From 2d8e3b678f18ce39926be0662eedb849b528e84c Mon Sep 17 00:00:00 2001 From: Hyrin-mansoor Date: Mon, 18 May 2026 10:54:10 +0300 Subject: [PATCH] feat: Add support for sending non-ERP questions directly to AI - Introduced a toggle in the settings to enable/disable sending non-ERP questions directly to AI. - Updated the TTS configuration to use 'Zayd' as the default voice ID. - Enhanced message rendering in the ChatMessage component using DOMPurify and marked for markdown support. - Modified the pipeline functions to accept a new parameter for sending non-ERP questions. - Added UI elements and styles for the new feature in the SettingsTab and ChatbotPopup components. - Improved logging for loading settings and error handling. --- .../api/v2/assets/business_keywords_v1.json | 63 ++- .../non_erp_combined.processed.cache.pkl | Bin 2496947 -> 2497089 bytes .../v2/assets/non_erp_combined.processed.json | 7 + .../changai/api/v2/text2sql_pipeline_v2.py | 501 ++++++++++++---- .../changai_settings/changai_settings.json | 9 +- .../prompts/sql_rewrite_sys_prompt.txt | 5 +- changai/changai/prompts/sql_system_prompt.txt | 131 +++-- changai/changai/prompts/sql_user_prompt.txt | 9 +- .../changai/prompts/support_sys_prompt.txt | 2 +- .../changai/prompts/user_friendly_prompt.txt | 4 +- changai/hooks.py | 22 +- changai/public/dist/changai-chatbot.css | 2 +- changai/public/dist/changai-chatbot.js | 89 ++- frontend/package-lock.json | 534 +++++++++++------- frontend/package.json | 2 + frontend/src/App.vue | 32 +- frontend/src/components/ChatMessage.vue | 42 +- frontend/src/components/ChatbotPopup.vue | 5 +- frontend/src/components/SettingsTab.vue | 29 +- frontend/src/tailwind.css | 65 ++- frontend/src/utils/frappe.js | 9 +- 21 files changed, 1106 insertions(+), 456 deletions(-) diff --git a/changai/changai/api/v2/assets/business_keywords_v1.json b/changai/changai/api/v2/assets/business_keywords_v1.json index 3658622..dba3dd6 100644 --- a/changai/changai/api/v2/assets/business_keywords_v1.json +++ b/changai/changai/api/v2/assets/business_keywords_v1.json @@ -20176,6 +20176,67 @@ "توازن حسن النية", "رصيد الاستثمار", "أسهم الخزينة", - "توازن مصالح الأقلية" + "توازن مصالح الأقلية", + "مبيعات", + "هذا الشهر", + "الشهر", + "عملاء", + "الإيرادات", + "مبيعات", + "غير مدفوعة", + "مبيعات", + "فواتير", + "الفواتير", + "الفواتير", + "عميل", + "المخزون", + "أصناف", + "إعادة الطلب", + "الأصناف", + "صنف", + "شراء", + "المشتريات", + "مبالغ مستحقة", + "الموردين", + "حضور", + "الموظفين", + "الحضور", + "مشاريع", + "ساعات عمل", + "موظف", + "مفتوحة", + "شراء", + "أوامر", + "متأخرة", + "مشاريع", + "صنف", + "تم بيعه", + "منخفض", + "أصناف", + "المخزون", + "أصناف", + "الإيرادات", + "الأرباح", + "عملاء", + "الشراء", + "فواتير", + "فواتير المبيعات", + "مبيعات", + "الطلبات", + "الطلبات المفتوحة", + "مشاريع", + "موعد التسليم", + "مورد", + "الموردين", + "مبلغ مستحق", + "المشتريات", + "منتجات", + "صنف", + "المخزون", + "إعادة الطلب", + "إجمالي", + "فاتورة", + "إيراد", + "ربح" ] } \ No newline at end of file diff --git a/changai/changai/api/v2/assets/non_erp_combined.processed.cache.pkl b/changai/changai/api/v2/assets/non_erp_combined.processed.cache.pkl index 1d95c918fe1e2b3259d204900ff8eed1cea753de..4724beef26f0908e964fac8ac565a12a2e22a7de 100644 GIT binary patch delta 179 zcmV;k08Ib0vzP(Fw3q>agaL#Cgad>Ggaw2Kga?EOgb9QSgbRcWgbjoagb#!egb{=i zgcF1mgcXDqgcpPugc*bygd2n$gdKz)gdc<;gdv0?gd>C`ge9~lW(EV(69AXs0udCK zFslL!w}=KNDHE5!V;%>WfGh_J0UVcbG9el%*q@YW28>eJquGYory$s<*sj@%*s<7* hAlS6ogV?dyr`d}j*@W4HA(ydb95e@7XbFgQWiEiJL^A*Y delta 110 zcmV~$%Mn9B0Dxh;l8r=OEI}UR#f*#5L`tC!hyRcc=)sYhoOO~?eBU&7Vi-EnAdr|W zSfW^Av1WtKmK}Qz9C2{bc=((M2#Gjz;mVDeggXzOym*t2S*^^EHrl^*yteG6{rjpc H*Rm>Rv;`qs diff --git a/changai/changai/api/v2/assets/non_erp_combined.processed.json b/changai/changai/api/v2/assets/non_erp_combined.processed.json index fcf47c5..77307b6 100644 --- a/changai/changai/api/v2/assets/non_erp_combined.processed.json +++ b/changai/changai/api/v2/assets/non_erp_combined.processed.json @@ -136855,5 +136855,12 @@ "response": "نعتذر عن هذا الانقطاع. يرجى تقديم بلاغ في تبويب الدعم وسيعمل فريقنا على استعادة الخدمة فوراً.", "priority": 90, "is_active": true + }, + { + "category": "system", + "user_input": "كيف حالك اليوم؟", + "response": "أنا بخير، شكراً لك! كيف يمكنني مساعدتك اليوم؟", + "priority": 90, + "is_active": true } ] \ No newline at end of file diff --git a/changai/changai/api/v2/text2sql_pipeline_v2.py b/changai/changai/api/v2/text2sql_pipeline_v2.py index 65bf3a1..864f2a3 100644 --- a/changai/changai/api/v2/text2sql_pipeline_v2.py +++ b/changai/changai/api/v2/text2sql_pipeline_v2.py @@ -161,7 +161,7 @@ def get_symspell(): frappe.logger().error(f"SymSpell loading NOW in PID: {os.getpid()}") - sym_spell = SymSpell(max_dictionary_edit_distance=2, prefix_length=7) + sym_spell = SymSpell(max_dictionary_edit_distance=4, prefix_length=7) dictionary_path = frappe.get_app_path( "changai", @@ -379,9 +379,32 @@ def load_field_matrix(): return docs, embs, table_to_idx +@frappe.whitelist(allow_guest=True) +def _get_cached_embedding_test(q: str) -> tuple: + t0=time.time() + # publish_pipeline_update( + # request_id, + # "embedding_start", + # "embedding started" + # ) + emb = get_embedding_engine() + emb_load_time = time.time() - t0 + + # publish_pipeline_update( + # request_id, + # "embedding_end", + # "get_embedding_engine ended" + # ) + t1 = time.time() + vec = emb.embed_query(q) + embed_query_time = time.time() - t1 + return emb_load_time,embed_query_time # tuple for hashability + def get_embedding_engine(): global _EMBEDDER_INSTANCE + if _EMBEDDER_INSTANCE is not None: + return _EMBEDDER_INSTANCE model_path = _get_model_path() # check path first, always @@ -434,8 +457,9 @@ def _build_frontend_settings_config() -> Dict[str, Any]: "gemini_json_content": settings.gemini_json_content, "enable_voice_chat": bool(settings.enable_voice_chat), "aws_region": aws_region, - "polly_voice_id": "Joanna", + "polly_voice_id": "Zayd", "polly_enabled": bool(settings.enable_voice_chat and aws_access_key_id and aws_secret_access_key), + "enable_changai": bool(settings.enable_changai) } @@ -489,6 +513,32 @@ def get_polly_client(config): ) return _POLLY_CLIENT +def build_ssml(text: str) -> str: + parts = [] + current = [] + current_lang = None + + for token in text.split(): + lang = "ar-AE" if re.search(r'[\u0600-\u06FF]', token) else "en-US" + + if current_lang is None: + current_lang = lang + + if lang != current_lang: + parts.append( + f'{" ".join(current)}' + ) + current = [token] + current_lang = lang + else: + current.append(token) + + if current: + parts.append( + f'{" ".join(current)}' + ) + + return "" + " ".join(parts) + "" @frappe.whitelist(allow_guest=False) def synthesize_tts(text: str, voice_id: Optional[str] = None) -> Dict[str, Any]: config = ChangAIConfig.get() @@ -508,14 +558,15 @@ def synthesize_tts(text: str, voice_id: Optional[str] = None) -> Dict[str, Any]: try: polly_client = get_polly_client(config) - voice = (voice_id or config.get("polly_voice_id") or "Joanna").strip() or "Joanna" + voice = (voice_id or config.get("polly_voice_id") or "Zayd").strip() or "Zayd" + ssml_text = build_ssml(cleaned_text) response = polly_client.synthesize_speech( - Text=cleaned_text, - OutputFormat="mp3", - VoiceId=voice, - Engine="neural", - TextType="text", - ) + Text=ssml_text, + OutputFormat="mp3", + VoiceId="Zayd", + Engine="neural", + TextType="ssml", +) stream = response.get("AudioStream") if stream is None: return {"ok": False, "error": "Polly did not return audio stream.", "provider": "browser"} @@ -908,6 +959,7 @@ def _safe_strip(v): # Shared State class SQLState(TypedDict, total=False): request_id: str + sendNonErptoAI:bool session_id: str question: str contains_values: bool @@ -932,14 +984,6 @@ class SQLState(TypedDict, total=False): selected_fields: str -def is_erp_query(q: str) -> tuple[bool, str]: - _init_keywords() - for word in q.lower().split(): - is_erp = _word_is_erp(word) - if is_erp: - return True - return False - def correct_spelling(text: str) -> str: sym = get_symspell() suggestions = sym.lookup_compound(text, max_edit_distance=2) @@ -950,24 +994,121 @@ def fill_sql_prompt(question: str, context: str) -> str: return SQL_PROMPT.format(question=question, context=context) +@lru_cache(maxsize=None) +def _word_is_erp(word: str) -> bool: + if len(word) <= 3: + return False + if word in _KEYWORDS_SET: + return True + for kw in _KEYWORDS_SET: + if word in kw or kw in word: + return True + if len(word) >= 4: + match = process.extractOne( + word, _KEYWORDS_LIST, scorer=fuzz.ratio, score_cutoff=85 + ) + if match: + return True + return False + +# def is_erp_query(q: str) -> bool: +# _init_keywords() +# for word in q.lower().split(): +# if _word_is_erp(word): +# return True +# return False + +STOP_WORDS = { + # English greetings / casual + "hi", "hello", "hey", "thanks", "thank", "please", "pls", + "ok", "okay", "yes", "no", "bye", "goodbye","have","has","had","do","does","did", + + # English question/helper words + "what", "which", "who", "whom", "whose", "where", "when", "why", "how", + "can", "could", "would", "should", "do", "does", "did", "is", "are", + "was", "were", "be", "been", "being", + + # English filler/common words + "the", "a", "an", "to", "for", "from", "of", "in", "on", "at", "by", + "with", "without", "and", "or", "but", "if", "then", "than", "as", + "this", "that", "these", "those", "it", "its", "there", "here", + + # English user command words + "show", "list", "give", "get", "find", "display", "tell", "me", + "need", "want", "make", "create", "check", "see", "view", + + # English time/common filters + "today", "yesterday", "tomorrow", "now", "current", "latest", + "last", "next", "this", "week", "month", "year", "daily", "weekly", + "monthly", "yearly", + + # Arabic greetings / casual + "مرحبا", "مرحبًا", "اهلا", "أهلا", "أهلًا", "السلام", "شكرا", "شكرًا", + "نعم", "لا", "طيب", "تمام", "مع السلامة", + + # Arabic question/helper words + "ما", "ماذا", "من", "متى", "أين", "اين", "كيف", "لماذا", "هل", "كم", + "أي", "اي", "الذي", "التي", "الذين", + + # Arabic filler/common words + "في", "من", "إلى", "الى", "على", "عن", "مع", "بدون", "و", "أو", "او", + "لكن", "إذا", "اذا", "ثم", "هذا", "هذه", "هؤلاء", "ذلك", "تلك", "هنا", + + # Arabic user command words + "اعرض", "عرض", "اظهر", "أظهر", "هات", "اعطني", "أعطني", "اريد", "أريد", + "احتاج", "ابحث", "تحقق", "شوف", + + # Arabic time/common filters + "اليوم", "أمس", "امس", "غدا", "غدًا", "الآن", "الان", "الحالي", + "الأخير", "الاخير", "هذا", "هذه", "الأسبوع", "الاسبوع", "الشهر", + "السنة", "العام", "يومي", "أسبوعي", "شهري", "سنوي", +} + + +def tokenize_mixed(text): + return re.findall(r'[\u0600-\u06FF]+|[a-zA-Z0-9]+', text.lower()) + + +@frappe.whitelist(allow_guest=True) +def is_erp_query(q: str): + words = tokenize_mixed(q) + + for word in words: + + if len(word) <= 2: + continue + + if word in STOP_WORDS: + continue + + match = process.extractOne( + word, + BUSINESS_KEYWORDS, + scorer=fuzz.ratio, + score_cutoff=80 + ) + + if match: + return True + + return False + + def guardrail_router(state: SQLState) -> SQLState: request_id = state.get("request_id") - raw_q = state.get("formatted_q") or state.get("question") or "" - q = str(raw_q).lower().strip() - q_corrected = correct_spelling(q) - is_erp= is_erp_query(q_corrected) + # q = str(raw_q).lower().strip() + # q_corrected = correct_spelling(q) + is_erp= is_erp_query(raw_q) query_type = "ERP" if is_erp else "NON_ERP" state["query_type"] = query_type publish_pipeline_update( request_id, - "question_rewrite_done", + "question_classify_done", "Query classified as " + query_type, data={"query_type": query_type} ) - - return state def send_non_erp_request(state: SQLState) -> SQLState: @@ -1098,39 +1239,104 @@ def get_table_vs(): # out.append(t) # return out -@frappe.whitelist(allow_guest=False) def check_memory_status() -> dict: return { - "pid": os.getpid(), # which worker answered + "pid": os.getpid(), + "module": __name__, + "file": __file__, "globals": { - "embedding_model": _EMBEDDER_INSTANCE is not None, - "table_vs": _VS_TABLE is not None, - "full_fields_vs": _FULL_FIELDS_VS is not None, - "field_docs": _FIELD_DOCS_CACHE is not None, - "field_embs": _FIELD_EMBS_CACHE is not None, - "table_to_idx": _TABLE_TO_IDX_CACHE is not None, - "master_vs": _VS_MASTER is not None, - "gemini_client": _GEMINI_CLIENT is not None, - "symspell": sym_spell is not None, - "keywords": _KEYWORDS_SET is not None, + "embedding_model": { + "loaded": _EMBEDDER_INSTANCE is not None, + "id": id(_EMBEDDER_INSTANCE), + }, + "table_vs": { + "loaded": _VS_TABLE is not None, + "id": id(_VS_TABLE), + }, + "full_fields_vs": { + "loaded": _FULL_FIELDS_VS is not None, + "id": id(_FULL_FIELDS_VS), + }, + "field_docs": { + "loaded": _FIELD_DOCS_CACHE is not None, + "id": id(_FIELD_DOCS_CACHE), + }, + "field_embs": { + "loaded": _FIELD_EMBS_CACHE is not None, + "id": id(_FIELD_EMBS_CACHE), + }, + "table_to_idx": { + "loaded": _TABLE_TO_IDX_CACHE is not None, + "id": id(_TABLE_TO_IDX_CACHE), + }, + "master_vs": { + "loaded": _VS_MASTER is not None, + "id": id(_VS_MASTER), + }, + "gemini_client": { + "loaded": _GEMINI_CLIENT is not None, + "id": id(_GEMINI_CLIENT), + }, + "symspell": { + "loaded": sym_spell is not None, + "id": id(sym_spell), + }, + "keywords": { + "loaded": _KEYWORDS_SET is not None, + "id": id(_KEYWORDS_SET), + }, } } - @lru_cache(maxsize=512) -def _get_cached_embedding(q: str) -> tuple: +def _get_cached_embedding(q: str, request_id: str) -> tuple: + publish_pipeline_update( + request_id, + "embedding_start", + "embedding started" + ) emb = get_embedding_engine() + publish_pipeline_update( + request_id, + "embedding_end", + "get_embedding_engine ended" + ) vec = emb.embed_query(q) + publish_pipeline_update( + request_id, + "embedding_query_done", + "embedding query done" + ) return tuple(vec) # tuple for hashability -def call_fvs_table_search(q: str) -> List[str]: +def call_fvs_table_search(q: str, request_id: str) -> List[str]: # get cached embedding - q_vec = np.array(_get_cached_embedding(q), dtype="float32") + publish_pipeline_update( + request_id, + "Inside the Table Search Function", + _("Inside the Table Search Function") + ) + q_vec = np.array(_get_cached_embedding(q,request_id), dtype="float32") # use FAISS index directly instead of similarity_search + publish_pipeline_update( + request_id, + "q_vec_ready", + _("q_vec_ready") + ) vs = get_table_vs() + publish_pipeline_update( + request_id, + "vs_ready", + _("vs_ready") + ) scores, indices = vs.index.search(q_vec.reshape(1, -1), k=20) + publish_pipeline_update( + request_id, + "index_search_done", + _("index_search_done") + ) out, seen = [], set() for idx in indices[0]: @@ -1169,7 +1375,7 @@ def build_hnsw_index(embeddings): def call_retrieve_multi_line(user_question: str, request_id: str) -> Dict[str, Any]: try: - top_tables = call_fvs_table_search(user_question) + top_tables = call_fvs_table_search(user_question, request_id) publish_pipeline_update( request_id, "table_retrieval_done", @@ -1178,7 +1384,8 @@ def call_retrieve_multi_line(user_question: str, request_id: str) -> Dict[str, A fields_candidates= call_fvs_field_search_global_k( user_question, selected_tables=top_tables, - k_total=40 + k_total=40, + request_id=request_id ) publish_pipeline_update( request_id, @@ -1200,7 +1407,8 @@ def call_retrieve_multi_line(user_question: str, request_id: str) -> Dict[str, A def call_fvs_field_search_global_k( user_question: str, selected_tables: List[str], - k_total: int = 20, + k_total: int = 40, + request_id: Optional[str] = None ) -> str: if not user_question or not selected_tables: @@ -1208,10 +1416,10 @@ def call_fvs_field_search_global_k( docs, embs, table_to_idx = load_field_matrix() - emb = get_embedding_engine() + # emb = get_embedding_engine() q_vec = np.array( - _get_cached_embedding(user_question), + _get_cached_embedding(user_question, request_id), dtype="float32" ) @@ -1382,24 +1590,11 @@ def remote_entity_embedder(q: str) -> Union[list, str]: return response -# @frappe.whitelist(allow_guest=False) -# def get_master_vs(): -# global _VS_MASTER -# if _VS_MASTER is None: -# emb = get_embedding_engine() -# if emb is None: -# frappe.throw(_(EMBEDDING_ENGINE_NONE_MESSG)) -# app_path = frappe.get_app_path("changai") -# master_vs_path = os.path.join(app_path, "changai", "api", "v2", "fvs_stores", "erpnext", "masterdata_fvs") -# if not os.path.exists(master_vs_path): -# frappe.throw(_("FAISS MASTER store not found at {0}").format(master_vs_path)) -# _VS_MASTER = FAISS.load_local(master_vs_path, emb, allow_dangerous_deserialization=True) -# return _VS_MASTER - settingsUrl = frappe.utils.get_url( "/app/changai-settings/ChangAI%20Settings" ) -@frappe.whitelist(allow_guest=False) + + def get_master_vs(): global _VS_MASTER try: @@ -1432,12 +1627,9 @@ def get_master_vs(): ) except Exception as e: frappe.log_error(f"Error loading master vector store: {e}", "ChangAI Master VS Load Error") - _VS_MASTER = None # Ensure it's return _VS_MASTER - -@frappe.whitelist() def local_entity_embedder(q: str) -> List[Dict[str, Any]]: hits = get_master_vs().similarity_search(q, k=15) out, seen = [], set() @@ -1450,7 +1642,6 @@ def local_entity_embedder(q: str) -> List[Dict[str, Any]]: out.append({"entity_type": entity_type, "entity_id": entity_id}) return out -@frappe.whitelist(allow_guest=False) def call_entity_retriever(qstn: str) -> Dict[str, Any]: config = ChangAIConfig.get() if config["REMOTE"] and config["llm"] == "QWEN3": @@ -1741,7 +1932,23 @@ def validate_sql_against_mapping( return result +def routeNonErpToAI(state: SQLState): + question= state["question"] + sys_prompt = """You are ChangAI, an intelligent assistant powered by ERPGulf. +The user has asked a general question that is not related to ERP. +Answer the question clearly and helpfully. +Always mention that you are ChangAI by ERPGulf when introducing yourself.""" + if frappe.utils.cint(state.get("sendNonErptoAI", 0)) == 1 or state.get("sendNonErptoAI") == "true": + try: + res = call_gemini(question,sys_prompt) + return {**state, "non_erp_res": res} + except Exceptiona as e: + return {**state, "non_erp_res": "Model Calling Failed .Please try Again","error":str(e)} + + else: + res= send_non_erp_request(state) + return res # Building the Workflow Graph @@ -1755,10 +1962,11 @@ def validate_sql_against_mapping( workflow.add_node("validate_sql",validate_sql) workflow.add_node("repair_sql",repair_sqlquery) workflow.add_node("send_non_erp_request",send_non_erp_request) +workflow.add_node("routeNonErpToAI",routeNonErpToAI) workflow.set_entry_point("guardrail_router") -workflow.add_conditional_edges("guardrail_router",route_guardrail,{"ERP":"rewrite_question","NON_ERP":"send_non_erp_request"}) +workflow.add_conditional_edges("guardrail_router",route_guardrail,{"ERP":"rewrite_question","NON_ERP":"routeNonErpToAI"}) # workflow.add_edge("guardrail_router", "rewrite_question") -workflow.add_edge("send_non_erp_request", END) +workflow.add_edge("routeNonErpToAI", END) workflow.add_edge("rewrite_question", "retrieve") workflow.add_edge("retrieve","detect_entities") workflow.add_conditional_edges("detect_entities", route_after_entities, {"CONTEXT":"build_context","DIRECT":"generate_sql"}) @@ -1852,10 +2060,11 @@ def to_json_if_needed(v: Any) -> Any: if isinstance(v, (dict, list)): return json.dumps(v, default=str, ensure_ascii=False) return v - + MAX_LOG_LEN = 140 doc = frappe.new_doc("ChangAI Logs") doc.user_question = user_question - doc.rewritten_question = formatted_q + safe_question=(formatted_q[:137] + "..." if len(formatted_q) > MAX_LOG_LEN else formatted_q) + doc.rewritten_question = safe_question doc.schema_retrieved = to_json_if_needed(context) doc.sql_generated = to_json_if_needed(sql) doc.validation = to_json_if_needed(val) @@ -1887,14 +2096,35 @@ def format_data(qstn: str, sql_data: Any) -> Dict[str, str]: db_result_json = str(sql_data) if sql_data is not None else "{}" sys_prompt = """ -INSTRUCTIONS: -- Convert raw database results into a short, friendly, human-readable answer. -- You may use BOTH: (1) the user question and (2) the DB result JSON to form the answer. +You are ChangAI, a warm and intelligent business assistant. +Your job is to turn raw database results into clear, friendly, human-readable answers. + +CONTENT RULES: +- Use BOTH the user question and the DB result JSON to form the answer. - Use ONLY values present in the JSON. NEVER invent numbers or fields. -- Keep the answer brief (1–6 lines). -- If the question asks for last/top/highest/total, interpret based strictly on the JSON rows. +- If result is empty, respond warmly and suggest refining the search. +- Do NOT mention SQL, tables, fields, JSON, reasoning, or steps. + +TONE & STYLE: +- Warm, conversational, and helpful — like a knowledgeable friend, not a report. +- If the question is in Arabic, reply in natural Arabic — not translated English. +- Never respond with a cold, empty, or robotic answer. + +FORMATTING: +- Start with ONE relevant emoji matching the topic (📦💰🧾👥📊📅🔍💤📉) +- For 3+ items, use a bullet list: • Item — value +- If list exceeds shown items, state exactly how many remain: e.g. + 3 أخرى +- Keep answers brief (1–6 lines). Lead with the direct answer, then light context. + +CLOSING: +- End with ONE short, relevant follow-up question to keep the conversation going. +- Make it feel natural, not robotic. e.g. "هل تريد تفاصيل أكثر عن أحد هؤلاء؟" +Never list names or items in a comma-separated line. Ever. OUTPUT: -Write a clear final answer for the user based strictly on the JSON above. +- Markdown ALLOWED: **bold**, • bullets, emojis +- No JSON. No code blocks. No labels. No explanations. +- Output ONLY the final user-facing answer. Nothing else. +- if the user question is in english reply in arbic only very improtant. """ user_prompt=f""" QUESTION: @@ -2236,11 +2466,12 @@ def debug_entity_retriever(q: str): } -def _invoke_pipeline(user_question: str, chat_id: str, request_id: str): +def _invoke_pipeline(user_question: str, chat_id: str, request_id: str,sendNonErptoAI:bool): initial_state: SQLState = { "question": user_question or "", "session_id": chat_id, "request_id": request_id, + "sendNonErptoAI":sendNonErptoAI } config = { "configurable": {"thread_id": chat_id}, @@ -2286,7 +2517,7 @@ def _handle_non_erp(final: SQLState, user_question: str, chat_id: str) -> Dict: def _get_sql_error_message(err: Any, val: Dict) -> str: if err: frappe.log_error(err, "ChangAI SQL Pipeline Error") - return "⚠️ The model encountered an error generating your query. Please try again." + return "⚠️ The model encountered an error generating your query. Please try the same Question again." error_text = (val.get("error") or "").strip() @@ -2308,7 +2539,7 @@ def _get_sql_error_message(err: Any, val: Dict) -> str: return f"⚠️ The model generated an invalid query. {error_text}" -def _handle_sql_result(sql_prompt:str,final: SQLState, sql: str, orm: str, formatted_q: str, fields: str, +def _handle_sql_result(memory_status: Dict,sql_prompt:str,final: SQLState, sql: str, orm: str, formatted_q: str, fields: str, selected_tables: List, val: Dict, entity_debug: Dict, user_question: str, chat_id: str) -> Dict: try: @@ -2342,6 +2573,8 @@ def _handle_sql_result(sql_prompt:str,final: SQLState, sql: str, orm: str, forma return {"error": str(e)} return { + "context":context, + "Memory Status":memory_status, "Question": user_question, "Formated Question":formatted_q, "SQL": sql, @@ -2358,8 +2591,9 @@ def _handle_sql_result(sql_prompt:str,final: SQLState, sql: str, orm: str, forma @frappe.whitelist(allow_guest=False) -def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str) -> Dict: - final, err_response = _invoke_pipeline(user_question, chat_id, request_id) +def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str,sendNonErptoAI=0) -> Dict: + memory_status = check_memory_status() + final, err_response = _invoke_pipeline(user_question, chat_id, request_id,sendNonErptoAI) if err_response: return err_response entity_debug = { @@ -2386,6 +2620,7 @@ def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str) -> if not res.get("ok") or not sql.upper().startswith("SELECT"): context = (final.get("context") or final.get("selected_fields") or "")[:800] return { + "Memory Status":memory_status, "Question": user_question, "Formatted_Question": formatted_q, "Context": context, @@ -2398,9 +2633,10 @@ def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str) -> "Error": err or "SQL not valid or missing", "Result": [], "Bot": _get_sql_error_message(err, res), + } - return _handle_sql_result(sql_prompt, final, sql, orm, formatted_q, fields, selected_tables, res, entity_debug, user_question, chat_id) + return _handle_sql_result(memory_status, sql_prompt, final, sql, orm, formatted_q, fields, selected_tables, res, entity_debug, user_question, chat_id) @@ -2414,10 +2650,15 @@ def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str) -> # return standalone, contains_values # except Exception as e: # print(f"Error during model call: {e}") - - +_WARMUP_COUNT=0 +@frappe.whitelist(allow_guest=True) def load_on_startup(): - global _EMBEDDER_INSTANCE, _VS_TABLE, _FULL_FIELDS_VS, _VS_MASTER, _FIELD_DOCS_CACHE, sym_spell, _GEMINI_CLIENT + global _WARMUP_COUNT,_EMBEDDER_INSTANCE, _VS_TABLE, _FULL_FIELDS_VS, _VS_MASTER, _FIELD_DOCS_CACHE, sym_spell, _GEMINI_CLIENT + _WARMUP_COUNT+=1 + frappe.log_error( + title=f"ChangAI Warmup called | PID {os.getpid()} | Count {_WARMUP_COUNT}", + message="load_on_startup triggered" + ) # If all are already loaded, skip if all([ @@ -2429,12 +2670,14 @@ def load_on_startup(): sym_spell is not None, _GEMINI_CLIENT is not None, ]): - return - try: frappe.log_error( - title="ChangAI Warmup started", - message=frappe.get_traceback() # full stack trace + title=f"ChangAI Warmup skipped | PID {os.getpid()}", + message="Already loaded in this worker" ) + return + message=f"PID={os.getpid()} | module={__name__} | file={__file__} | loaded={_EMBEDDER_INSTANCE is not None} | id={id(_EMBEDDER_INSTANCE)}" + + try: get_symspell() get_embedding_engine() get_table_vs() @@ -2442,7 +2685,6 @@ def load_on_startup(): gemini_client() get_master_vs() _init_keywords() - frappe.logger().info("ChangAI: All components loaded into memory") config = ChangAIConfig.get() get_polly_client(config) frappe.log_error( @@ -2454,6 +2696,7 @@ def load_on_startup(): title="ChangAI Warmup Failed", message=frappe.get_traceback() # full stack trace ) + return message def _init_keywords(): @@ -2465,35 +2708,7 @@ def _init_keywords(): # ✅ pre-warm cache — run every keyword through _word_is_erp at startup for kw in _KEYWORDS_LIST: _word_is_erp(kw) # result gets cached — first real request is instant - - -@lru_cache(maxsize=None) -def _word_is_erp(word: str) -> tuple[bool, str]: - """Returns (is_erp, matched_keyword)""" - if len(word) <= 3: - return False - - # 1. exact - if word in _KEYWORDS_SET: - return True - - # 2. substring - for kw in _KEYWORDS_SET: - if word in kw or kw in word: - return True - - # 3. fuzzy - if len(word) >= 4: - match = process.extractOne( - word, - _KEYWORDS_LIST, - scorer=fuzz.ratio, - score_cutoff=85 - ) - if match: - return True - - return False, "" + @frappe.whitelist(allow_guest=False) def test(): @@ -2503,4 +2718,54 @@ def test(): meta = frappe.get_meta(doc) title_field = meta.title_field result.append((doc, title_field)) - return result \ No newline at end of file + return result + + +@frappe.whitelist(allow_guest=True) +def get_embedding_engine_test(): + global _EMBEDDER_INSTANCE + import time, os + + before_id = id(_EMBEDDER_INSTANCE) + before_loaded = _EMBEDDER_INSTANCE is not None + + if _EMBEDDER_INSTANCE is not None: + return { + "before_loaded": before_loaded, + "before_id": before_id, + "pid": os.getpid(), + "result": "returned_cached" + } + + t3 = time.time() + model_path = _get_model_path() + + _EMBEDDER_INSTANCE = HuggingFaceEmbeddings( + model_name=model_path, + model_kwargs={"device": "cpu", "trust_remote_code": True}, + encode_kwargs={"normalize_embeddings": True}, + ) + + return { + "before_loaded": before_loaded, + "before_id": before_id, + "after_loaded": _EMBEDDER_INSTANCE is not None, + "after_id": id(_EMBEDDER_INSTANCE), + "pid": os.getpid(), + "load_time": time.time() - t3, + "result": "loaded_now" + } + + +@frappe.whitelist(allow_guest=True) +def test_guardrail_router(question: str): + raw_q = (question or "").lower().strip() + q_corrected = correct_spelling(raw_q) + is_erp = is_erp_query(q_corrected) + query_type = "ERP" if is_erp else "NON_ERP" + + return { + "original": question, + "corrected": q_corrected, + "query_type": query_type, + } \ No newline at end of file diff --git a/changai/changai/doctype/changai_settings/changai_settings.json b/changai/changai/doctype/changai_settings/changai_settings.json index 222ae14..17cdfa1 100644 --- a/changai/changai/doctype/changai_settings/changai_settings.json +++ b/changai/changai/doctype/changai_settings/changai_settings.json @@ -6,6 +6,7 @@ "engine": "InnoDB", "field_order": [ "server_section", + "enable_changai", "remote", "from_language", "to_language", @@ -379,13 +380,19 @@ "fieldname": "last_masterdata_sync", "fieldtype": "Datetime", "label": "Last Master data sync " + }, + { + "default": "1", + "fieldname": "enable_changai", + "fieldtype": "Check", + "label": "Enable changAI" } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "issingle": 1, "links": [], - "modified": "2026-05-07 10:34:23.772823", + "modified": "2026-05-18 07:06:57.303210", "modified_by": "Administrator", "module": "Changai", "name": "ChangAI Settings", diff --git a/changai/changai/prompts/sql_rewrite_sys_prompt.txt b/changai/changai/prompts/sql_rewrite_sys_prompt.txt index 28b3307..79ec99b 100644 --- a/changai/changai/prompts/sql_rewrite_sys_prompt.txt +++ b/changai/changai/prompts/sql_rewrite_sys_prompt.txt @@ -77,5 +77,6 @@ STRICT RULES: - Never invent schema elements. - Always return any one clear user-readable business field, not only technical IDs, unless explicitly requested. - If the query is ambiguous, ask for clarification and set "clarify": true. -- this is very importnat. Do not map user intent to non-existent fields. If the user asks for something like "status" or "active customers" but the schema does not have a column literally named status, do not substitute it with a guessed equivalent. Instead, look at what columns actually exist in the schema and either use the correct matching column if it clearly corresponds, or inform the user that the exact field is not in the schema. - +- this is very important.Do not map user intent to non-existent fields. If the user asks for something like "status" or "active customers" but the schema does not have a column literally named status, do not substitute it with a guessed equivalent. Instead, look at what columns actually exist in the schema and either use the correct matching column if it clearly corresponds, or inform the user that the exact field is not in the schema. +- Preserve ERPNext business semantics during rewriting and avoid converting ERPNext document lifecycle terms into generic workflow or approval terminology that may change the original meaning. +- if the user question is in Arabic translate and rewrite into English ERPNext questions, preserve the original ERP business meaning and document lifecycle semantics in english. \ No newline at end of file diff --git a/changai/changai/prompts/sql_system_prompt.txt b/changai/changai/prompts/sql_system_prompt.txt index c943321..b2ba2e6 100644 --- a/changai/changai/prompts/sql_system_prompt.txt +++ b/changai/changai/prompts/sql_system_prompt.txt @@ -1,57 +1,79 @@ -You are a strict MariaDB SQL and Frappe ORM query generator. +You are a RESTRICTED MariaDB SQL and Frappe ORM generator. +You have NO knowledge of ERPNext, databases, or any schema beyond what is written in SCHEMA CONTEXT. +SCHEMA CONTEXT is your entire universe. Nothing outside it exists. -TASK: Generate EXACTLY one executable MariaDB SELECT query AND one equivalent Frappe ORM query that correctly answers the USER QUESTION. +═══ FIELD & TABLE LAW (ABSOLUTE — ZERO EXCEPTIONS) ═══ +BEFORE writing any field or table name, locate it physically in SCHEMA CONTEXT. + FOUND → you may use it, only under the table it is listed. + NOT FOUND → it does not exist. Do not write it. Do not guess it. Do not remember it. -═══ SCHEMA GROUNDING (ABSOLUTE) ═══ -- Use ONLY tables and fields that exist EXACTLY in SCHEMA CONTEXT. -- A field may ONLY be used with the table it belongs to in SCHEMA CONTEXT. -- If a required field/table is missing from SCHEMA CONTEXT, omit it or return empty string. +- A field listed under tabCustomer CANNOT appear in a query on tabSales Order unless + an explicit JOIN exists via a link field in SCHEMA CONTEXT. +- JOIN is only allowed if SCHEMA CONTEXT explicitly shows a link field (→) between the two tables. +- Do NOT assume any relationship between tables. If no link field exists → no JOIN. +- SELECT * is forbidden. Every field must be named and verified in SCHEMA CONTEXT. +- Never use any fields or tables that are not given in SCHEMA CONTEXT. +- Never assume fields. Only use the fields and tables that exist in SCHEMA CONTEXT. - SELECT * is forbidden. Always use explicit fields. +- NEVER return empty sql. Always generate the best possible SELECT query using the closest available fields and tables from SCHEMA CONTEXT. + +═══ SELF-CHECK PROTOCOL (MANDATORY BEFORE OUTPUT) ═══ +For every field in your SQL, answer internally: + Q: Is this field listed under THIS exact table in SCHEMA CONTEXT? + YES → keep it. + NO → remove it immediately. No exceptions. + +For every table in your SQL, answer internally: + Q: Is this table present in SCHEMA CONTEXT? + YES → keep it. + NO → remove it immediately. No exceptions. ═══ ENTITY FILTERING ═══ -- If ENTITY_CARD exists, use ONLY those exact entity values (no case/spelling changes) in both SQL and ORM. +- If ENTITY_CARDS exist, use ONLY those exact values (no spelling/case changes). - NEVER use entity string literals from the user question directly. +- Match user-mentioned names to the closest ENTITY_CARD using fuzzy/semantic matching. + Account for typos, abbreviations, and partial names. +- Always use the exact entity card value in SQL and ORM. -═══ DOCSTATUS RULE ═══ -- For queries needing filtering with submitted, draft or cancelled use docstatus. -- Draft = docstatus = 0 | Submitted = docstatus = 1 | Cancelled = docstatus = 2 -- NEVER use `status` for these states. docstatus has absolute priority. -- All business data queries (sales, purchase, revenue, stock) MUST filter docstatus = 1. -- docstatus = 0 → ONLY when user says "draft" -- docstatus = 1 → ONLY when user says "submitted" -- docstatus = 2 → ONLY when user says "cancelled" -- For ALL other status words (pending, on hold, overdue, closed, approved, rejected, completed, open) → use the `status` field, NOT docstatus. -- If the schema provides status field options → match the user's word to the closest option value. -- Many master doctypes (Employee, Customer, Item, Supplier, etc.) are non-submittable and normally remain docstatus = 0. Use docstatus filters only when appropriate for the doctype. -- Any document that goes through a Draft → Submit → Cancel cycle has a docstatus field. - -═══ ABSOLUTE CONSTRAINTS (NO EXCEPTIONS) ═══ -1. Use ONLY tables and fields that appear EXACTLY in SCHEMA CONTEXT. -2. A field may ONLY be used with the table it belongs to in SCHEMA CONTEXT. -3. JOIN tables ONLY if SCHEMA CONTEXT explicitly provides a join key (join_hint / link field). -4. Do NOT assume ERP relationships unless present in SCHEMA CONTEXT. -5. Do NOT hallucinate tables or fields. +═══ DOCSTATUS LAW ═══ +- docstatus ONLY exists on submittable transaction doctypes: + Sales Invoice, Sales Order, Purchase Order, Purchase Invoice, + Payment Entry, Journal Entry, Stock Entry, Delivery Note, + Purchase Receipt, Work Order, Timesheet, Expense Claim. +- docstatus NEVER exists on master doctypes: + Customer, Supplier, Item, Employee, Warehouse, Territory, + Address, Contact, User, Item Group, Customer Group. +- NEVER add docstatus to a master doctype query under any circumstance. +- Values: 0 = Draft | 1 = Submitted | 2 = Cancelled +- Any transactional document that goes through a Draft → Submit → Cancel cycle has a docstatus field. +- Default for all business data queries (sales, purchase, stock, finance): docstatus = 1 +- docstatus = 0 → ONLY when user explicitly says "draft" +- docstatus = 1 → ONLY when user explicitly says "submitted" +- docstatus = 2 → ONLY when user explicitly says "cancelled" +- NEVER use `status` field to represent Draft/Submitted/Cancelled states. docstatus has absolute priority. ═══ MARIADB COMPATIBILITY (ZERO TOLERANCE) ═══ -FORBIDDEN TOKENS — NEVER USE UNDER ANY CIRCUMSTANCE: -STRFTIME, DATE_TRUNC, ::, ILIKE, TO_CHAR, NOW()::, EXTRACT, INTERVAL 'x' +FORBIDDEN — NEVER USE UNDER ANY CIRCUMSTANCE: + STRFTIME, DATE_TRUNC, ::, ILIKE, TO_CHAR, NOW()::, EXTRACT, INTERVAL 'x' ALLOWED DATE PATTERNS ONLY: -- This month: MONTH(col) = MONTH(CURDATE()) AND YEAR(col) = YEAR(CURDATE()) -- Date math: DATE_SUB(date, INTERVAL n UNIT) — never DATE_SUB(date, n, UNIT) -- Filtering: YEAR(), MONTH(), QUARTER(), LAST_DAY(), CURDATE() + This month : MONTH(col) = MONTH(CURDATE()) AND YEAR(col) = YEAR(CURDATE()) + Date range : col BETWEEN DATE_SUB(CURDATE(), INTERVAL n DAY) AND CURDATE() + Date math : DATE_SUB(date, INTERVAL n UNIT) — never DATE_SUB(date, n, UNIT) + Filtering : YEAR(), MONTH(), QUARTER(), LAST_DAY(), CURDATE() FOR "THIS MONTH" — USE ONLY ONE OF: A. (MONTH(date_col) = MONTH(CURDATE()) AND YEAR(date_col) = YEAR(CURDATE())) B. (date_col BETWEEN DATE_SUB(CURDATE(), INTERVAL DAYOFMONTH(CURDATE())-1 DAY) AND LAST_DAY(CURDATE())) -- If you are about to output any forbidden token, you MUST REWRITE using MariaDB equivalents. -- If you cannot express date logic using MariaDB functions, you MUST NOT output a query with forbidden tokens. +If you are about to write a forbidden token → STOP → rewrite using MariaDB equivalents. ═══ SCHEMA RANKING AWARENESS ═══ -- SCHEMA CONTEXT is retrieved via semantic search — relevant tables/fields may appear low in the list due to weak retrieval ranking. Do NOT treat rank as relevance. -- You MUST scan the ENTIRE SCHEMA CONTEXT before selecting tables and fields. -- Choose the most semantically correct table/field for the question even if it appears last in SCHEMA CONTEXT. +- SCHEMA CONTEXT is retrieved via semantic search — relevant tables/fields may appear + low in the list due to weak retrieval ranking. Do NOT treat rank as relevance. +- Scan the ENTIRE SCHEMA CONTEXT before selecting any table or field. +- Choose the most semantically correct table/field for the question + even if it appears last in SCHEMA CONTEXT. - Ranking is a retrieval artifact. Correctness is your responsibility. ═══ STATUS MAPPING ═══ @@ -61,23 +83,26 @@ FOR "THIS MONTH" — USE ONLY ONE OF: - pending invoice → outstanding_amount > 0 → unpaid invoice → overdue invoice. - Always include docstatus = 1 in any query where you want only real, valid, posted transactions. -═══ FORMAT RULES ═══ -- Output ONLY SQL and ORM. No explanation. -- Start SQL with SELECT and end with ; -- Uppercase SQL keywords. -- Wrap EVERY table name in backticks exactly as in SCHEMA CONTEXT. -- Raw JSON only. No escaping, no explanation. -- When filtering multiple values on the same field, always use IN (...) instead of OR conditions. - -═══ SYNTAX RULES ═══ -- NEVER use multiple OR conditions on the same field → always use IN (...) -- NEVER combine OR and AND without wrapping OR in parentheses -- ALWAYS verify operator precedence: AND binds before OR -- NEVER assume execution success means correct results -- Before outputting SQL, verify: correct operator precedence, no missing filters, and logic matches the original question exactly. -Make sure the sql you give for the user question is 100% correct.becuase sometimes you give bad sql that desonot accurely answers the user question. -Never use any fields or tables that is not given in the above schema.never assume fields.only use the fields and tables that exist in the schema. -═══ OUTPUT FORMAT ═══ +═══ SYNTAX LAW ═══ +- Multiple values on same field → always IN (...), never chained OR. +- OR combined with AND → always wrap OR in parentheses. +- AND binds before OR — always verify operator precedence. +- Wrap EVERY table name in backticks exactly as written in SCHEMA CONTEXT. +- Uppercase all SQL keywords. +- SQL must start with SELECT and end with ; +- Before outputting SQL, verify: correct operator precedence, no missing filters, + and logic matches the original question exactly. +- Make sure the SQL you generate is 100% correct because sometimes models generate + bad SQL that does not accurately answer the user question. +═══ NULL SQL = CRITICAL FAILURE ═══ +sql: "" or sql: null is NEVER allowed. Ever. No exception. No excuse. +If perfect is impossible → drop bad fields → drop bad JOINs → drop bad filters → output the best partial SELECT from what remains. +A partial query is always correct. An empty query is always wrong. +THERE IS NO VALID REASON TO RETURN EMPTY SQL. +═══ OUTPUT LAW ═══ +NEVER return empty sql. Always generate the best possible perfect SELECT query using the closest available fields and tables from SCHEMA CONTEXT. +- Output ONLY raw JSON. No explanation. No markdown. No extra keys. +- Format: { "sql": "", "orm": "" diff --git a/changai/changai/prompts/sql_user_prompt.txt b/changai/changai/prompts/sql_user_prompt.txt index 105e12c..57c7310 100644 --- a/changai/changai/prompts/sql_user_prompt.txt +++ b/changai/changai/prompts/sql_user_prompt.txt @@ -1,3 +1,8 @@ USER QUESTION: {question} - -SCHEMA CONTEXT: {context} \ No newline at end of file +You are FORBIDDEN from using any table or field that is not explicitly listed in the SCHEMA CONTEXT. No exceptions. +SCHEMA CONTEXT: {context} +GENERIC FIELDS (available on ALL transaction doctypes): +name, creation, modified, owner, company, docstatus, naming_series, amended_from +GENERIC FIELDS (available on ALL master doctypes): +name, creation, modified, owner, disabled, naming_series +REMINDER: Use only fields from SCHEMA CONTEXT. diff --git a/changai/changai/prompts/support_sys_prompt.txt b/changai/changai/prompts/support_sys_prompt.txt index 91e258e..d1cb53f 100644 --- a/changai/changai/prompts/support_sys_prompt.txt +++ b/changai/changai/prompts/support_sys_prompt.txt @@ -22,4 +22,4 @@ Rules: - Use double quotes for all keys and values. - Do not use single quotes. - Do not include markdown or explanation. -- Return ONLY valid JSON. No extra text. \ No newline at end of file +- Return ONLY valid JSON. No extra text. diff --git a/changai/changai/prompts/user_friendly_prompt.txt b/changai/changai/prompts/user_friendly_prompt.txt index 9400238..27ada36 100644 --- a/changai/changai/prompts/user_friendly_prompt.txt +++ b/changai/changai/prompts/user_friendly_prompt.txt @@ -19,5 +19,5 @@ TASK: Write a short business-friendly summary (1–2 sentences) that explains the result meaningfully. - Use simple language - Do not mention SQL, tables, fields, tags, reasoning, or steps -- Do not output anything other than the final summary - +- Do not output anything other than the final user-freindly summary +if the user question is in arbic make the final summary comppleetly in arbaic full. diff --git a/changai/hooks.py b/changai/hooks.py index 0840198..01d6ad2 100644 --- a/changai/hooks.py +++ b/changai/hooks.py @@ -170,17 +170,17 @@ # --------------- # Hook on document methods and events -doc_events = { -"Employee": { - "on_update": "changai.changai.api.v2.create_qr.create_qr_code", - - }, -# "*": { -# "on_update": "method", -# "on_cancel": "method", -# "on_trash": "method" -# } -} +# doc_events = { +# "Employee": { +# "on_update": "changai.changai.api.v2.create_qr.create_qr_code", + +# }, +# # "*": { +# # "on_update": "method", +# # "on_cancel": "method", +# # "on_trash": "method" +# # } +# } # also runs after bench migrate on_session_creation = [ diff --git a/changai/public/dist/changai-chatbot.css b/changai/public/dist/changai-chatbot.css index 689792c..c06a0ef 100644 --- a/changai/public/dist/changai-chatbot.css +++ b/changai/public/dist/changai-chatbot.css @@ -1 +1 @@ -/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-300:oklch(82.8% .111 230.318);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-300:oklch(78.5% .115 274.713);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-700:oklch(49.1% .27 292.581);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-100:oklch(96.7% .003 264.542);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-500:#6d4fc2;--color-brand-600:#5f44ad;--color-brand-50:#f6f2ff;--animate-gemini-arc:gemini-arc 1.35s cubic-bezier(.4, 0, .2, 1) infinite;--animate-gemini-spark:gemini-spark 1.45s cubic-bezier(.34, 1.56, .64, 1) infinite;--animate-soft-float:soft-float 4.8s ease-in-out infinite;--animate-surface-in:surface-in .32s cubic-bezier(.22, 1, .36, 1);--animate-fade-rise:fade-rise .28s cubic-bezier(.16, 1, .3, 1);--animate-stop-button-pulse:stop-button-pulse 1.65s cubic-bezier(.22, 1, .36, 1) infinite}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}#changai-chatbot-root,#changai-chatbot-root *{box-sizing:border-box}#changai-chatbot-root{color:#0f172a;font-family:Plus Jakarta Sans,Segoe UI,Helvetica Neue,sans-serif}#changai-chatbot-root button,#changai-chatbot-root input,#changai-chatbot-root textarea,#changai-chatbot-root select{font:inherit}#changai-chatbot-root button{appearance:none;background-clip:padding-box;border:0}#changai-chatbot-root button.rounded-full,#changai-chatbot-root form.rounded-full{border-radius:9999px}#changai-chatbot-root button.rounded-md{border-radius:.375rem}#changai-chatbot-root button.rounded-lg{border-radius:.5rem}#changai-chatbot-root .chat-scrollbar{scrollbar-width:auto;scrollbar-color:#6d4fc2ad #6d4fc229;scrollbar-gutter:stable}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar{width:10px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-track{background:#6d4fc21f;border-radius:9999px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-thumb{background:linear-gradient(#6d4fc2c7,#6d4fc26b);border:2px solid #6d4fc21f;border-radius:9999px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-thumb:hover{background:linear-gradient(#6d4fc2e6,#6d4fc285)}#changai-chatbot-root .chat-shell{background:radial-gradient(120% 120% at 100% 0,#6d4fc21a,#6d4fc200 58%),radial-gradient(120% 120% at 0 100%,#6d4fc20f,#6d4fc200 55%),#fff}#changai-chatbot-root .chat-card{background:linear-gradient(#fffffff2,#f8fafceb);border:1px solid #94a3b833;box-shadow:0 12px 35px -28px #0f172a73}@media (prefers-reduced-motion:reduce){#changai-chatbot-root *,#changai-chatbot-root :before,#changai-chatbot-root :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-14{top:calc(var(--spacing) * -14)}.top-0\.5{top:calc(var(--spacing) * .5)}.-right-14{right:calc(var(--spacing) * -14)}.right-0{right:calc(var(--spacing) * 0)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-14{bottom:calc(var(--spacing) * -14)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-\[74px\]{bottom:74px}.bottom-\[calc\(90px\+env\(safe-area-inset-bottom\)\)\]{bottom:calc(90px + env(safe-area-inset-bottom))}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-\[1\.45rem\]{left:1.45rem}.z-20{z-index:20}.z-9999,.z-\[9999\]{z-index:9999}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-7{height:calc(var(--spacing) * 7)}.h-7\.5{height:calc(var(--spacing) * 7.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-32{height:calc(var(--spacing) * 32)}.h-36{height:calc(var(--spacing) * 36)}.h-\[min\(86vh\,860px\)\]{height:min(86vh,860px)}.h-\[min\(560px\,72vh\)\]{height:min(560px,72vh)}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-screen{max-height:100vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-14{min-height:calc(var(--spacing) * 14)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7\.5{width:calc(var(--spacing) * 7.5)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-\[min\(50vw\,860px\)\]{width:min(50vw,860px)}.w-\[min\(360px\,calc\(100vw-40px\)\)\]{width:min(360px,100vw - 40px)}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-\[85\%\]{max-width:85%}.max-w-\[92\%\]{max-width:92%}.max-w-\[calc\(100\%-2\.5rem\)\]{max-width:calc(100% - 2.5rem)}.max-w-full{max-width:100%}.max-w-screen{max-width:100vw}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-8{min-width:calc(var(--spacing) * 8)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.origin-center{transform-origin:50%}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/5{--tw-translate-x: 20% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-8{--tw-translate-y:calc(var(--spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.animate-gemini-arc{animation:var(--animate-gemini-arc)}.animate-gemini-spark{animation:var(--animate-gemini-spark)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[10px_10px_10px_3px\]{border-radius:10px 10px 10px 3px}.rounded-\[13px_13px_3px_13px\]{border-radius:13px 13px 3px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.rounded-b-\[10px\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-rose-100{border-color:var(--color-rose-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/80{border-color:color-mix(in oklab,var(--color-slate-200) 80%,transparent)}}.border-slate-200\/90{border-color:#e2e8f0e6}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/90{border-color:color-mix(in oklab,var(--color-slate-200) 90%,transparent)}}.border-transparent{border-color:#0000}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.border-t-\[\#4b89ff\]{border-top-color:#4b89ff}.border-r-\[\#4b89ff\]\/70{border-right-color:#4b89ffb3}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500\/45{background-color:#f99c0073}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/45{background-color:color-mix(in oklab,var(--color-amber-500) 45%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500\/15{background-color:#6d4fc226}@supports (color:color-mix(in lab,red,red)){.bg-brand-500\/15{background-color:color-mix(in oklab,var(--color-brand-500) 15%,transparent)}}.bg-emerald-500\/45{background-color:#00bb7f73}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/45{background-color:color-mix(in oklab,var(--color-emerald-500) 45%,transparent)}}.bg-emerald-500\/95{background-color:#00bb7ff2}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/95{background-color:color-mix(in oklab,var(--color-emerald-500) 95%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50\/60{background-color:#f8fafc99}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/60{background-color:color-mix(in oklab,var(--color-slate-50) 60%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-500\/35{background-color:#62748e59}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/35{background-color:color-mix(in oklab,var(--color-slate-500) 35%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-400\/15{background-color:#a685ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-400\/15{background-color:color-mix(in oklab,var(--color-violet-400) 15%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/24{background-color:#ffffff3d}@supports (color:color-mix(in lab,red,red)){.bg-white\/24{background-color:color-mix(in oklab,var(--color-white) 24%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\/95{background-color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-brand-500{--tw-gradient-from:var(--color-brand-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-brand-600{--tw-gradient-from:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-300\/36{--tw-gradient-from:#c4b4ff5c}@supports (color:color-mix(in lab,red,red)){.from-violet-300\/36{--tw-gradient-from:color-mix(in oklab, var(--color-violet-300) 36%, transparent)}}.from-violet-300\/36{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-brand-500{--tw-gradient-via:var(--color-brand-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-300\/30{--tw-gradient-via:#a4b3ff4d}@supports (color:color-mix(in lab,red,red)){.via-indigo-300\/30{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-300) 30%, transparent)}}.via-indigo-300\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/92{--tw-gradient-via:#ffffffeb}@supports (color:color-mix(in lab,red,red)){.via-white\/92{--tw-gradient-via:color-mix(in oklab, var(--color-white) 92%, transparent)}}.via-white\/92{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-brand-600{--tw-gradient-to:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-300\/28{--tw-gradient-to:#77d4ff47}@supports (color:color-mix(in lab,red,red)){.to-sky-300\/28{--tw-gradient-to:color-mix(in oklab, var(--color-sky-300) 28%, transparent)}}.to-sky-300\/28{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-400{--tw-gradient-to:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white\/0{--tw-gradient-to:#0000}@supports (color:color-mix(in lab,red,red)){.to-white\/0{--tw-gradient-to:color-mix(in oklab, var(--color-white) 0%, transparent)}}.to-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-white{fill:var(--color-white)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-\[calc\(12px\+env\(safe-area-inset-bottom\)\)\]{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.01em\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.wrap-anywhere{overflow-wrap:anywhere}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#3a67c9\]{color:#3a67c9}.text-\[\#4b89ff\]{color:#4b89ff}.text-amber-700{color:var(--color-amber-700)}.text-black{color:var(--color-black)}.text-blue-700{color:var(--color-blue-700)}.text-brand-600{color:var(--color-brand-600)}.text-current\/80{color:currentColor}@supports (color:color-mix(in lab,red,red)){.text-current\/80{color:color-mix(in oklab,currentcolor 80%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-rose-600{color:var(--color-rose-600)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-45{opacity:.45}.opacity-95{opacity:.95}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_10px_rgba\(20\,24\,40\,0\.22\)\]{--tw-shadow:0 4px 10px var(--tw-shadow-color,#14182838);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_20px_-12px_rgba\(159\,18\,57\,0\.35\)\]{--tw-shadow:0 8px 20px -12px var(--tw-shadow-color,#9f123959);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_18px_-12px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 10px 18px -12px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_20px_-18px_rgba\(220\,38\,38\,0\.9\)\]{--tw-shadow:0 10px 20px -18px var(--tw-shadow-color,#dc2626e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_24px_-16px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 10px 24px -16px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_26px_-20px_rgba\(15\,23\,42\,0\.7\)\]{--tw-shadow:0 12px 26px -20px var(--tw-shadow-color,#0f172ab3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_14px_26px_-16px_rgba\(15\,23\,42\,0\.65\)\]{--tw-shadow:0 14px 26px -16px var(--tw-shadow-color,#0f172aa6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_14px_30px_-18px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 14px 30px -18px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_36px_-20px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 20px 36px -20px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_32px_80px_-44px_rgba\(2\,6\,23\,0\.7\)\,0_18px_40px_-24px_rgba\(15\,23\,42\,0\.45\)\]{--tw-shadow:0 32px 80px -44px var(--tw-shadow-color,#020617b3), 0 18px 40px -24px var(--tw-shadow-color,#0f172a73);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-200{--tw-ring-color:var(--color-blue-200)}.ring-red-200{--tw-ring-color:var(--color-red-200)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media (hover:hover){.group-hover\:bg-white\/70:is(:where(.group):hover *){background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/70:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.focus-within\:-translate-y-0\.5:focus-within{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\:shadow-\[0_18px_30px_-20px_rgba\(13\,110\,253\,0\.5\)\]:focus-within{--tw-shadow:0 18px 30px -20px var(--tw-shadow-color,#0d6efd80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-brand-500\/25:focus-within{--tw-ring-color:#6d4fc240}@supports (color:color-mix(in lab,red,red)){.focus-within\:ring-brand-500\/25:focus-within{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 25%, transparent)}}@media (hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-green-300:hover{border-color:var(--color-green-300)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\:border-white\/25:hover{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/25:hover{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-white\/12:hover{background-color:#ffffff1f}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/12:hover{background-color:color-mix(in oklab,var(--color-white) 12%,transparent)}}.hover\:bg-white\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/15:hover{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.hover\:bg-white\/25:hover{background-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/25:hover{background-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.hover\:from-brand-600:hover{--tw-gradient-from:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-violet-700:hover{--tw-gradient-to:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-brand-600:hover{color:var(--color-brand-600)}.hover\:text-current:hover{color:currentColor}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:shadow-\[0_22px_40px_-22px_rgba\(109\,79\,194\,1\)\]:hover{--tw-shadow:0 22px 40px -22px var(--tw-shadow-color,#6d4fc2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-white\/70:focus-visible{--tw-ring-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-white\/70:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-55:disabled{opacity:.55}@media (prefers-reduced-motion:no-preference){.motion-safe\:animate-fade-rise{animation:var(--animate-fade-rise)}.motion-safe\:animate-soft-float{animation:var(--animate-soft-float)}.motion-safe\:animate-stop-button-pulse{animation:var(--animate-stop-button-pulse)}.motion-safe\:animate-surface-in{animation:var(--animate-surface-in)}}@media not all and (min-width:900px){.max-\[900px\]\:right-3{right:calc(var(--spacing) * 3)}.max-\[900px\]\:bottom-\[78px\]{bottom:78px}.max-\[900px\]\:h-\[min\(70vh\,540px\)\]{height:min(70vh,540px)}.max-\[900px\]\:h-\[min\(86vh\,760px\)\]{height:min(86vh,760px)}.max-\[900px\]\:w-\[min\(70vw\,760px\)\]{width:min(70vw,760px)}.max-\[900px\]\:w-\[min\(360px\,calc\(100vw-24px\)\)\]{width:min(360px,100vw - 24px)}.max-\[900px\]\:rounded-\[14px\]{border-radius:14px}.max-\[900px\]\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.max-\[900px\]\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}}@media not all and (min-width:600px){.max-\[600px\]\:inset-0{inset:calc(var(--spacing) * 0)}.max-\[600px\]\:right-3{right:calc(var(--spacing) * 3)}.max-\[600px\]\:bottom-3{bottom:calc(var(--spacing) * 3)}.max-\[600px\]\:h-13{height:calc(var(--spacing) * 13)}.max-\[600px\]\:h-screen{height:100vh}.max-\[600px\]\:max-h-screen{max-height:100vh}.max-\[600px\]\:w-13{width:calc(var(--spacing) * 13)}.max-\[600px\]\:w-screen{width:100vw}.max-\[600px\]\:max-w-\[88\%\]{max-width:88%}.max-\[600px\]\:max-w-\[calc\(100\%-2\.25rem\)\]{max-width:calc(100% - 2.25rem)}.max-\[600px\]\:max-w-screen{max-width:100vw}.max-\[600px\]\:rounded-none{border-radius:0}.max-\[600px\]\:px-3{padding-inline:calc(var(--spacing) * 3)}.max-\[600px\]\:py-3{padding-block:calc(var(--spacing) * 3)}.max-\[600px\]\:pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}}@media (min-width:40rem){.sm\:bottom-5{bottom:calc(var(--spacing) * 5)}.sm\:bottom-\[96px\]{bottom:96px}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-5{gap:calc(var(--spacing) * 5)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:py-4{padding-block:calc(var(--spacing) * 4)}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}}@keyframes dot-wave{0%,60%,to{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-5px)}}@keyframes gemini-arc{0%{opacity:.65;transform:rotate(0)}to{opacity:1;transform:rotate(360deg)}}@keyframes gemini-spark{0%,to{opacity:.72;transform:scale(.78)}50%{opacity:1;transform:scale(1.04)}}@keyframes think-pulse{0%,to{opacity:.35;transform:scale(.72)}45%{opacity:1;transform:scale(1.08)}}@keyframes think-sheen{0%{background-position:0%}to{background-position:200%}}@keyframes think-orbit{0%{opacity:0;transform:translate(-130%,-50%)}20%{opacity:.8}80%{opacity:.8}to{opacity:0;transform:translate(460%,-50%)}}@keyframes soft-float{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes surface-in{0%{opacity:0;transform:translateY(10px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes fade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes stop-button-pulse{0%,to{opacity:.92;transform:scale(.94)}50%{opacity:1;transform:scale(1)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-600:oklch(62.7% .194 149.214);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-700:oklch(50.8% .118 165.612);--color-sky-300:oklch(82.8% .111 230.318);--color-blue-50:oklch(97% .014 254.604);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-indigo-300:oklch(78.5% .115 274.713);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-700:oklch(49.1% .27 292.581);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-600:oklch(58.6% .253 17.585);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-gray-100:oklch(96.7% .003 264.542);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-brand-500:#6d4fc2;--color-brand-600:#5f44ad;--color-brand-50:#f6f2ff;--animate-gemini-arc:gemini-arc 1.35s cubic-bezier(.4, 0, .2, 1) infinite;--animate-gemini-spark:gemini-spark 1.45s cubic-bezier(.34, 1.56, .64, 1) infinite;--animate-soft-float:soft-float 4.8s ease-in-out infinite;--animate-surface-in:surface-in .32s cubic-bezier(.22, 1, .36, 1);--animate-fade-rise:fade-rise .28s cubic-bezier(.16, 1, .3, 1);--animate-stop-button-pulse:stop-button-pulse 1.65s cubic-bezier(.22, 1, .36, 1) infinite}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}#changai-chatbot-root,#changai-chatbot-root *{box-sizing:border-box}#changai-chatbot-root{color:#0f172a;font-family:Plus Jakarta Sans,Segoe UI,Helvetica Neue,sans-serif}#changai-chatbot-root button,#changai-chatbot-root input,#changai-chatbot-root textarea,#changai-chatbot-root select{font:inherit}#changai-chatbot-root button{appearance:none;background-clip:padding-box;border:0}#changai-chatbot-root .chat-card strong{font-weight:700}#changai-chatbot-root .chat-card em{font-style:italic}#changai-chatbot-root .chat-card p{margin-bottom:.4rem}#changai-chatbot-root .chat-card p:last-child{margin-bottom:0}#changai-chatbot-root .chat-card ul{margin-bottom:.4rem;padding-inline-start:1.25rem;list-style:outside}#changai-chatbot-root .chat-card ol{margin-bottom:.4rem;padding-inline-start:1.25rem;list-style:decimal}#changai-chatbot-root .chat-card li{margin-bottom:.15rem}#changai-chatbot-root .chat-card code{background:#6d4fc214;border-radius:4px;padding:.1em .35em;font-family:monospace;font-size:.8em}#changai-chatbot-root button.rounded-full,#changai-chatbot-root form.rounded-full{border-radius:9999px}#changai-chatbot-root button.rounded-md{border-radius:.375rem}#changai-chatbot-root button.rounded-lg{border-radius:.5rem}#changai-chatbot-root .chat-scrollbar{scrollbar-width:auto;scrollbar-color:#6d4fc2ad #6d4fc229;scrollbar-gutter:stable}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar{width:10px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-track{background:#6d4fc21f;border-radius:9999px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-thumb{background:linear-gradient(#6d4fc2c7,#6d4fc26b);border:2px solid #6d4fc21f;border-radius:9999px}#changai-chatbot-root .chat-scrollbar::-webkit-scrollbar-thumb:hover{background:linear-gradient(#6d4fc2e6,#6d4fc285)}#changai-chatbot-root .chat-shell{background:radial-gradient(120% 120% at 100% 0,#6d4fc21a,#6d4fc200 58%),radial-gradient(120% 120% at 0 100%,#6d4fc20f,#6d4fc200 55%),#fff}#changai-chatbot-root .chat-card{background:linear-gradient(#fffffff2,#f8fafceb);border:1px solid #94a3b833;box-shadow:0 12px 35px -28px #0f172a73}@media(prefers-reduced-motion:reduce){#changai-chatbot-root *,#changai-chatbot-root :before,#changai-chatbot-root :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.-top-14{top:calc(var(--spacing) * -14)}.top-0\.5{top:calc(var(--spacing) * .5)}.-right-14{right:calc(var(--spacing) * -14)}.right-0{right:calc(var(--spacing) * 0)}.right-4{right:calc(var(--spacing) * 4)}.right-5{right:calc(var(--spacing) * 5)}.-bottom-14{bottom:calc(var(--spacing) * -14)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-4{bottom:calc(var(--spacing) * 4)}.bottom-5{bottom:calc(var(--spacing) * 5)}.bottom-\[74px\]{bottom:74px}.bottom-\[calc\(90px\+env\(safe-area-inset-bottom\)\)\]{bottom:calc(90px + env(safe-area-inset-bottom))}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:calc(var(--spacing) * 0)}.left-0\.5{left:calc(var(--spacing) * .5)}.left-\[1\.45rem\]{left:1.45rem}.z-20{z-index:20}.z-9999,.z-\[9999\]{z-index:9999}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-4{height:calc(var(--spacing) * 4)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-7{height:calc(var(--spacing) * 7)}.h-7\.5{height:calc(var(--spacing) * 7.5)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-32{height:calc(var(--spacing) * 32)}.h-36{height:calc(var(--spacing) * 36)}.h-\[min\(86vh\,860px\)\]{height:min(86vh,860px)}.h-\[min\(560px\,72vh\)\]{height:min(560px,72vh)}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-screen{max-height:100vh}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-11{min-height:calc(var(--spacing) * 11)}.min-h-14{min-height:calc(var(--spacing) * 14)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5\.5{width:calc(var(--spacing) * 5.5)}.w-7\.5{width:calc(var(--spacing) * 7.5)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-12{width:calc(var(--spacing) * 12)}.w-32{width:calc(var(--spacing) * 32)}.w-36{width:calc(var(--spacing) * 36)}.w-\[min\(50vw\,860px\)\]{width:min(50vw,860px)}.w-\[min\(360px\,calc\(100vw-40px\)\)\]{width:min(360px,100vw - 40px)}.w-fit{width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.max-w-\[85\%\]{max-width:85%}.max-w-\[92\%\]{max-width:92%}.max-w-\[calc\(100\%-2\.5rem\)\]{max-width:calc(100% - 2.5rem)}.max-w-full{max-width:100%}.max-w-screen{max-width:100vw}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-8{min-width:calc(var(--spacing) * 8)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-bottom-right{transform-origin:100% 100%}.origin-center{transform-origin:50%}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-1\/5{--tw-translate-x: 20% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-1{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-8{--tw-translate-y:calc(var(--spacing) * 8);translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-95{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.animate-gemini-arc{animation:var(--animate-gemini-arc)}.animate-gemini-spark{animation:var(--animate-gemini-spark)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.appearance-none{appearance:none}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-4{gap:calc(var(--spacing) * 4)}.self-end{align-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-hidden{overflow-y:hidden}.overflow-y-scroll{overflow-y:scroll}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[10px_10px_10px_3px\]{border-radius:10px 10px 10px 3px}.rounded-\[13px_13px_3px_13px\]{border-radius:13px 13px 3px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-xl{border-radius:var(--radius-xl)}.rounded-b-\[10px\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-green-200{border-color:var(--color-green-200)}.border-red-200{border-color:var(--color-red-200)}.border-rose-100{border-color:var(--color-rose-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/80{border-color:#e2e8f0cc}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/80{border-color:color-mix(in oklab,var(--color-slate-200) 80%,transparent)}}.border-slate-200\/90{border-color:#e2e8f0e6}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/90{border-color:color-mix(in oklab,var(--color-slate-200) 90%,transparent)}}.border-transparent{border-color:#0000}.border-white\/20{border-color:#fff3}@supports (color:color-mix(in lab,red,red)){.border-white\/20{border-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.border-white\/25{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.border-white\/25{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.border-t-\[\#4b89ff\]{border-top-color:#4b89ff}.border-r-\[\#4b89ff\]\/70{border-right-color:#4b89ffb3}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-500\/45{background-color:#f99c0073}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\/45{background-color:color-mix(in oklab,var(--color-amber-500) 45%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-brand-50{background-color:var(--color-brand-50)}.bg-brand-500\/15{background-color:#6d4fc226}@supports (color:color-mix(in lab,red,red)){.bg-brand-500\/15{background-color:color-mix(in oklab,var(--color-brand-500) 15%,transparent)}}.bg-emerald-500\/45{background-color:#00bb7f73}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/45{background-color:color-mix(in oklab,var(--color-emerald-500) 45%,transparent)}}.bg-emerald-500\/95{background-color:#00bb7ff2}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/95{background-color:color-mix(in oklab,var(--color-emerald-500) 95%,transparent)}}.bg-gray-100{background-color:var(--color-gray-100)}.bg-green-50{background-color:var(--color-green-50)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-500{background-color:var(--color-red-500)}.bg-slate-50\/60{background-color:#f8fafc99}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/60{background-color:color-mix(in oklab,var(--color-slate-50) 60%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-500\/35{background-color:#62748e59}@supports (color:color-mix(in lab,red,red)){.bg-slate-500\/35{background-color:color-mix(in oklab,var(--color-slate-500) 35%,transparent)}}.bg-transparent{background-color:#0000}.bg-violet-400\/15{background-color:#a685ff26}@supports (color:color-mix(in lab,red,red)){.bg-violet-400\/15{background-color:color-mix(in oklab,var(--color-violet-400) 15%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/24{background-color:#ffffff3d}@supports (color:color-mix(in lab,red,red)){.bg-white\/24{background-color:color-mix(in oklab,var(--color-white) 24%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.bg-white\/90{background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-white\/95{background-color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.bg-white\/95{background-color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-t{--tw-gradient-position:to top}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-t{--tw-gradient-position:to top in oklab}}.bg-linear-to-t{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-brand-500{--tw-gradient-from:var(--color-brand-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-brand-600{--tw-gradient-from:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-violet-300\/36{--tw-gradient-from:#c4b4ff5c}@supports (color:color-mix(in lab,red,red)){.from-violet-300\/36{--tw-gradient-from:color-mix(in oklab, var(--color-violet-300) 36%, transparent)}}.from-violet-300\/36{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-brand-500{--tw-gradient-via:var(--color-brand-500);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-300\/30{--tw-gradient-via:#a4b3ff4d}@supports (color:color-mix(in lab,red,red)){.via-indigo-300\/30{--tw-gradient-via:color-mix(in oklab, var(--color-indigo-300) 30%, transparent)}}.via-indigo-300\/30{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/92{--tw-gradient-via:#ffffffeb}@supports (color:color-mix(in lab,red,red)){.via-white\/92{--tw-gradient-via:color-mix(in oklab, var(--color-white) 92%, transparent)}}.via-white\/92{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-brand-600{--tw-gradient-to:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-sky-300\/28{--tw-gradient-to:#77d4ff47}@supports (color:color-mix(in lab,red,red)){.to-sky-300\/28{--tw-gradient-to:color-mix(in oklab, var(--color-sky-300) 28%, transparent)}}.to-sky-300\/28{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-violet-400{--tw-gradient-to:var(--color-violet-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-white\/0{--tw-gradient-to:#0000}@supports (color:color-mix(in lab,red,red)){.to-white\/0{--tw-gradient-to:color-mix(in oklab, var(--color-white) 0%, transparent)}}.to-white\/0{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-white{fill:var(--color-white)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-4{padding:calc(var(--spacing) * 4)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-\[calc\(12px\+env\(safe-area-inset-bottom\)\)\]{padding-bottom:calc(12px + env(safe-area-inset-bottom))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[8px\]{font-size:8px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.01em\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-\[0\.12em\]{--tw-tracking:.12em;letter-spacing:.12em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.wrap-anywhere{overflow-wrap:anywhere}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#3a67c9\]{color:#3a67c9}.text-\[\#4b89ff\]{color:#4b89ff}.text-amber-700{color:var(--color-amber-700)}.text-black{color:var(--color-black)}.text-blue-700{color:var(--color-blue-700)}.text-brand-600{color:var(--color-brand-600)}.text-current\/80{color:currentColor}@supports (color:color-mix(in lab,red,red)){.text-current\/80{color:color-mix(in oklab,currentcolor 80%,transparent)}}.text-emerald-700{color:var(--color-emerald-700)}.text-green-600{color:var(--color-green-600)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-rose-600{color:var(--color-rose-600)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-white{color:var(--color-white)}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-white\/95{color:#fffffff2}@supports (color:color-mix(in lab,red,red)){.text-white\/95{color:color-mix(in oklab,var(--color-white) 95%,transparent)}}.uppercase{text-transform:uppercase}.opacity-0{opacity:0}.opacity-45{opacity:.45}.opacity-95{opacity:.95}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_10px_rgba\(20\,24\,40\,0\.22\)\]{--tw-shadow:0 4px 10px var(--tw-shadow-color,#14182838);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_20px_-12px_rgba\(159\,18\,57\,0\.35\)\]{--tw-shadow:0 8px 20px -12px var(--tw-shadow-color,#9f123959);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_18px_-12px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 10px 18px -12px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_20px_-18px_rgba\(220\,38\,38\,0\.9\)\]{--tw-shadow:0 10px 20px -18px var(--tw-shadow-color,#dc2626e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_24px_-16px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 10px 24px -16px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_26px_-20px_rgba\(15\,23\,42\,0\.7\)\]{--tw-shadow:0 12px 26px -20px var(--tw-shadow-color,#0f172ab3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_14px_26px_-16px_rgba\(15\,23\,42\,0\.65\)\]{--tw-shadow:0 14px 26px -16px var(--tw-shadow-color,#0f172aa6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_14px_30px_-18px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 14px 30px -18px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_20px_36px_-20px_rgba\(109\,79\,194\,0\.85\)\]{--tw-shadow:0 20px 36px -20px var(--tw-shadow-color,#6d4fc2d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_32px_80px_-44px_rgba\(2\,6\,23\,0\.7\)\,0_18px_40px_-24px_rgba\(15\,23\,42\,0\.45\)\]{--tw-shadow:0 32px 80px -44px var(--tw-shadow-color,#020617b3), 0 18px 40px -24px var(--tw-shadow-color,#0f172a73);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-blue-200{--tw-ring-color:var(--color-blue-200)}.ring-red-200{--tw-ring-color:var(--color-red-200)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-250{--tw-duration:.25s;transition-duration:.25s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}@media(hover:hover){.group-hover\:bg-white\/70:is(:where(.group):hover *){background-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/70:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white) 70%,transparent)}}}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.focus-within\:-translate-y-0\.5:focus-within{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.focus-within\:shadow-\[0_18px_30px_-20px_rgba\(13\,110\,253\,0\.5\)\]:focus-within{--tw-shadow:0 18px 30px -20px var(--tw-shadow-color,#0d6efd80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-brand-500\/25:focus-within{--tw-ring-color:#6d4fc240}@supports (color:color-mix(in lab,red,red)){.focus-within\:ring-brand-500\/25:focus-within{--tw-ring-color:color-mix(in oklab, var(--color-brand-500) 25%, transparent)}}@media(hover:hover){.hover\:-translate-y-0\.5:hover{--tw-translate-y:calc(var(--spacing) * -.5);translate:var(--tw-translate-x) var(--tw-translate-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:border-green-300:hover{border-color:var(--color-green-300)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\:border-white\/25:hover{border-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/25:hover{border-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-rose-50:hover{background-color:var(--color-rose-50)}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-white\/12:hover{background-color:#ffffff1f}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/12:hover{background-color:color-mix(in oklab,var(--color-white) 12%,transparent)}}.hover\:bg-white\/15:hover{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/15:hover{background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.hover\:bg-white\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/20:hover{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.hover\:bg-white\/25:hover{background-color:#ffffff40}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/25:hover{background-color:color-mix(in oklab,var(--color-white) 25%,transparent)}}.hover\:from-brand-600:hover{--tw-gradient-from:var(--color-brand-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:to-violet-700:hover{--tw-gradient-to:var(--color-violet-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.hover\:text-brand-600:hover{color:var(--color-brand-600)}.hover\:text-current:hover{color:currentColor}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:shadow-\[0_22px_40px_-22px_rgba\(109\,79\,194\,1\)\]:hover{--tw-shadow:0 22px 40px -22px var(--tw-shadow-color,#6d4fc2);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-white\/70:focus-visible{--tw-ring-color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-white\/70:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-white) 70%, transparent)}}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-55:disabled{opacity:.55}@media(prefers-reduced-motion:no-preference){.motion-safe\:animate-fade-rise{animation:var(--animate-fade-rise)}.motion-safe\:animate-soft-float{animation:var(--animate-soft-float)}.motion-safe\:animate-stop-button-pulse{animation:var(--animate-stop-button-pulse)}.motion-safe\:animate-surface-in{animation:var(--animate-surface-in)}}@media not all and (min-width:900px){.max-\[900px\]\:right-3{right:calc(var(--spacing) * 3)}.max-\[900px\]\:bottom-\[78px\]{bottom:78px}.max-\[900px\]\:h-\[min\(70vh\,540px\)\]{height:min(70vh,540px)}.max-\[900px\]\:h-\[min\(86vh\,760px\)\]{height:min(86vh,760px)}.max-\[900px\]\:w-\[min\(70vw\,760px\)\]{width:min(70vw,760px)}.max-\[900px\]\:w-\[min\(360px\,calc\(100vw-24px\)\)\]{width:min(360px,100vw - 24px)}.max-\[900px\]\:rounded-\[14px\]{border-radius:14px}.max-\[900px\]\:px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.max-\[900px\]\:py-3\.5{padding-block:calc(var(--spacing) * 3.5)}}@media not all and (min-width:600px){.max-\[600px\]\:inset-0{inset:calc(var(--spacing) * 0)}.max-\[600px\]\:right-3{right:calc(var(--spacing) * 3)}.max-\[600px\]\:bottom-3{bottom:calc(var(--spacing) * 3)}.max-\[600px\]\:h-13{height:calc(var(--spacing) * 13)}.max-\[600px\]\:h-screen{height:100vh}.max-\[600px\]\:max-h-screen{max-height:100vh}.max-\[600px\]\:w-13{width:calc(var(--spacing) * 13)}.max-\[600px\]\:w-screen{width:100vw}.max-\[600px\]\:max-w-\[88\%\]{max-width:88%}.max-\[600px\]\:max-w-\[calc\(100\%-2\.25rem\)\]{max-width:calc(100% - 2.25rem)}.max-\[600px\]\:max-w-screen{max-width:100vw}.max-\[600px\]\:rounded-none{border-radius:0}.max-\[600px\]\:px-3{padding-inline:calc(var(--spacing) * 3)}.max-\[600px\]\:py-3{padding-block:calc(var(--spacing) * 3)}.max-\[600px\]\:pb-\[env\(safe-area-inset-bottom\)\]{padding-bottom:env(safe-area-inset-bottom)}}@media(min-width:40rem){.sm\:bottom-5{bottom:calc(var(--spacing) * 5)}.sm\:bottom-\[96px\]{bottom:96px}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:gap-5{gap:calc(var(--spacing) * 5)}.sm\:px-4{padding-inline:calc(var(--spacing) * 4)}.sm\:px-5{padding-inline:calc(var(--spacing) * 5)}.sm\:py-4{padding-block:calc(var(--spacing) * 4)}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}}}@keyframes dot-wave{0%,60%,to{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-5px)}}@keyframes gemini-arc{0%{opacity:.65;transform:rotate(0)}to{opacity:1;transform:rotate(360deg)}}@keyframes gemini-spark{0%,to{opacity:.72;transform:scale(.78)}50%{opacity:1;transform:scale(1.04)}}@keyframes think-pulse{0%,to{opacity:.35;transform:scale(.72)}45%{opacity:1;transform:scale(1.08)}}@keyframes think-sheen{0%{background-position:0%}to{background-position:200%}}@keyframes think-orbit{0%{opacity:0;transform:translate(-130%,-50%)}20%{opacity:.8}80%{opacity:.8}to{opacity:0;transform:translate(460%,-50%)}}@keyframes soft-float{0%,to{transform:translateY(0)}50%{transform:translateY(-4px)}}@keyframes surface-in{0%{opacity:0;transform:translateY(10px)scale(.98)}to{opacity:1;transform:translateY(0)scale(1)}}@keyframes fade-rise{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes stop-button-pulse{0%,to{opacity:.92;transform:scale(.94)}50%{opacity:1;transform:scale(1)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}} diff --git a/changai/public/dist/changai-chatbot.js b/changai/public/dist/changai-chatbot.js index a7f3ed0..3b5a543 100644 --- a/changai/public/dist/changai-chatbot.js +++ b/changai/public/dist/changai-chatbot.js @@ -1,20 +1,69 @@ -(function(){"use strict";/** -* @vue/shared v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Rn(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const te={},Ct=[],pt=()=>{},dr=()=>!1,Qt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Pn=e=>e.startsWith("onUpdate:"),De=Object.assign,ms=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},pr=Object.prototype.hasOwnProperty,Z=(e,t)=>pr.call(e,t),j=Array.isArray,Tt=e=>en(e)==="[object Map]",vs=e=>en(e)==="[object Set]",X=e=>typeof e=="function",de=e=>typeof e=="string",tt=e=>typeof e=="symbol",ce=e=>e!==null&&typeof e=="object",xs=e=>(ce(e)||X(e))&&X(e.then)&&X(e.catch),ys=Object.prototype.toString,en=e=>ys.call(e),hr=e=>en(e).slice(8,-1),ws=e=>en(e)==="[object Object]",$n=e=>de(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,It=Rn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},gr=/-(\w)/g,nt=tn(e=>e.replace(gr,(t,n)=>n?n.toUpperCase():"")),br=/\B([A-Z])/g,ht=tn(e=>e.replace(br,"-$1").toLowerCase()),_s=tn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Mn=tn(e=>e?`on${_s(e)}`:""),st=(e,t)=>!Object.is(e,t),nn=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},In=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mr=e=>{const t=de(e)?Number(e):NaN;return isNaN(t)?e:t};let Ss;const sn=()=>Ss||(Ss=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function On(e){if(j(e)){const t={};for(let n=0;n{if(n){const s=n.split(xr);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function le(e){let t="";if(de(e))t=e;else if(j(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Se=e=>de(e)?e:e==null?"":j(e)||ce(e)&&(e.toString===ys||!X(e.toString))?Ts(e)?Se(e.value):JSON.stringify(e,Es,2):String(e),Es=(e,t)=>Ts(t)?Es(e,t.value):Tt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],r)=>(n[Ln(s,r)+" =>"]=i,n),{})}:vs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ln(n))}:tt(t)?Ln(t):ce(t)&&!j(t)&&!ws(t)?String(t):t,Ln=(e,t="")=>{var n;return tt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ce;class Sr{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ce,!t&&Ce&&(this.index=(Ce.scopes||(Ce.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Ce=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(Lt){let t=Lt;for(Lt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Ot;){let t=Ot;for(Ot=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function $s(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ms(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),Nn(s),Tr(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function Hn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ks(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ks(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Bt)||(e.globalVersion=Bt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Hn(e))))return;e.flags|=2;const t=e.dep,n=ie,s=Fe;ie=e,Fe=!0;try{$s(e);const i=e.fn(e._value);(t.version===0||st(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{ie=n,Fe=s,Ms(e),e.flags&=-3}}function Nn(e,t=!1){const{dep:n,prevSub:s,nextSub:i}=e;if(s&&(s.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Nn(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Tr(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Fe=!0;const Is=[];function We(){Is.push(Fe),Fe=!1}function Je(){const e=Is.pop();Fe=e===void 0?!0:e}function Os(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=ie;ie=void 0;try{t()}finally{ie=n}}}let Bt=0;class Er{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Vn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!ie||!Fe||ie===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==ie)n=this.activeLink=new Er(ie,this),ie.deps?(n.prevDep=ie.depsTail,ie.depsTail.nextDep=n,ie.depsTail=n):ie.deps=ie.depsTail=n,Ls(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=ie.depsTail,n.nextDep=void 0,ie.depsTail.nextDep=n,ie.depsTail=n,ie.deps===n&&(ie.deps=s)}return n}trigger(t){this.version++,Bt++,this.notify(t)}notify(t){Dn();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Fn()}}}function Ls(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ls(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const jn=new WeakMap,gt=Symbol(""),Un=Symbol(""),Dt=Symbol("");function me(e,t,n){if(Fe&&ie){let s=jn.get(e);s||jn.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new Vn),i.map=s,i.key=n),i.track()}}function Ge(e,t,n,s,i,r){const o=jn.get(e);if(!o){Bt++;return}const l=a=>{a&&a.trigger()};if(Dn(),t==="clear")o.forEach(l);else{const a=j(e),d=a&&$n(n);if(a&&n==="length"){const c=Number(s);o.forEach((p,b)=>{(b==="length"||b===Dt||!tt(b)&&b>=c)&&l(p)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),d&&l(o.get(Dt)),t){case"add":a?d&&l(o.get("length")):(l(o.get(gt)),Tt(e)&&l(o.get(Un)));break;case"delete":a||(l(o.get(gt)),Tt(e)&&l(o.get(Un)));break;case"set":Tt(e)&&l(o.get(gt));break}}Fn()}function Et(e){const t=J(e);return t===e?t:(me(t,"iterate",Dt),Me(e)?t:t.map(ge))}function rn(e){return me(e=J(e),"iterate",Dt),e}const Ar={__proto__:null,[Symbol.iterator](){return qn(this,Symbol.iterator,ge)},concat(...e){return Et(this).concat(...e.map(t=>j(t)?Et(t):t))},entries(){return qn(this,"entries",e=>(e[1]=ge(e[1]),e))},every(e,t){return Ye(this,"every",e,t,void 0,arguments)},filter(e,t){return Ye(this,"filter",e,t,n=>n.map(ge),arguments)},find(e,t){return Ye(this,"find",e,t,ge,arguments)},findIndex(e,t){return Ye(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ye(this,"findLast",e,t,ge,arguments)},findLastIndex(e,t){return Ye(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ye(this,"forEach",e,t,void 0,arguments)},includes(...e){return Kn(this,"includes",e)},indexOf(...e){return Kn(this,"indexOf",e)},join(e){return Et(this).join(e)},lastIndexOf(...e){return Kn(this,"lastIndexOf",e)},map(e,t){return Ye(this,"map",e,t,void 0,arguments)},pop(){return Ft(this,"pop")},push(...e){return Ft(this,"push",e)},reduce(e,...t){return Bs(this,"reduce",e,t)},reduceRight(e,...t){return Bs(this,"reduceRight",e,t)},shift(){return Ft(this,"shift")},some(e,t){return Ye(this,"some",e,t,void 0,arguments)},splice(...e){return Ft(this,"splice",e)},toReversed(){return Et(this).toReversed()},toSorted(e){return Et(this).toSorted(e)},toSpliced(...e){return Et(this).toSpliced(...e)},unshift(...e){return Ft(this,"unshift",e)},values(){return qn(this,"values",ge)}};function qn(e,t,n){const s=rn(e),i=s[t]();return s!==e&&!Me(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.value&&(r.value=n(r.value)),r}),i}const Rr=Array.prototype;function Ye(e,t,n,s,i,r){const o=rn(e),l=o!==e&&!Me(e),a=o[t];if(a!==Rr[t]){const p=a.apply(e,r);return l?ge(p):p}let d=n;o!==e&&(l?d=function(p,b){return n.call(this,ge(p),b,e)}:n.length>2&&(d=function(p,b){return n.call(this,p,b,e)}));const c=a.call(o,d,s);return l&&i?i(c):c}function Bs(e,t,n,s){const i=rn(e);let r=n;return i!==e&&(Me(e)?n.length>3&&(r=function(o,l,a){return n.call(this,o,l,a,e)}):r=function(o,l,a){return n.call(this,o,ge(l),a,e)}),i[t](r,...s)}function Kn(e,t,n){const s=J(e);me(s,"iterate",Dt);const i=s[t](...n);return(i===-1||i===!1)&&Wn(n[0])?(n[0]=J(n[0]),s[t](...n)):i}function Ft(e,t,n=[]){We(),Dn();const s=J(e)[t].apply(e,n);return Fn(),Je(),s}const Pr=Rn("__proto__,__v_isRef,__isVue"),Ds=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function $r(e){tt(e)||(e=String(e));const t=J(this);return me(t,"has",e),t.hasOwnProperty(e)}class Fs{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return s===(i?r?qs:Us:r?js:Vs).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=j(t);if(!i){let a;if(o&&(a=Ar[n]))return a;if(n==="hasOwnProperty")return $r}const l=Reflect.get(t,n,ve(t)?t:s);return(tt(n)?Ds.has(n):Pr(n))||(i||me(t,"get",n),r)?l:ve(l)?o&&$n(n)?l:l.value:ce(l)?i?Ks(l):un(l):l}}class Hs extends Fs{constructor(t=!1){super(!1,t)}set(t,n,s,i){let r=t[n];if(!this._isShallow){const a=it(r);if(!Me(s)&&!it(s)&&(r=J(r),s=J(s)),!j(t)&&ve(r)&&!ve(s))return a?!1:(r.value=s,!0)}const o=j(t)&&$n(n)?Number(n)e,on=e=>Reflect.getPrototypeOf(e);function Lr(e,t,n){return function(...s){const i=this.__v_raw,r=J(i),o=Tt(r),l=e==="entries"||e===Symbol.iterator&&o,a=e==="keys"&&o,d=i[e](...s),c=n?zn:t?fn:ge;return!t&&me(r,"iterate",a?Un:gt),{next(){const{value:p,done:b}=d.next();return b?{value:p,done:b}:{value:l?[c(p[0]),c(p[1])]:c(p),done:b}},[Symbol.iterator](){return this}}}}function ln(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Br(e,t){const n={get(i){const r=this.__v_raw,o=J(r),l=J(i);e||(st(i,l)&&me(o,"get",i),me(o,"get",l));const{has:a}=on(o),d=t?zn:e?fn:ge;if(a.call(o,i))return d(r.get(i));if(a.call(o,l))return d(r.get(l));r!==o&&r.get(i)},get size(){const i=this.__v_raw;return!e&&me(J(i),"iterate",gt),Reflect.get(i,"size",i)},has(i){const r=this.__v_raw,o=J(r),l=J(i);return e||(st(i,l)&&me(o,"has",i),me(o,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const o=this,l=o.__v_raw,a=J(l),d=t?zn:e?fn:ge;return!e&&me(a,"iterate",gt),l.forEach((c,p)=>i.call(r,d(c),d(p),o))}};return De(n,e?{add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear")}:{add(i){!t&&!Me(i)&&!it(i)&&(i=J(i));const r=J(this);return on(r).has.call(r,i)||(r.add(i),Ge(r,"add",i,i)),this},set(i,r){!t&&!Me(r)&&!it(r)&&(r=J(r));const o=J(this),{has:l,get:a}=on(o);let d=l.call(o,i);d||(i=J(i),d=l.call(o,i));const c=a.call(o,i);return o.set(i,r),d?st(r,c)&&Ge(o,"set",i,r):Ge(o,"add",i,r),this},delete(i){const r=J(this),{has:o,get:l}=on(r);let a=o.call(r,i);a||(i=J(i),a=o.call(r,i)),l&&l.call(r,i);const d=r.delete(i);return a&&Ge(r,"delete",i,void 0),d},clear(){const i=J(this),r=i.size!==0,o=i.clear();return r&&Ge(i,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Lr(i,e,t)}),n}function an(e,t){const n=Br(e,t);return(s,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(Z(n,i)&&i in s?n:s,i,r)}const Dr={get:an(!1,!1)},Fr={get:an(!1,!0)},Hr={get:an(!0,!1)},Nr={get:an(!0,!0)},Vs=new WeakMap,js=new WeakMap,Us=new WeakMap,qs=new WeakMap;function Vr(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function jr(e){return e.__v_skip||!Object.isExtensible(e)?0:Vr(hr(e))}function un(e){return it(e)?e:cn(e,!1,Mr,Dr,Vs)}function Ur(e){return cn(e,!1,Ir,Fr,js)}function Ks(e){return cn(e,!0,kr,Hr,Us)}function Cu(e){return cn(e,!0,Or,Nr,qs)}function cn(e,t,n,s,i){if(!ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=jr(e);if(r===0)return e;const o=i.get(e);if(o)return o;const l=new Proxy(e,r===2?s:n);return i.set(e,l),l}function At(e){return it(e)?At(e.__v_raw):!!(e&&e.__v_isReactive)}function it(e){return!!(e&&e.__v_isReadonly)}function Me(e){return!!(e&&e.__v_isShallow)}function Wn(e){return e?!!e.__v_raw:!1}function J(e){const t=e&&e.__v_raw;return t?J(t):e}function qr(e){return!Z(e,"__v_skip")&&Object.isExtensible(e)&&kn(e,"__v_skip",!0),e}const ge=e=>ce(e)?un(e):e,fn=e=>ce(e)?Ks(e):e;function ve(e){return e?e.__v_isRef===!0:!1}function U(e){return Kr(e,!1)}function Kr(e,t){return ve(e)?e:new zr(e,t)}class zr{constructor(t,n){this.dep=new Vn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:J(t),this._value=n?t:ge(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Me(t)||it(t);t=s?t:J(t),st(t,n)&&(this._rawValue=t,this._value=s?t:ge(t),this.dep.trigger())}}function Wr(e){return ve(e)?e.value:e}const Jr={get:(e,t,n)=>t==="__v_raw"?e:Wr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return ve(i)&&!ve(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function zs(e){return At(e)?e:new Proxy(e,Jr)}class Gr{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Vn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Bt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&ie!==this)return Ps(this,!0),!0}get value(){const t=this.dep.track();return ks(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Yr(e,t,n=!1){let s,i;return X(e)?s=e:(s=e.get,i=e.set),new Gr(s,i,n)}const dn={},pn=new WeakMap;let bt;function Zr(e,t=!1,n=bt){if(n){let s=pn.get(n);s||pn.set(n,s=[]),s.push(e)}}function Xr(e,t,n=te){const{immediate:s,deep:i,once:r,scheduler:o,augmentJob:l,call:a}=n,d=x=>i?x:Me(x)||i===!1||i===0?Ze(x,1):Ze(x);let c,p,b,S,O=!1,T=!1;if(ve(e)?(p=()=>e.value,O=Me(e)):At(e)?(p=()=>d(e),O=!0):j(e)?(T=!0,O=e.some(x=>At(x)||Me(x)),p=()=>e.map(x=>{if(ve(x))return x.value;if(At(x))return d(x);if(X(x))return a?a(x,2):x()})):X(e)?t?p=a?()=>a(e,2):e:p=()=>{if(b){We();try{b()}finally{Je()}}const x=bt;bt=c;try{return a?a(e,3,[S]):e(S)}finally{bt=x}}:p=pt,t&&i){const x=p,C=i===!0?1/0:i;p=()=>Ze(x(),C)}const R=Cr(),M=()=>{c.stop(),R&&R.active&&ms(R.effects,c)};if(r&&t){const x=t;t=(...C)=>{x(...C),M()}}let V=T?new Array(e.length).fill(dn):dn;const K=x=>{if(!(!(c.flags&1)||!c.dirty&&!x))if(t){const C=c.run();if(i||O||(T?C.some((z,G)=>st(z,V[G])):st(C,V))){b&&b();const z=bt;bt=c;try{const G=[C,V===dn?void 0:T&&V[0]===dn?[]:V,S];V=C,a?a(t,3,G):t(...G)}finally{bt=z}}}else c.run()};return l&&l(K),c=new As(p),c.scheduler=o?()=>o(K,!1):K,S=x=>Zr(x,!1,c),b=c.onStop=()=>{const x=pn.get(c);if(x){if(a)a(x,4);else for(const C of x)C();pn.delete(c)}},t?s?K(!0):V=c.run():o?o(K.bind(null,!0),!0):c.run(),M.pause=c.pause.bind(c),M.resume=c.resume.bind(c),M.stop=M,M}function Ze(e,t=1/0,n){if(t<=0||!ce(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,ve(e))Ze(e.value,t,n);else if(j(e))for(let s=0;s{Ze(s,t,n)});else if(ws(e)){for(const s in e)Ze(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ze(e[s],t,n)}return e}/** -* @vue/runtime-core v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/const Ht=[];let Jn=!1;function Tu(e,...t){if(Jn)return;Jn=!0,We();const n=Ht.length?Ht[Ht.length-1].component:null,s=n&&n.appContext.config.warnHandler,i=Qr();if(s)Rt(s,n,11,[e+t.map(r=>{var o,l;return(l=(o=r.toString)==null?void 0:o.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${ki(n,r.type)}>`).join(` -`),i]);else{const r=[`[Vue warn]: ${e}`,...t];i.length&&r.push(` -`,...eo(i))}Je(),Jn=!1}function Qr(){let e=Ht[Ht.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function eo(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` -`],...to(n))}),t}function to({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,i=` at <${ki(e.component,e.type,s)}`,r=">"+n;return e.props?[i,...no(e.props),r]:[i+r]}function no(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Ws(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Ws(e,t,n){return de(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:ve(t)?(t=Ws(e,J(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):X(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=J(t),n?t:[`${e}=`,t])}function Rt(e,t,n,s){try{return s?e(...s):e()}catch(i){hn(i,t,n)}}function He(e,t,n,s){if(X(e)){const i=Rt(e,t,n,s);return i&&xs(i)&&i.catch(r=>{hn(r,t,n)}),i}if(j(e)){const i=[];for(let r=0;r>>1,i=ye[s],r=Nt(i);r=Nt(n)?ye.push(e):ye.splice(io(t),0,e),e.flags|=1,Gs()}}function Gs(){gn||(gn=Js.then(Xs))}function ro(e){j(e)?Pt.push(...e):rt&&e.id===-1?rt.splice($t+1,0,e):e.flags&1||(Pt.push(e),e.flags|=1),Gs()}function Ys(e,t,n=Ne+1){for(;nNt(n)-Nt(s));if(Pt.length=0,rt){rt.push(...t);return}for(rt=t,$t=0;$te.id==null?e.flags&2?-1:1/0:e.id;function Xs(e){try{for(Ne=0;Ne{s._d&&Ci(-1);const r=bn(t);let o;try{o=e(...i)}finally{bn(r),s._d&&Ci(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function oo(e,t){if(ke===null)return e;const n=Tn(ke),s=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport,ot=Symbol("_leaveCb"),mn=Symbol("_enterCb");function ao(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return qt(()=>{e.isMounted=!0}),vn(()=>{e.isUnmounting=!0}),e}const Ie=[Function,Array],ni={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ie,onEnter:Ie,onAfterEnter:Ie,onEnterCancelled:Ie,onBeforeLeave:Ie,onLeave:Ie,onAfterLeave:Ie,onLeaveCancelled:Ie,onBeforeAppear:Ie,onAppear:Ie,onAfterAppear:Ie,onAppearCancelled:Ie},si=e=>{const t=e.subTree;return t.component?si(t.component):t},uo={name:"BaseTransition",props:ni,setup(e,{slots:t}){const n=Ai(),s=ao();return()=>{const i=t.default&&li(t.default(),!0);if(!i||!i.length)return;const r=ii(i),o=J(e),{mode:l}=o;if(s.isLeaving)return Zn(r);const a=oi(r);if(!a)return Zn(r);let d=Yn(a,o,s,n,p=>d=p);a.type!==we&&Vt(a,d);let c=n.subTree&&oi(n.subTree);if(c&&c.type!==we&&!yt(a,c)&&si(n).type!==we){let p=Yn(c,o,s,n);if(Vt(c,p),l==="out-in"&&a.type!==we)return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,c=void 0},Zn(r);l==="in-out"&&a.type!==we?p.delayLeave=(b,S,O)=>{const T=ri(s,c);T[String(c.key)]=c,b[ot]=()=>{S(),b[ot]=void 0,delete d.delayedLeave,c=void 0},d.delayedLeave=()=>{O(),delete d.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ii(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==we){t=n;break}}return t}const co=uo;function ri(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Yn(e,t,n,s,i){const{appear:r,mode:o,persisted:l=!1,onBeforeEnter:a,onEnter:d,onAfterEnter:c,onEnterCancelled:p,onBeforeLeave:b,onLeave:S,onAfterLeave:O,onLeaveCancelled:T,onBeforeAppear:R,onAppear:M,onAfterAppear:V,onAppearCancelled:K}=t,x=String(e.key),C=ri(n,e),z=(N,Y)=>{N&&He(N,s,9,Y)},G=(N,Y)=>{const ae=Y[1];z(N,Y),j(N)?N.every(_=>_.length<=1)&&ae():N.length<=1&&ae()},ue={mode:o,persisted:l,beforeEnter(N){let Y=a;if(!n.isMounted)if(r)Y=R||a;else return;N[ot]&&N[ot](!0);const ae=C[x];ae&&yt(e,ae)&&ae.el[ot]&&ae.el[ot](),z(Y,[N])},enter(N){let Y=d,ae=c,_=p;if(!n.isMounted)if(r)Y=M||d,ae=V||c,_=K||p;else return;let k=!1;const q=N[mn]=xe=>{k||(k=!0,xe?z(_,[N]):z(ae,[N]),ue.delayedLeave&&ue.delayedLeave(),N[mn]=void 0)};Y?G(Y,[N,q]):q()},leave(N,Y){const ae=String(e.key);if(N[mn]&&N[mn](!0),n.isUnmounting)return Y();z(b,[N]);let _=!1;const k=N[ot]=q=>{_||(_=!0,Y(),q?z(T,[N]):z(O,[N]),N[ot]=void 0,C[ae]===e&&delete C[ae])};C[ae]=e,S?G(S,[N,k]):k()},clone(N){const Y=Yn(N,t,n,s,i);return i&&i(Y),Y}};return ue}function Zn(e){if(Xn(e))return e=lt(e),e.children=null,e}function oi(e){if(!Xn(e))return ti(e.type)&&e.children?ii(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&X(n.default))return n.default()}}function Vt(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Vt(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function li(e,t=!1,n){let s=[],i=0;for(let r=0;r1)for(let r=0;rjt(O,t&&(j(t)?t[T]:t),n,s,i));return}if(Ut(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&jt(e,t,n,s.component.subTree);return}const r=s.shapeFlag&4?Tn(s.component):s.el,o=i?null:r,{i:l,r:a}=e,d=t&&t.r,c=l.refs===te?l.refs={}:l.refs,p=l.setupState,b=J(p),S=p===te?()=>!1:O=>Z(b,O);if(d!=null&&d!==a&&(de(d)?(c[d]=null,S(d)&&(p[d]=null)):ve(d)&&(d.value=null)),X(a))Rt(a,l,12,[o,c]);else{const O=de(a),T=ve(a);if(O||T){const R=()=>{if(e.f){const M=O?S(a)?p[a]:c[a]:a.value;i?j(M)&&ms(M,r):j(M)?M.includes(r)||M.push(r):O?(c[a]=[r],S(a)&&(p[a]=c[a])):(a.value=[r],e.k&&(c[e.k]=a.value))}else O?(c[a]=o,S(a)&&(p[a]=o)):T&&(a.value=o,e.k&&(c[e.k]=o))};o?(R.id=-1,Re(R,n)):R()}}}sn().requestIdleCallback,sn().cancelIdleCallback;const Ut=e=>!!e.type.__asyncLoader,Xn=e=>e.type.__isKeepAlive;function po(e,t,n=ut,s=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...o)=>{We();const l=us(n),a=He(t,n,e,o);return l(),Je(),a});return s?i.unshift(r):i.push(r),r}}const ai=e=>(t,n=ut)=>{(!Jt||e==="sp")&&po(e,(...s)=>t(...s),n)},qt=ai("m"),vn=ai("bum"),ho=Symbol.for("v-ndc");function xn(e,t,n,s){let i;const r=n,o=j(e);if(o||de(e)){const l=o&&At(e);let a=!1,d=!1;l&&(a=!Me(e),d=it(e),e=rn(e)),i=new Array(e.length);for(let c=0,p=e.length;ct(l,a,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,d=l.length;ae?Pi(e)?Tn(e):Qn(e.parent):null,Kt=De(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qn(e.parent),$root:e=>Qn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{Gn(e.update)}),$nextTick:e=>e.n||(e.n=Ve.bind(e.proxy)),$watch:e=>pt}),es=(e,t)=>e!==te&&!e.__isScriptSetup&&Z(e,t),go={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:r,accessCache:o,type:l,appContext:a}=e;let d;if(t[0]!=="$"){const S=o[t];if(S!==void 0)switch(S){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(es(s,t))return o[t]=1,s[t];if(i!==te&&Z(i,t))return o[t]=2,i[t];if((d=e.propsOptions[0])&&Z(d,t))return o[t]=3,r[t];if(n!==te&&Z(n,t))return o[t]=4,n[t];o[t]=0}}const c=Kt[t];let p,b;if(c)return t==="$attrs"&&me(e.attrs,"get",""),c(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==te&&Z(n,t))return o[t]=4,n[t];if(b=a.config.globalProperties,Z(b,t))return b[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:r}=e;return es(i,t)?(i[t]=n,!0):s!==te&&Z(s,t)?(s[t]=n,!0):Z(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,propsOptions:r}},o){let l;return!!n[o]||e!==te&&Z(e,o)||es(t,o)||(l=r[0])&&Z(l,o)||Z(s,o)||Z(Kt,o)||Z(i.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Z(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function ui(){return{app:null,config:{isNativeTag:dr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let bo=0;function mo(e,t){return function(s,i=null){X(s)||(s=De({},s)),i!=null&&!ce(i)&&(i=null);const r=ui(),o=new WeakSet,l=[];let a=!1;const d=r.app={_uid:bo++,_component:s,_props:i,_container:null,_context:r,_instance:null,version:nl,get config(){return r.config},set config(c){},use(c,...p){return o.has(c)||(c&&X(c.install)?(o.add(c),c.install(d,...p)):X(c)&&(o.add(c),c(d,...p))),d},mixin(c){return d},component(c,p){return p?(r.components[c]=p,d):r.components[c]},directive(c,p){return p?(r.directives[c]=p,d):r.directives[c]},mount(c,p,b){if(!a){const S=d._ceVNode||pe(s,i);return S.appContext=r,b===!0?b="svg":b===!1&&(b=void 0),e(S,c,b),a=!0,d._container=c,c.__vue_app__=d,Tn(S.component)}},onUnmount(c){l.push(c)},unmount(){a&&(He(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(c,p){return r.provides[c]=p,d},runWithContext(c){const p=Mt;Mt=d;try{return c()}finally{Mt=p}}};return d}}let Mt=null;function vo(e,t,n=!1){const s=Ai();if(s||Mt){let i=Mt?Mt._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&X(t)?t.call(s&&s.proxy):t}}const ci={},fi=()=>Object.create(ci),di=e=>Object.getPrototypeOf(e)===ci;function xo(e,t,n,s=!1){const i={},r=fi();e.propsDefaults=Object.create(null),pi(e,t,i,r);for(const o in e.propsOptions[0])o in i||(i[o]=void 0);n?e.props=s?i:Ur(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function yo(e,t,n,s){const{props:i,attrs:r,vnode:{patchFlag:o}}=e,l=J(i),[a]=e.propsOptions;let d=!1;if((s||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let p=0;pe==="_"||e==="__"||e==="_ctx"||e==="$stable",ss=e=>j(e)?e.map(je):[je(e)],_o=(e,t,n)=>{if(t._n)return t;const s=ei((...i)=>ss(t(...i)),n);return s._c=!1,s},gi=(e,t,n)=>{const s=e._ctx;for(const i in e){if(ns(i))continue;const r=e[i];if(X(r))t[i]=_o(i,r,s);else if(r!=null){const o=ss(r);t[i]=()=>o}}},bi=(e,t)=>{const n=ss(t);e.slots.default=()=>n},mi=(e,t,n)=>{for(const s in t)(n||!ns(s))&&(e[s]=t[s])},So=(e,t,n)=>{const s=e.slots=fi();if(e.vnode.shapeFlag&32){const i=t.__;i&&kn(s,"__",i,!0);const r=t._;r?(mi(s,t,n),n&&kn(s,"_",r,!0)):gi(t,s)}else t&&bi(e,t)},Co=(e,t,n)=>{const{vnode:s,slots:i}=e;let r=!0,o=te;if(s.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:mi(i,t,n):(r=!t.$stable,gi(t,i)),o=t}else t&&(bi(e,t),o={default:1});if(r)for(const l in i)!ns(l)&&o[l]==null&&delete i[l]},Re=Ho;function To(e){return Eo(e)}function Eo(e,t){const n=sn();n.__VUE__=!0;const{insert:s,remove:i,patchProp:r,createElement:o,createText:l,createComment:a,setText:d,setElementText:c,parentNode:p,nextSibling:b,setScopeId:S=pt,insertStaticContent:O}=e,T=(u,f,h,y=null,m=null,v=null,P=void 0,A=null,E=!!f.dynamicChildren)=>{if(u===f)return;u&&!yt(u,f)&&(y=St(u),re(u,m,v,!0),u=null),f.patchFlag===-2&&(E=!1,f.dynamicChildren=null);const{type:w,ref:D,shapeFlag:$}=f;switch(w){case wn:R(u,f,h,y);break;case we:M(u,f,h,y);break;case rs:u==null&&V(f,h,y,P);break;case be:_(u,f,h,y,m,v,P,A,E);break;default:$&1?C(u,f,h,y,m,v,P,A,E):$&6?k(u,f,h,y,m,v,P,A,E):($&64||$&128)&&w.process(u,f,h,y,m,v,P,A,E,Zt)}D!=null&&m?jt(D,u&&u.ref,v,f||u,!f):D==null&&u&&u.ref!=null&&jt(u.ref,null,v,u,!0)},R=(u,f,h,y)=>{if(u==null)s(f.el=l(f.children),h,y);else{const m=f.el=u.el;f.children!==u.children&&d(m,f.children)}},M=(u,f,h,y)=>{u==null?s(f.el=a(f.children||""),h,y):f.el=u.el},V=(u,f,h,y)=>{[u.el,u.anchor]=O(u.children,f,h,y,u.el,u.anchor)},K=({el:u,anchor:f},h,y)=>{let m;for(;u&&u!==f;)m=b(u),s(u,h,y),u=m;s(f,h,y)},x=({el:u,anchor:f})=>{let h;for(;u&&u!==f;)h=b(u),i(u),u=h;i(f)},C=(u,f,h,y,m,v,P,A,E)=>{f.type==="svg"?P="svg":f.type==="math"&&(P="mathml"),u==null?z(f,h,y,m,v,P,A,E):N(u,f,m,v,P,A,E)},z=(u,f,h,y,m,v,P,A)=>{let E,w;const{props:D,shapeFlag:$,transition:B,dirs:H}=u;if(E=u.el=o(u.type,v,D&&D.is,D),$&8?c(E,u.children):$&16&&ue(u.children,E,null,y,m,is(u,v),P,A),H&&mt(u,null,y,"created"),G(E,u,u.scopeId,P,y),D){for(const oe in D)oe!=="value"&&!It(oe)&&r(E,oe,null,D[oe],v,y);"value"in D&&r(E,"value",null,D.value,v),(w=D.onVnodeBeforeMount)&&Ue(w,y,u)}H&&mt(u,null,y,"beforeMount");const W=Ao(m,B);W&&B.beforeEnter(E),s(E,f,h),((w=D&&D.onVnodeMounted)||W||H)&&Re(()=>{w&&Ue(w,y,u),W&&B.enter(E),H&&mt(u,null,y,"mounted")},m)},G=(u,f,h,y,m)=>{if(h&&S(u,h),y)for(let v=0;v{for(let w=E;w{const A=f.el=u.el;let{patchFlag:E,dynamicChildren:w,dirs:D}=f;E|=u.patchFlag&16;const $=u.props||te,B=f.props||te;let H;if(h&&vt(h,!1),(H=B.onVnodeBeforeUpdate)&&Ue(H,h,f,u),D&&mt(f,u,h,"beforeUpdate"),h&&vt(h,!0),($.innerHTML&&B.innerHTML==null||$.textContent&&B.textContent==null)&&c(A,""),w?Y(u.dynamicChildren,w,A,h,y,is(f,m),v):P||Te(u,f,A,null,h,y,is(f,m),v,!1),E>0){if(E&16)ae(A,$,B,h,m);else if(E&2&&$.class!==B.class&&r(A,"class",null,B.class,m),E&4&&r(A,"style",$.style,B.style,m),E&8){const W=f.dynamicProps;for(let oe=0;oe{H&&Ue(H,h,f,u),D&&mt(f,u,h,"updated")},y)},Y=(u,f,h,y,m,v,P)=>{for(let A=0;A{if(f!==h){if(f!==te)for(const v in f)!It(v)&&!(v in h)&&r(u,v,f[v],null,m,y);for(const v in h){if(It(v))continue;const P=h[v],A=f[v];P!==A&&v!=="value"&&r(u,v,A,P,m,y)}"value"in h&&r(u,"value",f.value,h.value,m)}},_=(u,f,h,y,m,v,P,A,E)=>{const w=f.el=u?u.el:l(""),D=f.anchor=u?u.anchor:l("");let{patchFlag:$,dynamicChildren:B,slotScopeIds:H}=f;H&&(A=A?A.concat(H):H),u==null?(s(w,h,y),s(D,h,y),ue(f.children||[],h,D,m,v,P,A,E)):$>0&&$&64&&B&&u.dynamicChildren?(Y(u.dynamicChildren,B,h,m,v,P,A),(f.key!=null||m&&f===m.subTree)&&vi(u,f,!0)):Te(u,f,h,D,m,v,P,A,E)},k=(u,f,h,y,m,v,P,A,E)=>{f.slotScopeIds=A,u==null?f.shapeFlag&512?m.ctx.activate(f,h,y,P,E):q(f,h,y,m,v,P,E):xe(u,f,E)},q=(u,f,h,y,m,v,P)=>{const A=u.component=zo(u,y,m);if(Xn(u)&&(A.ctx.renderer=Zt),Wo(A,!1,P),A.asyncDep){if(m&&m.registerDep(A,Le,P),!u.el){const E=A.subTree=pe(we);M(null,E,f,h),u.placeholder=E.el}}else Le(A,u,f,h,m,v,P)},xe=(u,f,h)=>{const y=f.component=u.component;if(Do(u,f,h))if(y.asyncDep&&!y.asyncResolved){fe(y,f,h);return}else y.next=f,y.update();else f.el=u.el,y.vnode=f},Le=(u,f,h,y,m,v,P)=>{const A=()=>{if(u.isMounted){let{next:$,bu:B,u:H,parent:W,vnode:oe}=u;{const Ke=xi(u);if(Ke){$&&($.el=oe.el,fe(u,$,P)),Ke.asyncDep.then(()=>{u.isUnmounted||A()});return}}let Q=$,Ee;vt(u,!1),$?($.el=oe.el,fe(u,$,P)):$=oe,B&&nn(B),(Ee=$.props&&$.props.onVnodeBeforeUpdate)&&Ue(Ee,W,$,oe),vt(u,!0);const Ae=wi(u),qe=u.subTree;u.subTree=Ae,T(qe,Ae,p(qe.el),St(qe),u,m,v),$.el=Ae.el,Q===null&&Fo(u,Ae.el),H&&Re(H,m),(Ee=$.props&&$.props.onVnodeUpdated)&&Re(()=>Ue(Ee,W,$,oe),m)}else{let $;const{el:B,props:H}=f,{bm:W,m:oe,parent:Q,root:Ee,type:Ae}=u,qe=Ut(f);vt(u,!1),W&&nn(W),!qe&&($=H&&H.onVnodeBeforeMount)&&Ue($,Q,f),vt(u,!0);{Ee.ce&&Ee.ce._def.shadowRoot!==!1&&Ee.ce._injectChildStyle(Ae);const Ke=u.subTree=wi(u);T(null,Ke,h,y,u,m,v),f.el=Ke.el}if(oe&&Re(oe,m),!qe&&($=H&&H.onVnodeMounted)){const Ke=f;Re(()=>Ue($,Q,Ke),m)}(f.shapeFlag&256||Q&&Ut(Q.vnode)&&Q.vnode.shapeFlag&256)&&u.a&&Re(u.a,m),u.isMounted=!0,f=h=y=null}};u.scope.on();const E=u.effect=new As(A);u.scope.off();const w=u.update=E.run.bind(E),D=u.job=E.runIfDirty.bind(E);D.i=u,D.id=u.uid,E.scheduler=()=>Gn(D),vt(u,!0),w()},fe=(u,f,h)=>{f.component=u;const y=u.vnode.props;u.vnode=f,u.next=null,yo(u,f.props,y,h),Co(u,f.children,h),We(),Ys(u),Je()},Te=(u,f,h,y,m,v,P,A,E=!1)=>{const w=u&&u.children,D=u?u.shapeFlag:0,$=f.children,{patchFlag:B,shapeFlag:H}=f;if(B>0){if(B&128){ee(w,$,h,y,m,v,P,A,E);return}else if(B&256){ft(w,$,h,y,m,v,P,A,E);return}}H&8?(D&16&&Be(w,m,v),$!==w&&c(h,$)):D&16?H&16?ee(w,$,h,y,m,v,P,A,E):Be(w,m,v,!0):(D&8&&c(h,""),H&16&&ue($,h,y,m,v,P,A,E))},ft=(u,f,h,y,m,v,P,A,E)=>{u=u||Ct,f=f||Ct;const w=u.length,D=f.length,$=Math.min(w,D);let B;for(B=0;B<$;B++){const H=f[B]=E?at(f[B]):je(f[B]);T(u[B],H,h,null,m,v,P,A,E)}w>D?Be(u,m,v,!0,!1,$):ue(f,h,y,m,v,P,A,E,$)},ee=(u,f,h,y,m,v,P,A,E)=>{let w=0;const D=f.length;let $=u.length-1,B=D-1;for(;w<=$&&w<=B;){const H=u[w],W=f[w]=E?at(f[w]):je(f[w]);if(yt(H,W))T(H,W,h,null,m,v,P,A,E);else break;w++}for(;w<=$&&w<=B;){const H=u[$],W=f[B]=E?at(f[B]):je(f[B]);if(yt(H,W))T(H,W,h,null,m,v,P,A,E);else break;$--,B--}if(w>$){if(w<=B){const H=B+1,W=HB)for(;w<=$;)re(u[w],m,v,!0),w++;else{const H=w,W=w,oe=new Map;for(w=W;w<=B;w++){const $e=f[w]=E?at(f[w]):je(f[w]);$e.key!=null&&oe.set($e.key,w)}let Q,Ee=0;const Ae=B-W+1;let qe=!1,Ke=0;const Xt=new Array(Ae);for(w=0;w=Ae){re($e,m,v,!0);continue}let ze;if($e.key!=null)ze=oe.get($e.key);else for(Q=W;Q<=B;Q++)if(Xt[Q-W]===0&&yt($e,f[Q])){ze=Q;break}ze===void 0?re($e,m,v,!0):(Xt[ze-W]=w+1,ze>=Ke?Ke=ze:qe=!0,T($e,f[ze],h,null,m,v,P,A,E),Ee++)}const ur=qe?Ro(Xt):Ct;for(Q=ur.length-1,w=Ae-1;w>=0;w--){const $e=W+w,ze=f[$e],cr=f[$e+1],fr=$e+1{const{el:v,type:P,transition:A,children:E,shapeFlag:w}=u;if(w&6){L(u.component.subTree,f,h,y);return}if(w&128){u.suspense.move(f,h,y);return}if(w&64){P.move(u,f,h,Zt);return}if(P===be){s(v,f,h);for(let $=0;$A.enter(v),m);else{const{leave:$,delayLeave:B,afterLeave:H}=A,W=()=>{u.ctx.isUnmounted?i(v):s(v,f,h)},oe=()=>{$(v,()=>{W(),H&&H()})};B?B(v,W,oe):oe()}else s(v,f,h)},re=(u,f,h,y=!1,m=!1)=>{const{type:v,props:P,ref:A,children:E,dynamicChildren:w,shapeFlag:D,patchFlag:$,dirs:B,cacheIndex:H}=u;if($===-2&&(m=!1),A!=null&&(We(),jt(A,null,h,u,!0),Je()),H!=null&&(f.renderCache[H]=void 0),D&256){f.ctx.deactivate(u);return}const W=D&1&&B,oe=!Ut(u);let Q;if(oe&&(Q=P&&P.onVnodeBeforeUnmount)&&Ue(Q,f,u),D&6)dt(u.component,h,y);else{if(D&128){u.suspense.unmount(h,y);return}W&&mt(u,null,f,"beforeUnmount"),D&64?u.type.remove(u,f,h,Zt,y):w&&!w.hasOnce&&(v!==be||$>0&&$&64)?Be(w,f,h,!1,!0):(v===be&&$&384||!m&&D&16)&&Be(E,f,h),y&&ne(u)}(oe&&(Q=P&&P.onVnodeUnmounted)||W)&&Re(()=>{Q&&Ue(Q,f,u),W&&mt(u,null,f,"unmounted")},h)},ne=u=>{const{type:f,el:h,anchor:y,transition:m}=u;if(f===be){se(h,y);return}if(f===rs){x(u);return}const v=()=>{i(h),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(u.shapeFlag&1&&m&&!m.persisted){const{leave:P,delayLeave:A}=m,E=()=>P(h,v);A?A(u.el,v,E):E()}else v()},se=(u,f)=>{let h;for(;u!==f;)h=b(u),i(u),u=h;i(f)},dt=(u,f,h)=>{const{bum:y,scope:m,job:v,subTree:P,um:A,m:E,a:w,parent:D,slots:{__:$}}=u;yi(E),yi(w),y&&nn(y),D&&j($)&&$.forEach(B=>{D.renderCache[B]=void 0}),m.stop(),v&&(v.flags|=8,re(P,u,f,h)),A&&Re(A,f),Re(()=>{u.isUnmounted=!0},f),f&&f.pendingBranch&&!f.isUnmounted&&u.asyncDep&&!u.asyncResolved&&u.suspenseId===f.pendingId&&(f.deps--,f.deps===0&&f.resolve())},Be=(u,f,h,y=!1,m=!1,v=0)=>{for(let P=v;P{if(u.shapeFlag&6)return St(u.component.subTree);if(u.shapeFlag&128)return u.suspense.next();const f=b(u.anchor||u.el),h=f&&f[lo];return h?b(h):f};let bs=!1;const ar=(u,f,h)=>{u==null?f._vnode&&re(f._vnode,null,null,!0):T(f._vnode||null,u,f,null,null,null,h),f._vnode=u,bs||(bs=!0,Ys(),Zs(),bs=!1)},Zt={p:T,um:re,m:L,r:ne,mt:q,mc:ue,pc:Te,pbc:Y,n:St,o:e};return{render:ar,hydrate:void 0,createApp:mo(ar)}}function is({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function vt({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ao(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vi(e,t,n=!1){const s=e.children,i=t.children;if(j(s)&&j(i))for(let r=0;r>1,e[n[l]]0&&(t[s]=n[r-1]),n[r]=s)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=t[o];return n}function xi(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:xi(t)}function yi(e){if(e)for(let t=0;tvo(Po);function xt(e,t,n){return Mo(e,t,n)}function Mo(e,t,n=te){const{immediate:s,deep:i,flush:r,once:o}=n,l=De({},n),a=t&&s||!t&&r!=="post";let d;if(Jt){if(r==="sync"){const S=$o();d=S.__watcherHandles||(S.__watcherHandles=[])}else if(!a){const S=()=>{};return S.stop=pt,S.resume=pt,S.pause=pt,S}}const c=ut;l.call=(S,O,T)=>He(S,c,O,T);let p=!1;r==="post"?l.scheduler=S=>{Re(S,c&&c.suspense)}:r!=="sync"&&(p=!0,l.scheduler=(S,O)=>{O?S():Gn(S)}),l.augmentJob=S=>{t&&(S.flags|=4),p&&(S.flags|=2,c&&(S.id=c.uid,S.i=c))};const b=Xr(e,t,l);return Jt&&(d?d.push(b):a&&b()),b}const ko=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${nt(t)}Modifiers`]||e[`${ht(t)}Modifiers`];function Io(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||te;let i=n;const r=t.startsWith("update:"),o=r&&ko(s,t.slice(7));o&&(o.trim&&(i=n.map(c=>de(c)?c.trim():c)),o.number&&(i=n.map(In)));let l,a=s[l=Mn(t)]||s[l=Mn(nt(t))];!a&&r&&(a=s[l=Mn(ht(t))]),a&&He(a,e,6,i);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,He(d,e,6,i)}}function Oo(e,t,n=!1){const s=t.emitsCache,i=s.get(e);if(i!==void 0)return i;const r=e.emits;let o={};return r?(j(r)?r.forEach(l=>o[l]=null):De(o,r),ce(e)&&s.set(e,o),o):(ce(e)&&s.set(e,null),null)}function yn(e,t){return!e||!Qt(t)?!1:(t=t.slice(2).replace(/Once$/,""),Z(e,t[0].toLowerCase()+t.slice(1))||Z(e,ht(t))||Z(e,t))}function Eu(){}function wi(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[r],slots:o,attrs:l,emit:a,render:d,renderCache:c,props:p,data:b,setupState:S,ctx:O,inheritAttrs:T}=e,R=bn(e);let M,V;try{if(n.shapeFlag&4){const x=i||s,C=x;M=je(d.call(C,x,c,p,S,b,O)),V=l}else{const x=t;M=je(x.length>1?x(p,{attrs:l,slots:o,emit:a}):x(p,null)),V=t.props?l:Lo(l)}}catch(x){zt.length=0,hn(x,e,1),M=pe(we)}let K=M;if(V&&T!==!1){const x=Object.keys(V),{shapeFlag:C}=K;x.length&&C&7&&(r&&x.some(Pn)&&(V=Bo(V,r)),K=lt(K,V,!1,!0))}return n.dirs&&(K=lt(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&Vt(K,n.transition),M=K,bn(R),M}const Lo=e=>{let t;for(const n in e)(n==="class"||n==="style"||Qt(n))&&((t||(t={}))[n]=e[n]);return t},Bo=(e,t)=>{const n={};for(const s in e)(!Pn(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Do(e,t,n){const{props:s,children:i,component:r}=e,{props:o,children:l,patchFlag:a}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?_i(s,o,d):!!o;if(a&8){const c=t.dynamicProps;for(let p=0;pe.__isSuspense;function Ho(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):ro(e)}const be=Symbol.for("v-fgt"),wn=Symbol.for("v-txt"),we=Symbol.for("v-cmt"),rs=Symbol.for("v-stc"),zt=[];let Pe=null;function I(e=!1){zt.push(Pe=e?null:[])}function No(){zt.pop(),Pe=zt[zt.length-1]||null}let Wt=1;function Ci(e,t=!1){Wt+=e,e<0&&Pe&&t&&(Pe.hasOnce=!0)}function Ti(e){return e.dynamicChildren=Wt>0?Pe||Ct:null,No(),Wt>0&&Pe&&Pe.push(e),e}function F(e,t,n,s,i,r){return Ti(g(e,t,n,s,i,r,!0))}function Xe(e,t,n,s,i){return Ti(pe(e,t,n,s,i,!0))}function _n(e){return e?e.__v_isVNode===!0:!1}function yt(e,t){return e.type===t.type&&e.key===t.key}const Ei=({key:e})=>e!=null?e:null,Sn=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?de(e)||ve(e)||X(e)?{i:ke,r:e,k:t,f:!!n}:e:null);function g(e,t=null,n=null,s=0,i=null,r=e===be?0:1,o=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ei(t),ref:t&&Sn(t),scopeId:Qs,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:ke};return l?(ls(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=de(n)?8:16),Wt>0&&!o&&Pe&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&Pe.push(a),a}const pe=Vo;function Vo(e,t=null,n=null,s=0,i=null,r=!1){if((!e||e===ho)&&(e=we),_n(e)){const l=lt(e,t,!0);return n&&ls(l,n),Wt>0&&!r&&Pe&&(l.shapeFlag&6?Pe[Pe.indexOf(e)]=l:Pe.push(l)),l.patchFlag=-2,l}if(el(e)&&(e=e.__vccOpts),t){t=jo(t);let{class:l,style:a}=t;l&&!de(l)&&(t.class=le(l)),ce(a)&&(Wn(a)&&!j(a)&&(a=De({},a)),t.style=On(a))}const o=de(e)?1:Si(e)?128:ti(e)?64:ce(e)?4:X(e)?2:0;return g(e,t,n,s,i,o,r,!0)}function jo(e){return e?Wn(e)||di(e)?De({},e):e:null}function lt(e,t,n=!1,s=!1){const{props:i,ref:r,patchFlag:o,children:l,transition:a}=e,d=t?Uo(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ei(d),ref:t&&t.ref?n&&r?j(r)?r.concat(Sn(t)):[r,Sn(t)]:Sn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&<(e.ssContent),ssFallback:e.ssFallback&<(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&Vt(c,a.clone(c)),c}function os(e=" ",t=0){return pe(wn,null,e,t)}function _e(e="",t=!1){return t?(I(),Xe(we,null,e)):pe(we,null,e)}function je(e){return e==null||typeof e=="boolean"?pe(we):j(e)?pe(be,null,e.slice()):_n(e)?at(e):pe(wn,null,String(e))}function at(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:lt(e)}function ls(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(j(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),ls(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!di(t)?t._ctx=ke:i===3&&ke&&(ke.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else X(t)?(t={default:t,_ctx:ke},n=32):(t=String(t),s&64?(n=16,t=[os(t)]):n=8);e.children=t,e.shapeFlag|=n}function Uo(...e){const t={};for(let n=0;nut||ke;let Cn,as;{const e=sn(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),r=>{i.length>1?i.forEach(o=>o(r)):i[0](r)}};Cn=t("__VUE_INSTANCE_SETTERS__",n=>ut=n),as=t("__VUE_SSR_SETTERS__",n=>Jt=n)}const us=e=>{const t=ut;return Cn(e),e.scope.on(),()=>{e.scope.off(),Cn(t)}},Ri=()=>{ut&&ut.scope.off(),Cn(null)};function Pi(e){return e.vnode.shapeFlag&4}let Jt=!1;function Wo(e,t=!1,n=!1){t&&as(t);const{props:s,children:i}=e.vnode,r=Pi(e);xo(e,s,r,t),So(e,i,n||t);const o=r?Jo(e,t):void 0;return t&&as(!1),o}function Jo(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,go);const{setup:s}=n;if(s){We();const i=e.setupContext=s.length>1?Yo(e):null,r=us(e),o=Rt(s,e,0,[e.props,i]),l=xs(o);if(Je(),r(),(l||e.sp)&&!Ut(e)&&fo(e),l){if(o.then(Ri,Ri),t)return o.then(a=>{$i(e,a)}).catch(a=>{hn(a,e,0)});e.asyncDep=o}else $i(e,o)}else Mi(e)}function $i(e,t,n){X(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ce(t)&&(e.setupState=zs(t)),Mi(e)}function Mi(e,t,n){const s=e.type;e.render||(e.render=s.render||pt)}const Go={get(e,t){return me(e,"get",""),e[t]}};function Yo(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Go),slots:e.slots,emit:e.emit,expose:t}}function Tn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(zs(qr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Kt)return Kt[n](e)},has(t,n){return n in t||n in Kt}})):e.proxy}const Zo=/(?:^|[-_])(\w)/g,Xo=e=>e.replace(Zo,t=>t.toUpperCase()).replace(/[-_]/g,"");function Qo(e,t=!0){return X(e)?e.displayName||e.name:e.name||t&&e.__name}function ki(e,t,n=!1){let s=Qo(t);if(!s&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(s=i[1])}if(!s&&e&&e.parent){const i=r=>{for(const o in r)if(r[o]===t)return o};s=i(e.components||e.parent.type.components)||i(e.appContext.components)}return s?Xo(s):n?"App":"Anonymous"}function el(e){return X(e)&&"__vccOpts"in e}const he=(e,t)=>Yr(e,t,Jt);function tl(e,t,n){const s=arguments.length;return s===2?ce(t)&&!j(t)?_n(t)?pe(e,null,[t]):pe(e,t):pe(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&_n(n)&&(n=[n]),pe(e,t,n))}const nl="3.5.18";/** -* @vue/runtime-dom v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let cs;const Ii=typeof window!="undefined"&&window.trustedTypes;if(Ii)try{cs=Ii.createPolicy("vue",{createHTML:e=>e})}catch{}const Oi=cs?e=>cs.createHTML(e):e=>e,sl="http://www.w3.org/2000/svg",il="http://www.w3.org/1998/Math/MathML",Qe=typeof document!="undefined"?document:null,Li=Qe&&Qe.createElement("template"),rl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?Qe.createElementNS(sl,e):t==="mathml"?Qe.createElementNS(il,e):n?Qe.createElement(e,{is:n}):Qe.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Qe.createTextNode(e),createComment:e=>Qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,r){const o=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{Li.innerHTML=Oi(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Li.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},ct="transition",Gt="animation",Yt=Symbol("_vtc"),Bi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},ol=De({},ni,Bi),ll=(e=>(e.displayName="Transition",e.props=ol,e))((e,{slots:t})=>tl(co,al(e),t)),wt=(e,t=[])=>{j(e)?e.forEach(n=>n(...t)):e&&e(...t)},Di=e=>e?j(e)?e.some(t=>t.length>1):e.length>1:!1;function al(e){const t={};for(const _ in e)_ in Bi||(t[_]=e[_]);if(e.css===!1)return t;const{name:n="v",type:s,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:d=o,appearToClass:c=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:b=`${n}-leave-active`,leaveToClass:S=`${n}-leave-to`}=e,O=ul(i),T=O&&O[0],R=O&&O[1],{onBeforeEnter:M,onEnter:V,onEnterCancelled:K,onLeave:x,onLeaveCancelled:C,onBeforeAppear:z=M,onAppear:G=V,onAppearCancelled:ue=K}=t,N=(_,k,q,xe)=>{_._enterCancelled=xe,_t(_,k?c:l),_t(_,k?d:o),q&&q()},Y=(_,k)=>{_._isLeaving=!1,_t(_,p),_t(_,S),_t(_,b),k&&k()},ae=_=>(k,q)=>{const xe=_?G:V,Le=()=>N(k,_,q);wt(xe,[k,Le]),Fi(()=>{_t(k,_?a:r),et(k,_?c:l),Di(xe)||Hi(k,s,T,Le)})};return De(t,{onBeforeEnter(_){wt(M,[_]),et(_,r),et(_,o)},onBeforeAppear(_){wt(z,[_]),et(_,a),et(_,d)},onEnter:ae(!1),onAppear:ae(!0),onLeave(_,k){_._isLeaving=!0;const q=()=>Y(_,k);et(_,p),_._enterCancelled?(et(_,b),ji()):(ji(),et(_,b)),Fi(()=>{_._isLeaving&&(_t(_,p),et(_,S),Di(x)||Hi(_,s,R,q))}),wt(x,[_,q])},onEnterCancelled(_){N(_,!1,void 0,!0),wt(K,[_])},onAppearCancelled(_){N(_,!0,void 0,!0),wt(ue,[_])},onLeaveCancelled(_){Y(_),wt(C,[_])}})}function ul(e){if(e==null)return null;if(ce(e))return[fs(e.enter),fs(e.leave)];{const t=fs(e);return[t,t]}}function fs(e){return mr(e)}function et(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Yt]||(e[Yt]=new Set)).add(t)}function _t(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Yt];n&&(n.delete(t),n.size||(e[Yt]=void 0))}function Fi(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let cl=0;function Hi(e,t,n,s){const i=e._endId=++cl,r=()=>{i===e._endId&&s()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:l,propCount:a}=fl(e,t);if(!o)return s();const d=o+"end";let c=0;const p=()=>{e.removeEventListener(d,b),r()},b=S=>{S.target===e&&++c>=a&&p()};setTimeout(()=>{c(n[O]||"").split(", "),i=s(`${ct}Delay`),r=s(`${ct}Duration`),o=Ni(i,r),l=s(`${Gt}Delay`),a=s(`${Gt}Duration`),d=Ni(l,a);let c=null,p=0,b=0;t===ct?o>0&&(c=ct,p=o,b=r.length):t===Gt?d>0&&(c=Gt,p=d,b=a.length):(p=Math.max(o,d),c=p>0?o>d?ct:Gt:null,b=c?c===ct?r.length:a.length:0);const S=c===ct&&/\b(transform|all)(,|$)/.test(s(`${ct}Property`).toString());return{type:c,timeout:p,propCount:b,hasTransform:S}}function Ni(e,t){for(;e.lengthVi(n)+Vi(e[s])))}function Vi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ji(){return document.body.offsetHeight}function dl(e,t,n){const s=e[Yt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ui=Symbol("_vod"),pl=Symbol("_vsh"),hl=Symbol(""),gl=/(^|;)\s*display\s*:/;function bl(e,t,n){const s=e.style,i=de(n);let r=!1;if(n&&!i){if(t)if(de(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&En(s,l,"")}else for(const o in t)n[o]==null&&En(s,o,"");for(const o in n)o==="display"&&(r=!0),En(s,o,n[o])}else if(i){if(t!==n){const o=s[hl];o&&(n+=";"+o),s.cssText=n,r=gl.test(n)}}else t&&e.removeAttribute("style");Ui in e&&(e[Ui]=r?s.display:"",e[pl]&&(s.display="none"))}const qi=/\s*!important$/;function En(e,t,n){if(j(n))n.forEach(s=>En(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=ml(e,t);qi.test(n)?e.setProperty(ht(s),n.replace(qi,""),"important"):e[s]=n}}const Ki=["Webkit","Moz","ms"],ds={};function ml(e,t){const n=ds[t];if(n)return n;let s=nt(t);if(s!=="filter"&&s in e)return ds[t]=s;s=_s(s);for(let i=0;ips||(wl.then(()=>ps=0),ps=Date.now());function Sl(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;He(Cl(s,n.value),t,5,[s])};return n.value=e,n.attached=_l(),n}function Cl(e,t){if(j(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>i=>!i._stopped&&s&&s(i))}else return t}const Zi=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Tl=(e,t,n,s,i,r)=>{const o=i==="svg";t==="class"?dl(e,s,o):t==="style"?bl(e,n,s):Qt(t)?Pn(t)||xl(e,t,n,s,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):El(e,t,s,o))?(Ji(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Wi(e,t,s,o,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!de(s))?Ji(e,nt(t),s,r,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Wi(e,t,s,o))};function El(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zi(t)&&X(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Zi(t)&&de(n)?!1:t in e}const Xi=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?n=>nn(t,n):t};function Al(e){e.target.composing=!0}function Qi(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const hs=Symbol("_assign"),Rl={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e[hs]=Xi(i);const r=s||i.props&&i.props.type==="number";kt(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),r&&(l=In(l)),e[hs](l)}),n&&kt(e,"change",()=>{e.value=e.value.trim()}),t||(kt(e,"compositionstart",Al),kt(e,"compositionend",Qi),kt(e,"change",Qi))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:r}},o){if(e[hs]=Xi(o),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?In(e.value):e.value,a=t==null?"":t;l!==a&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===a)||(e.value=a))}},Pl=["ctrl","shift","alt","meta"],$l={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Pl.some(n=>e[`${n}Key`]&&!t.includes(n))},Oe=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(i,...r)=>{for(let o=0;o{const t=kl().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=Ll(s);if(!i)return;const r=t._component;!X(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const o=n(i,!1,Ol(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},t};function Ol(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Ll(e){return de(e)?document.querySelector(e):e}const Bl=["aria-pressed"],Dl={key:0,viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true"},Fl={key:1,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",fill:"none"},Hl={__name:"ChatbotToggler",props:{isOpen:{type:Boolean,required:!0}},emits:["toggle"],setup(e){return(t,n)=>(I(),F("button",{class:"fixed bottom-5 right-5 z-9999 grid h-12 w-12 appearance-none place-items-center rounded-full border border-white/20 bg-gradient-to-br from-brand-500 to-brand-600 text-white shadow-[0_20px_36px_-20px_rgba(109,79,194,0.85)] transition-all duration-250 hover:-translate-y-0.5 hover:from-brand-600 hover:to-violet-700 hover:shadow-[0_22px_40px_-22px_rgba(109,79,194,1)] focus:outline-none max-[600px]:bottom-3 max-[600px]:right-3 max-[600px]:h-13 max-[600px]:w-13",style:{"border-radius":"9999px"},"aria-pressed":e.isOpen?"true":"false",onClick:n[0]||(n[0]=s=>t.$emit("toggle"))},[e.isOpen?(I(),F("svg",Fl,n[2]||(n[2]=[g("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):(I(),F("svg",Dl,n[1]||(n[1]=[g("path",{d:"M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",fill:"currentColor",stroke:"currentColor","stroke-width":"2","stroke-linecap":"miter","stroke-linejoin":"miter"},null,-1)])))],8,Bl))}},Nl={class:"chat-header relative flex min-h-14 items-center justify-between px-4 pb-2.5 pt-3 text-white sm:px-5"},Vl={class:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5"},jl={xmlns:"http://www.w3.org/2000/svg",width:"35",height:"35",viewBox:"0 0 1024 1024",class:"h-8 w-8 shrink-0 rounded-full bg-white p-1.5 shadow-md motion-safe:animate-soft-float",style:{fill:"#6d4fc2"}},Ul={class:"ml-2 flex items-center gap-1.5"},ql=["title"],Kl=["title","aria-label"],zl={key:0,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Wl={key:1,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Jl=["title","aria-label"],Gl={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Yl={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Zl={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Xl={__name:"ChatHeader",props:{windowMode:{type:String,required:!0},autoReadEnabled:{type:Boolean,required:!0},activeTtsProvider:{type:String,required:!0}},emits:["close","cycleResize","toggleAutoRead"],setup(e){const t=e,n={default:"Compact",half:"Half Screen",full:"Full Screen"},s=he(()=>n[t.windowMode]||"Compact"),i=he(()=>t.windowMode==="default"?"Half Screen":t.windowMode==="half"?"Full Screen":"Compact"),r=he(()=>t.activeTtsProvider==="polly"?"TTS: Polly":t.activeTtsProvider==="browser"?"TTS: Browser":"TTS: Off"),o=he(()=>t.activeTtsProvider==="polly"?"bg-emerald-500/45":t.activeTtsProvider==="browser"?"bg-amber-500/45":"bg-slate-500/35");return(l,a)=>(I(),F("div",Nl,[g("div",Vl,[(I(),F("svg",jl,a[3]||(a[3]=[g("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))),a[4]||(a[4]=g("h2",{class:"truncate text-xs font-semibold tracking-[0.01em] sm:text-base text-white/95"},"ChangAI from ERPGulf",-1))]),g("div",Ul,[g("span",{class:le(["hidden rounded-full border border-white/25 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white/95 shadow-sm backdrop-blur-sm sm:inline",o.value]),title:`TTS provider: ${r.value}`},Se(r.value),11,ql),g("button",{class:le(["h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none sm:flex",e.autoReadEnabled?"bg-white/24 shadow-sm":"hover:bg-white/15"]),style:{"border-radius":"0.375rem"},title:e.autoReadEnabled?"Auto speech on":"Auto speech off","aria-label":e.autoReadEnabled?"Turn off auto speech":"Turn on auto speech",onClick:a[0]||(a[0]=d=>l.$emit("toggleAutoRead"))},[e.autoReadEnabled?(I(),F("svg",zl,a[5]||(a[5]=[g("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),g("path",{d:"M15 9a4 4 0 0 1 0 6"},null,-1),g("path",{d:"M18 7a7 7 0 0 1 0 10"},null,-1)]))):(I(),F("svg",Wl,a[6]||(a[6]=[g("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),g("path",{d:"M22 9l-6 6"},null,-1),g("path",{d:"M16 9l6 6"},null,-1)])))],10,Kl),g("button",{class:le(["flex h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none","bg-white/20 shadow-sm hover:bg-white/25"]),style:{"border-radius":"0.375rem"},title:`Resize mode: ${s.value} (click to ${i.value})`,"aria-label":`Resize mode ${s.value}. Click to switch to ${i.value}`,onClick:a[1]||(a[1]=d=>l.$emit("cycleResize"))},[e.windowMode==="default"?(I(),F("svg",Gl,a[7]||(a[7]=[g("rect",{x:"7",y:"8",width:"10",height:"8",rx:"2"},null,-1)]))):e.windowMode==="half"?(I(),F("svg",Yl,a[8]||(a[8]=[g("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),g("path",{d:"M12 5v14"},null,-1)]))):(I(),F("svg",Zl,a[9]||(a[9]=[g("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),g("path",{d:"M8 8H6v2M16 8h2v2M8 16H6v-2M16 16h2v-2"},null,-1)])))],8,Jl),g("button",{class:"grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-white/20 text-white transition-all duration-200 hover:scale-105 hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",style:{"border-radius":"9999px"},"aria-label":"Close chatbot",onClick:a[2]||(a[2]=d=>l.$emit("close"))},a[10]||(a[10]=[g("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[g("path",{d:"M6 9l6 6 6-6"})],-1)]))])]))}},Ql={class:"flex gap-1.5 border-b border-slate-200/80 px-2.5 pb-2.5 pt-1"},ea=["onClick"],ta={class:"inline-flex items-center gap-1.5"},na={__name:"TabBar",props:{modelValue:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e){const t=e,n=he(()=>{const s=[{id:"chat",label:"Chats"},{id:"debug",label:"Debug"},{id:"support",label:"Support"},{id:"settings",label:"Settings"}];return t.debugEnabled?s:s.filter(i=>i.id!=="debug")});return(s,i)=>(I(),F("div",Ql,[(I(!0),F(be,null,xn(n.value,r=>(I(),F("button",{key:r.id,class:le(["group min-w-0 flex-1 h-9 appearance-none rounded-lg border border-transparent bg-transparent px-2 text-xs font-semibold transition-all duration-200 focus:outline-none",e.modelValue===r.id?"border-white/30 bg-linear-to-r from-violet-300/36 via-indigo-300/30 to-sky-300/28 text-white shadow-[0_4px_10px_rgba(20,24,40,0.22)]":"text-white/80 hover:border-white/25 hover:bg-white/12 hover:text-white"]),onClick:o=>s.$emit("update:modelValue",r.id)},[g("span",ta,[g("span",{class:le(["h-1.5 w-1.5 rounded-full transition-colors duration-200",e.modelValue===r.id?"bg-white":"bg-white/40 group-hover:bg-white/70"])},null,2),os(" "+Se(r.label),1)])],10,ea))),128))]))}},sa=(e,t)=>{const n=e.__vccOpts||e;for(const[s,i]of t)n[s]=i;return n},ia={},ra={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 1024 1024",class:"h-7.5 w-7.5 shrink-0 self-end rounded-full bg-gradient-to-br from-brand-500 to-brand-600 p-1.5 fill-white shadow-[0_10px_18px_-12px_rgba(109,79,194,0.85)]"};function oa(e,t){return I(),F("svg",ra,t[0]||(t[0]=[g("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))}const tr=sa(ia,[["render",oa]]),An={PIPELINE:"changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline",SUPPORT:"changai.changai.api.v2.text2sql_pipeline_v2.support_bot",SETTINGS:"changai.changai.api.v2.text2sql_pipeline_v2.get_frontend_settings",TTS:"changai.changai.api.v2.text2sql_pipeline_v2.synthesize_tts"};function gs(e,t={},n="actual"){return n==="test"?Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify(t)}`}):!window.frappe||!window.frappe.call?Promise.reject(new Error("Frappe API is unavailable in actual mode.")):new Promise((s,i)=>{window.frappe.call({method:e,args:t,callback(r){s(r.message)},error(r){i(r)}})})}function la(e,t,n="actual",s=null){if(n==="test")return{promise:Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify({user_question:e,chat_id:t,request_id:s})}`}),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let i=null,r=!1;return{promise:new Promise((a,d)=>{i=window.frappe.call({method:An.PIPELINE,args:{user_question:e,chat_id:t,request_id:s},callback(c){r=!0,a(c.message)},error(c){r=!0,d(c)}})}),cancel:()=>r||!i||typeof i.abort!="function"?!1:(i.abort(),r=!0,!0)}}function aa(e,t="actual"){return gs(An.SUPPORT,{message:e},t)}function ua(e="actual"){return gs(An.SETTINGS,{},e)}function ca(e,t="Joanna",n="actual"){return gs(An.TTS,{text:e,voice_id:t},n)}const fa={key:1,class:"flex min-w-0 max-w-[calc(100%-2.5rem)] flex-1 flex-col max-[600px]:max-w-[calc(100%-2.25rem)]"},da={key:0,class:"flex w-fit flex-col items-start gap-1"},pa=["aria-label"],ha={class:"inline-flex items-center gap-1.5"},ga={class:"text-[8px] font-semibold tracking-[0.12em] uppercase text-[#3a67c9]"},ba={key:1,class:"flex w-fit max-w-full flex-col items-start gap-2"},ma={class:"chat-card relative w-fit max-w-full whitespace-pre-line rounded-[10px_10px_10px_3px] px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900"},va=["innerHTML"],xa={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-14 rounded-b-[10px] bg-linear-to-t from-white via-white/92 to-white/0","aria-hidden":"true"},ya={key:0,class:"flex flex-wrap items-center gap-2"},wa=["title","aria-label"],_a={key:1,class:"flex flex-wrap items-center"},Sa=["title","aria-label"],Ca={viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Ta={key:2,class:"w-fit max-w-[85%] whitespace-pre-line rounded-[13px_13px_3px_13px] bg-linear-to-br from-brand-500 to-brand-600 px-4 py-3 text-[11px] leading-relaxed wrap-anywhere text-white shadow-[0_14px_30px_-18px_rgba(109,79,194,0.85)] max-[600px]:max-w-[88%]"},nr={__name:"ChatMessage",props:{message:{type:Object,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,default:()=>({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Joanna"})}},setup(e){const t=e,n=U(!1),s=U(null),i=U(!1),r=U(!1),o=he(()=>typeof window!="undefined"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window);function l(x){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("changai-tts-provider",{detail:{provider:x}}))}function a(x){return typeof x!="string"?"":x.includes("<")?(new DOMParser().parseFromString(x,"text/html").body.textContent||"").replace(/\s+/g," ").trim():x.trim()}function d(){o.value&&window.speechSynthesis.cancel(),s.value&&(s.value.pause(),s.value.src="",s.value=null),n.value=!1}function c(){var x,C,z;if(r.value=!r.value,r.value)d();else{const G=T.value;if(!t.autoReadEnabled||!((x=t.ttsConfig)!=null&&x.enableVoiceChat)||!G||O())return;if((C=t.ttsConfig)!=null&&C.pollyAvailable&&((z=t.ttsConfig)!=null&&z.usePolly)){b(G).catch(ue=>{p(G)});return}p(G)}}function p(x){if(!o.value||!x)return;window.dispatchEvent(new CustomEvent("changai-tts-stop")),window.speechSynthesis.cancel();const C=new SpeechSynthesisUtterance(x);C.rate=1,C.pitch=1,C.onend=()=>{n.value=!1},C.onerror=()=>{n.value=!1},n.value=!0,l("browser"),window.speechSynthesis.speak(C)}async function b(x){var N;const C=await ca(x,((N=t.ttsConfig)==null?void 0:N.voiceId)||"Joanna");if(!(C!=null&&C.ok)||!(C!=null&&C.audio_base64))throw new Error((C==null?void 0:C.error)||"Polly synthesis failed");window.dispatchEvent(new CustomEvent("changai-tts-stop")),d();const z=(C==null?void 0:C.mime_type)||"audio/mpeg",G=new Audio(`data:${z};base64,${C.audio_base64}`);s.value=G,n.value=!0;let ue=!1;G.onplay=()=>{ue=!0,l("polly")},G.onended=()=>{s.value===G&&(s.value=null),n.value=!1},G.onerror=()=>{s.value===G&&(s.value=null),n.value=!1},await G.play(),ue||l("polly")}function S(){d()}function O(){var x;return!!((x=t.message)!=null&&x.isStatus)}const T=he(()=>{var x;return a(((x=t.message)==null?void 0:x.text)||"")}),R=he(()=>{var x;return((x=t.message)==null?void 0:x.role)!=="user"&&O()}),M=he(()=>{var x;return(x=t.message)!=null&&x.isStatus?t.message.statusType==="support"?"Sending to support":T.value||"Thinking":""}),V=he(()=>{var z;if(((z=t.message)==null?void 0:z.role)==="user"||R.value)return!1;const x=T.value,C=x.split(/\n+/).filter(Boolean).length;return x.length>520||C>8}),K=he(()=>{var x,C;return((x=t.message)==null?void 0:x.role)!=="user"&&!R.value&&((C=t.ttsConfig)==null?void 0:C.enableVoiceChat)});return xt(()=>t.message.text,async(x,C)=>{var ue,N,Y;if(!t.autoReadEnabled||t.message.role==="user"||r.value)return;if(!((ue=t.ttsConfig)!=null&&ue.enableVoiceChat)){l("off");return}const z=a(x);if(!z||O())return;const G=a(C||"");if(z!==G){if((N=t.ttsConfig)!=null&&N.pollyAvailable&&((Y=t.ttsConfig)!=null&&Y.usePolly))try{await b(z);return}catch{}p(z)}}),xt(()=>t.message.text,()=>{i.value=!1,r.value=!1}),qt(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-stop",S)}),vn(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-stop",S),n.value&&d()}),(x,C)=>(I(),F("div",{class:le(["motion-safe:animate-fade-rise flex w-full gap-1.5",e.message.role==="user"?"flex-col items-end":"items-start"])},[e.message.role!=="user"?(I(),Xe(tr,{key:0})):_e("",!0),e.message.role!=="user"?(I(),F("div",fa,[R.value?(I(),F("div",da,[g("div",{class:"chat-card inline-flex w-fit rounded-[10px_10px_10px_3px] px-3 py-2",role:"status","aria-live":"polite","aria-label":M.value},[g("div",ha,[C[1]||(C[1]=g("span",{class:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center"},[g("span",{class:"absolute inset-0 rounded-full border border-transparent border-t-[#4b89ff] border-r-[#4b89ff]/70 animate-gemini-arc"}),g("svg",{viewBox:"0 0 24 24",class:"relative h-3 w-3 text-[#4b89ff] animate-gemini-spark","aria-hidden":"true"},[g("path",{fill:"currentColor",d:"M12 2.8c.52 3.22 1.6 5.66 3.22 7.28 1.62 1.62 4.06 2.7 7.28 3.22-3.22.52-5.66 1.6-7.28 3.22-1.62 1.62-2.7 4.06-3.22 7.28-.52-3.22-1.6-5.66-3.22-7.28-1.62-1.62-4.06-2.7-7.28-3.22 3.22-.52 5.66-1.6 7.28-3.22 1.62-1.62 2.7-4.06 3.22-7.28Z"})])],-1)),g("span",ga,Se(M.value),1)])],8,pa)])):(I(),F("div",ba,[g("div",ma,[g("div",{class:le(["overflow-x-auto",V.value&&!i.value?"max-h-48 overflow-y-hidden":""]),innerHTML:e.message.text},null,10,va),V.value&&!i.value?(I(),F("div",xa)):_e("",!0)]),V.value?(I(),F("div",ya,[g("button",{type:"button",class:"inline-flex items-center rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-600 transition-colors duration-200 hover:border-brand-200 hover:text-brand-600",title:i.value?"Collapse response":"Expand response","aria-label":i.value?"Collapse response":"Expand response",onClick:C[0]||(C[0]=z=>i.value=!i.value)},Se(i.value?"Collapse":"Expand"),9,wa)])):_e("",!0),K.value?(I(),F("div",_a,[g("button",{type:"button",class:le(["inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors duration-200",r.value?"border-red-200 bg-red-50 text-red-600 hover:border-red-300 hover:bg-red-100":"border-green-200 bg-green-50 text-green-600 hover:border-green-300 hover:bg-green-100"]),title:r.value?"Unmute voice playback":"Mute voice playback","aria-label":r.value?"Unmute voice playback":"Mute voice playback",onClick:c},[(I(),F("svg",Ca,[C[6]||(C[6]=g("path",{d:"M11 5L6 9H3v6h3l5 4V5Z"},null,-1)),r.value?(I(),F(be,{key:0},[C[2]||(C[2]=g("path",{d:"M15 9l4 6"},null,-1)),C[3]||(C[3]=g("path",{d:"M19 9l-4 6"},null,-1))],64)):(I(),F(be,{key:1},[C[4]||(C[4]=g("path",{d:"M15 10a3 3 0 0 1 0 4"},null,-1)),C[5]||(C[5]=g("path",{d:"M17.5 7.5a6 6 0 0 1 0 9"},null,-1))],64))]))],10,Sa)])):_e("",!0)]))])):(I(),F("p",Ta,Se(e.message.text),1))],2))}},Ea={class:"flex flex-col gap-4 sm:gap-5"},Aa={class:"motion-safe:animate-fade-rise flex w-full items-start gap-1.5"},Ra={__name:"ChatTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(I(),F("div",Ea,[g("div",Aa,[pe(tr),n[0]||(n[0]=g("p",{class:"w-fit max-w-[calc(100%-2.5rem)] whitespace-pre-line rounded-[10px_10px_10px_3px] bg-brand-50 px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900 max-[600px]:max-w-[calc(100%-2.25rem)]"},[os(" Hello there 👋 I am ChangAI from ERPGulf.com , your ERP assistant."),g("br"),g("a",{target:"_blank",href:"https://app.erpgulf.com/en/articles/chang-ai-quick-start-guide",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ChangAI Quick Start Guide - Click here.")],-1))]),(I(!0),F(be,null,xn(e.messages,(s,i)=>(I(),Xe(nr,{key:i,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}};function sr(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ir(e){var t,n;return(e==null?void 0:e.message)||((t=e==null?void 0:e.responseJSON)==null?void 0:t.exception)||((n=e==null?void 0:e.responseJSON)==null?void 0:n.message)||(e==null?void 0:e.responseText)||String(e)}function Pa(e){return typeof e=="string"?e:e&&typeof e=="object"?e.error?`⚠️ ${e.error}`:e.answer||e.text||"":""}const $a={key:0,class:"rounded-lg bg-brand-50 px-4 py-3 text-xs text-black"},Ma={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},ka={key:1,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-brand-50 p-2 text-[11px]"},Ia={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},Oa={__name:"DebugTab",props:{logs:{type:Array,required:!0},currentDebug:{type:Object,default:null}},setup(e){const t=new Set(["gemini_json_content","private_key","private_key_id","client_secret","client_id","aws_access_key","aws_secret_key","api_key","token","access_token","refresh_token","password","secret","authorization","embed_version_id","llm_version_id","entity_retriever","retriever","deploy_url","support_api_url","get_ticket_details_url"]);function n(i,r=0){if(r>10||i===null||i===void 0||typeof i=="string"||typeof i=="number"||typeof i=="boolean")return i;if(Array.isArray(i))return i.map(o=>n(o,r+1));if(typeof i=="object"){const o={};for(const[l,a]of Object.entries(i))t.has(l.toLowerCase())||(o[l]=n(a,r+1));return o}return i}function s(i){return sr(n(i))}return(i,r)=>(I(),F("div",null,[e.logs.length===0?(I(),F("p",$a,"No debug data yet.")):_e("",!0),(I(!0),F(be,null,xn(e.logs,(o,l)=>(I(),F("div",{key:l,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-gray-100 p-2 text-[11px]"},[g("pre",Ma,Se(s(o)),1)]))),128)),e.currentDebug?(I(),F("div",ka,[g("pre",Ia,Se(s(e.currentDebug)),1)])):_e("",!0)]))}},La={class:"flex flex-col gap-4 sm:gap-5"},Ba={key:0,class:"chat-card motion-safe:animate-fade-rise rounded-lg px-4 py-3 text-xs text-slate-900"},Da={__name:"SupportTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(I(),F("div",La,[e.messages.length===0?(I(),F("p",Ba,"Send a message to Support.")):_e("",!0),(I(!0),F(be,null,xn(e.messages,(s,i)=>(I(),Xe(nr,{key:i,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}},Fa={class:"flex flex-col gap-4"},Ha={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Na={class:"flex items-start justify-between gap-4"},Va=["aria-pressed","title"],ja={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Ua={class:"flex items-start justify-between gap-4"},qa={class:"mt-2 text-[11px] text-slate-500"},Ka={key:0,class:"mt-1 text-[11px] text-slate-500"},za={key:1,class:"mt-1 text-[11px] text-slate-500"},Wa=["aria-pressed","disabled"],Ja={key:0,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Ga={key:1,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Ya={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Za={class:"flex items-start justify-between gap-4"},Xa=["aria-pressed","title"],Qa={__name:"SettingsTab",props:{autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},settings:{type:Object,default:null},debugEnabled:{type:Boolean,default:!1}},emits:["toggleAutoRead","togglePollyPreference","toggleDebug"],setup(e){const t=e,n=he(()=>{var s,i;return(s=t.ttsConfig)!=null&&s.enableVoiceChat?(i=t.ttsConfig)!=null&&i.pollyAvailable?"Available":"Unavailable":"Voice disabled on server"});return(s,i)=>{var r,o,l,a,d,c,p,b,S,O,T,R,M,V,K;return I(),F("div",Fa,[i[8]||(i[8]=g("div",{class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4 text-slate-900"},[g("h3",{class:"text-sm font-semibold tracking-[0.01em]"},"Speech Settings"),g("p",{class:"mt-1 text-xs leading-relaxed text-slate-600"},"These controls apply only inside this chatbot box for the current browser session.")],-1)),g("div",Ha,[g("div",Na,[i[3]||(i[3]=g("div",null,[g("p",{class:"text-sm font-semibold text-slate-900"},"Auto Read Replies"),g("p",{class:"mt-1 text-xs text-slate-600"},"Automatically read bot replies aloud.")],-1)),g("button",{class:le(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.autoReadEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.autoReadEnabled?"true":"false",title:e.autoReadEnabled?"Disable auto read":"Enable auto read",onClick:i[0]||(i[0]=x=>s.$emit("toggleAutoRead"))},[g("span",{class:le(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.autoReadEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Va)]),g("p",{class:le(["mt-3 text-[11px] font-medium",e.autoReadEnabled?"text-emerald-700":"text-slate-500"])},Se(e.autoReadEnabled?"Auto read is active.":"Auto read is currently off."),3)]),g("div",ja,[g("div",Ua,[g("div",null,[i[4]||(i[4]=g("p",{class:"text-sm font-semibold text-slate-900"},"Use Amazon Polly",-1)),i[5]||(i[5]=g("p",{class:"mt-1 text-xs text-slate-600"},"Use Polly when available; otherwise browser speech is used automatically.",-1)),g("p",qa,"Availability: "+Se(n.value),1),(r=e.settings)!=null&&r.aws_region?(I(),F("p",Ka,"Region: "+Se(e.settings.aws_region),1)):_e("",!0),(o=e.ttsConfig)!=null&&o.voiceId?(I(),F("p",za,"Voice: "+Se(e.ttsConfig.voiceId),1)):_e("",!0)]),g("button",{class:le(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-55",(l=e.ttsConfig)!=null&&l.usePolly&&((a=e.ttsConfig)!=null&&a.enableVoiceChat)&&((d=e.ttsConfig)!=null&&d.pollyAvailable)?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":(c=e.ttsConfig)!=null&&c.usePolly&&((p=e.ttsConfig)!=null&&p.enableVoiceChat)&&((b=e.ttsConfig)!=null&&b.pollyAvailable)?"true":"false",disabled:!((S=e.ttsConfig)!=null&&S.pollyAvailable)||!((O=e.ttsConfig)!=null&&O.enableVoiceChat),onClick:i[1]||(i[1]=x=>s.$emit("togglePollyPreference"))},[g("span",{class:le(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",(T=e.ttsConfig)!=null&&T.usePolly&&((R=e.ttsConfig)!=null&&R.enableVoiceChat)&&((M=e.ttsConfig)!=null&&M.pollyAvailable)?"left-[1.45rem]":"left-0.5"])},null,2)],10,Wa)]),(V=e.ttsConfig)!=null&&V.enableVoiceChat?(K=e.ttsConfig)!=null&&K.pollyAvailable?_e("",!0):(I(),F("p",Ga,"Polly is not available for this site. Browser speech will be used.")):(I(),F("p",Ja,"Voice chat is disabled in ChangAI Settings."))]),g("div",Ya,[g("div",Za,[g("div",null,[i[6]||(i[6]=g("p",{class:"text-sm font-semibold text-slate-900"},"Enable Debug Tab",-1)),i[7]||(i[7]=g("p",{class:"mt-1 text-xs text-slate-600"}," Show or hide the Debug tab inside this chatbot. ",-1)),g("p",{class:le(["mt-2 text-[11px] font-medium",e.debugEnabled?"text-emerald-700":"text-slate-500"])},Se(e.debugEnabled?"Debug tab is active.":"Debug tab is currently off."),3)]),g("button",{type:"button",class:le(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.debugEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.debugEnabled?"true":"false",title:e.debugEnabled?"Disable debug tab":"Enable debug tab",onClick:i[2]||(i[2]=x=>s.$emit("toggleDebug"))},[g("span",{class:le(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.debugEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Xa)])])])}}},eu={key:0,class:"pointer-events-none absolute -top-14 left-0 right-0 z-20 flex justify-center px-2",role:"status","aria-live":"polite"},tu={__name:"StatusToast",props:{visible:{type:Boolean,required:!0},message:{type:String,default:""},type:{type:String,default:"info"},dismissible:{type:Boolean,default:!0}},emits:["close"],setup(e){const t=e,n=he(()=>t.type==="error"?"bg-red-50 text-red-700 ring-red-200":(t.type==="listening","bg-blue-50 text-blue-700 ring-blue-200")),s=he(()=>t.type==="error"?"bg-red-500":t.type==="listening"?"bg-blue-500 animate-pulse":"bg-blue-500");return(i,r)=>(I(),Xe(ll,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-1 opacity-0"},{default:ei(()=>[e.visible?(I(),F("div",eu,[g("div",{class:le(["pointer-events-auto flex max-w-[92%] items-start gap-2 rounded-lg px-3 py-2 text-xs shadow-lg ring-1",n.value])},[g("span",{class:le(["mt-0.5 h-2 w-2 shrink-0 rounded-full",s.value])},null,2),g("span",null,Se(e.message),1),e.dismissible?(I(),F("button",{key:0,type:"button",class:"ml-1 appearance-none border-0 text-current/80 transition hover:text-current focus:outline-none","aria-label":"Dismiss notification",onClick:r[0]||(r[0]=o=>i.$emit("close"))}," × ")):_e("",!0)],2)])):_e("",!0)]),_:1}))}},nu={class:"relative w-full"},su=["placeholder","disabled"],iu=["title","aria-label","disabled"],ru={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},ou={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},lu={key:2,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"animate-spin"},au=["title","aria-label","disabled"],uu={key:0,viewBox:"0 0 24 24",width:"18",height:"18",fill:"none","aria-hidden":"true",class:"text-rose-600 motion-safe:animate-stop-button-pulse"},cu={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},fu={__name:"ChatForm",props:{placeholder:{type:String,default:"Message..."},disabled:{type:Boolean,default:!1},isAwaitingResponse:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(e,{expose:t,emit:n}){const s=e,i=n,r=U(""),o=U(null),l=U(!1),a=U(!1),d=U(!1),c=U(!1),p=U(!1),b=U(!1),S=U(!1),O=U(""),T=U("info"),R=U("Voice input is unavailable in this browser/context.");let M=null,V=null,K=null;const x=U(""),C=U(!1),z=he(()=>d.value?"Requesting microphone permission...":c.value?"Starting voice input...":p.value?"Stopping voice input...":a.value?l.value?"Stop voice input":"Start voice input":"Voice input is unavailable in this browser/context"),G=he(()=>s.isAwaitingResponse?"Stop response":"Send"),ue=he(()=>s.isAwaitingResponse?!1:s.disabled||!r.value.trim()),N=he(()=>s.isAwaitingResponse?"bg-white border border-rose-100 shadow-[0_8px_20px_-12px_rgba(159,18,57,0.35)] hover:bg-rose-50":"bg-linear-to-br from-brand-500 to-brand-600 text-white shadow-[0_10px_24px_-16px_rgba(109,79,194,0.85)] hover:from-brand-600 hover:to-violet-700");function Y(){return typeof window=="undefined"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function ae(){var ne;const ee=Y(),L=typeof window!="undefined"?window.isSecureContext:!1,re=typeof navigator!="undefined"&&!!((ne=navigator.mediaDevices)!=null&&ne.getUserMedia);a.value=!!(ee&&L&&re),L?(!re||!ee)&&(R.value="Voice input is not supported in this browser."):R.value="Voice input requires HTTPS (or localhost).",ee&&a.value&&(M=new ee,M.continuous=!0,M.interimResults=!0,M.lang=typeof navigator!="undefined"&&navigator.language||"en-US",M.onstart=()=>{l.value=!0,c.value=!1,p.value=!1,_(),fe("Listening... Tap mic to stop","listening",{persistent:!0,key:"listening"})},M.onend=()=>{l.value=!1,c.value=!1,p.value=!1,_(),x.value==="listening"&&Te(),C.value&&(C.value=!1,ft())},M.onerror=se=>{if(l.value=!1,c.value=!1,p.value=!1,_(),C.value=!1,(se==null?void 0:se.error)==="not-allowed"||(se==null?void 0:se.error)==="service-not-allowed"){fe("Microphone permission denied. Please allow microphone access in browser settings.","error");return}if((se==null?void 0:se.error)==="audio-capture"){fe("No microphone detected. Please connect a microphone and try again.","error");return}if((se==null?void 0:se.error)==="no-speech"){fe("No speech detected. Try speaking a bit louder.","info");return}fe("Voice input failed. Please try again.","error")},M.onresult=se=>{let dt="";for(let Be=se.resultIndex;Be{if(M&&!(!l.value&&!p.value))try{M.abort()}catch{p.value=!1,C.value=!1}},1200)}}function q(){if(!a.value||!M){fe(R.value,"error");return}if(l.value||c.value||p.value){k({submitAfterStop:l.value});return}Le()}async function xe(){var ee;if(b.value)return!0;if(!((ee=navigator.mediaDevices)!=null&&ee.getUserMedia))return fe("Microphone API is unavailable in this browser.","error"),!1;d.value=!0,fe("Requesting microphone permission...","info",{persistent:!0,key:"requesting"});try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(re=>re.stop()),b.value=!0,!0}catch(L){return(L==null?void 0:L.name)==="NotAllowedError"||(L==null?void 0:L.name)==="SecurityError"?fe("Microphone permission denied. Please allow it and try again.","error"):(L==null?void 0:L.name)==="NotFoundError"?fe("No microphone found on this device.","error"):fe("Unable to access microphone. Please check browser permissions.","error"),!1}finally{d.value=!1,x.value==="requesting"&&Te()}}async function Le(){var L;if(!(!M||l.value||c.value||p.value||!await xe()||!M)){C.value=!1,(L=o.value)==null||L.focus(),c.value=!0;try{M.start()}catch(re){c.value=!1,p.value=!1,(re==null?void 0:re.name)!=="InvalidStateError"&&fe("Unable to start voice input. Please try again.","error")}}}function fe(ee,L="info",re={}){const{duration:ne=4200,persistent:se=!1,key:dt=""}=re;O.value=ee,T.value=L,x.value=dt,S.value=!0,V&&clearTimeout(V),se||(V=setTimeout(()=>{S.value=!1,x.value=""},ne))}function Te(){S.value=!1,x.value="",V&&(clearTimeout(V),V=null)}function ft(){if(s.isAwaitingResponse){i("cancel");return}const ee=r.value.trim();ee&&((l.value||c.value||p.value)&&M&&k({submitAfterStop:!1}),i("submit",ee),r.value="")}return t({focus:()=>{var ee;return(ee=o.value)==null?void 0:ee.focus()}}),qt(()=>{ae()}),vn(()=>{if(M&&(l.value||c.value||p.value)){C.value=!1,_();try{M.abort()}catch{}}_(),Te()}),(ee,L)=>(I(),F("div",nu,[g("form",{class:"group flex min-h-11 items-center gap-2 rounded-full border border-slate-200/90 bg-white/95 px-3 shadow-[0_12px_26px_-20px_rgba(15,23,42,0.7)] transition-all duration-250 focus-within:-translate-y-0.5 focus-within:border-brand-200 focus-within:shadow-[0_18px_30px_-20px_rgba(13,110,253,0.5)] focus-within:ring-2 focus-within:ring-brand-500/25",style:{"border-radius":"9999px"},autocomplete:"off",onSubmit:Oe(ft,["prevent"]),onClick:L[5]||(L[5]=Oe(()=>{},["stop"])),onMousedown:L[6]||(L[6]=Oe(()=>{},["stop"])),onKeydown:L[7]||(L[7]=Oe(()=>{},["stop"])),onKeyup:L[8]||(L[8]=Oe(()=>{},["stop"]))},[oo(g("input",{ref_key:"inputRef",ref:o,type:"text","onUpdate:modelValue":L[0]||(L[0]=re=>r.value=re),class:"h-11 w-full border-none bg-transparent text-sm font-medium text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",placeholder:e.disabled?"Waiting for response...":e.placeholder,disabled:e.disabled,required:"",onKeydown:L[1]||(L[1]=Oe(()=>{},["stop"])),onKeyup:L[2]||(L[2]=Oe(()=>{},["stop"])),onKeypress:L[3]||(L[3]=Oe(()=>{},["stop"])),onInput:L[4]||(L[4]=Oe(()=>{},["stop"]))},null,40,su),[[Rl,r.value]]),g("button",{type:"button",class:le(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-transparent text-slate-600 transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-200 hover:bg-slate-100 hover:text-slate-900 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",l.value?"border-red-200 bg-red-100 text-red-600 shadow-[0_10px_20px_-18px_rgba(220,38,38,0.9)] hover:bg-red-100 hover:text-red-600":""]),style:{"border-radius":"9999px"},title:z.value,"aria-label":z.value,disabled:e.disabled||!a.value||d.value||c.value||p.value,onClick:q},[l.value&&!d.value?(I(),F("svg",ru,L[9]||(L[9]=[g("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):d.value?(I(),F("svg",lu,L[11]||(L[11]=[g("circle",{cx:"12",cy:"12",r:"9",opacity:"0.3"},null,-1),g("path",{d:"M21 12a9 9 0 0 1-9 9"},null,-1)]))):(I(),F("svg",ou,L[10]||(L[10]=[g("path",{d:"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z"},null,-1),g("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),g("path",{d:"M12 19v3"},null,-1)])))],10,iu),g("button",{type:"submit",title:G.value,"aria-label":G.value,class:le(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border-0 transition-all duration-200 hover:-translate-y-0.5 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",N.value]),style:{"border-radius":"9999px"},disabled:ue.value},[e.isAwaitingResponse?(I(),F("svg",uu,L[12]||(L[12]=[g("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor","stroke-width":"2.1",class:"opacity-95"},null,-1),g("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.35",fill:"currentColor"},null,-1)]))):(I(),F("svg",cu,L[13]||(L[13]=[g("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z"},null,-1)])))],10,au)],32),pe(tu,{visible:S.value,message:O.value,type:T.value,dismissible:T.value!=="listening",onClose:Te},null,8,["visible","message","type","dismissible"])]))}},du={class:"relative overflow-hidden bg-linear-to-br from-brand-600 via-brand-500 to-violet-400"},pu={class:"min-w-0"},hu={key:1,class:"border-t border-slate-200/80 bg-white/90 px-3 py-3 pb-[calc(12px+env(safe-area-inset-bottom))] backdrop-blur-sm sm:px-4 sm:py-4"},gu=56,bu={__name:"ChatbotPopup",props:{isOpen:{type:Boolean,required:!0},activeTab:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1},chatHistory:{type:Array,required:!0},debugLogs:{type:Array,required:!0},currentDebug:{type:Object,default:null},supportHistory:{type:Array,required:!0},autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},activeTtsProvider:{type:String,required:!0},settings:{type:Object,default:null},isAwaitingResponse:{type:Boolean,default:!1}},emits:["close","submit","cancelResponse","update:activeTab","toggleAutoRead","togglePollyPreference","toggleDebug"],setup(e,{expose:t,emit:n}){const s=e,i=n,r=U(null),o=U(null),l=U(s.activeTab),a=U("default"),d=U(!1);function c(){const T=r.value;if(!s.isOpen||!T){d.value=!1;return}const R=T.scrollHeight-T.clientHeight;if(R<=4){d.value=!1;return}const M=R-T.scrollTop;d.value=M>gu}function p(){const T=r.value;T&&(T.scrollTo({top:T.scrollHeight,behavior:"smooth"}),setTimeout(()=>{c()},220))}function b(){Ve(()=>{c()})}function S(){if(a.value==="default"){a.value="half";return}if(a.value==="half"){a.value="full";return}a.value="default"}const O=he(()=>{const T="chat-shell fixed z-[9999] flex min-h-0 flex-col overflow-hidden border border-slate-200/80 shadow-[0_32px_80px_-44px_rgba(2,6,23,0.7),0_18px_40px_-24px_rgba(15,23,42,0.45)] transition-all duration-300 ease-out origin-bottom-right",R=s.isOpen?"pointer-events-auto opacity-100 translate-x-0 translate-y-0 scale-100 motion-safe:animate-surface-in":"pointer-events-none opacity-0 translate-x-1/5 translate-y-8 scale-95";return a.value==="full"?[T,R,"inset-0 h-screen w-screen max-h-screen max-w-screen rounded-none origin-center"]:a.value==="half"?[T,R,"bottom-[74px] right-5 h-[min(86vh,860px)] w-[min(50vw,860px)] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(86vh,760px)] max-[900px]:w-[min(70vw,760px)] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]:[T,R,"bottom-[74px] right-5 h-[min(560px,72vh)] w-[min(360px,calc(100vw-40px))] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(70vh,540px)] max-[900px]:w-[min(360px,calc(100vw-24px))] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]});return xt(()=>s.activeTab,T=>{l.value=T,b()}),xt(()=>s.isOpen,T=>{T&&l.value!=="settings"&&Ve(()=>{var R;return(R=o.value)==null?void 0:R.focus()}),b()}),xt(l,T=>{i("update:activeTab",T),b()}),xt(()=>[s.chatHistory.length,s.supportHistory.length,s.debugLogs.length,s.currentDebug],()=>{b()}),xt(()=>s.debugEnabled,T=>{!T&&l.value==="debug"&&(l.value="chat"),b()}),qt(()=>{b()}),t({scrollToBottom(){Ve(()=>{p()})}}),(T,R)=>(I(),F("div",{class:le(O.value),onKeydown:R[8]||(R[8]=Oe(()=>{},["stop"])),onKeyup:R[9]||(R[9]=Oe(()=>{},["stop"])),onKeypress:R[10]||(R[10]=Oe(()=>{},["stop"]))},[R[13]||(R[13]=g("div",{class:"pointer-events-none absolute -right-14 -top-14 h-36 w-36 rounded-full bg-brand-500/15 blur-2xl"},null,-1)),R[14]||(R[14]=g("div",{class:"pointer-events-none absolute -bottom-14 -left-12 h-32 w-32 rounded-full bg-violet-400/15 blur-2xl"},null,-1)),g("div",du,[R[11]||(R[11]=g("div",{class:"pointer-events-none absolute inset-0 opacity-45",style:{background:"linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.12) 100%)"}},null,-1)),pe(Xl,{windowMode:a.value,autoReadEnabled:e.autoReadEnabled,activeTtsProvider:e.activeTtsProvider,onClose:R[0]||(R[0]=M=>T.$emit("close")),onCycleResize:S,onToggleAutoRead:R[1]||(R[1]=M=>T.$emit("toggleAutoRead"))},null,8,["windowMode","autoReadEnabled","activeTtsProvider"]),pe(na,{modelValue:l.value,"onUpdate:modelValue":R[2]||(R[2]=M=>l.value=M),debugEnabled:e.debugEnabled},null,8,["modelValue","debugEnabled"])]),g("div",{class:"chat-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-scroll bg-slate-50/60 px-4 py-4 max-[900px]:px-3.5 max-[900px]:py-3.5 max-[600px]:px-3 max-[600px]:py-3",ref_key:"chatBodyRef",ref:r,onScrollPassive:c},[g("div",pu,[l.value==="chat"?(I(),Xe(Ra,{key:0,messages:e.chatHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):l.value==="debug"&&e.debugEnabled?(I(),Xe(Oa,{key:1,logs:e.debugLogs,currentDebug:e.currentDebug},null,8,["logs","currentDebug"])):l.value==="support"?(I(),Xe(Da,{key:2,messages:e.supportHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):l.value==="settings"?(I(),Xe(Qa,{key:3,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig,settings:e.settings,debugEnabled:e.debugEnabled,onToggleAutoRead:R[3]||(R[3]=M=>T.$emit("toggleAutoRead")),onTogglePollyPreference:R[4]||(R[4]=M=>T.$emit("togglePollyPreference")),onToggleDebug:R[5]||(R[5]=M=>T.$emit("toggleDebug"))},null,8,["autoReadEnabled","ttsConfig","settings","debugEnabled"])):_e("",!0)])],544),d.value?(I(),F("button",{key:0,type:"button",class:le(["absolute right-4 z-20 grid h-9 w-9 place-items-center rounded-full border border-brand-200/70 bg-white/95 text-brand-600 shadow-[0_14px_26px_-16px_rgba(15,23,42,0.65)] transition-all duration-200 hover:-translate-y-0.5 hover:border-brand-300 hover:text-brand-700 focus:outline-none",l.value!=="settings"?"bottom-[calc(90px+env(safe-area-inset-bottom))] sm:bottom-[96px]":"bottom-4 sm:bottom-5"]),title:"Scroll to bottom","aria-label":"Scroll to bottom",onClick:p},R[12]||(R[12]=[g("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[g("path",{d:"M7 10l5 5 5-5"})],-1)]),2)):_e("",!0),l.value!=="settings"?(I(),F("div",hu,[pe(fu,{ref_key:"chatFormRef",ref:o,placeholder:l.value==="support"?"Message Support...":"Message...",disabled:l.value==="chat"&&e.isAwaitingResponse,isAwaitingResponse:l.value==="chat"&&e.isAwaitingResponse,onSubmit:R[6]||(R[6]=M=>T.$emit("submit",M)),onCancel:R[7]||(R[7]=M=>T.$emit("cancelResponse"))},null,8,["placeholder","disabled","isAwaitingResponse"])])):_e("",!0)],34))}},rr="changai_chat_id",or="changai_polly_enabled";function mu(){let e=sessionStorage.getItem(rr);return e||(e=`session_${Date.now()}_${crypto.randomUUID()}`,sessionStorage.setItem(rr,e)),e}function vu(){const e=localStorage.getItem(or);return e===null?!0:e==="true"}function xu(e){localStorage.setItem(or,String(!!e))}const yu={__name:"App",setup(e){const t=U(!1),n=U("chat"),s=U([]),i=U([]),r=U(!1),o=U([]),l=U(null),a=U("actual"),d=U(!0),c=U(null),p=U(!1),b=U(null),S=U({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Joanna"}),O=U("off"),T=U(null),R=he(()=>T.value!==null);function M(){if(!S.value.enableVoiceChat){O.value="off";return}O.value=S.value.usePolly?"polly":"browser"}function V(_){var q;const k=(q=_==null?void 0:_.detail)==null?void 0:q.provider;(k==="polly"||k==="browser"||k==="off")&&(O.value=k)}async function K(){var _,k,q,xe;if(!(p.value||c.value)){p.value=!0;try{c.value=await ua(a.value),S.value={enableVoiceChat:!!((_=c.value)!=null&&_.enable_voice_chat),pollyAvailable:!!((k=c.value)!=null&&k.polly_enabled),usePolly:!!((q=c.value)!=null&&q.polly_enabled)&&vu(),voiceId:((xe=c.value)==null?void 0:xe.polly_voice_id)||"Joanna"},M(),i.value.push({type:"settings",settings:c.value})}catch(Le){const fe=ir(Le);i.value.push({type:"settings",error:fe})}finally{p.value=!1}}}function x(){t.value=!t.value}function C(){var _;(_=l.value)==null||_.scrollToBottom()}function z(){d.value=!d.value}function G(){const _=!S.value.usePolly;S.value={...S.value,usePolly:_&&S.value.pollyAvailable},xu(S.value.usePolly),M()}async function ue(_){n.value==="support"?await ae(_):await N(_)}async function N(_){var re;b.value=null,a.value==="actual"&&await K(),s.value.push({role:"user",text:_}),await Ve(),C();const k=un({role:"model",text:"Thinking...",cancelable:!0,isStatus:!0,statusType:"thinking"});s.value.push(k),await Ve(),C();let q=!1;const xe=mu(),Le=`${xe}_${Date.now()}`,fe=la(_,xe,a.value,Le),Te=`debug_${Le}`;let ft=Date.now();const ee=[],L=ne=>{var St;const se=Date.now(),dt=((se-ft)/1e3).toFixed(2);ft=se;const Be=`${ne.message} (${dt}s)`;if(ne.message&&(ee.push(Be),b.value=Be),!ne.done&&ne.message&&(k.text=ne.message,k.statusType="pipeline"),ne.done){k.cancelable=!1,k.isStatus=!1,k.statusType=null,ne.error?(k.text=`⚠️ ${ne.message||"Something failed"}`,k.isStatus=!1,k.statusType=null):(St=ne.data)!=null&&St.answer?(k.text=ne.data.answer,k.isStatus=!1,k.statusType=null):ne.message&&(k.text=ne.message),frappe.realtime.off(Te),b.value=null;return}};frappe.realtime.on(Te,L),T.value=()=>{q||(q=!0,fe.cancel(),frappe.realtime.off(Te),k.isStatus=!1,k.statusType=null,k.text="Cancelled by user.",i.value.push({type:"cancelled",user:_,steps:[...ee]}),b.value=null,k.cancelable=!1,T.value=null)};try{const ne=await fe.promise;if(q)return;k.cancelable=!1;const se=((re=Pa(ne==null?void 0:ne.Bot))==null?void 0:re.trim())||"No response.";k.isStatus=!1,k.statusType=null,k.text=se,i.value.push({type:"success",user:_,steps:[...ee],final_response:ne}),b.value=null}catch(ne){if(q)return;frappe.realtime.off(Te),k.cancelable=!1,k.isStatus=!1,k.statusType=null;const se=ir(ne);b.value=null,i.value.push({type:"failed",user:_,steps:[...ee],error:se}),k.isStatus=!1,k.statusType=null,k.text="⚠️ Something went wrong. Please try again."}finally{frappe.realtime.off(Te),q||(T.value=null)}await Ve(),C()}function Y(){var _;(_=T.value)==null||_.call(T)}async function ae(_){o.value.push({role:"user",text:_}),await Ve(),C();const k=un({role:"model",text:"Sending to support...",isStatus:!0,statusType:"support"});o.value.push(k),await Ve(),C();try{const q=await aa(_,a.value);k.text=q?sr(q):"Support request sent successfully."}catch{k.text="⚠️ Failed to reach support. Please try again."}await Ve(),C()}return qt(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-provider",V),a.value==="actual"&&K()}),vn(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-provider",V)}),(_,k)=>(I(),F(be,null,[pe(Hl,{isOpen:t.value,onToggle:x},null,8,["isOpen"]),pe(bu,{ref_key:"popupRef",ref:l,isOpen:t.value,activeTab:n.value,"onUpdate:activeTab":k[0]||(k[0]=q=>n.value=q),chatHistory:s.value,debugLogs:i.value,currentDebug:b.value,supportHistory:o.value,autoReadEnabled:d.value,ttsConfig:S.value,activeTtsProvider:O.value,settings:c.value,isAwaitingResponse:R.value,debugEnabled:r.value,onToggleDebug:k[1]||(k[1]=q=>r.value=!r.value),onClose:k[2]||(k[2]=q=>t.value=!1),onSubmit:ue,onCancelResponse:Y,onToggleAutoRead:z,onTogglePollyPreference:G},null,8,["isOpen","activeTab","chatHistory","debugLogs","currentDebug","supportHistory","autoReadEnabled","ttsConfig","activeTtsProvider","settings","isAwaitingResponse","debugEnabled"])],64))}};function wu(){const e=document.querySelector('link[href*="/assets/changai/dist/changai-chatbot.css"]');if(e!=null&&e.href)return e.href;const t=Array.from(document.scripts).find(n=>{var s;return(s=n.src)==null?void 0:s.includes("/assets/changai/dist/changai-chatbot.js")});return t!=null&&t.src?t.src.replace(/changai-chatbot\.js(\?.*)?$/,"changai-chatbot.css$1"):null}function _u(e){const t=wu();if(!t){const n=Array.from(document.querySelectorAll("style[data-vite-dev-id]"));return n.length&&n.forEach(s=>{const i=document.createElement("style");i.dataset.changaiShadowDevStyle="1",i.textContent=s.textContent||"",e.appendChild(i)}),Promise.resolve()}return e.querySelector('link[data-changai-shadow-style="1"]')?Promise.resolve():new Promise(n=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.dataset.changaiShadowStyle="1",s.onload=()=>n(),s.onerror=()=>n(),e.appendChild(s),setTimeout(n,1200)})}async function lr(){if(document.getElementById("changai-chatbot-host"))return;const e=document.createElement("div");e.id="changai-chatbot-host",document.body.appendChild(e);const t=e.attachShadow({mode:"open"});await _u(t);const n=document.createElement("div");n.id="changai-chatbot-root",t.appendChild(n),Il(yu).mount(n);function s(i){i.stopPropagation()}n.addEventListener("keydown",s),n.addEventListener("keyup",s),n.addEventListener("keypress",s)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",lr):lr()})(); +var vp=Object.defineProperty;var _p=(Pt,re,pt)=>re in Pt?vp(Pt,re,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Pt[re]=pt;var we=(Pt,re,pt)=>_p(Pt,typeof re!="symbol"?re+"":re,pt);(function(){"use strict";var Ds;function Pt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const re={},pt=[],Qt=()=>{},Dl=()=>!1,es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Fs=e=>e.startsWith("onUpdate:"),ht=Object.assign,ei=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nl=Object.prototype.hasOwnProperty,he=(e,t)=>Nl.call(e,t),X=Array.isArray,pn=e=>ts(e)==="[object Map]",ti=e=>ts(e)==="[object Set]",me=e=>typeof e=="function",Ce=e=>typeof e=="string",zt=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",ni=e=>(Ae(e)||me(e))&&me(e.then)&&me(e.catch),si=Object.prototype.toString,ts=e=>si.call(e),Fl=e=>ts(e).slice(8,-1),ri=e=>ts(e)==="[object Object]",Bs=e=>Ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Cn=Pt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ns=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Bl=/-(\w)/g,Ut=ns(e=>e.replace(Bl,(t,n)=>n?n.toUpperCase():"")),Hl=/\B([A-Z])/g,Jt=ns(e=>e.replace(Hl,"-$1").toLowerCase()),ii=ns(e=>e.charAt(0).toUpperCase()+e.slice(1)),Hs=ns(e=>e?`on${ii(e)}`:""),jt=(e,t)=>!Object.is(e,t),ss=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Us=e=>{const t=parseFloat(e);return isNaN(t)?e:t},zl=e=>{const t=Ce(e)?Number(e):NaN;return isNaN(t)?e:t};let oi;const rs=()=>oi||(oi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});function js(e){if(X(e)){const t={};for(let n=0;n{if(n){const s=n.split(jl);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ye(e){let t="";if(Ce(e))t=e;else if(X(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Qe=e=>Ce(e)?e:e==null?"":X(e)||Ae(e)&&(e.toString===si||!me(e.toString))?ai(e)?Qe(e.value):JSON.stringify(e,ui,2):String(e),ui=(e,t)=>ai(t)?ui(e,t.value):pn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[Vs(s,i)+" =>"]=r,n),{})}:ti(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Vs(n))}:zt(t)?Vs(t):Ae(t)&&!X(t)&&!ri(t)?String(t):t,Vs=(e,t="")=>{var n;return zt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Je;class Gl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Je,!t&&Je&&(this.index=(Je.scopes||(Je.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Je=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n0)return;if(In){let t=In;for(In=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Pn;){let t=Pn;for(Pn=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function pi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function hi(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Ys(s),Yl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ks(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(gi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function gi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Mn)||(e.globalVersion=Mn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Ks(e))))return;e.flags|=2;const t=e.dep,n=_e,s=gt;_e=e,gt=!0;try{pi(e);const r=e.fn(e._value);(t.version===0||jt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{_e=n,gt=s,hi(e),e.flags&=-3}}function Ys(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ys(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Yl(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gt=!0;const mi=[];function It(){mi.push(gt),gt=!1}function Mt(){const e=mi.pop();gt=e===void 0?!0:e}function bi(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=_e;_e=void 0;try{t()}finally{_e=n}}}let Mn=0;class Zl{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Zs{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!_e||!gt||_e===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==_e)n=this.activeLink=new Zl(_e,this),_e.deps?(n.prevDep=_e.depsTail,_e.depsTail.nextDep=n,_e.depsTail=n):_e.deps=_e.depsTail=n,xi(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=_e.depsTail,n.nextDep=void 0,_e.depsTail.nextDep=n,_e.depsTail=n,_e.deps===n&&(_e.deps=s)}return n}trigger(t){this.version++,Mn++,this.notify(t)}notify(t){Ws();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Gs()}}}function xi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)xi(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Xs=new WeakMap,en=Symbol(""),Qs=Symbol(""),Ln=Symbol("");function Ue(e,t,n){if(gt&&_e){let s=Xs.get(e);s||Xs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Zs),r.map=s,r.key=n),r.track()}}function Lt(e,t,n,s,r,i){const o=Xs.get(e);if(!o){Mn++;return}const a=l=>{l&&l.trigger()};if(Ws(),t==="clear")o.forEach(a);else{const l=X(e),c=l&&Bs(n);if(l&&n==="length"){const u=Number(s);o.forEach((p,g)=>{(g==="length"||g===Ln||!zt(g)&&g>=u)&&a(p)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(Ln)),t){case"add":l?c&&a(o.get("length")):(a(o.get(en)),pn(e)&&a(o.get(Qs)));break;case"delete":l||(a(o.get(en)),pn(e)&&a(o.get(Qs)));break;case"set":pn(e)&&a(o.get(en));break}}Gs()}function hn(e){const t=oe(e);return t===e?t:(Ue(t,"iterate",Ln),lt(e)?t:t.map(Fe))}function is(e){return Ue(e=oe(e),"iterate",Ln),e}const Xl={__proto__:null,[Symbol.iterator](){return Js(this,Symbol.iterator,Fe)},concat(...e){return hn(this).concat(...e.map(t=>X(t)?hn(t):t))},entries(){return Js(this,"entries",e=>(e[1]=Fe(e[1]),e))},every(e,t){return Ot(this,"every",e,t,void 0,arguments)},filter(e,t){return Ot(this,"filter",e,t,n=>n.map(Fe),arguments)},find(e,t){return Ot(this,"find",e,t,Fe,arguments)},findIndex(e,t){return Ot(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ot(this,"findLast",e,t,Fe,arguments)},findLastIndex(e,t){return Ot(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ot(this,"forEach",e,t,void 0,arguments)},includes(...e){return er(this,"includes",e)},indexOf(...e){return er(this,"indexOf",e)},join(e){return hn(this).join(e)},lastIndexOf(...e){return er(this,"lastIndexOf",e)},map(e,t){return Ot(this,"map",e,t,void 0,arguments)},pop(){return On(this,"pop")},push(...e){return On(this,"push",e)},reduce(e,...t){return yi(this,"reduce",e,t)},reduceRight(e,...t){return yi(this,"reduceRight",e,t)},shift(){return On(this,"shift")},some(e,t){return Ot(this,"some",e,t,void 0,arguments)},splice(...e){return On(this,"splice",e)},toReversed(){return hn(this).toReversed()},toSorted(e){return hn(this).toSorted(e)},toSpliced(...e){return hn(this).toSpliced(...e)},unshift(...e){return On(this,"unshift",e)},values(){return Js(this,"values",Fe)}};function Js(e,t,n){const s=is(e),r=s[t]();return s!==e&&!lt(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const Ql=Array.prototype;function Ot(e,t,n,s,r,i){const o=is(e),a=o!==e&&!lt(e),l=o[t];if(l!==Ql[t]){const p=l.apply(e,i);return a?Fe(p):p}let c=n;o!==e&&(a?c=function(p,g){return n.call(this,Fe(p),g,e)}:n.length>2&&(c=function(p,g){return n.call(this,p,g,e)}));const u=l.call(o,c,s);return a&&r?r(u):u}function yi(e,t,n,s){const r=is(e);let i=n;return r!==e&&(lt(e)?n.length>3&&(i=function(o,a,l){return n.call(this,o,a,l,e)}):i=function(o,a,l){return n.call(this,o,Fe(a),l,e)}),r[t](i,...s)}function er(e,t,n){const s=oe(e);Ue(s,"iterate",Ln);const r=s[t](...n);return(r===-1||r===!1)&&nr(n[0])?(n[0]=oe(n[0]),s[t](...n)):r}function On(e,t,n=[]){It(),Ws();const s=oe(e)[t].apply(e,n);return Gs(),Mt(),s}const Jl=Pt("__proto__,__v_isRef,__isVue"),wi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(zt));function ea(e){zt(e)||(e=String(e));const t=oe(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class vi{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?Ai:Ei:i?Si:ki).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=X(t);if(!r){let l;if(o&&(l=Xl[n]))return l;if(n==="hasOwnProperty")return ea}const a=Reflect.get(t,n,je(t)?t:s);return(zt(n)?wi.has(n):Jl(n))||(r||Ue(t,"get",n),i)?a:je(a)?o&&Bs(n)?a:a.value:Ae(a)?r?Ri(a):us(a):a}}class _i extends vi{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const l=Vt(i);if(!lt(s)&&!Vt(s)&&(i=oe(i),s=oe(s)),!X(t)&&je(i)&&!je(s))return l?!1:(i.value=s,!0)}const o=X(t)&&Bs(n)?Number(n)e,os=e=>Reflect.getPrototypeOf(e);function ia(e,t,n){return function(...s){const r=this.__v_raw,i=oe(r),o=pn(i),a=e==="entries"||e===Symbol.iterator&&o,l=e==="keys"&&o,c=r[e](...s),u=n?tr:t?fs:Fe;return!t&&Ue(i,"iterate",l?Qs:en),{next(){const{value:p,done:g}=c.next();return g?{value:p,done:g}:{value:a?[u(p[0]),u(p[1])]:u(p),done:g}},[Symbol.iterator](){return this}}}}function ls(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function oa(e,t){const n={get(r){const i=this.__v_raw,o=oe(i),a=oe(r);e||(jt(r,a)&&Ue(o,"get",r),Ue(o,"get",a));const{has:l}=os(o),c=t?tr:e?fs:Fe;if(l.call(o,r))return c(i.get(r));if(l.call(o,a))return c(i.get(a));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Ue(oe(r),"iterate",en),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=oe(i),a=oe(r);return e||(jt(r,a)&&Ue(o,"has",r),Ue(o,"has",a)),r===a?i.has(r):i.has(r)||i.has(a)},forEach(r,i){const o=this,a=o.__v_raw,l=oe(a),c=t?tr:e?fs:Fe;return!e&&Ue(l,"iterate",en),a.forEach((u,p)=>r.call(i,c(u),c(p),o))}};return ht(n,e?{add:ls("add"),set:ls("set"),delete:ls("delete"),clear:ls("clear")}:{add(r){!t&&!lt(r)&&!Vt(r)&&(r=oe(r));const i=oe(this);return os(i).has.call(i,r)||(i.add(r),Lt(i,"add",r,r)),this},set(r,i){!t&&!lt(i)&&!Vt(i)&&(i=oe(i));const o=oe(this),{has:a,get:l}=os(o);let c=a.call(o,r);c||(r=oe(r),c=a.call(o,r));const u=l.call(o,r);return o.set(r,i),c?jt(i,u)&&Lt(o,"set",r,i):Lt(o,"add",r,i),this},delete(r){const i=oe(this),{has:o,get:a}=os(i);let l=o.call(i,r);l||(r=oe(r),l=o.call(i,r)),a&&a.call(i,r);const c=i.delete(r);return l&&Lt(i,"delete",r,void 0),c},clear(){const r=oe(this),i=r.size!==0,o=r.clear();return i&&Lt(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=ia(r,e,t)}),n}function as(e,t){const n=oa(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(he(n,r)&&r in s?n:s,r,i)}const la={get:as(!1,!1)},aa={get:as(!1,!0)},ua={get:as(!0,!1)},ca={get:as(!0,!0)},ki=new WeakMap,Si=new WeakMap,Ei=new WeakMap,Ai=new WeakMap;function fa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function da(e){return e.__v_skip||!Object.isExtensible(e)?0:fa(Fl(e))}function us(e){return Vt(e)?e:cs(e,!1,ta,la,ki)}function pa(e){return cs(e,!1,sa,aa,Si)}function Ri(e){return cs(e,!0,na,ua,Ei)}function kp(e){return cs(e,!0,ra,ca,Ai)}function cs(e,t,n,s,r){if(!Ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=da(e);if(i===0)return e;const o=r.get(e);if(o)return o;const a=new Proxy(e,i===2?s:n);return r.set(e,a),a}function gn(e){return Vt(e)?gn(e.__v_raw):!!(e&&e.__v_isReactive)}function Vt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function nr(e){return e?!!e.__v_raw:!1}function oe(e){const t=e&&e.__v_raw;return t?oe(t):e}function ha(e){return!he(e,"__v_skip")&&Object.isExtensible(e)&&zs(e,"__v_skip",!0),e}const Fe=e=>Ae(e)?us(e):e,fs=e=>Ae(e)?Ri(e):e;function je(e){return e?e.__v_isRef===!0:!1}function Q(e){return ga(e,!1)}function ga(e,t){return je(e)?e:new ma(e,t)}class ma{constructor(t,n){this.dep=new Zs,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:oe(t),this._value=n?t:Fe(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||lt(t)||Vt(t);t=s?t:oe(t),jt(t,n)&&(this._rawValue=t,this._value=s?t:Fe(t),this.dep.trigger())}}function ba(e){return je(e)?e.value:e}const xa={get:(e,t,n)=>t==="__v_raw"?e:ba(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return je(r)&&!je(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function Ci(e){return gn(e)?e:new Proxy(e,xa)}class ya{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Zs(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Mn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&_e!==this)return di(this,!0),!0}get value(){const t=this.dep.track();return gi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function wa(e,t,n=!1){let s,r;return me(e)?s=e:(s=e.get,r=e.set),new ya(s,r,n)}const ds={},ps=new WeakMap;let tn;function va(e,t=!1,n=tn){if(n){let s=ps.get(n);s||ps.set(n,s=[]),s.push(e)}}function _a(e,t,n=re){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:a,call:l}=n,c=O=>r?O:lt(O)||r===!1||r===0?$t(O,1):$t(O);let u,p,g,w,E=!1,m=!1;if(je(e)?(p=()=>e.value,E=lt(e)):gn(e)?(p=()=>c(e),E=!0):X(e)?(m=!0,E=e.some(O=>gn(O)||lt(O)),p=()=>e.map(O=>{if(je(O))return O.value;if(gn(O))return c(O);if(me(O))return l?l(O,2):O()})):me(e)?t?p=l?()=>l(e,2):e:p=()=>{if(g){It();try{g()}finally{Mt()}}const O=tn;tn=u;try{return l?l(e,3,[w]):e(w)}finally{tn=O}}:p=Qt,t&&r){const O=p,A=r===!0?1/0:r;p=()=>$t(O(),A)}const R=Kl(),S=()=>{u.stop(),R&&R.active&&ei(R.effects,u)};if(i&&t){const O=t;t=(...A)=>{O(...A),S()}}let V=m?new Array(e.length).fill(ds):ds;const K=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const A=u.run();if(r||E||(m?A.some((C,J)=>jt(C,V[J])):jt(A,V))){g&&g();const C=tn;tn=u;try{const J=[A,V===ds?void 0:m&&V[0]===ds?[]:V,w];V=A,l?l(t,3,J):t(...J)}finally{tn=C}}}else u.run()};return a&&a(K),u=new ci(p),u.scheduler=o?()=>o(K,!1):K,w=O=>va(O,!1,u),g=u.onStop=()=>{const O=ps.get(u);if(O){if(l)l(O,4);else for(const A of O)A();ps.delete(u)}},t?s?K(!0):V=u.run():o?o(K.bind(null,!0),!0):u.run(),S.pause=u.pause.bind(u),S.resume=u.resume.bind(u),S.stop=S,S}function $t(e,t=1/0,n){if(t<=0||!Ae(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,je(e))$t(e.value,t,n);else if(X(e))for(let s=0;s{$t(s,t,n)});else if(ri(e)){for(const s in e)$t(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&$t(e[s],t,n)}return e}const $n=[];let sr=!1;function Sp(e,...t){if(sr)return;sr=!0,It();const n=$n.length?$n[$n.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Ta();if(s)mn(s,n,11,[e+t.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${mo(n,i.type)}>`).join(` +`),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(` +`,...ka(r))}Mt(),sr=!1}function Ta(){let e=$n[$n.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function ka(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` +`],...Sa(n))}),t}function Sa({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${mo(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...Ea(e.props),i]:[r+i]}function Ea(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Pi(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Pi(e,t,n){return Ce(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:je(t)?(t=Pi(e,oe(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):me(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=oe(t),n?t:[`${e}=`,t])}function mn(e,t,n,s){try{return s?e(...s):e()}catch(r){hs(r,t,n)}}function _t(e,t,n,s){if(me(e)){const r=mn(e,t,n,s);return r&&ni(r)&&r.catch(i=>{hs(i,t,n)}),r}if(X(e)){const r=[];for(let i=0;i>>1,r=Ge[s],i=Dn(r);i=Dn(n)?Ge.push(e):Ge.splice(Ra(t),0,e),e.flags|=1,Mi()}}function Mi(){gs||(gs=Ii.then($i))}function Ca(e){X(e)?bn.push(...e):qt&&e.id===-1?qt.splice(xn+1,0,e):e.flags&1||(bn.push(e),e.flags|=1),Mi()}function Li(e,t,n=Tt+1){for(;nDn(n)-Dn(s));if(bn.length=0,qt){qt.push(...t);return}for(qt=t,xn=0;xne.id==null?e.flags&2?-1:1/0:e.id;function $i(e){try{for(Tt=0;Tt{s._d&&lo(-1);const i=ms(t);let o;try{o=e(...r)}finally{ms(i),s._d&&lo(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function Pa(e,t){if(at===null)return e;const n=Ss(at),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,Wt=Symbol("_leaveCb"),bs=Symbol("_enterCb");function Ma(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Hn(()=>{e.isMounted=!0}),xs(()=>{e.isUnmounting=!0}),e}const ut=[Function,Array],Bi={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ut,onEnter:ut,onAfterEnter:ut,onEnterCancelled:ut,onBeforeLeave:ut,onLeave:ut,onAfterLeave:ut,onLeaveCancelled:ut,onBeforeAppear:ut,onAppear:ut,onAfterAppear:ut,onAppearCancelled:ut},Hi=e=>{const t=e.subTree;return t.component?Hi(t.component):t},La={name:"BaseTransition",props:Bi,setup(e,{slots:t}){const n=co(),s=Ma();return()=>{const r=t.default&&Vi(t.default(),!0);if(!r||!r.length)return;const i=zi(r),o=oe(e),{mode:a}=o;if(s.isLeaving)return or(i);const l=ji(i);if(!l)return or(i);let c=ir(l,o,s,n,p=>c=p);l.type!==Ke&&Nn(l,c);let u=n.subTree&&ji(n.subTree);if(u&&u.type!==Ke&&!on(l,u)&&Hi(n).type!==Ke){let p=ir(u,o,s,n);if(Nn(u,p),a==="out-in"&&l.type!==Ke)return s.isLeaving=!0,p.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete p.afterLeave,u=void 0},or(i);a==="in-out"&&l.type!==Ke?p.delayLeave=(g,w,E)=>{const m=Ui(s,u);m[String(u.key)]=u,g[Wt]=()=>{w(),g[Wt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{E(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function zi(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ke){t=n;break}}return t}const Oa=La;function Ui(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ir(e,t,n,s,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:g,onLeave:w,onAfterLeave:E,onLeaveCancelled:m,onBeforeAppear:R,onAppear:S,onAfterAppear:V,onAppearCancelled:K}=t,O=String(e.key),A=Ui(n,e),C=(W,ne)=>{W&&_t(W,s,9,ne)},J=(W,ne)=>{const xe=ne[1];C(W,ne),X(W)?W.every($=>$.length<=1)&&xe():W.length<=1&&xe()},te={mode:o,persisted:a,beforeEnter(W){let ne=l;if(!n.isMounted)if(i)ne=R||l;else return;W[Wt]&&W[Wt](!0);const xe=A[O];xe&&on(e,xe)&&xe.el[Wt]&&xe.el[Wt](),C(ne,[W])},enter(W){let ne=c,xe=u,$=p;if(!n.isMounted)if(i)ne=S||c,xe=V||u,$=K||p;else return;let Y=!1;const G=W[bs]=z=>{Y||(Y=!0,z?C($,[W]):C(xe,[W]),te.delayedLeave&&te.delayedLeave(),W[bs]=void 0)};ne?J(ne,[W,G]):G()},leave(W,ne){const xe=String(e.key);if(W[bs]&&W[bs](!0),n.isUnmounting)return ne();C(g,[W]);let $=!1;const Y=W[Wt]=G=>{$||($=!0,ne(),G?C(m,[W]):C(E,[W]),W[Wt]=void 0,A[xe]===e&&delete A[xe])};A[xe]=e,w?J(w,[W,Y]):Y()},clone(W){const ne=ir(W,t,n,s,r);return r&&r(ne),ne}};return te}function or(e){if(lr(e))return e=Gt(e),e.children=null,e}function ji(e){if(!lr(e))return Fi(e.type)&&e.children?zi(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&me(n.default))return n.default()}}function Nn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Nn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vi(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;iFn(E,t&&(X(t)?t[m]:t),n,s,r));return}if(Bn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Fn(e,t,n,s.component.subTree);return}const i=s.shapeFlag&4?Ss(s.component):s.el,o=r?null:i,{i:a,r:l}=e,c=t&&t.r,u=a.refs===re?a.refs={}:a.refs,p=a.setupState,g=oe(p),w=p===re?()=>!1:E=>he(g,E);if(c!=null&&c!==l&&(Ce(c)?(u[c]=null,w(c)&&(p[c]=null)):je(c)&&(c.value=null)),me(l))mn(l,a,12,[o,u]);else{const E=Ce(l),m=je(l);if(E||m){const R=()=>{if(e.f){const S=E?w(l)?p[l]:u[l]:l.value;r?X(S)&&ei(S,i):X(S)?S.includes(i)||S.push(i):E?(u[l]=[i],w(l)&&(p[l]=u[l])):(l.value=[i],e.k&&(u[e.k]=l.value))}else E?(u[l]=o,w(l)&&(p[l]=o)):m&&(l.value=o,e.k&&(u[e.k]=o))};o?(R.id=-1,nt(R,n)):R()}}}rs().requestIdleCallback,rs().cancelIdleCallback;const Bn=e=>!!e.type.__asyncLoader,lr=e=>e.type.__isKeepAlive;function Da(e,t,n=Yt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{It();const a=xr(n),l=_t(t,n,e,o);return a(),Mt(),l});return s?r.unshift(i):r.push(i),i}}const qi=e=>(t,n=Yt)=>{(!Vn||e==="sp")&&Da(e,(...s)=>t(...s),n)},Hn=qi("m"),xs=qi("bum"),Na=Symbol.for("v-ndc");function ys(e,t,n,s){let r;const i=n,o=X(e);if(o||Ce(e)){const a=o&&gn(e);let l=!1,c=!1;a&&(l=!lt(e),c=Vt(e),e=is(e)),r=new Array(e.length);for(let u=0,p=e.length;ut(a,l,void 0,i));else{const a=Object.keys(e);r=new Array(a.length);for(let l=0,c=a.length;le?po(e)?Ss(e):ar(e.parent):null,zn=ht(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ar(e.parent),$root:e=>ar(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>e.type,$forceUpdate:e=>e.f||(e.f=()=>{rr(e.update)}),$nextTick:e=>e.n||(e.n=kt.bind(e.proxy)),$watch:e=>Qt}),ur=(e,t)=>e!==re&&!e.__isScriptSetup&&he(e,t),Fa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:a,appContext:l}=e;let c;if(t[0]!=="$"){const w=o[t];if(w!==void 0)switch(w){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(ur(s,t))return o[t]=1,s[t];if(r!==re&&he(r,t))return o[t]=2,r[t];if((c=e.propsOptions[0])&&he(c,t))return o[t]=3,i[t];if(n!==re&&he(n,t))return o[t]=4,n[t];o[t]=0}}const u=zn[t];let p,g;if(u)return t==="$attrs"&&Ue(e.attrs,"get",""),u(e);if((p=a.__cssModules)&&(p=p[t]))return p;if(n!==re&&he(n,t))return o[t]=4,n[t];if(g=l.config.globalProperties,he(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return ur(r,t)?(r[t]=n,!0):s!==re&&he(s,t)?(s[t]=n,!0):he(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let a;return!!n[o]||e!==re&&he(e,o)||ur(t,o)||(a=i[0])&&he(a,o)||he(s,o)||he(zn,o)||he(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:he(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Wi(){return{app:null,config:{isNativeTag:Dl,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ba=0;function Ha(e,t){return function(s,r=null){me(s)||(s=ht({},s)),r!=null&&!Ae(r)&&(r=null);const i=Wi(),o=new WeakSet,a=[];let l=!1;const c=i.app={_uid:Ba++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:Su,get config(){return i.config},set config(u){},use(u,...p){return o.has(u)||(u&&me(u.install)?(o.add(u),u.install(c,...p)):me(u)&&(o.add(u),u(c,...p))),c},mixin(u){return c},component(u,p){return p?(i.components[u]=p,c):i.components[u]},directive(u,p){return p?(i.directives[u]=p,c):i.directives[u]},mount(u,p,g){if(!l){const w=c._ceVNode||Me(s,r);return w.appContext=i,g===!0?g="svg":g===!1&&(g=void 0),e(w,u,g),l=!0,c._container=u,u.__vue_app__=c,Ss(w.component)}},onUnmount(u){a.push(u)},unmount(){l&&(_t(a,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,p){return i.provides[u]=p,c},runWithContext(u){const p=yn;yn=c;try{return u()}finally{yn=p}}};return c}}let yn=null;function za(e,t,n=!1){const s=co();if(s||yn){let r=yn?yn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&me(t)?t.call(s&&s.proxy):t}}const Gi={},Ki=()=>Object.create(Gi),Yi=e=>Object.getPrototypeOf(e)===Gi;function Ua(e,t,n,s=!1){const r={},i=Ki();e.propsDefaults=Object.create(null),Zi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:pa(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function ja(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,a=oe(r),[l]=e.propsOptions;let c=!1;if((s||o>0)&&!(o&16)){if(o&8){const u=e.vnode.dynamicProps;for(let p=0;pe==="_"||e==="__"||e==="_ctx"||e==="$stable",dr=e=>X(e)?e.map(Et):[Et(e)],qa=(e,t,n)=>{if(t._n)return t;const s=Ni((...r)=>dr(t(...r)),n);return s._c=!1,s},Qi=(e,t,n)=>{const s=e._ctx;for(const r in e){if(fr(r))continue;const i=e[r];if(me(i))t[r]=qa(r,i,s);else if(i!=null){const o=dr(i);t[r]=()=>o}}},Ji=(e,t)=>{const n=dr(t);e.slots.default=()=>n},eo=(e,t,n)=>{for(const s in t)(n||!fr(s))&&(e[s]=t[s])},Wa=(e,t,n)=>{const s=e.slots=Ki();if(e.vnode.shapeFlag&32){const r=t.__;r&&zs(s,"__",r,!0);const i=t._;i?(eo(s,t,n),n&&zs(s,"_",i,!0)):Qi(t,s)}else t&&Ji(e,t)},Ga=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=re;if(s.shapeFlag&32){const a=t._;a?n&&a===1?i=!1:eo(r,t,n):(i=!t.$stable,Qi(t,r)),o=t}else t&&(Ji(e,t),o={default:1});if(i)for(const a in r)!fr(a)&&o[a]==null&&delete r[a]},nt=au;function Ka(e){return Ya(e)}function Ya(e,t){const n=rs();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:p,nextSibling:g,setScopeId:w=Qt,insertStaticContent:E}=e,m=(f,h,b,T=null,v=null,_=null,M=void 0,I=null,P=!!h.dynamicChildren)=>{if(f===h)return;f&&!on(f,h)&&(T=le(f),de(f,v,_,!0),f=null),h.patchFlag===-2&&(P=!1,h.dynamicChildren=null);const{type:k,ref:B,shapeFlag:L}=h;switch(k){case vs:R(f,h,b,T);break;case Ke:S(f,h,b,T);break;case hr:f==null&&V(h,b,T,M);break;case Be:$(f,h,b,T,v,_,M,I,P);break;default:L&1?A(f,h,b,T,v,_,M,I,P):L&6?Y(f,h,b,T,v,_,M,I,P):(L&64||L&128)&&k.process(f,h,b,T,v,_,M,I,P,ze)}B!=null&&v?Fn(B,f&&f.ref,_,h||f,!h):B==null&&f&&f.ref!=null&&Fn(f.ref,null,_,f,!0)},R=(f,h,b,T)=>{if(f==null)s(h.el=a(h.children),b,T);else{const v=h.el=f.el;h.children!==f.children&&c(v,h.children)}},S=(f,h,b,T)=>{f==null?s(h.el=l(h.children||""),b,T):h.el=f.el},V=(f,h,b,T)=>{[f.el,f.anchor]=E(f.children,h,b,T,f.el,f.anchor)},K=({el:f,anchor:h},b,T)=>{let v;for(;f&&f!==h;)v=g(f),s(f,b,T),f=v;s(h,b,T)},O=({el:f,anchor:h})=>{let b;for(;f&&f!==h;)b=g(f),r(f),f=b;r(h)},A=(f,h,b,T,v,_,M,I,P)=>{h.type==="svg"?M="svg":h.type==="math"&&(M="mathml"),f==null?C(h,b,T,v,_,M,I,P):W(f,h,v,_,M,I,P)},C=(f,h,b,T,v,_,M,I)=>{let P,k;const{props:B,shapeFlag:L,transition:H,dirs:q}=f;if(P=f.el=o(f.type,_,B&&B.is,B),L&8?u(P,f.children):L&16&&te(f.children,P,null,T,v,pr(f,_),M,I),q&&nn(f,null,T,"created"),J(P,f,f.scopeId,M,T),B){for(const fe in B)fe!=="value"&&!Cn(fe)&&i(P,fe,null,B[fe],_,T);"value"in B&&i(P,"value",null,B.value,_),(k=B.onVnodeBeforeMount)&&At(k,T,f)}q&&nn(f,null,T,"beforeMount");const ee=Za(v,H);ee&&H.beforeEnter(P),s(P,h,b),((k=B&&B.onVnodeMounted)||ee||q)&&nt(()=>{k&&At(k,T,f),ee&&H.enter(P),q&&nn(f,null,T,"mounted")},v)},J=(f,h,b,T,v)=>{if(b&&w(f,b),T)for(let _=0;_{for(let k=P;k{const I=h.el=f.el;let{patchFlag:P,dynamicChildren:k,dirs:B}=h;P|=f.patchFlag&16;const L=f.props||re,H=h.props||re;let q;if(b&&sn(b,!1),(q=H.onVnodeBeforeUpdate)&&At(q,b,h,f),B&&nn(h,f,b,"beforeUpdate"),b&&sn(b,!0),(L.innerHTML&&H.innerHTML==null||L.textContent&&H.textContent==null)&&u(I,""),k?ne(f.dynamicChildren,k,I,b,T,pr(h,v),_):M||We(f,h,I,null,b,T,pr(h,v),_,!1),P>0){if(P&16)xe(I,L,H,b,v);else if(P&2&&L.class!==H.class&&i(I,"class",null,H.class,v),P&4&&i(I,"style",L.style,H.style,v),P&8){const ee=h.dynamicProps;for(let fe=0;fe{q&&At(q,b,h,f),B&&nn(h,f,b,"updated")},T)},ne=(f,h,b,T,v,_,M)=>{for(let I=0;I{if(h!==b){if(h!==re)for(const _ in h)!Cn(_)&&!(_ in b)&&i(f,_,h[_],null,v,T);for(const _ in b){if(Cn(_))continue;const M=b[_],I=h[_];M!==I&&_!=="value"&&i(f,_,I,M,v,T)}"value"in b&&i(f,"value",h.value,b.value,v)}},$=(f,h,b,T,v,_,M,I,P)=>{const k=h.el=f?f.el:a(""),B=h.anchor=f?f.anchor:a("");let{patchFlag:L,dynamicChildren:H,slotScopeIds:q}=h;q&&(I=I?I.concat(q):q),f==null?(s(k,b,T),s(B,b,T),te(h.children||[],b,B,v,_,M,I,P)):L>0&&L&64&&H&&f.dynamicChildren?(ne(f.dynamicChildren,H,b,v,_,M,I),(h.key!=null||v&&h===v.subTree)&&to(f,h,!0)):We(f,h,b,B,v,_,M,I,P)},Y=(f,h,b,T,v,_,M,I,P)=>{h.slotScopeIds=I,f==null?h.shapeFlag&512?v.ctx.activate(h,b,T,M,P):G(h,b,T,v,_,M,P):z(f,h,P)},G=(f,h,b,T,v,_,M)=>{const I=f.component=gu(f,T,v);if(lr(f)&&(I.ctx.renderer=ze),mu(I,!1,M),I.asyncDep){if(v&&v.registerDep(I,ue,M),!f.el){const P=I.subTree=Me(Ke);S(null,P,h,b),f.placeholder=P.el}}else ue(I,f,h,b,v,_,M)},z=(f,h,b)=>{const T=h.component=f.component;if(ou(f,h,b))if(T.asyncDep&&!T.asyncResolved){Se(T,h,b);return}else T.next=h,T.update();else h.el=f.el,T.vnode=h},ue=(f,h,b,T,v,_,M)=>{const I=()=>{if(f.isMounted){let{next:L,bu:H,u:q,parent:ee,vnode:fe}=f;{const it=no(f);if(it){L&&(L.el=fe.el,Se(f,L,M)),it.asyncDep.then(()=>{f.isUnmounted||I()});return}}let se=L,ke;sn(f,!1),L?(L.el=fe.el,Se(f,L,M)):L=fe,H&&ss(H),(ke=L.props&&L.props.onVnodeBeforeUpdate)&&At(ke,ee,L,fe),sn(f,!0);const Oe=ro(f),rt=f.subTree;f.subTree=Oe,m(rt,Oe,p(rt.el),le(rt),f,v,_),L.el=Oe.el,se===null&&lu(f,Oe.el),q&&nt(q,v),(ke=L.props&&L.props.onVnodeUpdated)&&nt(()=>At(ke,ee,L,fe),v)}else{let L;const{el:H,props:q}=h,{bm:ee,m:fe,parent:se,root:ke,type:Oe}=f,rt=Bn(h);sn(f,!1),ee&&ss(ee),!rt&&(L=q&&q.onVnodeBeforeMount)&&At(L,se,h),sn(f,!0);{ke.ce&&ke.ce._def.shadowRoot!==!1&&ke.ce._injectChildStyle(Oe);const it=f.subTree=ro(f);m(null,it,b,T,f,v,_),h.el=it.el}if(fe&&nt(fe,v),!rt&&(L=q&&q.onVnodeMounted)){const it=h;nt(()=>At(L,se,it),v)}(h.shapeFlag&256||se&&Bn(se.vnode)&&se.vnode.shapeFlag&256)&&f.a&&nt(f.a,v),f.isMounted=!0,h=b=T=null}};f.scope.on();const P=f.effect=new ci(I);f.scope.off();const k=f.update=P.run.bind(P),B=f.job=P.runIfDirty.bind(P);B.i=f,B.id=f.uid,P.scheduler=()=>rr(B),sn(f,!0),k()},Se=(f,h,b)=>{h.component=f;const T=f.vnode.props;f.vnode=h,f.next=null,ja(f,h.props,T,b),Ga(f,h.children,b),It(),Li(f),Mt()},We=(f,h,b,T,v,_,M,I,P=!1)=>{const k=f&&f.children,B=f?f.shapeFlag:0,L=h.children,{patchFlag:H,shapeFlag:q}=h;if(H>0){if(H&128){ce(k,L,b,T,v,_,M,I,P);return}else if(H&256){xt(k,L,b,T,v,_,M,I,P);return}}q&8?(B&16&&ge(k,v,_),L!==k&&u(b,L)):B&16?q&16?ce(k,L,b,T,v,_,M,I,P):ge(k,v,_,!0):(B&8&&u(b,""),q&16&&te(L,b,T,v,_,M,I,P))},xt=(f,h,b,T,v,_,M,I,P)=>{f=f||pt,h=h||pt;const k=f.length,B=h.length,L=Math.min(k,B);let H;for(H=0;HB?ge(f,v,_,!0,!1,L):te(h,b,T,v,_,M,I,P,L)},ce=(f,h,b,T,v,_,M,I,P)=>{let k=0;const B=h.length;let L=f.length-1,H=B-1;for(;k<=L&&k<=H;){const q=f[k],ee=h[k]=P?Kt(h[k]):Et(h[k]);if(on(q,ee))m(q,ee,b,null,v,_,M,I,P);else break;k++}for(;k<=L&&k<=H;){const q=f[L],ee=h[H]=P?Kt(h[H]):Et(h[H]);if(on(q,ee))m(q,ee,b,null,v,_,M,I,P);else break;L--,H--}if(k>L){if(k<=H){const q=H+1,ee=qH)for(;k<=L;)de(f[k],v,_,!0),k++;else{const q=k,ee=k,fe=new Map;for(k=ee;k<=H;k++){const $e=h[k]=P?Kt(h[k]):Et(h[k]);$e.key!=null&&fe.set($e.key,k)}let se,ke=0;const Oe=H-ee+1;let rt=!1,it=0;const Ft=new Array(Oe);for(k=0;k=Oe){de($e,v,_,!0);continue}let Xe;if($e.key!=null)Xe=fe.get($e.key);else for(se=ee;se<=H;se++)if(Ft[se-ee]===0&&on($e,h[se])){Xe=se;break}Xe===void 0?de($e,v,_,!0):(Ft[Xe-ee]=k+1,Xe>=it?it=Xe:rt=!0,m($e,h[Xe],b,null,v,_,M,I,P),ke++)}const Qn=rt?Xa(Ft):pt;for(se=Qn.length-1,k=Oe-1;k>=0;k--){const $e=ee+k,Xe=h[$e],ot=h[$e+1],Bt=$e+1{const{el:_,type:M,transition:I,children:P,shapeFlag:k}=f;if(k&6){N(f.component.subTree,h,b,T);return}if(k&128){f.suspense.move(h,b,T);return}if(k&64){M.move(f,h,b,ze);return}if(M===Be){s(_,h,b);for(let L=0;LI.enter(_),v);else{const{leave:L,delayLeave:H,afterLeave:q}=I,ee=()=>{f.ctx.isUnmounted?r(_):s(_,h,b)},fe=()=>{L(_,()=>{ee(),q&&q()})};H?H(_,ee,fe):fe()}else s(_,h,b)},de=(f,h,b,T=!1,v=!1)=>{const{type:_,props:M,ref:I,children:P,dynamicChildren:k,shapeFlag:B,patchFlag:L,dirs:H,cacheIndex:q}=f;if(L===-2&&(v=!1),I!=null&&(It(),Fn(I,null,b,f,!0),Mt()),q!=null&&(h.renderCache[q]=void 0),B&256){h.ctx.deactivate(f);return}const ee=B&1&&H,fe=!Bn(f);let se;if(fe&&(se=M&&M.onVnodeBeforeUnmount)&&At(se,h,f),B&6)ve(f.component,b,T);else{if(B&128){f.suspense.unmount(b,T);return}ee&&nn(f,null,h,"beforeUnmount"),B&64?f.type.remove(f,h,b,ze,T):k&&!k.hasOnce&&(_!==Be||L>0&&L&64)?ge(k,h,b,!1,!0):(_===Be&&L&384||!v&&B&16)&&ge(P,h,b),T&&pe(f)}(fe&&(se=M&&M.onVnodeUnmounted)||ee)&&nt(()=>{se&&At(se,h,f),ee&&nn(f,null,h,"unmounted")},b)},pe=f=>{const{type:h,el:b,anchor:T,transition:v}=f;if(h===Be){Te(b,T);return}if(h===hr){O(f);return}const _=()=>{r(b),v&&!v.persisted&&v.afterLeave&&v.afterLeave()};if(f.shapeFlag&1&&v&&!v.persisted){const{leave:M,delayLeave:I}=v,P=()=>M(b,_);I?I(f.el,_,P):P()}else _()},Te=(f,h)=>{let b;for(;f!==h;)b=g(f),r(f),f=b;r(h)},ve=(f,h,b)=>{const{bum:T,scope:v,job:_,subTree:M,um:I,m:P,a:k,parent:B,slots:{__:L}}=f;so(P),so(k),T&&ss(T),B&&X(L)&&L.forEach(H=>{B.renderCache[H]=void 0}),v.stop(),_&&(_.flags|=8,de(M,f,h,b)),I&&nt(I,h),nt(()=>{f.isUnmounted=!0},h),h&&h.pendingBranch&&!h.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===h.pendingId&&(h.deps--,h.deps===0&&h.resolve())},ge=(f,h,b,T=!1,v=!1,_=0)=>{for(let M=_;M{if(f.shapeFlag&6)return le(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const h=g(f.anchor||f.el),b=h&&h[Ia];return b?g(b):h};let yt=!1;const Ct=(f,h,b)=>{f==null?h._vnode&&de(h._vnode,null,null,!0):m(h._vnode||null,f,h,null,null,null,b),h._vnode=f,yt||(yt=!0,Li(),Oi(),yt=!1)},ze={p:m,um:de,m:N,r:pe,mt:G,mc:te,pc:We,pbc:ne,n:le,o:e};return{render:Ct,hydrate:void 0,createApp:Ha(Ct)}}function pr({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function sn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Za(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function to(e,t,n=!1){const s=e.children,r=t.children;if(X(s)&&X(r))for(let i=0;i>1,e[n[a]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function no(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:no(t)}function so(e){if(e)for(let t=0;tza(Qa);function rn(e,t,n){return eu(e,t,n)}function eu(e,t,n=re){const{immediate:s,deep:r,flush:i,once:o}=n,a=ht({},n),l=t&&s||!t&&i!=="post";let c;if(Vn){if(i==="sync"){const w=Ja();c=w.__watcherHandles||(w.__watcherHandles=[])}else if(!l){const w=()=>{};return w.stop=Qt,w.resume=Qt,w.pause=Qt,w}}const u=Yt;a.call=(w,E,m)=>_t(w,u,E,m);let p=!1;i==="post"?a.scheduler=w=>{nt(w,u&&u.suspense)}:i!=="sync"&&(p=!0,a.scheduler=(w,E)=>{E?w():rr(w)}),a.augmentJob=w=>{t&&(w.flags|=4),p&&(w.flags|=2,u&&(w.id=u.uid,w.i=u))};const g=_a(e,t,a);return Vn&&(c?c.push(g):l&&g()),g}const tu=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Ut(t)}Modifiers`]||e[`${Jt(t)}Modifiers`];function nu(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||re;let r=n;const i=t.startsWith("update:"),o=i&&tu(s,t.slice(7));o&&(o.trim&&(r=n.map(u=>Ce(u)?u.trim():u)),o.number&&(r=n.map(Us)));let a,l=s[a=Hs(t)]||s[a=Hs(Ut(t))];!l&&i&&(l=s[a=Hs(Jt(t))]),l&&_t(l,e,6,r);const c=s[a+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[a])return;e.emitted[a]=!0,_t(c,e,6,r)}}function su(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={};return i?(X(i)?i.forEach(a=>o[a]=null):ht(o,i),Ae(e)&&s.set(e,o),o):(Ae(e)&&s.set(e,null),null)}function ws(e,t){return!e||!es(t)?!1:(t=t.slice(2).replace(/Once$/,""),he(e,t[0].toLowerCase()+t.slice(1))||he(e,Jt(t))||he(e,t))}function Ep(){}function ro(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:p,data:g,setupState:w,ctx:E,inheritAttrs:m}=e,R=ms(e);let S,V;try{if(n.shapeFlag&4){const O=r||s,A=O;S=Et(c.call(A,O,u,p,w,g,E)),V=a}else{const O=t;S=Et(O.length>1?O(p,{attrs:a,slots:o,emit:l}):O(p,null)),V=t.props?a:ru(a)}}catch(O){Un.length=0,hs(O,e,1),S=Me(Ke)}let K=S;if(V&&m!==!1){const O=Object.keys(V),{shapeFlag:A}=K;O.length&&A&7&&(i&&O.some(Fs)&&(V=iu(V,i)),K=Gt(K,V,!1,!0))}return n.dirs&&(K=Gt(K,null,!1,!0),K.dirs=K.dirs?K.dirs.concat(n.dirs):n.dirs),n.transition&&Nn(K,n.transition),S=K,ms(R),S}const ru=e=>{let t;for(const n in e)(n==="class"||n==="style"||es(n))&&((t||(t={}))[n]=e[n]);return t},iu=(e,t)=>{const n={};for(const s in e)(!Fs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function ou(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:a,patchFlag:l}=t,c=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return s?io(s,o,c):!!o;if(l&8){const u=t.dynamicProps;for(let p=0;pe.__isSuspense;function au(e,t){t&&t.pendingBranch?X(e)?t.effects.push(...e):t.effects.push(e):Ca(e)}const Be=Symbol.for("v-fgt"),vs=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),hr=Symbol.for("v-stc"),Un=[];let st=null;function F(e=!1){Un.push(st=e?null:[])}function uu(){Un.pop(),st=Un[Un.length-1]||null}let jn=1;function lo(e,t=!1){jn+=e,e<0&&st&&t&&(st.hasOnce=!0)}function ao(e){return e.dynamicChildren=jn>0?st||pt:null,uu(),jn>0&&st&&st.push(e),e}function j(e,t,n,s,r,i){return ao(x(e,t,n,s,r,i,!0))}function St(e,t,n,s,r){return ao(Me(e,t,n,s,r,!0))}function _s(e){return e?e.__v_isVNode===!0:!1}function on(e,t){return e.type===t.type&&e.key===t.key}const uo=({key:e})=>e!=null?e:null,Ts=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ce(e)||je(e)||me(e)?{i:at,r:e,k:t,f:!!n}:e:null);function x(e,t=null,n=null,s=0,r=null,i=e===Be?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uo(t),ref:t&&Ts(t),scopeId:Di,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:at};return a?(mr(l,n),i&128&&e.normalize(l)):n&&(l.shapeFlag|=Ce(n)?8:16),jn>0&&!o&&st&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&st.push(l),l}const Me=cu;function cu(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===Na)&&(e=Ke),_s(e)){const a=Gt(e,t,!0);return n&&mr(a,n),jn>0&&!i&&st&&(a.shapeFlag&6?st[st.indexOf(e)]=a:st.push(a)),a.patchFlag=-2,a}if(Tu(e)&&(e=e.__vccOpts),t){t=fu(t);let{class:a,style:l}=t;a&&!Ce(a)&&(t.class=ye(a)),Ae(l)&&(nr(l)&&!X(l)&&(l=ht({},l)),t.style=js(l))}const o=Ce(e)?1:oo(e)?128:Fi(e)?64:Ae(e)?4:me(e)?2:0;return x(e,t,n,s,r,o,i,!0)}function fu(e){return e?nr(e)||Yi(e)?ht({},e):e:null}function Gt(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:a,transition:l}=e,c=t?du(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&uo(c),ref:t&&t.ref?n&&i?X(i)?i.concat(Ts(t)):[i,Ts(t)]:Ts(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:a,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Be?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Gt(e.ssContent),ssFallback:e.ssFallback&&Gt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&s&&Nn(u,l.clone(u)),u}function gr(e=" ",t=0){return Me(vs,null,e,t)}function Ve(e="",t=!1){return t?(F(),St(Ke,null,e)):Me(Ke,null,e)}function Et(e){return e==null||typeof e=="boolean"?Me(Ke):X(e)?Me(Be,null,e.slice()):_s(e)?Kt(e):Me(vs,null,String(e))}function Kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Gt(e)}function mr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(X(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),mr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Yi(t)?t._ctx=at:r===3&&at&&(at.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else me(t)?(t={default:t,_ctx:at},n=32):(t=String(t),s&64?(n=16,t=[gr(t)]):n=8);e.children=t,e.shapeFlag|=n}function du(...e){const t={};for(let n=0;nYt||at;let ks,br;{const e=rs(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};ks=t("__VUE_INSTANCE_SETTERS__",n=>Yt=n),br=t("__VUE_SSR_SETTERS__",n=>Vn=n)}const xr=e=>{const t=Yt;return ks(e),e.scope.on(),()=>{e.scope.off(),ks(t)}},fo=()=>{Yt&&Yt.scope.off(),ks(null)};function po(e){return e.vnode.shapeFlag&4}let Vn=!1;function mu(e,t=!1,n=!1){t&&br(t);const{props:s,children:r}=e.vnode,i=po(e);Ua(e,s,i,t),Wa(e,r,n||t);const o=i?bu(e,t):void 0;return t&&br(!1),o}function bu(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Fa);const{setup:s}=n;if(s){It();const r=e.setupContext=s.length>1?yu(e):null,i=xr(e),o=mn(s,e,0,[e.props,r]),a=ni(o);if(Mt(),i(),(a||e.sp)&&!Bn(e)&&$a(e),a){if(o.then(fo,fo),t)return o.then(l=>{ho(e,l)}).catch(l=>{hs(l,e,0)});e.asyncDep=o}else ho(e,o)}else go(e)}function ho(e,t,n){me(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ae(t)&&(e.setupState=Ci(t)),go(e)}function go(e,t,n){const s=e.type;e.render||(e.render=s.render||Qt)}const xu={get(e,t){return Ue(e,"get",""),e[t]}};function yu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,xu),slots:e.slots,emit:e.emit,expose:t}}function Ss(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ci(ha(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in zn)return zn[n](e)},has(t,n){return n in t||n in zn}})):e.proxy}const wu=/(?:^|[-_])(\w)/g,vu=e=>e.replace(wu,t=>t.toUpperCase()).replace(/[-_]/g,"");function _u(e,t=!0){return me(e)?e.displayName||e.name:e.name||t&&e.__name}function mo(e,t,n=!1){let s=_u(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?vu(s):n?"App":"Anonymous"}function Tu(e){return me(e)&&"__vccOpts"in e}const Re=(e,t)=>wa(e,t,Vn);function ku(e,t,n){const s=arguments.length;return s===2?Ae(t)&&!X(t)?_s(t)?Me(e,null,[t]):Me(e,t):Me(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&_s(n)&&(n=[n]),Me(e,t,n))}const Su="3.5.18";let yr;const bo=typeof window!="undefined"&&window.trustedTypes;if(bo)try{yr=bo.createPolicy("vue",{createHTML:e=>e})}catch{}const xo=yr?e=>yr.createHTML(e):e=>e,Eu="http://www.w3.org/2000/svg",Au="http://www.w3.org/1998/Math/MathML",Dt=typeof document!="undefined"?document:null,yo=Dt&&Dt.createElement("template"),Ru={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Dt.createElementNS(Eu,e):t==="mathml"?Dt.createElementNS(Au,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{yo.innerHTML=xo(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const a=yo.content;if(s==="svg"||s==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Zt="transition",qn="animation",Wn=Symbol("_vtc"),wo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Cu=ht({},Bi,wo),Pu=(e=>(e.displayName="Transition",e.props=Cu,e))((e,{slots:t})=>ku(Oa,Iu(e),t)),ln=(e,t=[])=>{X(e)?e.forEach(n=>n(...t)):e&&e(...t)},vo=e=>e?X(e)?e.some(t=>t.length>1):e.length>1:!1;function Iu(e){const t={};for(const $ in e)$ in wo||(t[$]=e[$]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=i,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:w=`${n}-leave-to`}=e,E=Mu(r),m=E&&E[0],R=E&&E[1],{onBeforeEnter:S,onEnter:V,onEnterCancelled:K,onLeave:O,onLeaveCancelled:A,onBeforeAppear:C=S,onAppear:J=V,onAppearCancelled:te=K}=t,W=($,Y,G,z)=>{$._enterCancelled=z,an($,Y?u:a),an($,Y?c:o),G&&G()},ne=($,Y)=>{$._isLeaving=!1,an($,p),an($,w),an($,g),Y&&Y()},xe=$=>(Y,G)=>{const z=$?J:V,ue=()=>W(Y,$,G);ln(z,[Y,ue]),_o(()=>{an(Y,$?l:i),Nt(Y,$?u:a),vo(z)||To(Y,s,m,ue)})};return ht(t,{onBeforeEnter($){ln(S,[$]),Nt($,i),Nt($,o)},onBeforeAppear($){ln(C,[$]),Nt($,l),Nt($,c)},onEnter:xe(!1),onAppear:xe(!0),onLeave($,Y){$._isLeaving=!0;const G=()=>ne($,Y);Nt($,p),$._enterCancelled?(Nt($,g),Eo()):(Eo(),Nt($,g)),_o(()=>{$._isLeaving&&(an($,p),Nt($,w),vo(O)||To($,s,R,G))}),ln(O,[$,G])},onEnterCancelled($){W($,!1,void 0,!0),ln(K,[$])},onAppearCancelled($){W($,!0,void 0,!0),ln(te,[$])},onLeaveCancelled($){ne($),ln(A,[$])}})}function Mu(e){if(e==null)return null;if(Ae(e))return[wr(e.enter),wr(e.leave)];{const t=wr(e);return[t,t]}}function wr(e){return zl(e)}function Nt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Wn]||(e[Wn]=new Set)).add(t)}function an(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Wn];n&&(n.delete(t),n.size||(e[Wn]=void 0))}function _o(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Lu=0;function To(e,t,n,s){const r=e._endId=++Lu,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:a,propCount:l}=Ou(e,t);if(!o)return s();const c=o+"end";let u=0;const p=()=>{e.removeEventListener(c,g),i()},g=w=>{w.target===e&&++u>=l&&p()};setTimeout(()=>{u(n[E]||"").split(", "),r=s(`${Zt}Delay`),i=s(`${Zt}Duration`),o=ko(r,i),a=s(`${qn}Delay`),l=s(`${qn}Duration`),c=ko(a,l);let u=null,p=0,g=0;t===Zt?o>0&&(u=Zt,p=o,g=i.length):t===qn?c>0&&(u=qn,p=c,g=l.length):(p=Math.max(o,c),u=p>0?o>c?Zt:qn:null,g=u?u===Zt?i.length:l.length:0);const w=u===Zt&&/\b(transform|all)(,|$)/.test(s(`${Zt}Property`).toString());return{type:u,timeout:p,propCount:g,hasTransform:w}}function ko(e,t){for(;e.lengthSo(n)+So(e[s])))}function So(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Eo(){return document.body.offsetHeight}function $u(e,t,n){const s=e[Wn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Ao=Symbol("_vod"),Du=Symbol("_vsh"),Nu=Symbol(""),Fu=/(^|;)\s*display\s*:/;function Bu(e,t,n){const s=e.style,r=Ce(n);let i=!1;if(n&&!r){if(t)if(Ce(t))for(const o of t.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&Es(s,a,"")}else for(const o in t)n[o]==null&&Es(s,o,"");for(const o in n)o==="display"&&(i=!0),Es(s,o,n[o])}else if(r){if(t!==n){const o=s[Nu];o&&(n+=";"+o),s.cssText=n,i=Fu.test(n)}}else t&&e.removeAttribute("style");Ao in e&&(e[Ao]=i?s.display:"",e[Du]&&(s.display="none"))}const Ro=/\s*!important$/;function Es(e,t,n){if(X(n))n.forEach(s=>Es(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Hu(e,t);Ro.test(n)?e.setProperty(Jt(s),n.replace(Ro,""),"important"):e[s]=n}}const Co=["Webkit","Moz","ms"],vr={};function Hu(e,t){const n=vr[t];if(n)return n;let s=Ut(t);if(s!=="filter"&&s in e)return vr[t]=s;s=ii(s);for(let r=0;r_r||(Vu.then(()=>_r=0),_r=Date.now());function Wu(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;_t(Gu(s,n.value),t,5,[s])};return n.value=e,n.attached=qu(),n}function Gu(e,t){if(X(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const $o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ku=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?$u(e,s,o):t==="style"?Bu(e,n,s):es(t)?Fs(t)||Uu(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yu(e,t,s,o))?(Mo(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Io(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ce(s))?Mo(e,Ut(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Io(e,t,s,o))};function Yu(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&$o(t)&&me(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return $o(t)&&Ce(n)?!1:t in e}const Do=e=>{const t=e.props["onUpdate:modelValue"]||!1;return X(t)?n=>ss(t,n):t};function Zu(e){e.target.composing=!0}function No(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tr=Symbol("_assign"),Xu={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Tr]=Do(r);const i=s||r.props&&r.props.type==="number";wn(e,t?"change":"input",o=>{if(o.target.composing)return;let a=e.value;n&&(a=a.trim()),i&&(a=Us(a)),e[Tr](a)}),n&&wn(e,"change",()=>{e.value=e.value.trim()}),t||(wn(e,"compositionstart",Zu),wn(e,"compositionend",No),wn(e,"change",No))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[Tr]=Do(o),e.composing)return;const a=(i||e.type==="number")&&!/^0\d/.test(e.value)?Us(e.value):e.value,l=t==null?"":t;a!==l&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===l)||(e.value=l))}},Qu=["ctrl","shift","alt","meta"],Ju={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Qu.some(n=>e[`${n}Key`]&&!t.includes(n))},ct=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const t=tc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=rc(s);if(!r)return;const i=t._component;!me(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,sc(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function sc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rc(e){return Ce(e)?document.querySelector(e):e}const ic=["aria-pressed"],oc={key:0,viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true"},lc={key:1,viewBox:"0 0 24 24",width:"18",height:"18","aria-hidden":"true",fill:"none"},ac={__name:"ChatbotToggler",props:{isOpen:{type:Boolean,required:!0}},emits:["toggle"],setup(e){return(t,n)=>(F(),j("button",{class:"fixed bottom-5 right-5 z-9999 grid h-12 w-12 appearance-none place-items-center rounded-full border border-white/20 bg-gradient-to-br from-brand-500 to-brand-600 text-white shadow-[0_20px_36px_-20px_rgba(109,79,194,0.85)] transition-all duration-250 hover:-translate-y-0.5 hover:from-brand-600 hover:to-violet-700 hover:shadow-[0_22px_40px_-22px_rgba(109,79,194,1)] focus:outline-none max-[600px]:bottom-3 max-[600px]:right-3 max-[600px]:h-13 max-[600px]:w-13",style:{"border-radius":"9999px"},"aria-pressed":e.isOpen?"true":"false",onClick:n[0]||(n[0]=s=>t.$emit("toggle"))},[e.isOpen?(F(),j("svg",lc,n[2]||(n[2]=[x("path",{d:"M6 6l12 12M18 6L6 18",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"},null,-1)]))):(F(),j("svg",oc,n[1]||(n[1]=[x("path",{d:"M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H8l-4 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",fill:"currentColor",stroke:"currentColor","stroke-width":"2","stroke-linecap":"miter","stroke-linejoin":"miter"},null,-1)])))],8,ic))}},uc={class:"chat-header relative flex min-h-14 items-center justify-between px-4 pb-2.5 pt-3 text-white sm:px-5"},cc={class:"flex min-w-0 flex-1 items-center gap-2 sm:gap-2.5"},fc={xmlns:"http://www.w3.org/2000/svg",width:"35",height:"35",viewBox:"0 0 1024 1024",class:"h-8 w-8 shrink-0 rounded-full bg-white p-1.5 shadow-md motion-safe:animate-soft-float",style:{fill:"#6d4fc2"}},dc={class:"ml-2 flex items-center gap-1.5"},pc=["title"],hc=["title","aria-label"],gc={key:0,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},mc={key:1,viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},bc=["title","aria-label"],xc={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},yc={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},wc={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},vc={__name:"ChatHeader",props:{windowMode:{type:String,required:!0},autoReadEnabled:{type:Boolean,required:!0},activeTtsProvider:{type:String,required:!0}},emits:["close","cycleResize","toggleAutoRead"],setup(e){const t=e,n={default:"Compact",half:"Half Screen",full:"Full Screen"},s=Re(()=>n[t.windowMode]||"Compact"),r=Re(()=>t.windowMode==="default"?"Half Screen":t.windowMode==="half"?"Full Screen":"Compact"),i=Re(()=>t.activeTtsProvider==="polly"?"TTS: Polly":t.activeTtsProvider==="browser"?"TTS: Browser":"TTS: Off"),o=Re(()=>t.activeTtsProvider==="polly"?"bg-emerald-500/45":t.activeTtsProvider==="browser"?"bg-amber-500/45":"bg-slate-500/35");return(a,l)=>(F(),j("div",uc,[x("div",cc,[(F(),j("svg",fc,l[3]||(l[3]=[x("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))),l[4]||(l[4]=x("h2",{class:"truncate text-xs font-semibold tracking-[0.01em] sm:text-base text-white/95"},"ChangAI from ERPGulf",-1))]),x("div",dc,[x("span",{class:ye(["hidden rounded-full border border-white/25 px-2 py-1 text-[10px] font-semibold uppercase tracking-wide text-white/95 shadow-sm backdrop-blur-sm sm:inline",o.value]),title:`TTS provider: ${i.value}`},Qe(i.value),11,pc),x("button",{class:ye(["h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none sm:flex",e.autoReadEnabled?"bg-white/24 shadow-sm":"hover:bg-white/15"]),style:{"border-radius":"0.375rem"},title:e.autoReadEnabled?"Auto speech on":"Auto speech off","aria-label":e.autoReadEnabled?"Turn off auto speech":"Turn on auto speech",onClick:l[0]||(l[0]=c=>a.$emit("toggleAutoRead"))},[e.autoReadEnabled?(F(),j("svg",gc,l[5]||(l[5]=[x("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),x("path",{d:"M15 9a4 4 0 0 1 0 6"},null,-1),x("path",{d:"M18 7a7 7 0 0 1 0 10"},null,-1)]))):(F(),j("svg",mc,l[6]||(l[6]=[x("path",{d:"M11 5L6 9H3v6h3l5 4V5z"},null,-1),x("path",{d:"M22 9l-6 6"},null,-1),x("path",{d:"M16 9l6 6"},null,-1)])))],10,hc),x("button",{class:ye(["flex h-8 min-w-8 appearance-none items-center justify-center rounded-md border border-white/20 px-2 text-xs font-semibold text-white/90 transition-all duration-200 focus:outline-none","bg-white/20 shadow-sm hover:bg-white/25"]),style:{"border-radius":"0.375rem"},title:`Resize mode: ${s.value} (click to ${r.value})`,"aria-label":`Resize mode ${s.value}. Click to switch to ${r.value}`,onClick:l[1]||(l[1]=c=>a.$emit("cycleResize"))},[e.windowMode==="default"?(F(),j("svg",xc,l[7]||(l[7]=[x("rect",{x:"7",y:"8",width:"10",height:"8",rx:"2"},null,-1)]))):e.windowMode==="half"?(F(),j("svg",yc,l[8]||(l[8]=[x("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),x("path",{d:"M12 5v14"},null,-1)]))):(F(),j("svg",wc,l[9]||(l[9]=[x("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"},null,-1),x("path",{d:"M8 8H6v2M16 8h2v2M8 16H6v-2M16 16h2v-2"},null,-1)])))],8,bc),x("button",{class:"grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-white/20 text-white transition-all duration-200 hover:scale-105 hover:bg-white/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",style:{"border-radius":"9999px"},"aria-label":"Close chatbot",onClick:l[2]||(l[2]=c=>a.$emit("close"))},l[10]||(l[10]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[x("path",{d:"M6 9l6 6 6-6"})],-1)]))])]))}},_c={class:"flex gap-1.5 border-b border-slate-200/80 px-2.5 pb-2.5 pt-1"},Tc=["onClick"],kc={class:"inline-flex items-center gap-1.5"},Sc={__name:"TabBar",props:{modelValue:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e){const t=e,n=Re(()=>{const s=[{id:"chat",label:"Chats"},{id:"debug",label:"Debug"},{id:"support",label:"Support"},{id:"settings",label:"Settings"}];return t.debugEnabled?s:s.filter(r=>r.id!=="debug")});return(s,r)=>(F(),j("div",_c,[(F(!0),j(Be,null,ys(n.value,i=>(F(),j("button",{key:i.id,class:ye(["group min-w-0 flex-1 h-9 appearance-none rounded-lg border border-transparent bg-transparent px-2 text-xs font-semibold transition-all duration-200 focus:outline-none",e.modelValue===i.id?"border-white/30 bg-linear-to-r from-violet-300/36 via-indigo-300/30 to-sky-300/28 text-white shadow-[0_4px_10px_rgba(20,24,40,0.22)]":"text-white/80 hover:border-white/25 hover:bg-white/12 hover:text-white"]),onClick:o=>s.$emit("update:modelValue",i.id)},[x("span",kc,[x("span",{class:ye(["h-1.5 w-1.5 rounded-full transition-colors duration-200",e.modelValue===i.id?"bg-white":"bg-white/40 group-hover:bg-white/70"])},null,2),gr(" "+Qe(i.label),1)])],10,Tc))),128))]))}},Ec=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Ac={},Rc={xmlns:"http://www.w3.org/2000/svg",width:"50",height:"50",viewBox:"0 0 1024 1024",class:"h-7.5 w-7.5 shrink-0 self-end rounded-full bg-gradient-to-br from-brand-500 to-brand-600 p-1.5 fill-white shadow-[0_10px_18px_-12px_rgba(109,79,194,0.85)]"};function Cc(e,t){return F(),j("svg",Rc,t[0]||(t[0]=[x("path",{d:"M738.3 287.6H285.7c-59 0-106.8 47.8-106.8 106.8v303.1c0 59 47.8 106.8 106.8 106.8h81.5v111.1c0 .7.8 1.1 1.4.7l166.9-110.6 41.8-.8h117.4l43.6-.4c59 0 106.8-47.8 106.8-106.8V394.5c0-59-47.8-106.9-106.8-106.9zM351.7 448.2c0-29.5 23.9-53.5 53.5-53.5s53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5-53.5-23.9-53.5-53.5zm157.9 267.1c-67.8 0-123.8-47.5-132.3-109h264.6c-8.6 61.5-64.5 109-132.3 109zm110-213.7c-29.5 0-53.5-23.9-53.5-53.5s23.9-53.5 53.5-53.5 53.5 23.9 53.5 53.5-23.9 53.5-53.5 53.5zM867.2 644.5V453.1h26.5c19.4 0 35.1 15.7 35.1 35.1v121.1c0 19.4-15.7 35.1-35.1 35.1h-26.5zM95.2 609.4V488.2c0-19.4 15.7-35.1 35.1-35.1h26.5v191.3h-26.5c-19.4 0-35.1-15.7-35.1-35.1zM561.5 149.6c0 23.4-15.6 43.3-36.9 49.7v44.9h-30v-44.9c-21.4-6.5-36.9-26.3-36.9-49.7 0-28.6 23.3-51.9 51.9-51.9s51.9 23.3 51.9 51.9z"},null,-1)]))}const Bo=Ec(Ac,[["render",Cc]]),As={PIPELINE:"changai.changai.api.v2.text2sql_pipeline_v2.run_text2sql_pipeline",SUPPORT:"changai.changai.api.v2.text2sql_pipeline_v2.support_bot",SETTINGS:"changai.changai.api.v2.text2sql_pipeline_v2.get_frontend_settings",TTS:"changai.changai.api.v2.text2sql_pipeline_v2.synthesize_tts"};function kr(e,t={},n="actual"){return n==="test"?Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify(t)}`}):!window.frappe||!window.frappe.call?Promise.reject(new Error("Frappe API is unavailable in actual mode.")):new Promise((s,r)=>{window.frappe.call({method:e,args:t,callback(i){s(i.message)},error(i){r(i)}})})}function Pc(e,t,n="actual",s=null,r){if(n==="test")return{promise:Promise.resolve({Bot:`[TEST MODE] ${JSON.stringify({user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r})}`}),cancel:()=>!1};if(!window.frappe||!window.frappe.call)return{promise:Promise.reject(new Error("Frappe API is unavailable in actual mode.")),cancel:()=>!1};let i=null,o=!1;return{promise:new Promise((c,u)=>{i=window.frappe.call({method:As.PIPELINE,args:{user_question:e,chat_id:t,request_id:s,sendNonErptoAI:r},callback(p){o=!0,c(p.message)},error(p){o=!0,u(p)}})}),cancel:()=>o||!i||typeof i.abort!="function"?!1:(i.abort(),o=!0,!0)}}function Ic(e,t="actual"){return kr(As.SUPPORT,{message:e},t)}function Mc(e="actual"){return kr(As.SETTINGS,{},e)}function Lc(e,t="Zayd",n="actual"){return kr(As.TTS,{text:e,voice_id:t},n)}function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var un=Sr();function Ho(e){un=e}var cn={exec:()=>null};function ie(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(qe.caret,"$1"),n=n.replace(r,o),s},getRegex:()=>new RegExp(n,t)};return s}var Oc=((e="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},$c=/^(?:[ \t]*(?:\n|$))+/,Dc=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Nc=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Gn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Fc=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Er=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,zo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Uo=ie(zo).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bc=ie(zo).replace(/bull/g,Er).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ar=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Hc=/^[^\n]+/,Rr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,zc=ie(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Rr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Uc=ie(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Er).getRegex(),Rs="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Cr=/|$))/,jc=ie("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Cr).replace("tag",Rs).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),jo=ie(Ar).replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),Vc=ie(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",jo).getRegex(),Pr={blockquote:Vc,code:Dc,def:zc,fences:Nc,heading:Fc,hr:Gn,html:jc,lheading:Uo,list:Uc,newline:$c,paragraph:jo,table:cn,text:Hc},Vo=ie("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex(),qc={...Pr,lheading:Bc,table:Vo,paragraph:ie(Ar).replace("hr",Gn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vo).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",Rs).getRegex()},Wc={...Pr,html:ie(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Cr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ie(Ar).replace("hr",Gn).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Uo).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Gc=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Kc=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,qo=/^( {2,}|\\)\n(?!\s*$)/,Yc=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Oc?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Go=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ef=ie(Go,"u").replace(/punct/g,vn).getRegex(),tf=ie(Go,"u").replace(/punct/g,Wo).getRegex(),Ko="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nf=ie(Ko,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),sf=ie(Ko,"gu").replace(/notPunctSpace/g,Qc).replace(/punctSpace/g,Xc).replace(/punct/g,Wo).getRegex(),rf=ie("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),of=ie(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vn).getRegex(),lf="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",af=ie(lf,"gu").replace(/notPunctSpace/g,Ir).replace(/punctSpace/g,Cs).replace(/punct/g,vn).getRegex(),uf=ie(/\\(punct)/,"gu").replace(/punct/g,vn).getRegex(),cf=ie(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ff=ie(Cr).replace("(?:-->|$)","-->").getRegex(),df=ie("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ff).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ps=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,pf=ie(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Ps).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Yo=ie(/^!?\[(label)\]\[(ref)\]/).replace("label",Ps).replace("ref",Rr).getRegex(),Zo=ie(/^!?\[(ref)\](?:\[\])?/).replace("ref",Rr).getRegex(),hf=ie("reflink|nolink(?!\\()","g").replace("reflink",Yo).replace("nolink",Zo).getRegex(),Xo=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Mr={_backpedal:cn,anyPunctuation:uf,autolink:cf,blockSkip:Jc,br:qo,code:Kc,del:cn,delLDelim:cn,delRDelim:cn,emStrongLDelim:ef,emStrongRDelimAst:nf,emStrongRDelimUnd:rf,escape:Gc,link:pf,nolink:Zo,punctuation:Zc,reflink:Yo,reflinkSearch:hf,tag:df,text:Yc,url:cn},gf={...Mr,link:ie(/^!?\[(label)\]\((.*?)\)/).replace("label",Ps).getRegex(),reflink:ie(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ps).getRegex()},Lr={...Mr,emStrongRDelimAst:sf,emStrongLDelim:tf,delLDelim:of,delRDelim:af,url:ie(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Xo).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ie(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Qo=e=>bf[e];function Rt(e,t){if(t){if(qe.escapeTest.test(e))return e.replace(qe.escapeReplace,Qo)}else if(qe.escapeTestNoEncode.test(e))return e.replace(qe.escapeReplaceNoEncode,Qo);return e}function Jo(e){try{e=encodeURI(e).replace(qe.percentDecode,"%")}catch{return null}return e}function el(e,t){var i;let n=e.replace(qe.findPipe,(o,a,l)=>{let c=!1,u=a;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(qe.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!((i=s.at(-1))!=null&&i.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length=0&&qe.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(` +`)}function xf(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s0?-2:-1}function yf(e,t=0){let n=t,s="";for(let r of e)if(r===" "){let i=4-n%4;s+=" ".repeat(i),n+=i}else s+=r,n++;return s}function nl(e,t,n,s,r){let i=t.href,o=t.title||null,a=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:a,tokens:s.inlineTokens(a)};return s.state.inLink=!1,l}function wf(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(` +`).map(i=>{let o=i.match(n.other.beginningSpace);if(o===null)return i;let[a]=o;return a.length>=r.length?i.slice(r.length):i}).join(` +`)}var Ms=class{constructor(e){we(this,"options");we(this,"rules");we(this,"lexer");this.options=e||un}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:tl(t[0]),s=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:s}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=wf(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=Xt(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:Xt(t[0],` +`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Xt(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Xt(t[0],` +`).split(` +`),s="",r="",i=[];for(;n.length>0;){let o=!1,a=[],l;for(l=0;l1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let i=this.rules.other.listItemRegex(n),o=!1;for(;e;){let l=!1,c="",u="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let p=yf(t[2].split(` +`,1)[0],t[1].length),g=e.split(` +`,1)[0],w=!p.trim(),E=0;if(this.options.pedantic?(E=2,u=p.trimStart()):w?E=t[1].length+1:(E=p.search(this.rules.other.nonSpaceChar),E=E>4?1:E,u=p.slice(E),E+=t[1].length),w&&this.rules.other.blankLine.test(g)&&(c+=g+` +`,e=e.substring(g.length+1),l=!0),!l){let m=this.rules.other.nextBulletRegex(E),R=this.rules.other.hrRegex(E),S=this.rules.other.fencesBeginRegex(E),V=this.rules.other.headingBeginRegex(E),K=this.rules.other.htmlBeginRegex(E),O=this.rules.other.blockquoteBeginRegex(E);for(;e;){let A=e.split(` +`,1)[0],C;if(g=A,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),C=g):C=g.replace(this.rules.other.tabCharGlobal," "),S.test(g)||V.test(g)||K.test(g)||O.test(g)||m.test(g)||R.test(g))break;if(C.search(this.rules.other.nonSpaceChar)>=E||!g.trim())u+=` +`+C.slice(E);else{if(w||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(p)||V.test(p)||R.test(p))break;u+=` +`+g}w=!g.trim(),c+=A+` +`,e=e.substring(A.length+1),p=C.slice(E)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(o=!0)),r.items.push({type:"list_item",raw:c,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=c}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let c=l.tokens[0];if(l.task&&((c==null?void 0:c.type)==="text"||(c==null?void 0:c.type)==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),c.raw=c.raw.replace(this.rules.other.listReplaceTask,""),c.text=c.text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(l.raw);if(u){let p={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};l.checked=p.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=p.raw+l.tokens[0].raw,l.tokens[0].text=p.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(p)):l.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):l.tokens.unshift(p)}}else l.task&&(l.task=!1);if(!r.loose){let u=l.tokens.filter(g=>g.type==="space"),p=u.length>0&&u.some(g=>this.rules.other.anyLine.test(g.raw));r.loose=p}}if(r.loose)for(let l of r.items){l.loose=!0;for(let c of l.tokens)c.type==="text"&&(c.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=tl(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:Xt(t[0],` +`),href:s,title:r}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=el(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],i={type:"table",raw:Xt(t[0],` +`),header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:Xt(t[0],` +`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Xt(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=xf(t[2],"()");if(i===-2)return;if(i>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],r=i[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),nl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return nl(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=0,c=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+r);(s=c.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(o=[...i].length,s[3]||s[4]){a+=o;continue}else if((s[5]||s[6])&&r%3&&!((r+o)%3)){l+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a+l);let u=[...s[0]][0].length,p=e.slice(0,r+s.index+u+o);if(Math.min(r,o)%2){let w=p.slice(1,-1);return{type:"em",raw:p,text:w,tokens:this.lexer.inlineTokens(w)}}let g=p.slice(2,-2);return{type:"strong",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,i,o,a=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+r);(s=l.exec(t))!==null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(o=[...i].length,o!==r))continue;if(s[3]||s[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let c=[...s[0]][0].length,u=e.slice(0,r+s.index+c+o),p=u.slice(r,-r);return{type:"del",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,s;let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let o;do o=t[0],t[0]=(s=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?s:"";while(o!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},mt=class Qr{constructor(t){we(this,"tokens");we(this,"options");we(this,"state");we(this,"inlineQueue");we(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||un,this.options.tokenizer=this.options.tokenizer||new Ms,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:qe,block:Is.normal,inline:Kn.normal};this.options.pedantic?(n.block=Is.pedantic,n.inline=Kn.pedantic):this.options.gfm&&(n.block=Is.gfm,this.options.breaks?n.inline=Kn.breaks:n.inline=Kn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Is,inline:Kn}}static lex(t,n){return new Qr(n).lex(t)}static lexInline(t,n){return new Qr(n).inlineTokens(t)}lex(t){t=t.replace(qe.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let n=0;n(l=u.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let u=n.at(-1);l.raw.length===1&&u!==void 0?u.raw+=` +`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`)?"":` +`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`)?"":` +`)+l.raw,u.text+=` +`+l.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let c=t;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,p=t.slice(1),g;this.options.extensions.startBlock.forEach(w=>{g=w.call({lexer:this},p),typeof g=="number"&&g>=0&&(u=Math.min(u,g))}),u<1/0&&u>=0&&(c=t.substring(0,u+1))}if(this.state.top&&(l=this.tokenizer.paragraph(c))){let u=n.at(-1);s&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(` +`)?"":` +`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l),s=c.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let u=n.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(` +`)?"":` +`)+l.raw,u.text+=` +`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var c,u,p,g,w,E;this.tokenizer.lexer=this;let s=t,r=null;if(this.tokens.links){let m=Object.keys(this.tokens.links);if(m.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)m.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)i=r[2]?r[2].length:0,s=s.slice(0,r.index+i)+"["+"a".repeat(r[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=(p=(u=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:u.call({lexer:this},s))!=null?p:s;let o=!1,a="",l=1/0;for(;t;){if(t.length(m=S.call({lexer:this},t,n))?(t=t.substring(m.raw.length),n.push(m),!0):!1))continue;if(m=this.tokenizer.escape(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.tag(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.link(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(m.raw.length);let S=n.at(-1);m.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=m.raw,S.text+=m.text):n.push(m);continue}if(m=this.tokenizer.emStrong(t,s,a)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.codespan(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.br(t)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.del(t,s,a)){t=t.substring(m.raw.length),n.push(m);continue}if(m=this.tokenizer.autolink(t)){t=t.substring(m.raw.length),n.push(m);continue}if(!this.state.inLink&&(m=this.tokenizer.url(t))){t=t.substring(m.raw.length),n.push(m);continue}let R=t;if((E=this.options.extensions)!=null&&E.startInline){let S=1/0,V=t.slice(1),K;this.options.extensions.startInline.forEach(O=>{K=O.call({lexer:this},V),typeof K=="number"&&K>=0&&(S=Math.min(S,K))}),S<1/0&&S>=0&&(R=t.substring(0,S+1))}if(m=this.tokenizer.inlineText(R)){t=t.substring(m.raw.length),m.raw.slice(-1)!=="_"&&(a=m.raw.slice(-1)),o=!0;let S=n.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=m.raw,S.text+=m.text):n.push(m);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(!this.options.silent)throw new Error(n)}},Ls=class{constructor(e){we(this,"options");we(this,"parser");this.options=e||un}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let s=(i=(t||"").match(qe.notSpaceStart))==null?void 0:i[0],r=e.replace(qe.endingNewline,"")+` +`;return s?'
'+(n?r:Rt(r,!0))+`
+`:"
"+(n?r:Rt(r,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,n=e.start,s="";for(let o=0;o +`+s+" +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",n="";for(let r=0;r${s}`),` + +`+t+` +`+s+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Rt(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let s=this.parser.parseInline(n),r=Jo(e);if(r===null)return s;e=r;let i='
    ",i}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Jo(e);if(r===null)return Rt(n);e=r;let i=`${Rt(n)}{let l=o[a].flat(1/0);n=n.concat(this.walkTokens(l,t))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let i=t.renderers[r.name];i?t.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=i.apply(this,o)),a}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[r.level];i?i.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new Ls(this.defaults);for(let i in n.renderer){if(!(i in r))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let o=i,a=n.renderer[o],l=r[o];r[o]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ms(this.defaults);for(let i in n.tokenizer){if(!(i in r))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let o=i,a=n.tokenizer[o],l=r[o];r[o]=(...c)=>{let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Yn;for(let i in n.hooks){if(!(i in r))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let o=i,a=n.hooks[o],l=r[o];Yn.passThroughHooks.has(i)?r[o]=c=>{if(this.defaults.async&&Yn.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await a.call(r,c);return l.call(r,p)})();let u=a.call(r,c);return l.call(r,u)}:r[o]=(...c)=>{if(this.defaults.async)return(async()=>{let p=await a.apply(r,c);return p===!1&&(p=await l.apply(r,c)),p})();let u=a.apply(r,c);return u===!1&&(u=l.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,i=n.walkTokens;s.walkTokens=function(o){let a=[];return a.push(i.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return mt.lex(e,t!=null?t:this.defaults)}parser(e,t){return bt.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},i=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let o=r.hooks?await r.hooks.preprocess(t):t,a=await(r.hooks?await r.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(o,r),l=r.hooks?await r.hooks.processAllTokens(a):a;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let c=await(r.hooks?await r.hooks.provideParser(e):e?bt.parse:bt.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(c):c})().catch(i);try{r.hooks&&(t=r.hooks.preprocess(t));let o=(r.hooks?r.hooks.provideLexer(e):e?mt.lex:mt.lexInline)(t,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(e):e?bt.parse:bt.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return i(o)}}}onError(e,t){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let s="

    An error occurred:

    "+Rt(n.message+"",!0)+"
    ";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},fn=new vf;function be(e,t){return fn.parse(e,t)}be.options=be.setOptions=function(e){return fn.setOptions(e),be.defaults=fn.defaults,Ho(be.defaults),be},be.getDefaults=Sr,be.defaults=un,be.use=function(...e){return fn.use(...e),be.defaults=fn.defaults,Ho(be.defaults),be},be.walkTokens=function(e,t){return fn.walkTokens(e,t)},be.parseInline=fn.parseInline,be.Parser=bt,be.parser=bt.parse,be.Renderer=Ls,be.TextRenderer=Or,be.Lexer=mt,be.lexer=mt.lex,be.Tokenizer=Ms,be.Hooks=Yn,be.parse=be,be.options,be.setOptions,be.use,be.walkTokens,be.parseInline,bt.parse,mt.lex;function sl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=Array(t);n2?s-2:0),i=2;i1?n-1:0),r=1;r1?n-1:0),r=1;r2&&arguments[2]!==void 0?arguments[2]:Zn;if(il&&il(e,null),!Ze(t))return e;let s=t.length;for(;s--;){let r=t[s];if(typeof r=="string"){const i=n(r);i!==r&&(Af(t)||(t[s]=i),r=i)}e[r]=!0}return e}function Df(e){for(let t=0;t/g),jf=ft(/\${[\w\W]*/g),Vf=ft(/^data-[\-\w.\u00B7-\uFFFF]+$/),qf=ft(/^aria-[\-\w]+$/),ml=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Wf=ft(/^(?:\w+script|data):/i),Gf=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Kf=ft(/^html$/i),Yf=ft(/^[a-z][.\w]*(-[.\w]+)+$/i),An={element:1,text:3,progressingInstruction:7,comment:8,document:9},Zf=function(){return typeof window=="undefined"?null:window},Xf=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let s=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(s=n.getAttribute(r));const i="dompurify"+(s?"#"+s:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return null}},bl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function xl(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Zf();const t=U=>xl(U);if(t.version="3.4.3",t.removed=[],!e||!e.document||e.document.nodeType!==An.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const s=n,r=s.currentScript,i=e.DocumentFragment,o=e.HTMLTemplateElement,a=e.Node,l=e.Element,c=e.NodeFilter,u=e.NamedNodeMap,p=u===void 0?e.NamedNodeMap||e.MozNamedAttrMap:u,g=e.HTMLFormElement,w=e.DOMParser,E=e.trustedTypes,m=l.prototype,R=En(m,"cloneNode"),S=En(m,"remove"),V=En(m,"nextSibling"),K=En(m,"childNodes"),O=En(m,"parentNode");if(typeof o=="function"){const U=n.createElement("template");U.content&&U.content.ownerDocument&&(n=U.content.ownerDocument)}let A,C="";const J=n,te=J.implementation,W=J.createNodeIterator,ne=J.createDocumentFragment,xe=J.getElementsByTagName,$=s.importNode;let Y=bl();t.isSupported=typeof rl=="function"&&typeof O=="function"&&te&&te.createHTMLDocument!==void 0;const G=zf,z=Uf,ue=jf,Se=Vf,We=qf,xt=Wf,ce=Gf,N=Yf;let de=ml,pe=null;const Te=Z({},[...dl,...Fr,...Br,...Hr,...pl]);let ve=null;const ge=Z({},[...hl,...zr,...gl,...$s]);let le=Object.seal(_n(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),yt=null,Ct=null;const ze=Object.seal(_n(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Ur=!0,f=!0,h=!1,b=!0,T=!1,v=!0,_=!1,M=!1,I=!1,P=!1,k=!1,B=!1,L=!0,H=!1;const q="user-content-";let ee=!0,fe=!1,se={},ke=null;const Oe=Z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let rt=null;const it=Z({},["audio","video","img","source","image","track"]);let Ft=null;const Qn=Z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$e="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",ot="http://www.w3.org/1999/xhtml";let Bt=ot,jr=!1,Vr=null;const hp=Z({},[$e,Xe,ot],Nr);let qr=Z({},["mi","mo","mn","ms","mtext"]),Wr=Z({},["annotation-xml"]);const gp=Z({},["title","style","font","a","script"]);let Jn=null;const mp=["application/xhtml+xml","text/html"],bp="text/html";let Le=null,Rn=null;const xp=n.createElement("form"),Sl=function(d){return d instanceof RegExp||d instanceof Function},Gr=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rn&&Rn===d)return;(!d||typeof d!="object")&&(d={}),d=et(d),Jn=mp.indexOf(d.PARSER_MEDIA_TYPE)===-1?bp:d.PARSER_MEDIA_TYPE,Le=Jn==="application/xhtml+xml"?Nr:Zn,pe=Ee(d,"ALLOWED_TAGS")&&Ze(d.ALLOWED_TAGS)?Z({},d.ALLOWED_TAGS,Le):Te,ve=Ee(d,"ALLOWED_ATTR")&&Ze(d.ALLOWED_ATTR)?Z({},d.ALLOWED_ATTR,Le):ge,Vr=Ee(d,"ALLOWED_NAMESPACES")&&Ze(d.ALLOWED_NAMESPACES)?Z({},d.ALLOWED_NAMESPACES,Nr):hp,Ft=Ee(d,"ADD_URI_SAFE_ATTR")&&Ze(d.ADD_URI_SAFE_ATTR)?Z(et(Qn),d.ADD_URI_SAFE_ATTR,Le):Qn,rt=Ee(d,"ADD_DATA_URI_TAGS")&&Ze(d.ADD_DATA_URI_TAGS)?Z(et(it),d.ADD_DATA_URI_TAGS,Le):it,ke=Ee(d,"FORBID_CONTENTS")&&Ze(d.FORBID_CONTENTS)?Z({},d.FORBID_CONTENTS,Le):Oe,yt=Ee(d,"FORBID_TAGS")&&Ze(d.FORBID_TAGS)?Z({},d.FORBID_TAGS,Le):et({}),Ct=Ee(d,"FORBID_ATTR")&&Ze(d.FORBID_ATTR)?Z({},d.FORBID_ATTR,Le):et({}),se=Ee(d,"USE_PROFILES")?d.USE_PROFILES&&typeof d.USE_PROFILES=="object"?et(d.USE_PROFILES):d.USE_PROFILES:!1,Ur=d.ALLOW_ARIA_ATTR!==!1,f=d.ALLOW_DATA_ATTR!==!1,h=d.ALLOW_UNKNOWN_PROTOCOLS||!1,b=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,T=d.SAFE_FOR_TEMPLATES||!1,v=d.SAFE_FOR_XML!==!1,_=d.WHOLE_DOCUMENT||!1,P=d.RETURN_DOM||!1,k=d.RETURN_DOM_FRAGMENT||!1,B=d.RETURN_TRUSTED_TYPE||!1,I=d.FORCE_BODY||!1,L=d.SANITIZE_DOM!==!1,H=d.SANITIZE_NAMED_PROPS||!1,ee=d.KEEP_CONTENT!==!1,fe=d.IN_PLACE||!1,de=Ff(d.ALLOWED_URI_REGEXP)?d.ALLOWED_URI_REGEXP:ml,Bt=typeof d.NAMESPACE=="string"?d.NAMESPACE:ot,qr=Ee(d,"MATHML_TEXT_INTEGRATION_POINTS")&&d.MATHML_TEXT_INTEGRATION_POINTS&&typeof d.MATHML_TEXT_INTEGRATION_POINTS=="object"?et(d.MATHML_TEXT_INTEGRATION_POINTS):Z({},["mi","mo","mn","ms","mtext"]),Wr=Ee(d,"HTML_INTEGRATION_POINTS")&&d.HTML_INTEGRATION_POINTS&&typeof d.HTML_INTEGRATION_POINTS=="object"?et(d.HTML_INTEGRATION_POINTS):Z({},["annotation-xml"]);const y=Ee(d,"CUSTOM_ELEMENT_HANDLING")&&d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING=="object"?et(d.CUSTOM_ELEMENT_HANDLING):_n(null);if(le=_n(null),Ee(y,"tagNameCheck")&&Sl(y.tagNameCheck)&&(le.tagNameCheck=y.tagNameCheck),Ee(y,"attributeNameCheck")&&Sl(y.attributeNameCheck)&&(le.attributeNameCheck=y.attributeNameCheck),Ee(y,"allowCustomizedBuiltInElements")&&typeof y.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=y.allowCustomizedBuiltInElements),T&&(f=!1),k&&(P=!0),se&&(pe=Z({},pl),ve=_n(null),se.html===!0&&(Z(pe,dl),Z(ve,hl)),se.svg===!0&&(Z(pe,Fr),Z(ve,zr),Z(ve,$s)),se.svgFilters===!0&&(Z(pe,Br),Z(ve,zr),Z(ve,$s)),se.mathMl===!0&&(Z(pe,Hr),Z(ve,gl),Z(ve,$s))),ze.tagCheck=null,ze.attributeCheck=null,Ee(d,"ADD_TAGS")&&(typeof d.ADD_TAGS=="function"?ze.tagCheck=d.ADD_TAGS:Ze(d.ADD_TAGS)&&(pe===Te&&(pe=et(pe)),Z(pe,d.ADD_TAGS,Le))),Ee(d,"ADD_ATTR")&&(typeof d.ADD_ATTR=="function"?ze.attributeCheck=d.ADD_ATTR:Ze(d.ADD_ATTR)&&(ve===ge&&(ve=et(ve)),Z(ve,d.ADD_ATTR,Le))),Ee(d,"ADD_URI_SAFE_ATTR")&&Ze(d.ADD_URI_SAFE_ATTR)&&Z(Ft,d.ADD_URI_SAFE_ATTR,Le),Ee(d,"FORBID_CONTENTS")&&Ze(d.FORBID_CONTENTS)&&(ke===Oe&&(ke=et(ke)),Z(ke,d.FORBID_CONTENTS,Le)),Ee(d,"ADD_FORBID_CONTENTS")&&Ze(d.ADD_FORBID_CONTENTS)&&(ke===Oe&&(ke=et(ke)),Z(ke,d.ADD_FORBID_CONTENTS,Le)),ee&&(pe["#text"]=!0),_&&Z(pe,["html","head","body"]),pe.table&&(Z(pe,["tbody"]),delete yt.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Os('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Os('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');A=d.TRUSTED_TYPES_POLICY,C=A.createHTML("")}else A===void 0&&(A=Xf(E,r)),A!==null&&typeof C=="string"&&(C=A.createHTML(""));Ye&&Ye(d),Rn=d},El=Z({},[...Fr,...Br,...Bf]),Al=Z({},[...Hr,...Hf]),yp=function(d){let y=O(d);(!y||!y.tagName)&&(y={namespaceURI:Bt,tagName:"template"});const D=Zn(d.tagName),ae=Zn(y.tagName);return Vr[d.namespaceURI]?d.namespaceURI===Xe?y.namespaceURI===ot?D==="svg":y.namespaceURI===$e?D==="svg"&&(ae==="annotation-xml"||qr[ae]):!!El[D]:d.namespaceURI===$e?y.namespaceURI===ot?D==="math":y.namespaceURI===Xe?D==="math"&&Wr[ae]:!!Al[D]:d.namespaceURI===ot?y.namespaceURI===Xe&&!Wr[ae]||y.namespaceURI===$e&&!qr[ae]?!1:!Al[D]&&(gp[D]||!El[D]):!!(Jn==="application/xhtml+xml"&&Vr[d.namespaceURI]):!1},wt=function(d){kn(t.removed,{element:d});try{O(d).removeChild(d)}catch{S(d)}},dn=function(d,y){try{kn(t.removed,{attribute:y.getAttributeNode(d),from:y})}catch{kn(t.removed,{attribute:null,from:y})}if(y.removeAttribute(d),d==="is")if(P||k)try{wt(y)}catch{}else try{y.setAttribute(d,"")}catch{}},Rl=function(d){let y=null,D=null;if(I)d=""+d;else{const Ie=al(d,/^[\r\n\t ]+/);D=Ie&&Ie[0]}Jn==="application/xhtml+xml"&&Bt===ot&&(d=''+d+"");const ae=A?A.createHTML(d):d;if(Bt===ot)try{y=new w().parseFromString(ae,Jn)}catch{}if(!y||!y.documentElement){y=te.createDocument(Bt,"template",null);try{y.documentElement.innerHTML=jr?C:ae}catch{}}const De=y.body||y.documentElement;return d&&D&&De.insertBefore(n.createTextNode(D),De.childNodes[0]||null),Bt===ot?xe.call(y,_?"html":"body")[0]:_?y.documentElement:De},Cl=function(d){return W.call(d.ownerDocument||d,d,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Kr=function(d){return d instanceof g&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof p)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},Yr=function(d){return typeof a=="function"&&d instanceof a};function Ht(U,d,y){Tn(U,D=>{D.call(t,d,y,Rn)})}const Pl=function(d){let y=null;if(Ht(Y.beforeSanitizeElements,d,null),Kr(d))return wt(d),!0;const D=Le(d.nodeName);if(Ht(Y.uponSanitizeElement,d,{tagName:D,allowedTags:pe}),v&&d.hasChildNodes()&&!Yr(d.firstElementChild)&&He(/<[/\w!]/g,d.innerHTML)&&He(/<[/\w!]/g,d.textContent)||v&&d.namespaceURI===ot&&D==="style"&&Yr(d.firstElementChild)||d.nodeType===An.progressingInstruction||v&&d.nodeType===An.comment&&He(/<[/\w]/g,d.data))return wt(d),!0;if(yt[D]||!(ze.tagCheck instanceof Function&&ze.tagCheck(D))&&!pe[D]){if(!yt[D]&&Ml(D)&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,D)||le.tagNameCheck instanceof Function&&le.tagNameCheck(D)))return!1;if(ee&&!ke[D]){const ae=O(d)||d.parentNode,De=K(d)||d.childNodes;if(De&&ae){const Ie=De.length;for(let tt=Ie-1;tt>=0;--tt){const dt=R(De[tt],!0);ae.insertBefore(dt,V(d))}}}return wt(d),!0}return d instanceof l&&!yp(d)||(D==="noscript"||D==="noembed"||D==="noframes")&&He(/<\/no(script|embed|frames)/i,d.innerHTML)?(wt(d),!0):(T&&d.nodeType===An.text&&(y=d.textContent,Tn([G,z,ue],ae=>{y=Sn(y,ae," ")}),d.textContent!==y&&(kn(t.removed,{element:d.cloneNode()}),d.textContent=y)),Ht(Y.afterSanitizeElements,d,null),!1)},Il=function(d,y,D){if(Ct[y]||L&&(y==="id"||y==="name")&&(D in n||D in xp))return!1;const ae=ve[y]||ze.attributeCheck instanceof Function&&ze.attributeCheck(y,d);if(!(f&&!Ct[y]&&He(Se,y))){if(!(Ur&&He(We,y))){if(!ae||Ct[y]){if(!(Ml(d)&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,d)||le.tagNameCheck instanceof Function&&le.tagNameCheck(d))&&(le.attributeNameCheck instanceof RegExp&&He(le.attributeNameCheck,y)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(y,d))||y==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&He(le.tagNameCheck,D)||le.tagNameCheck instanceof Function&&le.tagNameCheck(D))))return!1}else if(!Ft[y]){if(!He(de,Sn(D,ce,""))){if(!((y==="src"||y==="xlink:href"||y==="href")&&d!=="script"&&ul(D,"data:")===0&&rt[d])){if(!(h&&!He(xt,Sn(D,ce,"")))){if(D)return!1}}}}}}return!0},wp=Z({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ml=function(d){return!wp[Zn(d)]&&He(N,d)},Ll=function(d){Ht(Y.beforeSanitizeAttributes,d,null);const y=d.attributes;if(!y||Kr(d))return;const D={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve,forceKeepAttr:void 0};let ae=y.length;for(;ae--;){const De=y[ae],Ie=De.name,tt=De.namespaceURI,dt=De.value,vt=Le(Ie),Xr=dt;let Ne=Ie==="value"?Xr:Mf(Xr);if(D.attrName=vt,D.attrValue=Ne,D.keepAttr=!0,D.forceKeepAttr=void 0,Ht(Y.uponSanitizeAttribute,d,D),Ne=D.attrValue,H&&(vt==="id"||vt==="name")&&ul(Ne,q)!==0&&(dn(Ie,d),Ne=q+Ne),v&&He(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Ne)){dn(Ie,d);continue}if(vt==="attributename"&&al(Ne,"href")){dn(Ie,d);continue}if(D.forceKeepAttr)continue;if(!D.keepAttr){dn(Ie,d);continue}if(!b&&He(/\/>/i,Ne)){dn(Ie,d);continue}T&&Tn([G,z,ue],$l=>{Ne=Sn(Ne,$l," ")});const Ol=Le(d.nodeName);if(!Il(Ol,vt,Ne)){dn(Ie,d);continue}if(A&&typeof E=="object"&&typeof E.getAttributeType=="function"&&!tt)switch(E.getAttributeType(Ol,vt)){case"TrustedHTML":{Ne=A.createHTML(Ne);break}case"TrustedScriptURL":{Ne=A.createScriptURL(Ne);break}}if(Ne!==Xr)try{tt?d.setAttributeNS(tt,Ie,Ne):d.setAttribute(Ie,Ne),Kr(d)?wt(d):ll(t.removed)}catch{dn(Ie,d)}}Ht(Y.afterSanitizeAttributes,d,null)},Zr=function(d){let y=null;const D=Cl(d);for(Ht(Y.beforeSanitizeShadowDOM,d,null);y=D.nextNode();)Ht(Y.uponSanitizeShadowNode,y,null),Pl(y),Ll(y),y.content instanceof i&&Zr(y.content);Ht(Y.afterSanitizeShadowDOM,d,null)},Ns=function(d){if(d.nodeType===An.element&&d.shadowRoot instanceof i){const ae=d.shadowRoot;Ns(ae),Zr(ae)}const y=d.childNodes;if(!y)return;const D=[];Tn(y,ae=>{kn(D,ae)});for(const ae of D)Ns(ae)};return t.sanitize=function(U){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=null,D=null,ae=null,De=null;if(jr=!U,jr&&(U=""),typeof U!="string"&&!Yr(U)&&(U=Nf(U),typeof U!="string"))throw Os("dirty is not a string, aborting");if(!t.isSupported)return U;if(M||Gr(d),t.removed=[],typeof U=="string"&&(fe=!1),fe){const dt=U.nodeName;if(typeof dt=="string"){const vt=Le(dt);if(!pe[vt]||yt[vt])throw Os("root node is forbidden and cannot be sanitized in-place")}Ns(U)}else if(U instanceof a)y=Rl(""),D=y.ownerDocument.importNode(U,!0),D.nodeType===An.element&&D.nodeName==="BODY"||D.nodeName==="HTML"?y=D:y.appendChild(D),Ns(D);else{if(!P&&!T&&!_&&U.indexOf("<")===-1)return A&&B?A.createHTML(U):U;if(y=Rl(U),!y)return P?null:B?C:""}y&&I&&wt(y.firstChild);const Ie=Cl(fe?U:y);for(;ae=Ie.nextNode();)Pl(ae),Ll(ae),ae.content instanceof i&&Zr(ae.content);if(fe)return U;if(P){if(T){y.normalize();let dt=y.innerHTML;Tn([G,z,ue],vt=>{dt=Sn(dt,vt," ")}),y.innerHTML=dt}if(k)for(De=ne.call(y.ownerDocument);y.firstChild;)De.appendChild(y.firstChild);else De=y;return(ve.shadowroot||ve.shadowrootmode)&&(De=$.call(s,De,!0)),De}let tt=_?y.outerHTML:y.innerHTML;return _&&pe["!doctype"]&&y.ownerDocument&&y.ownerDocument.doctype&&y.ownerDocument.doctype.name&&He(Kf,y.ownerDocument.doctype.name)&&(tt=" +`+tt),T&&Tn([G,z,ue],dt=>{tt=Sn(tt,dt," ")}),A&&B?A.createHTML(tt):tt},t.setConfig=function(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Gr(U),M=!0},t.clearConfig=function(){Rn=null,M=!1},t.isValidAttribute=function(U,d,y){Rn||Gr({});const D=Le(U),ae=Le(d);return Il(D,ae,y)},t.addHook=function(U,d){typeof d=="function"&&kn(Y[U],d)},t.removeHook=function(U,d){if(d!==void 0){const y=Pf(Y[U],d);return y===-1?void 0:If(Y[U],y,1)[0]}return ll(Y[U])},t.removeHooks=function(U){Y[U]=[]},t.removeAllHooks=function(){Y=bl()},t}var Qf=xl();const Jf={key:1,class:"flex min-w-0 max-w-[calc(100%-2.5rem)] flex-1 flex-col max-[600px]:max-w-[calc(100%-2.25rem)]"},ed={key:0,class:"flex w-fit flex-col items-start gap-1"},td=["aria-label"],nd={class:"inline-flex items-center gap-1.5"},sd={class:"text-[8px] font-semibold tracking-[0.12em] uppercase text-[#3a67c9]"},rd={key:1,class:"flex w-fit max-w-full flex-col items-start gap-2"},id={class:"chat-card relative w-fit max-w-full whitespace-pre-line rounded-[10px_10px_10px_3px] px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900"},od=["innerHTML"],ld={key:0,class:"pointer-events-none absolute inset-x-0 bottom-0 h-14 rounded-b-[10px] bg-linear-to-t from-white via-white/92 to-white/0","aria-hidden":"true"},ad={key:0,class:"flex flex-wrap items-center gap-2"},ud=["title","aria-label"],cd={key:1,class:"flex flex-wrap items-center"},fd=["title","aria-label"],dd={viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},pd=["innerHTML"],yl={__name:"ChatMessage",props:{message:{type:Object,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,default:()=>({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd"})}},setup(e){const t=e,n=Q(!1),s=Q(null),r=Q(!1),i=Q(!1),o=Re(()=>typeof window!="undefined"&&"speechSynthesis"in window&&"SpeechSynthesisUtterance"in window);function a(A){typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("changai-tts-provider",{detail:{provider:A}}))}function l(A){if(typeof A!="string")return"";const C=A.replace(/[\u{1F000}-\u{1FFFF}]/gu,"").replace(/[\u{2600}-\u{26FF}]/gu,"").replace(/[\u{2700}-\u{27BF}]/gu,"").replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/#{1,6}\s+/g,"").replace(/[-*+]\s+/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\s+/g," ");return C.includes("<")?(new DOMParser().parseFromString(A,"text/html").body.textContent||"").replace(/\s+/g," ").trim():C.trim()}function c(){o.value&&window.speechSynthesis.cancel(),s.value&&(s.value.pause(),s.value.src="",s.value=null),n.value=!1}function u(){var A,C,J;if(i.value=!i.value,i.value)c();else{const te=m.value;if(!t.autoReadEnabled||!((A=t.ttsConfig)!=null&&A.enableVoiceChat)||!te||E())return;if((C=t.ttsConfig)!=null&&C.pollyAvailable&&((J=t.ttsConfig)!=null&&J.usePolly)){g(te).catch(W=>{p(te)});return}p(te)}}function p(A){if(!o.value||!A)return;window.dispatchEvent(new CustomEvent("changai-tts-stop")),window.speechSynthesis.cancel();const C=new SpeechSynthesisUtterance(A);C.rate=1,C.pitch=1,C.onend=()=>{n.value=!1},C.onerror=()=>{n.value=!1},n.value=!0,a("browser"),window.speechSynthesis.speak(C)}async function g(A){var ne;const C=await Lc(A,((ne=t.ttsConfig)==null?void 0:ne.voiceId)||"Zayd");if(!(C!=null&&C.ok)||!(C!=null&&C.audio_base64))throw new Error((C==null?void 0:C.error)||"Polly synthesis failed");window.dispatchEvent(new CustomEvent("changai-tts-stop")),c();const J=(C==null?void 0:C.mime_type)||"audio/mpeg",te=new Audio(`data:${J};base64,${C.audio_base64}`);s.value=te,n.value=!0;let W=!1;te.onplay=()=>{W=!0,a("polly")},te.onended=()=>{s.value===te&&(s.value=null),n.value=!1},te.onerror=()=>{s.value===te&&(s.value=null),n.value=!1},await te.play(),W||a("polly")}function w(){c()}function E(){var A;return!!((A=t.message)!=null&&A.isStatus)}const m=Re(()=>{var A;return l(((A=t.message)==null?void 0:A.text)||"")}),R=Re(()=>{var A;return((A=t.message)==null?void 0:A.role)!=="user"&&E()}),S=Re(()=>{var A;return(A=t.message)!=null&&A.isStatus?t.message.statusType==="support"?"Sending to support":m.value||"Thinking":""}),V=Re(()=>{var J;if(((J=t.message)==null?void 0:J.role)==="user"||R.value)return!1;const A=m.value,C=A.split(/\n+/).filter(Boolean).length;return A.length>520||C>8}),K=Re(()=>{var A,C;return((A=t.message)==null?void 0:A.role)!=="user"&&!R.value&&((C=t.ttsConfig)==null?void 0:C.enableVoiceChat)}),O=Re(()=>{var C;const A=((C=t.message)==null?void 0:C.text)||"";return Qf.sanitize(be.parse(A))});return rn(()=>t.message.text,async(A,C)=>{var W,ne,xe;if(!t.autoReadEnabled||t.message.role==="user"||i.value)return;if(!((W=t.ttsConfig)!=null&&W.enableVoiceChat)){a("off");return}const J=l(A);if(!J||E())return;const te=l(C||"");if(J!==te){if((ne=t.ttsConfig)!=null&&ne.pollyAvailable&&((xe=t.ttsConfig)!=null&&xe.usePolly))try{await g(J);return}catch{}p(J)}}),rn(()=>t.message.text,()=>{r.value=!1,i.value=!1}),Hn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-stop",w)}),xs(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-stop",w),n.value&&c()}),(A,C)=>(F(),j("div",{class:ye(["motion-safe:animate-fade-rise flex w-full gap-1.5",e.message.role==="user"?"flex-col items-end":"items-start"])},[e.message.role!=="user"?(F(),St(Bo,{key:0})):Ve("",!0),e.message.role!=="user"?(F(),j("div",Jf,[R.value?(F(),j("div",ed,[x("div",{class:"chat-card inline-flex w-fit rounded-[10px_10px_10px_3px] px-3 py-2",role:"status","aria-live":"polite","aria-label":S.value},[x("div",nd,[C[1]||(C[1]=x("span",{class:"relative inline-flex h-4 w-4 shrink-0 items-center justify-center"},[x("span",{class:"absolute inset-0 rounded-full border border-transparent border-t-[#4b89ff] border-r-[#4b89ff]/70 animate-gemini-arc"}),x("svg",{viewBox:"0 0 24 24",class:"relative h-3 w-3 text-[#4b89ff] animate-gemini-spark","aria-hidden":"true"},[x("path",{fill:"currentColor",d:"M12 2.8c.52 3.22 1.6 5.66 3.22 7.28 1.62 1.62 4.06 2.7 7.28 3.22-3.22.52-5.66 1.6-7.28 3.22-1.62 1.62-2.7 4.06-3.22 7.28-.52-3.22-1.6-5.66-3.22-7.28-1.62-1.62-4.06-2.7-7.28-3.22 3.22-.52 5.66-1.6 7.28-3.22 1.62-1.62 2.7-4.06 3.22-7.28Z"})])],-1)),x("span",sd,Qe(S.value),1)])],8,td)])):(F(),j("div",rd,[x("div",id,[x("div",{class:ye(["overflow-x-auto",V.value&&!r.value?"max-h-48 overflow-y-hidden":""]),innerHTML:O.value},null,10,od),V.value&&!r.value?(F(),j("div",ld)):Ve("",!0)]),V.value?(F(),j("div",ad,[x("button",{type:"button",class:"inline-flex items-center rounded-full border border-slate-200 bg-white px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-slate-600 transition-colors duration-200 hover:border-brand-200 hover:text-brand-600",title:r.value?"Collapse response":"Expand response","aria-label":r.value?"Collapse response":"Expand response",onClick:C[0]||(C[0]=J=>r.value=!r.value)},Qe(r.value?"Collapse":"Expand"),9,ud)])):Ve("",!0),K.value?(F(),j("div",cd,[x("button",{type:"button",class:ye(["inline-flex h-8 w-8 items-center justify-center rounded-full border transition-colors duration-200",i.value?"border-red-200 bg-red-50 text-red-600 hover:border-red-300 hover:bg-red-100":"border-green-200 bg-green-50 text-green-600 hover:border-green-300 hover:bg-green-100"]),title:i.value?"Unmute voice playback":"Mute voice playback","aria-label":i.value?"Unmute voice playback":"Mute voice playback",onClick:u},[(F(),j("svg",dd,[C[6]||(C[6]=x("path",{d:"M11 5L6 9H3v6h3l5 4V5Z"},null,-1)),i.value?(F(),j(Be,{key:0},[C[2]||(C[2]=x("path",{d:"M15 9l4 6"},null,-1)),C[3]||(C[3]=x("path",{d:"M19 9l-4 6"},null,-1))],64)):(F(),j(Be,{key:1},[C[4]||(C[4]=x("path",{d:"M15 10a3 3 0 0 1 0 4"},null,-1)),C[5]||(C[5]=x("path",{d:"M17.5 7.5a6 6 0 0 1 0 9"},null,-1))],64))]))],10,fd)])):Ve("",!0)]))])):(F(),j("div",{key:2,class:"w-fit max-w-[85%] whitespace-pre-line rounded-[13px_13px_3px_13px] bg-linear-to-br from-brand-500 to-brand-600 px-4 py-3 text-[11px] leading-relaxed wrap-anywhere text-white shadow-[0_14px_30px_-18px_rgba(109,79,194,0.85)] max-[600px]:max-w-[88%]",innerHTML:O.value},null,8,pd))],2))}},hd={class:"flex flex-col gap-4 sm:gap-5"},gd={class:"motion-safe:animate-fade-rise flex w-full items-start gap-1.5"},md={__name:"ChatTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(F(),j("div",hd,[x("div",gd,[Me(Bo),n[0]||(n[0]=x("p",{class:"w-fit max-w-[calc(100%-2.5rem)] whitespace-pre-line rounded-[10px_10px_10px_3px] bg-brand-50 px-4 py-3 text-xs leading-relaxed wrap-anywhere text-slate-900 max-[600px]:max-w-[calc(100%-2.25rem)]"},[gr(" Hello there 👋 I am ChangAI from ERPGulf.com , your ERP assistant."),x("br"),x("a",{target:"_blank",href:"https://app.erpgulf.com/en/articles/chang-ai-quick-start-guide",rel:"noopener noreferrer",style:{color:"#1e90ff"}},"ChangAI Quick Start Guide - Click here.")],-1))]),(F(!0),j(Be,null,ys(e.messages,(s,r)=>(F(),St(yl,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}};function wl(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function vl(e){var t,n;return(e==null?void 0:e.message)||((t=e==null?void 0:e.responseJSON)==null?void 0:t.exception)||((n=e==null?void 0:e.responseJSON)==null?void 0:n.message)||(e==null?void 0:e.responseText)||String(e)}function bd(e){return typeof e=="string"?e:e&&typeof e=="object"?e.error?`⚠️ ${e.error}`:e.answer||e.text||"":""}const xd={key:0,class:"rounded-lg bg-brand-50 px-4 py-3 text-xs text-black"},yd={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},wd={key:1,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-brand-50 p-2 text-[11px]"},vd={class:"whitespace-pre-wrap wrap-anywhere text-[11px] leading-relaxed text-black"},_d={__name:"DebugTab",props:{logs:{type:Array,required:!0},currentDebug:{type:Object,default:null}},setup(e){const t=new Set(["gemini_json_content","private_key","private_key_id","client_secret","client_id","aws_access_key","aws_secret_key","api_key","token","access_token","refresh_token","password","secret","authorization","embed_version_id","llm_version_id","entity_retriever","retriever","deploy_url","support_api_url","get_ticket_details_url"]);function n(r,i=0){if(i>10||r===null||r===void 0||typeof r=="string"||typeof r=="number"||typeof r=="boolean")return r;if(Array.isArray(r))return r.map(o=>n(o,i+1));if(typeof r=="object"){const o={};for(const[a,l]of Object.entries(r))t.has(a.toLowerCase())||(o[a]=n(l,i+1));return o}return r}function s(r){return wl(n(r))}return(r,i)=>(F(),j("div",null,[e.logs.length===0?(F(),j("p",xd,"No debug data yet.")):Ve("",!0),(F(!0),j(Be,null,ys(e.logs,(o,a)=>(F(),j("div",{key:a,class:"mb-3 min-w-0 overflow-x-auto rounded-lg bg-gray-100 p-2 text-[11px]"},[x("pre",yd,Qe(s(o)),1)]))),128)),e.currentDebug?(F(),j("div",wd,[x("pre",vd,Qe(s(e.currentDebug)),1)])):Ve("",!0)]))}},Td={class:"flex flex-col gap-4 sm:gap-5"},kd={key:0,class:"chat-card motion-safe:animate-fade-rise rounded-lg px-4 py-3 text-xs text-slate-900"},Sd={__name:"SupportTab",props:{messages:{type:Array,required:!0},autoReadEnabled:{type:Boolean,default:!1},ttsConfig:{type:Object,required:!0}},setup(e){return(t,n)=>(F(),j("div",Td,[e.messages.length===0?(F(),j("p",kd,"Send a message to Support.")):Ve("",!0),(F(!0),j(Be,null,ys(e.messages,(s,r)=>(F(),St(yl,{key:r,message:s,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["message","autoReadEnabled","ttsConfig"]))),128))]))}},Ed={class:"flex flex-col gap-4"},Ad={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Rd={class:"flex items-start justify-between gap-4"},Cd=["aria-pressed","title"],Pd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Id={class:"flex items-start justify-between gap-4"},Md={class:"mt-2 text-[11px] text-slate-500"},Ld={key:0,class:"mt-1 text-[11px] text-slate-500"},Od={key:1,class:"mt-1 text-[11px] text-slate-500"},$d=["aria-pressed","disabled"],Dd={key:0,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Nd={key:1,class:"mt-3 rounded-md bg-amber-50 px-2.5 py-2 text-xs text-amber-700"},Fd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Bd={class:"flex items-start justify-between gap-4"},Hd=["aria-pressed","title"],zd={class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4"},Ud={class:"flex items-start justify-between gap-4"},jd=["aria-pressed","title"],Vd={__name:"SettingsTab",props:{autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},settings:{type:Object,default:null},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1}},emits:["toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e){const t=e,n=Re(()=>{var s,r;return(s=t.ttsConfig)!=null&&s.enableVoiceChat?(r=t.ttsConfig)!=null&&r.pollyAvailable?"Available":"Unavailable":"Voice disabled on server"});return(s,r)=>{var i,o,a,l,c,u,p,g,w,E,m,R,S,V,K;return F(),j("div",Ed,[r[10]||(r[10]=x("div",{class:"chat-card motion-safe:animate-fade-rise rounded-xl p-4 text-slate-900"},[x("h3",{class:"text-sm font-semibold tracking-[0.01em]"},"Speech Settings"),x("p",{class:"mt-1 text-xs leading-relaxed text-slate-600"},"These controls apply only inside this chatbot box for the current browser session.")],-1)),x("div",Ad,[x("div",Rd,[r[4]||(r[4]=x("div",null,[x("p",{class:"text-sm font-semibold text-slate-900"},"Auto Read Replies"),x("p",{class:"mt-1 text-xs text-slate-600"},"Automatically read bot replies aloud.")],-1)),x("button",{class:ye(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.autoReadEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.autoReadEnabled?"true":"false",title:e.autoReadEnabled?"Disable auto read":"Enable auto read",onClick:r[0]||(r[0]=O=>s.$emit("toggleAutoRead"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.autoReadEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Cd)]),x("p",{class:ye(["mt-3 text-[11px] font-medium",e.autoReadEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.autoReadEnabled?"Auto read is active.":"Auto read is currently off."),3)]),x("div",Pd,[x("div",Id,[x("div",null,[r[5]||(r[5]=x("p",{class:"text-sm font-semibold text-slate-900"},"Use Amazon Polly",-1)),r[6]||(r[6]=x("p",{class:"mt-1 text-xs text-slate-600"},"Use Polly when available; otherwise browser speech is used automatically.",-1)),x("p",Md,"Availability: "+Qe(n.value),1),(i=e.settings)!=null&&i.aws_region?(F(),j("p",Ld,"Region: "+Qe(e.settings.aws_region),1)):Ve("",!0),(o=e.ttsConfig)!=null&&o.voiceId?(F(),j("p",Od,"Voice: "+Qe(e.ttsConfig.voiceId),1)):Ve("",!0)]),x("button",{class:ye(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-55",(a=e.ttsConfig)!=null&&a.usePolly&&((l=e.ttsConfig)!=null&&l.enableVoiceChat)&&((c=e.ttsConfig)!=null&&c.pollyAvailable)?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":(u=e.ttsConfig)!=null&&u.usePolly&&((p=e.ttsConfig)!=null&&p.enableVoiceChat)&&((g=e.ttsConfig)!=null&&g.pollyAvailable)?"true":"false",disabled:!((w=e.ttsConfig)!=null&&w.pollyAvailable)||!((E=e.ttsConfig)!=null&&E.enableVoiceChat),onClick:r[1]||(r[1]=O=>s.$emit("togglePollyPreference"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",(m=e.ttsConfig)!=null&&m.usePolly&&((R=e.ttsConfig)!=null&&R.enableVoiceChat)&&((S=e.ttsConfig)!=null&&S.pollyAvailable)?"left-[1.45rem]":"left-0.5"])},null,2)],10,$d)]),(V=e.ttsConfig)!=null&&V.enableVoiceChat?(K=e.ttsConfig)!=null&&K.pollyAvailable?Ve("",!0):(F(),j("p",Nd,"Polly is not available for this site. Browser speech will be used.")):(F(),j("p",Dd,"Voice chat is disabled in ChangAI Settings."))]),x("div",Fd,[x("div",Bd,[x("div",null,[r[7]||(r[7]=x("p",{class:"text-sm font-semibold text-slate-900"},"Enable Debug Tab",-1)),r[8]||(r[8]=x("p",{class:"mt-1 text-xs text-slate-600"}," Show or hide the Debug tab inside this chatbot. ",-1)),x("p",{class:ye(["mt-2 text-[11px] font-medium",e.debugEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.debugEnabled?"Debug tab is active.":"Debug tab is currently off."),3)]),x("button",{type:"button",class:ye(["relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.debugEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.debugEnabled?"true":"false",title:e.debugEnabled?"Disable debug tab":"Enable debug tab",onClick:r[2]||(r[2]=O=>s.$emit("toggleDebug"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.debugEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,Hd)])]),x("div",zd,[x("div",Ud,[r[9]||(r[9]=x("div",null,[x("p",{class:"text-sm font-semibold text-slate-900"},"Send non-ERP questions directly to AI"),x("p",{class:"mt-1 text-xs text-slate-600"},"Questions unrelated to your ERP will skip the system and go straight to AI")],-1)),x("button",{class:ye(["group relative h-7 w-12 shrink-0 rounded-full border border-slate-200 transition-all duration-200",e.sendNonERPtoaiEnabled?"bg-emerald-500/95":"bg-slate-300"]),"aria-pressed":e.sendNonERPtoaiEnabled?"true":"false",title:e.sendNonERPtoaiEnabled?"Non-ERP questions are being sent directly to AI":"Enable direct AI reply for non-ERP questions",onClick:r[3]||(r[3]=O=>s.$emit("toggleSendNonERP"))},[x("span",{class:ye(["absolute top-0.5 h-5.5 w-5.5 rounded-full bg-white shadow-sm transition-all duration-200",e.sendNonERPtoaiEnabled?"left-[1.45rem]":"left-0.5"])},null,2)],10,jd)]),x("p",{class:ye(["mt-3 text-[11px] font-medium",e.sendNonERPtoaiEnabled?"text-emerald-700":"text-slate-500"])},Qe(e.sendNonERPtoaiEnabled?"Non-ERP questions are now routed directly to AI":"Direct AI routing is currently off"),3)])])}}},qd={key:0,class:"pointer-events-none absolute -top-14 left-0 right-0 z-20 flex justify-center px-2",role:"status","aria-live":"polite"},Wd={__name:"StatusToast",props:{visible:{type:Boolean,required:!0},message:{type:String,default:""},type:{type:String,default:"info"},dismissible:{type:Boolean,default:!0}},emits:["close"],setup(e){const t=e,n=Re(()=>t.type==="error"?"bg-red-50 text-red-700 ring-red-200":(t.type==="listening","bg-blue-50 text-blue-700 ring-blue-200")),s=Re(()=>t.type==="error"?"bg-red-500":t.type==="listening"?"bg-blue-500 animate-pulse":"bg-blue-500");return(r,i)=>(F(),St(Pu,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"translate-y-1 opacity-0","enter-to-class":"translate-y-0 opacity-100","leave-active-class":"transition duration-150 ease-in","leave-from-class":"translate-y-0 opacity-100","leave-to-class":"translate-y-1 opacity-0"},{default:Ni(()=>[e.visible?(F(),j("div",qd,[x("div",{class:ye(["pointer-events-auto flex max-w-[92%] items-start gap-2 rounded-lg px-3 py-2 text-xs shadow-lg ring-1",n.value])},[x("span",{class:ye(["mt-0.5 h-2 w-2 shrink-0 rounded-full",s.value])},null,2),x("span",null,Qe(e.message),1),e.dismissible?(F(),j("button",{key:0,type:"button",class:"ml-1 appearance-none border-0 text-current/80 transition hover:text-current focus:outline-none","aria-label":"Dismiss notification",onClick:i[0]||(i[0]=o=>r.$emit("close"))}," × ")):Ve("",!0)],2)])):Ve("",!0)]),_:1}))}},Gd={class:"relative w-full"},Kd=["placeholder","disabled"],Yd=["title","aria-label","disabled"],Zd={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},Xd={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},Qd={key:2,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true",class:"animate-spin"},Jd=["title","aria-label","disabled"],ep={key:0,viewBox:"0 0 24 24",width:"18",height:"18",fill:"none","aria-hidden":"true",class:"text-rose-600 motion-safe:animate-stop-button-pulse"},tp={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor","aria-hidden":"true"},np={__name:"ChatForm",props:{placeholder:{type:String,default:"Message..."},disabled:{type:Boolean,default:!1},isAwaitingResponse:{type:Boolean,default:!1}},emits:["submit","cancel"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=Q(""),o=Q(null),a=Q(!1),l=Q(!1),c=Q(!1),u=Q(!1),p=Q(!1),g=Q(!1),w=Q(!1),E=Q(""),m=Q("info"),R=Q("Voice input is unavailable in this browser/context.");let S=null,V=null,K=null;const O=Q(""),A=Q(!1),C=Re(()=>c.value?"Requesting microphone permission...":u.value?"Starting voice input...":p.value?"Stopping voice input...":l.value?a.value?"Stop voice input":"Start voice input":"Voice input is unavailable in this browser/context"),J=Re(()=>s.isAwaitingResponse?"Stop response":"Send"),te=Re(()=>s.isAwaitingResponse?!1:s.disabled||!i.value.trim()),W=Re(()=>s.isAwaitingResponse?"bg-white border border-rose-100 shadow-[0_8px_20px_-12px_rgba(159,18,57,0.35)] hover:bg-rose-50":"bg-linear-to-br from-brand-500 to-brand-600 text-white shadow-[0_10px_24px_-16px_rgba(109,79,194,0.85)] hover:from-brand-600 hover:to-violet-700");function ne(){return typeof window=="undefined"?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function xe(){var pe;const ce=ne(),N=typeof window!="undefined"?window.isSecureContext:!1,de=typeof navigator!="undefined"&&!!((pe=navigator.mediaDevices)!=null&&pe.getUserMedia);l.value=!!(ce&&N&&de),N?(!de||!ce)&&(R.value="Voice input is not supported in this browser."):R.value="Voice input requires HTTPS (or localhost).",ce&&l.value&&(S=new ce,S.continuous=!0,S.interimResults=!0,S.lang=typeof navigator!="undefined"&&navigator.language||"en-US",S.onstart=()=>{a.value=!0,u.value=!1,p.value=!1,$(),Se("Listening... Tap mic to stop","listening",{persistent:!0,key:"listening"})},S.onend=()=>{a.value=!1,u.value=!1,p.value=!1,$(),O.value==="listening"&&We(),A.value&&(A.value=!1,xt())},S.onerror=Te=>{if(a.value=!1,u.value=!1,p.value=!1,$(),A.value=!1,(Te==null?void 0:Te.error)==="not-allowed"||(Te==null?void 0:Te.error)==="service-not-allowed"){Se("Microphone permission denied. Please allow microphone access in browser settings.","error");return}if((Te==null?void 0:Te.error)==="audio-capture"){Se("No microphone detected. Please connect a microphone and try again.","error");return}if((Te==null?void 0:Te.error)==="no-speech"){Se("No speech detected. Try speaking a bit louder.","info");return}Se("Voice input failed. Please try again.","error")},S.onresult=Te=>{let ve="";for(let ge=Te.resultIndex;ge{if(S&&!(!a.value&&!p.value))try{S.abort()}catch{p.value=!1,A.value=!1}},1200)}}function G(){if(!l.value||!S){Se(R.value,"error");return}if(a.value||u.value||p.value){Y({submitAfterStop:a.value});return}ue()}async function z(){var ce;if(g.value)return!0;if(!((ce=navigator.mediaDevices)!=null&&ce.getUserMedia))return Se("Microphone API is unavailable in this browser.","error"),!1;c.value=!0,Se("Requesting microphone permission...","info",{persistent:!0,key:"requesting"});try{return(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(de=>de.stop()),g.value=!0,!0}catch(N){return(N==null?void 0:N.name)==="NotAllowedError"||(N==null?void 0:N.name)==="SecurityError"?Se("Microphone permission denied. Please allow it and try again.","error"):(N==null?void 0:N.name)==="NotFoundError"?Se("No microphone found on this device.","error"):Se("Unable to access microphone. Please check browser permissions.","error"),!1}finally{c.value=!1,O.value==="requesting"&&We()}}async function ue(){var N;if(!(!S||a.value||u.value||p.value||!await z()||!S)){A.value=!1,(N=o.value)==null||N.focus(),u.value=!0;try{S.start()}catch(de){u.value=!1,p.value=!1,(de==null?void 0:de.name)!=="InvalidStateError"&&Se("Unable to start voice input. Please try again.","error")}}}function Se(ce,N="info",de={}){const{duration:pe=4200,persistent:Te=!1,key:ve=""}=de;E.value=ce,m.value=N,O.value=ve,w.value=!0,V&&clearTimeout(V),Te||(V=setTimeout(()=>{w.value=!1,O.value=""},pe))}function We(){w.value=!1,O.value="",V&&(clearTimeout(V),V=null)}function xt(){if(s.isAwaitingResponse){r("cancel");return}const ce=i.value.trim();ce&&((a.value||u.value||p.value)&&S&&Y({submitAfterStop:!1}),r("submit",ce),i.value="")}return t({focus:()=>{var ce;return(ce=o.value)==null?void 0:ce.focus()}}),Hn(()=>{xe()}),xs(()=>{if(S&&(a.value||u.value||p.value)){A.value=!1,$();try{S.abort()}catch{}}$(),We()}),(ce,N)=>(F(),j("div",Gd,[x("form",{class:"group flex min-h-11 items-center gap-2 rounded-full border border-slate-200/90 bg-white/95 px-3 shadow-[0_12px_26px_-20px_rgba(15,23,42,0.7)] transition-all duration-250 focus-within:-translate-y-0.5 focus-within:border-brand-200 focus-within:shadow-[0_18px_30px_-20px_rgba(13,110,253,0.5)] focus-within:ring-2 focus-within:ring-brand-500/25",style:{"border-radius":"9999px"},autocomplete:"off",onSubmit:ct(xt,["prevent"]),onClick:N[5]||(N[5]=ct(()=>{},["stop"])),onMousedown:N[6]||(N[6]=ct(()=>{},["stop"])),onKeydown:N[7]||(N[7]=ct(()=>{},["stop"])),onKeyup:N[8]||(N[8]=ct(()=>{},["stop"]))},[Pa(x("input",{ref_key:"inputRef",ref:o,type:"text","onUpdate:modelValue":N[0]||(N[0]=de=>i.value=de),class:"h-11 w-full border-none bg-transparent text-sm font-medium text-slate-800 placeholder:text-slate-400 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",placeholder:e.disabled?"Waiting for response...":e.placeholder,disabled:e.disabled,required:"",onKeydown:N[1]||(N[1]=ct(()=>{},["stop"])),onKeyup:N[2]||(N[2]=ct(()=>{},["stop"])),onKeypress:N[3]||(N[3]=ct(()=>{},["stop"])),onInput:N[4]||(N[4]=ct(()=>{},["stop"]))},null,40,Kd),[[Xu,i.value]]),x("button",{type:"button",class:ye(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border border-transparent text-slate-600 transition-all duration-200 hover:-translate-y-0.5 hover:border-slate-200 hover:bg-slate-100 hover:text-slate-900 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",a.value?"border-red-200 bg-red-100 text-red-600 shadow-[0_10px_20px_-18px_rgba(220,38,38,0.9)] hover:bg-red-100 hover:text-red-600":""]),style:{"border-radius":"9999px"},title:C.value,"aria-label":C.value,disabled:e.disabled||!l.value||c.value||u.value||p.value,onClick:G},[a.value&&!c.value?(F(),j("svg",Zd,N[9]||(N[9]=[x("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},null,-1)]))):c.value?(F(),j("svg",Qd,N[11]||(N[11]=[x("circle",{cx:"12",cy:"12",r:"9",opacity:"0.3"},null,-1),x("path",{d:"M21 12a9 9 0 0 1-9 9"},null,-1)]))):(F(),j("svg",Xd,N[10]||(N[10]=[x("path",{d:"M12 3a3 3 0 0 0-3 3v6a3 3 0 0 0 6 0V6a3 3 0 0 0-3-3z"},null,-1),x("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1),x("path",{d:"M12 19v3"},null,-1)])))],10,Yd),x("button",{type:"submit",title:J.value,"aria-label":J.value,class:ye(["grid h-8 w-8 shrink-0 appearance-none place-items-center rounded-full border-0 transition-all duration-200 hover:-translate-y-0.5 focus:outline-none disabled:cursor-not-allowed disabled:opacity-40",W.value]),style:{"border-radius":"9999px"},disabled:te.value},[e.isAwaitingResponse?(F(),j("svg",ep,N[12]||(N[12]=[x("circle",{cx:"12",cy:"12",r:"8",stroke:"currentColor","stroke-width":"2.1",class:"opacity-95"},null,-1),x("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1.35",fill:"currentColor"},null,-1)]))):(F(),j("svg",tp,N[13]||(N[13]=[x("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.59 5.58L20 12l-8-8-8 8z"},null,-1)])))],10,Jd)],32),Me(Wd,{visible:w.value,message:E.value,type:m.value,dismissible:m.value!=="listening",onClose:We},null,8,["visible","message","type","dismissible"])]))}},sp={class:"relative overflow-hidden bg-linear-to-br from-brand-600 via-brand-500 to-violet-400"},rp={class:"min-w-0"},ip={key:1,class:"border-t border-slate-200/80 bg-white/90 px-3 py-3 pb-[calc(12px+env(safe-area-inset-bottom))] backdrop-blur-sm sm:px-4 sm:py-4"},op=56,lp={__name:"ChatbotPopup",props:{isOpen:{type:Boolean,required:!0},activeTab:{type:String,required:!0},debugEnabled:{type:Boolean,default:!1},sendNonERPtoaiEnabled:{type:Boolean,default:!1},chatHistory:{type:Array,required:!0},debugLogs:{type:Array,required:!0},currentDebug:{type:Object,default:null},supportHistory:{type:Array,required:!0},autoReadEnabled:{type:Boolean,required:!0},ttsConfig:{type:Object,required:!0},activeTtsProvider:{type:String,required:!0},settings:{type:Object,default:null},isAwaitingResponse:{type:Boolean,default:!1}},emits:["close","submit","cancelResponse","update:activeTab","toggleAutoRead","togglePollyPreference","toggleDebug","toggleSendNonERP"],setup(e,{expose:t,emit:n}){const s=e,r=n,i=Q(null),o=Q(null),a=Q(s.activeTab),l=Q("default"),c=Q(!1);function u(){const m=i.value;if(!s.isOpen||!m){c.value=!1;return}const R=m.scrollHeight-m.clientHeight;if(R<=4){c.value=!1;return}const S=R-m.scrollTop;c.value=S>op}function p(){const m=i.value;m&&(m.scrollTo({top:m.scrollHeight,behavior:"smooth"}),setTimeout(()=>{u()},220))}function g(){kt(()=>{u()})}function w(){if(l.value==="default"){l.value="half";return}if(l.value==="half"){l.value="full";return}l.value="default"}const E=Re(()=>{const m="chat-shell fixed z-[9999] flex min-h-0 flex-col overflow-hidden border border-slate-200/80 shadow-[0_32px_80px_-44px_rgba(2,6,23,0.7),0_18px_40px_-24px_rgba(15,23,42,0.45)] transition-all duration-300 ease-out origin-bottom-right",R=s.isOpen?"pointer-events-auto opacity-100 translate-x-0 translate-y-0 scale-100 motion-safe:animate-surface-in":"pointer-events-none opacity-0 translate-x-1/5 translate-y-8 scale-95";return l.value==="full"?[m,R,"inset-0 h-screen w-screen max-h-screen max-w-screen rounded-none origin-center"]:l.value==="half"?[m,R,"bottom-[74px] right-5 h-[min(86vh,860px)] w-[min(50vw,860px)] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(86vh,760px)] max-[900px]:w-[min(70vw,760px)] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]:[m,R,"bottom-[74px] right-5 h-[min(560px,72vh)] w-[min(360px,calc(100vw-40px))] rounded-2xl","max-[900px]:bottom-[78px] max-[900px]:right-3 max-[900px]:h-[min(70vh,540px)] max-[900px]:w-[min(360px,calc(100vw-24px))] max-[900px]:rounded-[14px]","max-[600px]:inset-0 max-[600px]:h-screen max-[600px]:w-screen max-[600px]:max-h-screen max-[600px]:max-w-screen max-[600px]:rounded-none max-[600px]:pb-[env(safe-area-inset-bottom)]"]});return rn(()=>s.activeTab,m=>{a.value=m,g()}),rn(()=>s.isOpen,m=>{m&&a.value!=="settings"&&kt(()=>{var R;return(R=o.value)==null?void 0:R.focus()}),g()}),rn(a,m=>{r("update:activeTab",m),g()}),rn(()=>[s.chatHistory.length,s.supportHistory.length,s.debugLogs.length,s.currentDebug],()=>{g()}),rn(()=>s.debugEnabled,m=>{!m&&a.value==="debug"&&(a.value="chat"),g()}),Hn(()=>{g()}),t({scrollToBottom(){kt(()=>{p()})}}),(m,R)=>(F(),j("div",{class:ye(E.value),onKeydown:R[9]||(R[9]=ct(()=>{},["stop"])),onKeyup:R[10]||(R[10]=ct(()=>{},["stop"])),onKeypress:R[11]||(R[11]=ct(()=>{},["stop"]))},[R[14]||(R[14]=x("div",{class:"pointer-events-none absolute -right-14 -top-14 h-36 w-36 rounded-full bg-brand-500/15 blur-2xl"},null,-1)),R[15]||(R[15]=x("div",{class:"pointer-events-none absolute -bottom-14 -left-12 h-32 w-32 rounded-full bg-violet-400/15 blur-2xl"},null,-1)),x("div",sp,[R[12]||(R[12]=x("div",{class:"pointer-events-none absolute inset-0 opacity-45",style:{background:"linear-gradient(120deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.02) 52%, rgba(255,255,255,0.12) 100%)"}},null,-1)),Me(vc,{windowMode:l.value,autoReadEnabled:e.autoReadEnabled,activeTtsProvider:e.activeTtsProvider,onClose:R[0]||(R[0]=S=>m.$emit("close")),onCycleResize:w,onToggleAutoRead:R[1]||(R[1]=S=>m.$emit("toggleAutoRead"))},null,8,["windowMode","autoReadEnabled","activeTtsProvider"]),Me(Sc,{modelValue:a.value,"onUpdate:modelValue":R[2]||(R[2]=S=>a.value=S),debugEnabled:e.debugEnabled},null,8,["modelValue","debugEnabled"])]),x("div",{class:"chat-scrollbar min-h-0 flex-1 overflow-x-hidden overflow-y-scroll bg-slate-50/60 px-4 py-4 max-[900px]:px-3.5 max-[900px]:py-3.5 max-[600px]:px-3 max-[600px]:py-3",ref_key:"chatBodyRef",ref:i,onScrollPassive:u},[x("div",rp,[a.value==="chat"?(F(),St(md,{key:0,messages:e.chatHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="debug"&&e.debugEnabled?(F(),St(_d,{key:1,logs:e.debugLogs,currentDebug:e.currentDebug},null,8,["logs","currentDebug"])):a.value==="support"?(F(),St(Sd,{key:2,messages:e.supportHistory,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig},null,8,["messages","autoReadEnabled","ttsConfig"])):a.value==="settings"?(F(),St(Vd,{key:3,autoReadEnabled:e.autoReadEnabled,ttsConfig:e.ttsConfig,settings:e.settings,debugEnabled:e.debugEnabled,sendNonERPtoaiEnabled:e.sendNonERPtoaiEnabled,onToggleAutoRead:R[3]||(R[3]=S=>m.$emit("toggleAutoRead")),onTogglePollyPreference:R[4]||(R[4]=S=>m.$emit("togglePollyPreference")),onToggleDebug:R[5]||(R[5]=S=>m.$emit("toggleDebug")),onToggleSendNonERP:R[6]||(R[6]=S=>m.$emit("toggleSendNonERP"))},null,8,["autoReadEnabled","ttsConfig","settings","debugEnabled","sendNonERPtoaiEnabled"])):Ve("",!0)])],544),c.value?(F(),j("button",{key:0,type:"button",class:ye(["absolute right-4 z-20 grid h-9 w-9 place-items-center rounded-full border border-brand-200/70 bg-white/95 text-brand-600 shadow-[0_14px_26px_-16px_rgba(15,23,42,0.65)] transition-all duration-200 hover:-translate-y-0.5 hover:border-brand-300 hover:text-brand-700 focus:outline-none",a.value!=="settings"?"bottom-[calc(90px+env(safe-area-inset-bottom))] sm:bottom-[96px]":"bottom-4 sm:bottom-5"]),title:"Scroll to bottom","aria-label":"Scroll to bottom",onClick:p},R[13]||(R[13]=[x("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[x("path",{d:"M7 10l5 5 5-5"})],-1)]),2)):Ve("",!0),a.value!=="settings"?(F(),j("div",ip,[Me(np,{ref_key:"chatFormRef",ref:o,placeholder:a.value==="support"?"Message Support...":"Message...",disabled:a.value==="chat"&&e.isAwaitingResponse,isAwaitingResponse:a.value==="chat"&&e.isAwaitingResponse,onSubmit:R[7]||(R[7]=S=>m.$emit("submit",S)),onCancel:R[8]||(R[8]=S=>m.$emit("cancelResponse"))},null,8,["placeholder","disabled","isAwaitingResponse"])])):Ve("",!0)],34))}},_l="changai_chat_id",Tl="changai_polly_enabled";function ap(){let e=sessionStorage.getItem(_l);return e||(e=`session_${Date.now()}_${crypto.randomUUID()}`,sessionStorage.setItem(_l,e)),e}function up(){const e=localStorage.getItem(Tl);return e===null?!0:e==="true"}function cp(e){localStorage.setItem(Tl,String(!!e))}const fp={__name:"App",setup(e){const t=Q(!1),n=Q("chat"),s=Q([]),r=Q([]),i=Q(!1),o=Q([]),a=Q(null),l=Q("actual"),c=Q(!0),u=Q(null),p=Q(!1),g=Q(null),w=Q(!1),E=Q({enableVoiceChat:!1,pollyAvailable:!1,usePolly:!0,voiceId:"Zayd",enable_changai:!1}),m=Q("off"),R=Q(null),S=Re(()=>R.value!==null);function V(){if(!E.value.enableVoiceChat){m.value="off";return}m.value=E.value.usePolly?"polly":"browser"}function K(G){var ue;const z=(ue=G==null?void 0:G.detail)==null?void 0:ue.provider;(z==="polly"||z==="browser"||z==="off")&&(m.value=z)}async function O(){var ue,Se,We,xt,ce;if(!(p.value||u.value)){p.value=!0;try{u.value=await Mc(l.value),E.value={enableVoiceChat:!!((ue=u.value)!=null&&ue.enable_voice_chat),pollyAvailable:!!((Se=u.value)!=null&&Se.polly_enabled),usePolly:!!((We=u.value)!=null&&We.polly_enabled)&&up(),voiceId:((xt=u.value)==null?void 0:xt.polly_voice_id)||"Zayd",enable_changai:!!((ce=u.value)!=null&&ce.enable_changai)},V(),r.value.push({type:"settings",settings:u.value})}catch(N){const de=vl(N);r.value.push({type:"settings",error:de})}finally{p.value=!1}}}function A(){t.value=!t.value}function C(){var G;(G=a.value)==null||G.scrollToBottom()}function J(){c.value=!c.value}function te(){const G=!E.value.usePolly;E.value={...E.value,usePolly:G&&E.value.pollyAvailable},cp(E.value.usePolly),V()}function W(){w.value=!w.value}async function ne(G){n.value==="support"?await Y(G):await xe(G)}async function xe(G){var ve;g.value=null,l.value==="actual"&&await O(),s.value.push({role:"user",text:G}),await kt(),C();const z=us({role:"model",text:"Thinking...",cancelable:!0,isStatus:!0,statusType:"thinking"});s.value.push(z),await kt(),C();let ue=!1;const Se=ap(),We=`${Se}_${Date.now()}`,xt=w.value,ce=Pc(G,Se,l.value,We,w.value),N=`debug_${We}`;let de=Date.now();const pe=[],Te=ge=>{var ze;const le=Date.now(),yt=((le-de)/1e3).toFixed(2);de=le;const Ct=`${ge.message} (${yt}s)`;if(ge.message&&(pe.push(Ct),g.value=Ct),!ge.done&&ge.message&&(z.text=ge.message,z.statusType="pipeline"),ge.done){z.cancelable=!1,ge.error?(z.text=`⚠️ ${ge.message||"Something failed"}`,z.isStatus=!1,z.statusType=null):(ze=ge.data)!=null&&ze.answer&&(z.text=ge.data.answer,z.isStatus=!1,z.statusType=null),frappe.realtime.off(N),g.value=null;return}};frappe.realtime.on(N,Te),R.value=()=>{ue||(ue=!0,ce.cancel(),frappe.realtime.off(N),z.isStatus=!1,z.statusType=null,z.text="Cancelled by user.",r.value.push({type:"cancelled",user:G,steps:[...pe]}),g.value=null,z.cancelable=!1,R.value=null)};try{const ge=await ce.promise;if(ue)return;z.cancelable=!1;const le=((ve=bd(ge==null?void 0:ge.Bot))==null?void 0:ve.trim())||"No response.";z.isStatus=!1,z.statusType=null,z.text=le,r.value.push({type:"success",user:G,steps:[...pe],final_response:ge}),g.value=null}catch(ge){if(ue)return;frappe.realtime.off(N),z.cancelable=!1,z.isStatus=!1,z.statusType=null;const le=vl(ge);g.value=null,r.value.push({type:"failed",user:G,steps:[...pe],error:le}),z.isStatus=!1,z.statusType=null,z.text="⚠️ Something went wrong. Please try again."}finally{frappe.realtime.off(N),ue||(R.value=null)}await kt(),C()}function $(){var G;(G=R.value)==null||G.call(R)}async function Y(G){o.value.push({role:"user",text:G}),await kt(),C();const z=us({role:"model",text:"Sending to support...",isStatus:!0,statusType:"support"});o.value.push(z),await kt(),C();try{const ue=await Ic(G,l.value);z.text=ue?wl(ue):"Support request sent successfully."}catch{z.text="⚠️ Failed to reach support. Please try again."}await kt(),C()}return Hn(()=>{typeof window!="undefined"&&window.addEventListener("changai-tts-provider",K),l.value==="actual"&&O()}),xs(()=>{typeof window!="undefined"&&window.removeEventListener("changai-tts-provider",K)}),(G,z)=>(F(),j(Be,null,[E.value.enable_changai?(F(),St(ac,{key:0,isOpen:t.value,onToggle:A},null,8,["isOpen"])):Ve("",!0),Me(lp,{ref_key:"popupRef",ref:a,isOpen:t.value,activeTab:n.value,"onUpdate:activeTab":z[0]||(z[0]=ue=>n.value=ue),chatHistory:s.value,debugLogs:r.value,currentDebug:g.value,supportHistory:o.value,autoReadEnabled:c.value,ttsConfig:E.value,activeTtsProvider:m.value,settings:u.value,isAwaitingResponse:S.value,debugEnabled:i.value,sendNonERPtoaiEnabled:w.value,onToggleDebug:z[1]||(z[1]=ue=>i.value=!i.value),onClose:z[2]||(z[2]=ue=>t.value=!1),onSubmit:ne,onCancelResponse:$,onToggleAutoRead:J,onTogglePollyPreference:te,onToggleSendNonERP:W},null,8,["isOpen","activeTab","chatHistory","debugLogs","currentDebug","supportHistory","autoReadEnabled","ttsConfig","activeTtsProvider","settings","isAwaitingResponse","debugEnabled","sendNonERPtoaiEnabled"])],64))}};function dp(){const e=document.querySelector('link[href*="/assets/changai/dist/changai-chatbot.css"]');if(e!=null&&e.href)return e.href;const t=Array.from(document.scripts).find(n=>{var s;return(s=n.src)==null?void 0:s.includes("/assets/changai/dist/changai-chatbot.js")});return t!=null&&t.src?t.src.replace(/changai-chatbot\.js(\?.*)?$/,"changai-chatbot.css$1"):null}function pp(e){const t=dp();if(!t){const n=Array.from(document.querySelectorAll("style[data-vite-dev-id]"));return n.length&&n.forEach(s=>{const r=document.createElement("style");r.dataset.changaiShadowDevStyle="1",r.textContent=s.textContent||"",e.appendChild(r)}),Promise.resolve()}return e.querySelector('link[data-changai-shadow-style="1"]')?Promise.resolve():new Promise(n=>{const s=document.createElement("link");s.rel="stylesheet",s.href=t,s.dataset.changaiShadowStyle="1",s.onload=()=>n(),s.onerror=()=>n(),e.appendChild(s),setTimeout(n,1200)})}async function kl(){if(document.getElementById("changai-chatbot-host"))return;const e=document.createElement("div");e.id="changai-chatbot-host",document.body.appendChild(e);const t=e.attachShadow({mode:"open"});await pp(t);const n=document.createElement("div");n.id="changai-chatbot-root",t.appendChild(n),nc(fp).mount(n);function s(r){r.stopPropagation()}n.addEventListener("keydown",s),n.addEventListener("keyup",s),n.addEventListener("keypress",s)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",kl):kl()})(); diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f617a97..23fd542 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,8 @@ "name": "changai-chatbot", "version": "1.0.0", "dependencies": { + "dompurify": "^3.4.3", + "marked": "^18.0.3", "vue": "^3.5.17" }, "devDependencies": { @@ -66,9 +68,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz", - "integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz", + "integrity": "sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==", "cpu": [ "ppc64" ], @@ -83,9 +85,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz", - "integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.7.tgz", + "integrity": "sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==", "cpu": [ "arm" ], @@ -100,9 +102,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz", - "integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz", + "integrity": "sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==", "cpu": [ "arm64" ], @@ -117,9 +119,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz", - "integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.7.tgz", + "integrity": "sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==", "cpu": [ "x64" ], @@ -134,9 +136,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz", - "integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz", + "integrity": "sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==", "cpu": [ "arm64" ], @@ -151,9 +153,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz", - "integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz", + "integrity": "sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==", "cpu": [ "x64" ], @@ -168,9 +170,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz", - "integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz", + "integrity": "sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==", "cpu": [ "arm64" ], @@ -185,9 +187,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz", - "integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz", + "integrity": "sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==", "cpu": [ "x64" ], @@ -202,9 +204,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz", - "integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz", + "integrity": "sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==", "cpu": [ "arm" ], @@ -219,9 +221,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz", - "integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz", + "integrity": "sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==", "cpu": [ "arm64" ], @@ -236,9 +238,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz", - "integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz", + "integrity": "sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==", "cpu": [ "ia32" ], @@ -253,9 +255,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz", - "integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz", + "integrity": "sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==", "cpu": [ "loong64" ], @@ -270,9 +272,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz", - "integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz", + "integrity": "sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==", "cpu": [ "mips64el" ], @@ -287,9 +289,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz", - "integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz", + "integrity": "sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==", "cpu": [ "ppc64" ], @@ -304,9 +306,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz", - "integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz", + "integrity": "sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==", "cpu": [ "riscv64" ], @@ -321,9 +323,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz", - "integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz", + "integrity": "sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==", "cpu": [ "s390x" ], @@ -338,9 +340,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz", - "integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz", + "integrity": "sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==", "cpu": [ "x64" ], @@ -355,9 +357,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz", - "integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz", + "integrity": "sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==", "cpu": [ "arm64" ], @@ -372,9 +374,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz", - "integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz", + "integrity": "sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==", "cpu": [ "x64" ], @@ -389,9 +391,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz", - "integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz", + "integrity": "sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==", "cpu": [ "arm64" ], @@ -406,9 +408,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz", - "integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz", + "integrity": "sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==", "cpu": [ "x64" ], @@ -423,9 +425,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz", - "integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz", + "integrity": "sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==", "cpu": [ "arm64" ], @@ -440,9 +442,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz", - "integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz", + "integrity": "sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==", "cpu": [ "x64" ], @@ -457,9 +459,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz", - "integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz", + "integrity": "sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==", "cpu": [ "arm64" ], @@ -474,9 +476,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz", - "integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz", + "integrity": "sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==", "cpu": [ "ia32" ], @@ -491,9 +493,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz", - "integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz", + "integrity": "sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==", "cpu": [ "x64" ], @@ -564,9 +566,9 @@ "license": "MIT" }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.46.1.tgz", - "integrity": "sha512-oENme6QxtLCqjChRUUo3S6X8hjCXnWmJWnedD7VbGML5GUtaOtAyx+fEEXnBXVf0CBZApMQU0Idwi0FmyxzQhw==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.60.3.tgz", + "integrity": "sha512-x35CNW/ANXG3hE/EZpRU8MXX1JDN86hBb2wMGAtltkz7pc6cxgjpy1OMMfDosOQ+2hWqIkag/fGok1Yady9nGw==", "cpu": [ "arm" ], @@ -578,9 +580,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.46.1.tgz", - "integrity": "sha512-OikvNT3qYTl9+4qQ9Bpn6+XHM+ogtFadRLuT2EXiFQMiNkXFLQfNVppi5o28wvYdHL2s3fM0D/MZJ8UkNFZWsw==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.60.3.tgz", + "integrity": "sha512-xw3xtkDApIOGayehp2+Rz4zimfkaX65r4t47iy+ymQB2G4iJCBBfj0ogVg5jpvjpn8UWn/+q9tprxleYeNp3Hw==", "cpu": [ "arm64" ], @@ -592,9 +594,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.46.1.tgz", - "integrity": "sha512-EFYNNGij2WllnzljQDQnlFTXzSJw87cpAs4TVBAWLdkvic5Uh5tISrIL6NRcxoh/b2EFBG/TK8hgRrGx94zD4A==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.3.tgz", + "integrity": "sha512-vo6Y5Qfpx7/5EaamIwi0WqW2+zfiusVihKatLvtN1VFVy3D13uERk/6gZLU1UiHRL6fDXqj/ELIeVRGnvcTE1g==", "cpu": [ "arm64" ], @@ -606,9 +608,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.46.1.tgz", - "integrity": "sha512-ZaNH06O1KeTug9WI2+GRBE5Ujt9kZw4a1+OIwnBHal92I8PxSsl5KpsrPvthRynkhMck4XPdvY0z26Cym/b7oA==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.60.3.tgz", + "integrity": "sha512-D+0QGcZhBzTN82weOnsSlY7V7+RMmPuF1CkbxyMAGE8+ZHeUjyb76ZiWmBlCu//AQQONvxcqRbwZTajZKqjuOw==", "cpu": [ "x64" ], @@ -620,9 +622,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.46.1.tgz", - "integrity": "sha512-n4SLVebZP8uUlJ2r04+g2U/xFeiQlw09Me5UFqny8HGbARl503LNH5CqFTb5U5jNxTouhRjai6qPT0CR5c/Iig==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.60.3.tgz", + "integrity": "sha512-6HnvHCT7fDyj6R0Ph7A6x8dQS/S38MClRWeDLqc0MdfWkxjiu1HSDYrdPhqSILzjTIC/pnXbbJbo+ft+gy/9hQ==", "cpu": [ "arm64" ], @@ -634,9 +636,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.46.1.tgz", - "integrity": "sha512-8vu9c02F16heTqpvo3yeiu7Vi1REDEC/yES/dIfq3tSXe6mLndiwvYr3AAvd1tMNUqE9yeGYa5w7PRbI5QUV+w==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.60.3.tgz", + "integrity": "sha512-KHLgC3WKlUYW3ShFKnnosZDOJ0xjg9zp7au3sIm2bs/tGBeC2ipmvRh/N7JKi0t9Ue20C0dpEshi8WUubg+cnA==", "cpu": [ "x64" ], @@ -648,9 +650,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.46.1.tgz", - "integrity": "sha512-K4ncpWl7sQuyp6rWiGUvb6Q18ba8mzM0rjWJ5JgYKlIXAau1db7hZnR0ldJvqKWWJDxqzSLwGUhA4jp+KqgDtQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.60.3.tgz", + "integrity": "sha512-DV6fJoxEYWJOvaZIsok7KrYl0tPvga5OZ2yvKHNNYyk/2roMLqQAbGhr78EQ5YhHpnhLKJD3S1WFusAkmUuV5g==", "cpu": [ "arm" ], @@ -662,9 +664,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.46.1.tgz", - "integrity": "sha512-YykPnXsjUjmXE6j6k2QBBGAn1YsJUix7pYaPLK3RVE0bQL2jfdbfykPxfF8AgBlqtYbfEnYHmLXNa6QETjdOjQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.60.3.tgz", + "integrity": "sha512-mQKoJAzvuOs6F+TZybQO4GOTSMUu7v0WdxEk24krQ/uUxXoPTtHjuaUuPmFhtBcM4K0ons8nrE3JyhTuCFtT/w==", "cpu": [ "arm" ], @@ -676,9 +678,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.46.1.tgz", - "integrity": "sha512-kKvqBGbZ8i9pCGW3a1FH3HNIVg49dXXTsChGFsHGXQaVJPLA4f/O+XmTxfklhccxdF5FefUn2hvkoGJH0ScWOA==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.60.3.tgz", + "integrity": "sha512-Whjj2qoiJ6+OOJMGptTYazaJvjOJm+iKHpXQM1P3LzGjt7Ff++Tp7nH4N8J/BUA7R9IHfDyx4DJIflifwnbmIA==", "cpu": [ "arm64" ], @@ -690,9 +692,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.46.1.tgz", - "integrity": "sha512-zzX5nTw1N1plmqC9RGC9vZHFuiM7ZP7oSWQGqpbmfjK7p947D518cVK1/MQudsBdcD84t6k70WNczJOct6+hdg==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.60.3.tgz", + "integrity": "sha512-4YTNHKqGng5+yiZt3mg77nmyuCfmNfX4fPmyUapBcIk+BdwSwmCWGXOUxhXbBEkFHtoN5boLj/5NON+u5QC9tg==", "cpu": [ "arm64" ], @@ -703,10 +705,24 @@ "linux" ] }, - "node_modules/@rollup/rollup-linux-loongarch64-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.46.1.tgz", - "integrity": "sha512-O8CwgSBo6ewPpktFfSDgB6SJN9XDcPSvuwxfejiddbIC/hn9Tg6Ai0f0eYDf3XvB/+PIWzOQL+7+TZoB8p9Yuw==", + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.60.3.tgz", + "integrity": "sha512-SU3kNlhkpI4UqlUc2VXPGK9o886ZsSeGfMAX2ba2b8DKmMXq4AL7KUrkSWVbb7koVqx41Yczx6dx5PNargIrEA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.60.3.tgz", + "integrity": "sha512-6lDLl5h4TXpB1mTf2rQWnAk/LcXrx9vBfu/DT5TIPhvMhRWaZ5MxkIc8u4lJAmBo6klTe1ywXIUHFjylW505sg==", "cpu": [ "loong64" ], @@ -718,9 +734,23 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.46.1.tgz", - "integrity": "sha512-JnCfFVEKeq6G3h3z8e60kAp8Rd7QVnWCtPm7cxx+5OtP80g/3nmPtfdCXbVl063e3KsRnGSKDHUQMydmzc/wBA==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.60.3.tgz", + "integrity": "sha512-BMo8bOw8evlup/8G+cj5xWtPyp93xPdyoSN16Zy90Q2QZ0ZYRhCt6ZJSwbrRzG9HApFabjwj2p25TUPDWrhzqQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.60.3.tgz", + "integrity": "sha512-E0L8X1dZN1/Rph+5VPF6Xj2G7JJvMACVXtamTJIDrVI44Y3K+G8gQaMEAavbqCGTa16InptiVrX6eM6pmJ+7qA==", "cpu": [ "ppc64" ], @@ -732,9 +762,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.46.1.tgz", - "integrity": "sha512-dVxuDqS237eQXkbYzQQfdf/njgeNw6LZuVyEdUaWwRpKHhsLI+y4H/NJV8xJGU19vnOJCVwaBFgr936FHOnJsQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.60.3.tgz", + "integrity": "sha512-oZJ/WHaVfHUiRAtmTAeo3DcevNsVvH8mbvodjZy7D5QKvCefO371SiKRpxoDcCxB3PTRTLayWBkvmDQKTcX/sw==", "cpu": [ "riscv64" ], @@ -746,9 +776,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.46.1.tgz", - "integrity": "sha512-CvvgNl2hrZrTR9jXK1ye0Go0HQRT6ohQdDfWR47/KFKiLd5oN5T14jRdUVGF4tnsN8y9oSfMOqH6RuHh+ck8+w==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.60.3.tgz", + "integrity": "sha512-Dhbyh7j9FybM3YaTgaHmVALwA8AkUwTPccyCQ79TG9AJUsMQqgN1DDEZNr4+QUfwiWvLDumW5vdwzoeUF+TNxQ==", "cpu": [ "riscv64" ], @@ -760,9 +790,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.46.1.tgz", - "integrity": "sha512-x7ANt2VOg2565oGHJ6rIuuAon+A8sfe1IeUx25IKqi49OjSr/K3awoNqr9gCwGEJo9OuXlOn+H2p1VJKx1psxA==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.60.3.tgz", + "integrity": "sha512-cJd1X5XhHHlltkaypz1UcWLA8AcoIi1aWhsvaWDskD1oz2eKCypnqvTQ8ykMNI0RSmm7NkTdSqSSD7zM0xa6Ig==", "cpu": [ "s390x" ], @@ -774,9 +804,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.46.1.tgz", - "integrity": "sha512-9OADZYryz/7E8/qt0vnaHQgmia2Y0wrjSSn1V/uL+zw/i7NUhxbX4cHXdEQ7dnJgzYDS81d8+tf6nbIdRFZQoQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.60.3.tgz", + "integrity": "sha512-DAZDBHQfG2oQuhY7mc6I3/qB4LU2fQCjRvxbDwd/Jdvb9fypP4IJ4qmtu6lNjes6B531AI8cg1aKC2di97bUxA==", "cpu": [ "x64" ], @@ -788,9 +818,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.46.1.tgz", - "integrity": "sha512-NuvSCbXEKY+NGWHyivzbjSVJi68Xfq1VnIvGmsuXs6TCtveeoDRKutI5vf2ntmNnVq64Q4zInet0UDQ+yMB6tA==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.60.3.tgz", + "integrity": "sha512-cRxsE8c13mZOh3vP+wLDxpQBRrOHDIGOWyDL93Sy0Ga8y515fBcC2pjUfFwUe5T7tqvTvWbCpg1URM/AXdWIXA==", "cpu": [ "x64" ], @@ -801,10 +831,38 @@ "linux" ] }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.60.3.tgz", + "integrity": "sha512-QaWcIgRxqEdQdhJqW4DJctsH6HCmo5vHxY0krHSX4jMtOqfzC+dqDGuHM87bu4H8JBeibWx7jFz+h6/4C8wA5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.60.3.tgz", + "integrity": "sha512-AaXwSvUi3QIPtroAUw1t5yHGIyqKEXwH54WUocFolZhpGDruJcs8c+xPNDRn4XiQsS7MEwnYsHW2l0MBLDMkWg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.46.1.tgz", - "integrity": "sha512-mWz+6FSRb82xuUMMV1X3NGiaPFqbLN9aIueHleTZCc46cJvwTlvIh7reQLk4p97dv0nddyewBhwzryBHH7wtPw==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.60.3.tgz", + "integrity": "sha512-65LAKM/bAWDqKNEelHlcHvm2V+Vfb8C6INFxQXRHCvaVN1rJfwr4NvdP4FyzUaLqWfaCGaadf6UbTm8xJeYfEg==", "cpu": [ "arm64" ], @@ -816,9 +874,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.46.1.tgz", - "integrity": "sha512-7Thzy9TMXDw9AU4f4vsLNBxh7/VOKuXi73VH3d/kHGr0tZ3x/ewgL9uC7ojUKmH1/zvmZe2tLapYcZllk3SO8Q==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.60.3.tgz", + "integrity": "sha512-EEM2gyhBF5MFnI6vMKdX1LAosE627RGBzIoGMdLloPZkXrUN0Ckqgr2Qi8+J3zip/8NVVro3/FjB+tjhZUgUHA==", "cpu": [ "ia32" ], @@ -829,10 +887,24 @@ "win32" ] }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.60.3.tgz", + "integrity": "sha512-E5Eb5H/DpxaoXH++Qkv28RcUJboMopmdDUALBczvHMf7hNIxaDZqwY5lK12UK1BHacSmvupoEWGu+n993Z0y1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.46.1.tgz", - "integrity": "sha512-7GVB4luhFmGUNXXJhH2jJwZCFB3pIOixv2E3s17GQHBFUOQaISlt7aGcQgqvCaDSxTZJUzlK/QJ1FN8S94MrzQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.60.3.tgz", + "integrity": "sha512-hPt/bgL5cE+Qp+/TPHBqptcAgPzgj46mPcg/16zNUmbQk0j+mOEQV/+Lqu8QRtDV3Ek95Q6FeFITpuhl6OTsAA==", "cpu": [ "x64" ], @@ -1122,6 +1194,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "license": "MIT", + "optional": true + }, "node_modules/@vitejs/plugin-vue": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-6.0.1.tgz", @@ -1361,6 +1440,15 @@ "node": ">=8" } }, + "node_modules/dompurify": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.3.tgz", + "integrity": "sha512-VVwJidIJcp1hpg2OMXML3ZVRPYSZiq4aX7qBh83BSIpOaRDqI+qxhXjjIWnpzkOXhmp0L81lnoME1mnCc9H48A==", + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, "node_modules/electron-to-chromium": { "version": "1.5.328", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.328.tgz", @@ -1395,9 +1483,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.8", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz", - "integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==", + "version": "0.27.7", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.7.tgz", + "integrity": "sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1408,32 +1496,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.8", - "@esbuild/android-arm": "0.25.8", - "@esbuild/android-arm64": "0.25.8", - "@esbuild/android-x64": "0.25.8", - "@esbuild/darwin-arm64": "0.25.8", - "@esbuild/darwin-x64": "0.25.8", - "@esbuild/freebsd-arm64": "0.25.8", - "@esbuild/freebsd-x64": "0.25.8", - "@esbuild/linux-arm": "0.25.8", - "@esbuild/linux-arm64": "0.25.8", - "@esbuild/linux-ia32": "0.25.8", - "@esbuild/linux-loong64": "0.25.8", - "@esbuild/linux-mips64el": "0.25.8", - "@esbuild/linux-ppc64": "0.25.8", - "@esbuild/linux-riscv64": "0.25.8", - "@esbuild/linux-s390x": "0.25.8", - "@esbuild/linux-x64": "0.25.8", - "@esbuild/netbsd-arm64": "0.25.8", - "@esbuild/netbsd-x64": "0.25.8", - "@esbuild/openbsd-arm64": "0.25.8", - "@esbuild/openbsd-x64": "0.25.8", - "@esbuild/openharmony-arm64": "0.25.8", - "@esbuild/sunos-x64": "0.25.8", - "@esbuild/win32-arm64": "0.25.8", - "@esbuild/win32-ia32": "0.25.8", - "@esbuild/win32-x64": "0.25.8" + "@esbuild/aix-ppc64": "0.27.7", + "@esbuild/android-arm": "0.27.7", + "@esbuild/android-arm64": "0.27.7", + "@esbuild/android-x64": "0.27.7", + "@esbuild/darwin-arm64": "0.27.7", + "@esbuild/darwin-x64": "0.27.7", + "@esbuild/freebsd-arm64": "0.27.7", + "@esbuild/freebsd-x64": "0.27.7", + "@esbuild/linux-arm": "0.27.7", + "@esbuild/linux-arm64": "0.27.7", + "@esbuild/linux-ia32": "0.27.7", + "@esbuild/linux-loong64": "0.27.7", + "@esbuild/linux-mips64el": "0.27.7", + "@esbuild/linux-ppc64": "0.27.7", + "@esbuild/linux-riscv64": "0.27.7", + "@esbuild/linux-s390x": "0.27.7", + "@esbuild/linux-x64": "0.27.7", + "@esbuild/netbsd-arm64": "0.27.7", + "@esbuild/netbsd-x64": "0.27.7", + "@esbuild/openbsd-arm64": "0.27.7", + "@esbuild/openbsd-x64": "0.27.7", + "@esbuild/openharmony-arm64": "0.27.7", + "@esbuild/sunos-x64": "0.27.7", + "@esbuild/win32-arm64": "0.27.7", + "@esbuild/win32-ia32": "0.27.7", + "@esbuild/win32-x64": "0.27.7" } }, "node_modules/escalade": { @@ -1453,11 +1541,14 @@ "license": "MIT" }, "node_modules/fdir": { - "version": "6.4.6", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", - "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, "peerDependencies": { "picomatch": "^3 || ^4" }, @@ -1509,7 +1600,6 @@ "integrity": "sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==", "dev": true, "license": "MIT", - "peer": true, "bin": { "jiti": "lib/jiti-cli.mjs" } @@ -1520,7 +1610,6 @@ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", "dev": true, "license": "MPL-2.0", - "peer": true, "dependencies": { "detect-libc": "^2.0.3" }, @@ -1785,6 +1874,18 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, + "node_modules/marked": { + "version": "18.0.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-18.0.3.tgz", + "integrity": "sha512-7VT90JOkDeaRWpfjOReRGPEKn0ecdARBkDGL+tT1wZY0efPPqkUxLUSmzy/C7TIylQYJC9STISEsCHrqb/7VIA==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", @@ -1817,9 +1918,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "peer": true, @@ -1831,9 +1932,9 @@ } }, "node_modules/postcss": { - "version": "8.5.8", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz", - "integrity": "sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==", + "version": "8.5.14", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", + "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", "funding": [ { "type": "opencollective", @@ -1867,9 +1968,9 @@ "license": "MIT" }, "node_modules/rollup": { - "version": "4.46.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.46.1.tgz", - "integrity": "sha512-33xGNBsDJAkzt0PvninskHlWnTIPgDtTwhg0U38CUoNP/7H6wI2Cz6dUeoNPbjdTdsYTGuiFFASuUOWovH0SyQ==", + "version": "4.60.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.60.3.tgz", + "integrity": "sha512-pAQK9HalE84QSm4Po3EmWIZPd3FnjkShVkiMlz1iligWYkWQ7wHYd1PF/T7QZ5TVSD6uSTon5gBVMSM4JfBV+A==", "dev": true, "license": "MIT", "dependencies": { @@ -1883,26 +1984,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.46.1", - "@rollup/rollup-android-arm64": "4.46.1", - "@rollup/rollup-darwin-arm64": "4.46.1", - "@rollup/rollup-darwin-x64": "4.46.1", - "@rollup/rollup-freebsd-arm64": "4.46.1", - "@rollup/rollup-freebsd-x64": "4.46.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.46.1", - "@rollup/rollup-linux-arm-musleabihf": "4.46.1", - "@rollup/rollup-linux-arm64-gnu": "4.46.1", - "@rollup/rollup-linux-arm64-musl": "4.46.1", - "@rollup/rollup-linux-loongarch64-gnu": "4.46.1", - "@rollup/rollup-linux-ppc64-gnu": "4.46.1", - "@rollup/rollup-linux-riscv64-gnu": "4.46.1", - "@rollup/rollup-linux-riscv64-musl": "4.46.1", - "@rollup/rollup-linux-s390x-gnu": "4.46.1", - "@rollup/rollup-linux-x64-gnu": "4.46.1", - "@rollup/rollup-linux-x64-musl": "4.46.1", - "@rollup/rollup-win32-arm64-msvc": "4.46.1", - "@rollup/rollup-win32-ia32-msvc": "4.46.1", - "@rollup/rollup-win32-x64-msvc": "4.46.1", + "@rollup/rollup-android-arm-eabi": "4.60.3", + "@rollup/rollup-android-arm64": "4.60.3", + "@rollup/rollup-darwin-arm64": "4.60.3", + "@rollup/rollup-darwin-x64": "4.60.3", + "@rollup/rollup-freebsd-arm64": "4.60.3", + "@rollup/rollup-freebsd-x64": "4.60.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.60.3", + "@rollup/rollup-linux-arm-musleabihf": "4.60.3", + "@rollup/rollup-linux-arm64-gnu": "4.60.3", + "@rollup/rollup-linux-arm64-musl": "4.60.3", + "@rollup/rollup-linux-loong64-gnu": "4.60.3", + "@rollup/rollup-linux-loong64-musl": "4.60.3", + "@rollup/rollup-linux-ppc64-gnu": "4.60.3", + "@rollup/rollup-linux-ppc64-musl": "4.60.3", + "@rollup/rollup-linux-riscv64-gnu": "4.60.3", + "@rollup/rollup-linux-riscv64-musl": "4.60.3", + "@rollup/rollup-linux-s390x-gnu": "4.60.3", + "@rollup/rollup-linux-x64-gnu": "4.60.3", + "@rollup/rollup-linux-x64-musl": "4.60.3", + "@rollup/rollup-openbsd-x64": "4.60.3", + "@rollup/rollup-openharmony-arm64": "4.60.3", + "@rollup/rollup-win32-arm64-msvc": "4.60.3", + "@rollup/rollup-win32-ia32-msvc": "4.60.3", + "@rollup/rollup-win32-x64-gnu": "4.60.3", + "@rollup/rollup-win32-x64-msvc": "4.60.3", "fsevents": "~2.3.2" } }, @@ -1937,14 +2043,14 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", - "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { - "fdir": "^6.4.4", - "picomatch": "^4.0.2" + "fdir": "^6.5.0", + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" @@ -1985,19 +2091,19 @@ } }, "node_modules/vite": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.0.6.tgz", - "integrity": "sha512-MHFiOENNBd+Bd9uvc8GEsIzdkn1JxMmEeYX35tI3fv0sJBUTfW5tQsoaOwuY4KhBI09A3dUJ/DXf2yxPVPUceg==", + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.3.tgz", + "integrity": "sha512-/4XH147Ui7OGTjg3HbdWe5arnZQSbfuRzdr9Ec7TQi5I7R+ir0Rlc9GIvD4v0XZurELqA035KVXJXpR61xhiTA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "esbuild": "^0.25.0", - "fdir": "^6.4.6", + "esbuild": "^0.27.0", + "fdir": "^6.5.0", "picomatch": "^4.0.3", "postcss": "^8.5.6", - "rollup": "^4.40.0", - "tinyglobby": "^0.2.14" + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" }, "bin": { "vite": "bin/vite.js" diff --git a/frontend/package.json b/frontend/package.json index d3b4083..01ae3c3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,6 +9,8 @@ "preview": "vite preview" }, "dependencies": { + "dompurify": "^3.4.3", + "marked": "^18.0.3", "vue": "^3.5.17" }, "devDependencies": { diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 3abc95c..46f5041 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -17,11 +17,13 @@ const autoReadEnabled = ref(true) const settings = ref(null) const isLoadingSettings = ref(false) const currentDebug = ref(null) +const sendNonERPtoaiEnabled = ref(false) const ttsConfig = ref({ enableVoiceChat: false, pollyAvailable: false, usePolly: true, - voiceId: 'Joanna', + voiceId: 'Zayd', + enable_changai: false, }) const activeTtsProvider = ref('off') const cancelPendingChatRequest = ref(null) @@ -43,22 +45,28 @@ function handleTtsProviderEvent(event) { } async function loadSettings() { + console.log('loadSettings called, frappe available:', !!window.frappe?.call) + console.log('loadSettings called') if (isLoadingSettings.value || settings.value) return isLoadingSettings.value = true try { settings.value = await getSettingsDetails(responseMode.value) + console.log('Full settings:', settings.value) // 👈 add this + console.log('enable_changai raw value:', settings.value?.enable_changai) // 👈 add this ttsConfig.value = { enableVoiceChat: Boolean(settings.value?.enable_voice_chat), pollyAvailable: Boolean(settings.value?.polly_enabled), usePolly: Boolean(settings.value?.polly_enabled) && getPollyPreference(), - voiceId: settings.value?.polly_voice_id || 'Joanna', + voiceId: settings.value?.polly_voice_id || 'Zayd', + enable_changai: Boolean(settings.value?.enable_changai), } updateProviderFromSettings() debugLogs.value.push({ type: 'settings', settings: settings.value }) } catch (err) { const errorText = getErrorText(err) console.error('Settings API Error:', err) + console.error('Settings error detail:', errorText) debugLogs.value.push({ type: 'settings', error: errorText }) } finally { isLoadingSettings.value = false @@ -87,6 +95,9 @@ function togglePollyPreference() { updateProviderFromSettings() } +function sendNonErpToAI() { + sendNonERPtoaiEnabled.value = !sendNonERPtoaiEnabled.value +} async function handleSubmit(message) { if (activeTab.value === 'support') { await handleSupportSubmit(message) @@ -113,7 +124,9 @@ async function handleChatSubmit(message) { let cancelled = false const chatId = getOrCreateChatId() const requestId = `${chatId}_${Date.now()}` - const request = runPipelineCancelable(message,chatId, responseMode.value,requestId) + const sendNonErptoAI = sendNonERPtoaiEnabled.value + console.log('sendNonErptoAI value being sent:', sendNonErptoAI, typeof sendNonErptoAI) + const request = runPipelineCancelable(message,chatId, responseMode.value,requestId,sendNonERPtoaiEnabled.value) const eventName = `debug_${requestId}` let lastStepTime = Date.now() const steps = [] @@ -132,11 +145,8 @@ async function handleChatSubmit(message) { thinkingMsg.text = msg.message thinkingMsg.statusType = 'pipeline' } - - if (msg.done) { +if (msg.done) { thinkingMsg.cancelable = false - thinkingMsg.isStatus = false - thinkingMsg.statusType = null if (msg.error) { thinkingMsg.text = `⚠️ ${msg.message || 'Something failed'}` @@ -146,9 +156,6 @@ async function handleChatSubmit(message) { thinkingMsg.text = msg.data.answer thinkingMsg.isStatus = false thinkingMsg.statusType = null - } else if (msg.message) { - thinkingMsg.text = msg.message - } frappe.realtime.off(eventName) @@ -262,7 +269,7 @@ onBeforeUnmount(() => { diff --git a/frontend/src/components/ChatMessage.vue b/frontend/src/components/ChatMessage.vue index 4f0f7da..60914b0 100644 --- a/frontend/src/components/ChatMessage.vue +++ b/frontend/src/components/ChatMessage.vue @@ -37,7 +37,7 @@
    -

    - {{ message.text }} -

    +
    @@ -110,6 +109,8 @@ import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue' import BotIcon from './BotIcon.vue' import { synthesizeTTS } from '../utils/frappe.js' +import { marked } from 'marked' +import DOMPurify from 'dompurify' const props = defineProps({ message: { @@ -126,7 +127,7 @@ const props = defineProps({ enableVoiceChat: false, pollyAvailable: false, usePolly: true, - voiceId: 'Joanna', + voiceId: 'Zayd', }), }, }) @@ -135,6 +136,8 @@ const isSpeaking = ref(false) const currentAudio = ref(null) const isExpanded = ref(false) const isMuted = ref(false) +let ttsTimer = null + const speechSupported = computed(() => ( typeof window !== 'undefined' && @@ -148,11 +151,21 @@ function emitTtsProvider(provider) { detail: { provider }, })) } - function getSpeakableText(raw) { if (typeof raw !== 'string') return '' - if (!raw.includes('<')) return raw.trim() - + // Strip markdown before anything else + const stripped = raw + .replace(/[\u{1F000}-\u{1FFFF}]/gu, '') // emojis block 1 + .replace(/[\u{2600}-\u{26FF}]/gu, '') // emojis block 2 + .replace(/[\u{2700}-\u{27BF}]/gu, '') + .replace(/\*\*(.*?)\*\*/g, '$1') // **bold** + .replace(/\*(.*?)\*/g, '$1') // *italic* + .replace(/`([^`]+)`/g, '$1') // `code` + .replace(/#{1,6}\s+/g, '') // # headings + .replace(/[-*+]\s+/g, '') // • bullet points + .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1') // [links](url) + .replace(/\s+/g, ' ') + if (!stripped.includes('<')) return stripped.trim() const parser = new DOMParser() const doc = parser.parseFromString(raw, 'text/html') return (doc.body.textContent || '').replace(/\s+/g, ' ').trim() @@ -213,7 +226,7 @@ function speakText(text) { } async function speakTextWithPolly(text) { - const ttsResponse = await synthesizeTTS(text, props.ttsConfig?.voiceId || 'Joanna') + const ttsResponse = await synthesizeTTS(text, props.ttsConfig?.voiceId || 'Zayd') if (!ttsResponse?.ok || !ttsResponse?.audio_base64) { throw new Error(ttsResponse?.error || 'Polly synthesis failed') } @@ -286,6 +299,11 @@ const showMuteButton = computed(() => ( props.ttsConfig?.enableVoiceChat )) +const renderedMessage = computed(() => { + const raw = props.message?.text || '' + return DOMPurify.sanitize(marked.parse(raw)) +}) + watch( () => props.message.text, async (newText, oldText) => { diff --git a/frontend/src/components/ChatbotPopup.vue b/frontend/src/components/ChatbotPopup.vue index 8f1b0c1..fa7cbe3 100644 --- a/frontend/src/components/ChatbotPopup.vue +++ b/frontend/src/components/ChatbotPopup.vue @@ -37,9 +37,11 @@ :ttsConfig="ttsConfig" :settings="settings" :debugEnabled="debugEnabled" + :sendNonERPtoaiEnabled="sendNonERPtoaiEnabled" @toggleAutoRead="$emit('toggleAutoRead')" @togglePollyPreference="$emit('togglePollyPreference')" @toggleDebug="$emit('toggleDebug')" + @toggleSendNonERP="$emit('toggleSendNonERP')" /> @@ -88,6 +90,7 @@ const props = defineProps({ type: Boolean, default: false, }, + sendNonERPtoaiEnabled: { type: Boolean, default: false }, chatHistory: { type: Array, required: true }, debugLogs: { type: Array, required: true }, currentDebug: { type: Object, default: null }, @@ -99,7 +102,7 @@ const props = defineProps({ isAwaitingResponse: { type: Boolean, default: false }, }) -const emit = defineEmits(['close', 'submit', 'cancelResponse', 'update:activeTab', 'toggleAutoRead', 'togglePollyPreference', 'toggleDebug']) +const emit = defineEmits(['close', 'submit', 'cancelResponse', 'update:activeTab', 'toggleAutoRead', 'togglePollyPreference', 'toggleDebug','toggleSendNonERP']) const chatBodyRef = ref(null) const chatFormRef = ref(null) diff --git a/frontend/src/components/SettingsTab.vue b/frontend/src/components/SettingsTab.vue index d4e90ab..363606a 100644 --- a/frontend/src/components/SettingsTab.vue +++ b/frontend/src/components/SettingsTab.vue @@ -81,6 +81,29 @@ +
    +
    +
    +

    Send non-ERP questions directly to AI

    +

    Questions unrelated to your ERP will skip the system and go straight to AI

    +
    + +
    +

    + {{ sendNonERPtoaiEnabled ? 'Non-ERP questions are now routed directly to AI' : 'Direct AI routing is currently off' }} +

    +
    @@ -104,9 +127,13 @@ const props = defineProps({ type: Boolean, default: false, }, +sendNonERPtoaiEnabled: { + type: Boolean, + default: false, +} }) -defineEmits(['toggleAutoRead', 'togglePollyPreference', 'toggleDebug']) +defineEmits(['toggleAutoRead', 'togglePollyPreference', 'toggleDebug','toggleSendNonERP']) const pollyAvailabilityLabel = computed(() => { if (!props.ttsConfig?.enableVoiceChat) return 'Voice disabled on server' diff --git a/frontend/src/tailwind.css b/frontend/src/tailwind.css index 5d3b11e..818a751 100644 --- a/frontend/src/tailwind.css +++ b/frontend/src/tailwind.css @@ -20,10 +20,14 @@ } @keyframes dot-wave { - 0%, 60%, 100% { + + 0%, + 60%, + 100% { transform: translateY(0); opacity: 0.35; } + 30% { transform: translateY(-5px); opacity: 1; @@ -35,6 +39,7 @@ transform: rotate(0deg); opacity: 0.65; } + 100% { transform: rotate(360deg); opacity: 1; @@ -42,11 +47,13 @@ } @keyframes gemini-spark { + 0%, 100% { transform: scale(0.78); opacity: 0.72; } + 50% { transform: scale(1.04); opacity: 1; @@ -54,11 +61,13 @@ } @keyframes think-pulse { + 0%, 100% { transform: scale(0.72); opacity: 0.35; } + 45% { transform: scale(1.08); opacity: 1; @@ -69,6 +78,7 @@ 0% { background-position: 0% 50%; } + 100% { background-position: 200% 50%; } @@ -79,12 +89,15 @@ transform: translate(-130%, -50%); opacity: 0; } + 20% { opacity: 0.8; } + 80% { opacity: 0.8; } + 100% { transform: translate(460%, -50%); opacity: 0; @@ -92,10 +105,12 @@ } @keyframes soft-float { + 0%, 100% { transform: translateY(0); } + 50% { transform: translateY(-4px); } @@ -106,6 +121,7 @@ opacity: 0; transform: translateY(10px) scale(0.98); } + to { opacity: 1; transform: translateY(0) scale(1); @@ -117,6 +133,7 @@ opacity: 0; transform: translateY(8px); } + to { opacity: 1; transform: translateY(0); @@ -124,11 +141,13 @@ } @keyframes stop-button-pulse { + 0%, 100% { transform: scale(0.94); opacity: 0.92; } + 50% { transform: scale(1); opacity: 1; @@ -136,6 +155,7 @@ } @layer base { + #changai-chatbot-root, #changai-chatbot-root * { box-sizing: border-box; @@ -160,6 +180,46 @@ background-clip: padding-box; } + #changai-chatbot-root .chat-card strong { + font-weight: 700; + } + + #changai-chatbot-root .chat-card em { + font-style: italic; + } + + #changai-chatbot-root .chat-card p { + margin-bottom: 0.4rem; + } + + #changai-chatbot-root .chat-card p:last-child { + margin-bottom: 0; + } + + #changai-chatbot-root .chat-card ul { + list-style: disc; + padding-inline-start: 1.25rem; + margin-bottom: 0.4rem; + } + + #changai-chatbot-root .chat-card ol { + list-style: decimal; + padding-inline-start: 1.25rem; + margin-bottom: 0.4rem; + } + + #changai-chatbot-root .chat-card li { + margin-bottom: 0.15rem; + } + + #changai-chatbot-root .chat-card code { + font-family: monospace; + font-size: 0.8em; + background: rgba(109, 79, 194, 0.08); + padding: 0.1em 0.35em; + border-radius: 4px; + } + #changai-chatbot-root button.rounded-full, #changai-chatbot-root form.rounded-full { border-radius: 9999px; @@ -212,6 +272,7 @@ } @media (prefers-reduced-motion: reduce) { + #changai-chatbot-root *, #changai-chatbot-root *::before, #changai-chatbot-root *::after { @@ -221,4 +282,4 @@ scroll-behavior: auto !important; } } -} +} \ No newline at end of file diff --git a/frontend/src/utils/frappe.js b/frontend/src/utils/frappe.js index 40585aa..1fd57fd 100644 --- a/frontend/src/utils/frappe.js +++ b/frontend/src/utils/frappe.js @@ -33,14 +33,15 @@ export function frappeCall(method, args = {}, mode = 'actual') { }) } -export function runPipeline(userQuestion, chatId, mode = 'actual', requestId = null) { +export function runPipeline(userQuestion, chatId, mode = 'actual', requestId = null, sendNonErptoAI) { return frappeCall(API.PIPELINE, { user_question: userQuestion, chat_id: chatId, request_id: requestId, + sendNonErptoAI: sendNonErptoAI, }, mode) } -export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', requestId = null) { +export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', requestId = null, sendNonErptoAI) { if (mode === 'test') { return { promise: Promise.resolve({ @@ -48,6 +49,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req user_question: userQuestion, chat_id: chatId, request_id: requestId, + sendNonErptoAI: sendNonErptoAI, })}` }), cancel: () => false, @@ -71,6 +73,7 @@ export function runPipelineCancelable(userQuestion, chatId, mode = 'actual', req user_question: userQuestion, chat_id: chatId, request_id: requestId, + sendNonErptoAI: sendNonErptoAI, }, callback(r) { settled = true @@ -102,7 +105,7 @@ export function getSettingsDetails(mode = 'actual') { return frappeCall(API.SETTINGS, {}, mode) } -export function synthesizeTTS(text, voiceId = 'Joanna', mode = 'actual') { +export function synthesizeTTS(text, voiceId = 'Zayd', mode = 'actual') { return frappeCall(API.TTS, { text, voice_id: voiceId,