"
"Check this Quick Start Guide for more detail: "
"Click here"
- ).format(CHANGAI_GUIDE_LINK),
+ "ERPGulf.com."
+
+ ).format(CHANGAI_GUIDE_LINK,settingsUrl,ERPGULF_LINK),
title=_("Embedding Model Required")
)
@@ -781,20 +773,24 @@ def _get_gemini_vertex_config(config):
def _throw_missing_vertex_field(project_id: str, location: str, credentials_json: str) -> None:
if not project_id:
frappe.throw(
- _("Gemini Project ID is missing.
Please go to ChangAI Settings and enter your Gemini Project ID. "
- "Check Quick Start Guide 👇: Click here").format(CHANGAI_GUIDE_LINK),
+ _("Gemini Project ID is missing.
Please Go to Settings Page and enter your Gemini Project ID. "
+ "Check Quick Start Guide 👇: Click here "
+ "ERPGulf.com.").format(CHANGAI_GUIDE_LINK,settingsUrl,ERPGULF_LINK),
title=_("Missing Gemini Project ID"),
)
if not location:
frappe.throw(
- _("Gemini Location is missing.
Please go to ChangAI Settings and enter your Gemini Location. "
- "Check Quick Start Guide 👇: Click here").format(CHANGAI_GUIDE_LINK),
+ _("Gemini Location is missing.
Please Go to Settings Page and enter your Gemini Location. "
+ "Check Quick Start Guide 👇: Click here "
+ "ERPGulf.com.").format(CHANGAI_GUIDE_LINK,settingsUrl,ERPGULF_LINK),
title=_("Missing Gemini Location"),
)
if not credentials_json:
frappe.throw(
- _("Service Account Credentials are missing.
Please go to ChangAI Settings and enter your Service Account Credential. "
- "Check Quick Start Guide 👇: Click here").format(CHANGAI_GUIDE_LINK),
+ _("Service Account Credentials are missing.
Please Go to Settings Page and enter your Service Account Credential. "
+ "Check Quick Start Guide 👇: Click here"
+ "ERPGulf.com."
+).format(CHANGAI_GUIDE_LINK,settingsUrl,ERPGULF_LINK),
title=_("Missing Service Account Credentials"),
)
@@ -832,9 +828,12 @@ def _get_api_key_client(config):
"Google AI Studio.
"
"Option 2 (Vertex AI / Service Account): "
"Fill in Gemini Project ID, Gemini Location, "
- "and Service Account Credentials in ChangAI Settings. "
- "ChangAI Quick Start Guide 👇: Click here"
- ).format(CHANGAI_GUIDE_LINK),
+ "and Service Account Credentials in Got to Settings Page. "
+ "ChangAI Quick Start Guide 👇: "
+ "Click here "
+ "ERPGulf.com."
+
+ ).format(CHANGAI_GUIDE_LINK,settingsUrl,ERPGULF_LINK),
title=_("Gemini Authentication Not Configured"),
)
@@ -870,37 +869,47 @@ def _handle_gemini_api_exception(e: Exception) -> None:
if isinstance(e, google_exceptions.ResourceExhausted):
frappe.throw(
_("Gemini API quota exceeded.
Please wait and try again or upgrade your plan. Check Quick Start Guide 👇: "
- "Click here").format(CHANGAI_GUIDE_LINK),
+ "Click here "
+ "ERPGulf.com."
+).format(CHANGAI_GUIDE_LINK,ERPGULF_LINK),
+
title=_("Gemini Quota Exceeded"),
)
if isinstance(e, google_exceptions.Unauthenticated):
frappe.throw(
_("Gemini API key is invalid.
Please go to ChangAI Settings and enter a valid Gemini API Key. "
- "Check ChangAI Quick Start Guide 👇: Click here").format(CHANGAI_GUIDE_LINK),
+ "Check ChangAI Quick Start Guide 👇: Click here "
+ "ERPGulf.com."
+).format(CHANGAI_GUIDE_LINK,ERPGULF_LINK),
title=_("Invalid Gemini API Key"),
)
if isinstance(e, google_exceptions.PermissionDenied):
frappe.throw(
_("Gemini API permission denied.
"
@@ -1742,22 +1703,53 @@ def get_master_vs():
return _VS_MASTER
-def local_entity_embedder(q: str) -> List[Dict[str, Any]]:
- hits = get_master_vs().similarity_search(q, k=15)
+import re
+
+def append_entity_field_to_schema(top_fields: str, table_name: str, field_name: str) -> str:
+ """
+ Append field_name to the FIELDS section of table_name if missing.
+ Example: append customer_name into TABLE: tabCustomer block.
+ """
+
+ pattern = rf"(TABLE:\s*{re.escape(table_name)}\n.*?FIELDS:\n)(.*?)(?=\n\nTABLE:|\Z)"
+
+ def replace_block(match):
+ header = match.group(1)
+ fields_block = match.group(2)
+
+ # already exists
+ if re.search(rf"^- {re.escape(field_name)}(\s|$)", fields_block, re.MULTILINE):
+ return match.group(0)
+
+ return header + fields_block.rstrip() + f"\n- {field_name}\n"
+
+ return re.sub(pattern, replace_block, top_fields, count=1, flags=re.DOTALL)
+
+
+def local_entity_embedder(q: str,state: SQLState = None) -> List[Dict[str, Any]]:
+ hits = get_master_vs().similarity_search(q, k=20)
out, seen = [], set()
for h in hits:
- entity_type = h.metadata.get("entity_type")
- entity_id = h.metadata.get("entity_id")
- key = (entity_type, entity_id)
- if entity_type and key not in seen:
+ entity_type = h.metadata.get("entity_type") # example: tabCustomer
+ entity_id = h.metadata.get("entity_id") # example: customer_name
+ entity_label = h.metadata.get("entity_label")
+ # if entity_type in state["selected_tables"]:
+ # state["selected_fields"] = append_entity_field_to_schema(
+ # top_fields=state["selected_fields"],
+ # table_name=entity_type,
+ # field_name=entity_id
+ # )
+
+ key = (entity_type, entity_label)
+ if key not in seen:
seen.add(key)
- out.append({"entity_type": entity_type, "entity_id": entity_id})
+ out.append({"entity_type": entity_type, "entity_id": entity_id, "entity_label": entity_label})
return out
-def call_entity_retriever(qstn: str) -> Dict[str, Any]:
+
+def call_entity_retriever(qstn: str,state: SQLState) -> Dict[str, Any]:
config = ChangAIConfig.get()
if config["REMOTE"] and config["llm"] == "QWEN3":
-
response = remote_entity_embedder(qstn)
if not response.get("ok"):
@@ -1772,8 +1764,12 @@ def call_entity_retriever(qstn: str) -> Dict[str, Any]:
return {"raw": body, "cards": cards}
else:
- results = local_entity_embedder(qstn)
- cards = [f"{r['entity_type']}:{r['entity_id']}" for r in results if r.get("entity_type")]
+ results = local_entity_embedder(qstn,state)
+ cards = [
+ r.get("entity_label")
+ for r in results
+ if r.get("entity_label")
+ ]
return {"raw": results, "cards": cards}
@@ -1831,11 +1827,11 @@ def detect_specific_entities(state: SQLState) -> SQLState:
frappe.throw(_(
"Master Data does not exist. Because of this, results may not be accurate. "
"For better accuracy, please open "
- "ChangAI Settings "
+ "Go to Settings Page "
"and click on the Update Master Data button in the Training tab.
"
"Check Quick Start Guide Here 👇: "
"Click here "
- "ERPGulf.com"
+ "ERPGulf.com"
).format(settingsUrl, CHANGAI_GUIDE_LINK, ERPGULF_LINK))
if not res.get("update_status") and res.get("days", 0) > 0:
@@ -1843,14 +1839,14 @@ def detect_specific_entities(state: SQLState) -> SQLState:
"Your master data is {0} days old. "
"Because of this, results may not be accurate. "
"For better accuracy, please open "
- "ChangAI Settings "
+ "Go to Settings Page "
"and click on the Update Master Data button in the Training tab.
"
"Check Quick Start Guide Here 👇: "
"Click here "
"ERPGulf.com"
).format(res.get("days"), settingsUrl, CHANGAI_GUIDE_LINK, ERPGULF_LINK))
- out = call_entity_retriever(q)
+ out = call_entity_retriever(q,state)
return {
**state,
"entity_cards": out.get("cards") or [],
@@ -2056,6 +2052,10 @@ def routeNonErpToAI(state: SQLState):
try:
res = call_gemini(question,sys_prompt)
return {**state, "non_erp_res": res}
+ # except ValidationError as ve:
+ # return {**state,"error":str(ve)}
+ except frappe.exceptions.ValidationError:
+ raise
except Exception as e:
return {**state, "non_erp_res": "Model Calling Failed .Please try Again","error":str(e)}
@@ -2196,7 +2196,6 @@ def to_json_if_needed(v: Any) -> Any:
return doc.name
-@frappe.whitelist(allow_guest=False)
def format_data_conversationally(user_data: Any) -> str:
return render_template(
CONVERSATION_TEMPLATE, # nosemgrep: frappe-semgrep-rules.rules.security.frappe-ssti
@@ -2205,7 +2204,6 @@ def format_data_conversationally(user_data: Any) -> str:
)
-@frappe.whitelist(allow_guest=False)
def format_data(qstn: str, sql_data: Any) -> Dict[str, str]:
if isinstance(sql_data, (dict, list)):
db_result_json = json.dumps(sql_data, ensure_ascii=False, default=str)
@@ -2574,13 +2572,12 @@ def hits_to_schema_context(
return "\n".join(lines)
-@frappe.whitelist(allow_guest=False)
-def debug_entity_retriever(q: str):
+def debug_entity_retriever(q: str,state: SQLState):
resp = remote_entity_embedder(q) # this returns {"ok":..., "body":...}
return {
"query": q,
"raw_response": resp,
- "parsed_entity_cards": call_entity_retriever(q),
+ "parsed_entity_cards": call_entity_retriever(q,state)
}
@@ -2633,14 +2630,14 @@ 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 the same Question again."
+ # if err:
+ # frappe.log_error(err, "ChangAI SQL Pipeline Error")
+ # return "⚠️ The model encountered an error generating your query. Please try the same Question again."
error_text = (val.get("error") or "").strip()
if not error_text:
- return "⚠️ Could not process your request. Please try rephrasing."
+ return "⚠️ Could nprocess your request. Please try rephrasing."
if "Empty SQL from LLM" in error_text:
return "⚠️ The model could not generate a SQL query for your question. Please try rephrasing."
@@ -2768,7 +2765,7 @@ def get_last_thread_message(chat_id: str):
THREAD_WORDS = [
# English confirmation
- "yes", "yep", "yeah", "yup", "yes please",
+ "yes", "yep", "yeah", "yup", "yes please","list",
"of course", "sure", "surely", "absolutely",
"definitely", "certainly", "indeed", "correct", "ofcourse",
"right", "exactly", "precisely",
@@ -2776,14 +2773,14 @@ def get_last_thread_message(chat_id: str):
"do it", "show me", "please", "go on",
"continue", "proceed", "why not",
"aye", "affirmative", "true", "agreed",
- "hmm", "hm", "umm", "uh", "ah",
+ "hmm", "hm", "umm", "uh", "ah","give",
"interesting", "i see", "got it", "ok got it",
"and", "so", "then", "also", "but",
"what", "how", "when", "who", "where", "why",
"more", "less", "again", "another", "other",
"next", "previous", "back", "forward",
"noted", "understood", "makes sense",
- "okay okay", "fine fine", "sure sure",
+ "okay okay", "fine fine", "sure sure","show",
# Arabic confirmation
"نعم", "أجل", "بالتأكيد", "طبعاً", "حسناً",
"موافق", "صحيح", "بالضبط", "تماماً", "إي",
@@ -2799,10 +2796,9 @@ def get_last_thread_message(chat_id: str):
"اتركه", "مش محتاج", "مو صح", "خطأ",
]
-@frappe.whitelist(allow_guest=False)
def is_thread_erp(q:str,chat_id:str):
msg_type = get_last_thread_message(chat_id)
- if msg_type == "erp" and is_erp_query(q, THREAD_WORDS,85):
+ if msg_type == "erp" and is_erp_query(False,q, THREAD_WORDS,85):
return True
else:
return False
@@ -2830,18 +2826,19 @@ def run_text2sql_pipeline(user_question: str, chat_id: str, request_id: str, sen
selected_tables = final.get("selected_tables") or []
fields = _safe_strip(final.get("selected_fields") or "")
sql_prompt = _safe_strip(final.get("sql_prompt") or "")
+ final_prompt = final.get("final_prompt") or ""
try:
context = final.get("context")
except Exception as e:
frappe.log_error(e, "Error occurred while fetching final values")
err = final.get("error")
- # guard empty sql
- # if not sql:
- # return _error_response(memory_status, user_question, formatted_q, context,
- # selected_tables, fields, sql,
- # {"ok": False, "error": "SQL is empty"},
- # entity_debug, 0, "SQL not valid or missing", err)
+ # # # guard empty sql
+ # # # if not sql:
+ # # # return _error_response(memory_status, user_question, formatted_q, context,
+ # # # selected_tables, fields, sql,
+ # # # {"ok": False, "error": "SQL is empty"},
+ # # # entity_debug, 0, "SQL not valid or missing", err)
# retried_sql1, retried_orm1, retry1_val_res = retry_sql(retried_sql, retry_val_res.get("error"), formatted_q, sql_prompt)
# if retry1_val_res.get("ok"):
# return _handle_sql_result(memory_status, sql_prompt, final, retried_sql1, retried_orm1,
@@ -2897,16 +2894,6 @@ def _error_response(memory_status, user_question, formatted_q, context,
}
-# @frappe.whitelist(allow_guest=False)
-# def test(user_qstn, session_id):
-# prompt = inject_prompt(user_qstn, session_id)
-
-# try:
-# raw = call_model(prompt, "llm")
-# standalone, contains_values = _parse_rewrite_response(raw, user_qstn)
-# return standalone, contains_values
-# except Exception as e:
-# print(f"Error during model call: {e}")
_WARMUP_COUNT=0
def load_on_startup():
global _WARMUP_COUNT,_EMBEDDER_INSTANCE, _VS_TABLE, _FULL_FIELDS_VS, _VS_MASTER, _FIELD_DOCS_CACHE, sym_spell, _GEMINI_CLIENT
@@ -2966,16 +2953,6 @@ def _init_keywords():
_word_is_erp(kw) # result gets cached — first real request is instant
-@frappe.whitelist(allow_guest=False)
-def test():
- test_docs=["Customer","Employee","Item","Sales Order"]
- result = []
- for doc in test_docs:
- meta = frappe.get_meta(doc)
- title_field = meta.title_field
- result.append((doc, title_field))
- return result
-
def get_embedding_engine_test():
global _EMBEDDER_INSTANCE
diff --git a/changai/changai/doctype/changai_settings/changai_settings.js b/changai/changai/doctype/changai_settings/changai_settings.js
index ccaf584..e27147e 100644
--- a/changai/changai/doctype/changai_settings/changai_settings.js
+++ b/changai/changai/doctype/changai_settings/changai_settings.js
@@ -159,8 +159,13 @@ frappe.ui.form.on("ChangAI Settings", {
fieldname: "tts_provider",
text: "Choose the Text-to-Speech provider. Use Polly for high-quality AI voices with AWS Polly credentials; otherwise browser speech is used automatically"
,
+ },
+ {
+ fieldname: "module_and_description",
+ text: "Add modules with their descriptions, select them from the table, then click Create Train Data to generate the training dataset.",
}
+
];
applyTooltips(frm, fieldsWithTooltips);
frm.add_custom_button(__('Download Embedding Model'), () => {
diff --git a/changai/changai/doctype/changai_settings/changai_settings.json b/changai/changai/doctype/changai_settings/changai_settings.json
index 17cdfa1..df9b4a7 100644
--- a/changai/changai/doctype/changai_settings/changai_settings.json
+++ b/changai/changai/doctype/changai_settings/changai_settings.json
@@ -10,6 +10,8 @@
"remote",
"from_language",
"to_language",
+ "gemini_authentication_free_tier_section",
+ "gemini_api_key",
"models_section",
"embedder",
"qwen3_4b_instruct",
@@ -21,8 +23,6 @@
"gemini_location",
"gemini_project_id",
"gemini_json_content",
- "gemini_authentication_free_tier_section",
- "gemini_api_key",
"section_break_gnue",
"retain_memory",
"last_schema_sync",
@@ -392,7 +392,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
- "modified": "2026-05-18 07:06:57.303210",
+ "modified": "2026-05-21 16:38:55.838611",
"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 05c369d..c21a877 100644
--- a/changai/changai/prompts/sql_rewrite_sys_prompt.txt
+++ b/changai/changai/prompts/sql_rewrite_sys_prompt.txt
@@ -3,7 +3,10 @@ Return ONLY valid JSON:
{{"standalone_question":"...","contains_values":true/false}}
TASK 1 — FOLLOW-UP
-- If the query depends on previous messages, rewrite it as a complete standalone question.
+- Analyze the last user message and last AI reply together.
+- If the last AI reply ended with a question and the user message is a reply to it,
+ rewrite using the AI’s last question intent.
+- If the query depends on chat history, rewrite it as a complete standalone question by analysing the chat history .
- Otherwise keep it unchanged.
TASK 2 — ENTITY DETECTION
diff --git a/changai/changai/prompts/sql_system_prompt.txt b/changai/changai/prompts/sql_system_prompt.txt
index 3f749dc..012f39f 100644
--- a/changai/changai/prompts/sql_system_prompt.txt
+++ b/changai/changai/prompts/sql_system_prompt.txt
@@ -30,11 +30,20 @@ For every table in your SQL, answer internally:
NO → remove it immediately. No exceptions.
═══ ENTITY FILTERING ═══
-- 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.
+- If ENTITY_CARDS exist, use ONLY those exact entity values in enity card (no spelling/case changes).
+- NEVER EVER use entity string literals dirently in writing SQL from the user question directly.
+- Match user-mentioned names to the closest ENTITY_CARD using typos/phonetic matching/fuzzy/semantic matching, abbreviations, and partial names.
- Always use the exact entity card value in SQL and ORM.
+ ENTITY CARD FILTERING RULE:
+ If the user mentions an entity that is the same as, similar to, or a partial match of any provided entity card, you MUST use that entity card's exact filter_field and filter_value in the SQL WHERE clause.
+ Do NOT use the raw user text for filtering.
+ Do NOT default to the `name` field unless the entity card filter_field is `name`.
+- Consider very bad typos, pronunciation similarity, sound-alike names, abbreviations, and partial matches,phonetic matching when matching user enteity text with entity cards.
+ important - always use the filter field given in entity cards for filtering with that enitity value
+CRITICAL ENTITY FILTER OVERRIDE RULE:
+If a matching ENTITY_CARD is found for a user-mentioned entity, the SQL WHERE clause MUST use ONLY:
+- the ENTITY_CARD filter_field
+- the ENTITY_CARD filter_value
═══ DOCSTATUS LAW ═══
- docstatus ONLY exists on submittable transaction doctypes:
diff --git a/changai/changai/prompts/sql_user_prompt.txt b/changai/changai/prompts/sql_user_prompt.txt
index 57c7310..6ba79c9 100644
--- a/changai/changai/prompts/sql_user_prompt.txt
+++ b/changai/changai/prompts/sql_user_prompt.txt
@@ -1,5 +1,10 @@
USER QUESTION: {question}
You are FORBIDDEN from using any table or field that is not explicitly listed in the SCHEMA CONTEXT. No exceptions.
+ENTITY_CARDS provide the exact field and value to use in SQL filtering.
+When ENTITY_CARDS are provided, they may contain values in the format:
+field_name:field_value
+When generating SQL for entity retrieval, you MUST use the exact field name and exact field value provided in the ENTITY_CARDS context for WHERE conditions.
+Do not use the raw user text or replace the field name with another field like `name`.
SCHEMA CONTEXT: {context}
GENERIC FIELDS (available on ALL transaction doctypes):
name, creation, modified, owner, company, docstatus, naming_series, amended_from
diff --git a/changai/changai/replicate_model_files/changai_retriever/.cog/tmp/build20251119113343.789672/requirements.txt b/changai/changai/replicate_model_files/changai_retriever/.cog/tmp/build20251119113343.789672/requirements.txt
index 07f72be..00ccb89 100644
--- a/changai/changai/replicate_model_files/changai_retriever/.cog/tmp/build20251119113343.789672/requirements.txt
+++ b/changai/changai/replicate_model_files/changai_retriever/.cog/tmp/build20251119113343.789672/requirements.txt
@@ -1,5 +1,5 @@
--extra-index-url https://download.pytorch.org/whl/cpu
-torch==2.3.1
+torch>=2.8.0
faiss-cpu==1.8.0
numpy==1.26.4
sentence-transformers>=2.6.0
diff --git a/changai/changai/replicate_model_files/entity_retriever/.cog/tmp/build20251221171616.080360/requirements.txt b/changai/changai/replicate_model_files/entity_retriever/.cog/tmp/build20251221171616.080360/requirements.txt
index 07f72be..00ccb89 100644
--- a/changai/changai/replicate_model_files/entity_retriever/.cog/tmp/build20251221171616.080360/requirements.txt
+++ b/changai/changai/replicate_model_files/entity_retriever/.cog/tmp/build20251221171616.080360/requirements.txt
@@ -1,5 +1,5 @@
--extra-index-url https://download.pytorch.org/whl/cpu
-torch==2.3.1
+torch>=2.8.0
faiss-cpu==1.8.0
numpy==1.26.4
sentence-transformers>=2.6.0
diff --git a/changai/public/dist/changai-chatbot.js b/changai/public/dist/changai-chatbot.js
index d392363..ab89094 100644
--- a/changai/public/dist/changai-chatbot.js
+++ b/changai/public/dist/changai-chatbot.js
@@ -1,7 +1,7 @@
-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 Ns;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),Bs=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]",Hs=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)),zs=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})},js=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 Vs(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[qs(s,i)+" =>"]=r,n),{})}:ti(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>qs(n))}:zt(t)?qs(t):Ae(t)&&!X(t)&&!ri(t)?String(t):t,qs=(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),Zs(s),Yl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ys(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||!Ys(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 Zs(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)Zs(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 Xs{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){Gs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ks()}}}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 Qs=new WeakMap,en=Symbol(""),Js=Symbol(""),Ln=Symbol("");function Ue(e,t,n){if(gt&&_e){let s=Qs.get(e);s||Qs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Xs),r.map=s,r.key=n),r.track()}}function Lt(e,t,n,s,r,i){const o=Qs.get(e);if(!o){Mn++;return}const a=l=>{l&&l.trigger()};if(Gs(),t==="clear")o.forEach(a);else{const l=X(e),c=l&&Hs(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(Js)));break;case"delete":l||(a(o.get(en)),pn(e)&&a(o.get(Js)));break;case"set":pn(e)&&a(o.get(en));break}}Ks()}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 er(this,Symbol.iterator,Fe)},concat(...e){return hn(this).concat(...e.map(t=>X(t)?hn(t):t))},entries(){return er(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 tr(this,"includes",e)},indexOf(...e){return tr(this,"indexOf",e)},join(e){return hn(this).join(e)},lastIndexOf(...e){return tr(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 er(this,"values",Fe)}};function er(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 tr(e,t,n){const s=oe(e);Ue(s,"iterate",Ln);const r=s[t](...n);return(r===-1||r===!1)&&sr(n[0])?(n[0]=oe(n[0]),s[t](...n)):r}function On(e,t,n=[]){It(),Gs();const s=oe(e)[t].apply(e,n);return Ks(),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:Ti).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&&Hs(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)&&Hs(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?nr:t?fs:Fe;return!t&&Ue(i,"iterate",l?Js: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?nr: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?nr: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)},Ti=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,Ti)}function pa(e){return cs(e,!1,sa,aa,Si)}function Ri(e){return cs(e,!0,na,ua,Ei)}function Tp(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 sr(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)&&Us(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 Xs,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 Xs(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 rr=!1;function Sp(e,...t){if(rr)return;rr=!0,It();const n=$n.length?$n[$n.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=ka();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(`
+var vp=Object.defineProperty;var _p=(Pt,se,pt)=>se in Pt?vp(Pt,se,{enumerable:!0,configurable:!0,writable:!0,value:pt}):Pt[se]=pt;var we=(Pt,se,pt)=>_p(Pt,typeof se!="symbol"?se+"":se,pt);(function(){"use strict";var Ns;function Pt(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const se={},pt=[],Qt=()=>{},Dl=()=>!1,es=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bs=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,ge=(e,t)=>Nl.call(e,t),Q=Array.isArray,pn=e=>ts(e)==="[object Map]",ti=e=>ts(e)==="[object Set]",be=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)||be(e))&&be(e.then)&&be(e.catch),si=Object.prototype.toString,ts=e=>si.call(e),Fl=e=>ts(e).slice(8,-1),ri=e=>ts(e)==="[object Object]",Hs=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)),zs=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})},js=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 Vs(e){if(Q(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(Q(e))for(let n=0;n!!(e&&e.__v_isRef===!0),Qe=e=>Ce(e)?e:e==null?"":Q(e)||Ae(e)&&(e.toString===si||!be(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[qs(s,i)+" =>"]=r,n),{})}:ti(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>qs(n))}:zt(t)?qs(t):Ae(t)&&!Q(t)&&!ri(t)?String(t):t,qs=(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),Zs(s),Yl(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function Ys(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||!Ys(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 Zs(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)Zs(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 Xs{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){Gs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ks()}}}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 Qs=new WeakMap,en=Symbol(""),Js=Symbol(""),Ln=Symbol("");function Ue(e,t,n){if(gt&&_e){let s=Qs.get(e);s||Qs.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Xs),r.map=s,r.key=n),r.track()}}function Lt(e,t,n,s,r,i){const o=Qs.get(e);if(!o){Mn++;return}const a=l=>{l&&l.trigger()};if(Gs(),t==="clear")o.forEach(a);else{const l=Q(e),c=l&&Hs(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(Js)));break;case"delete":l||(a(o.get(en)),pn(e)&&a(o.get(Js)));break;case"set":pn(e)&&a(o.get(en));break}}Ks()}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 er(this,Symbol.iterator,Fe)},concat(...e){return hn(this).concat(...e.map(t=>Q(t)?hn(t):t))},entries(){return er(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 tr(this,"includes",e)},indexOf(...e){return tr(this,"indexOf",e)},join(e){return hn(this).join(e)},lastIndexOf(...e){return tr(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 er(this,"values",Fe)}};function er(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 tr(e,t,n){const s=oe(e);Ue(s,"iterate",Ln);const r=s[t](...n);return(r===-1||r===!1)&&sr(n[0])?(n[0]=oe(n[0]),s[t](...n)):r}function On(e,t,n=[]){It(),Gs();const s=oe(e)[t].apply(e,n);return Ks(),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:Ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=Q(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&&Hs(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)),!Q(t)&&je(i)&&!je(s))return l?!1:(i.value=s,!0)}const o=Q(t)&&Hs(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?nr:t?fs:Fe;return!t&&Ue(i,"iterate",l?Js: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?nr: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?nr: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(ge(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)},Ti=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,Ti)}function pa(e){return cs(e,!1,sa,aa,Si)}function Ri(e){return cs(e,!0,na,ua,Ei)}function Tp(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 sr(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!ge(e,"__v_skip")&&Object.isExtensible(e)&&Us(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 J(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 Xs,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 Xs(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 be(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=se){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):Q(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(be(O))return l?l(O,2):O()})):be(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,z=r===!0?1/0:r;p=()=>$t(O(),z)}const A=Kl(),T=()=>{u.stop(),A&&A.active&&ei(A.effects,u)};if(i&&t){const O=t;t=(...z)=>{O(...z),T()}}let W=m?new Array(e.length).fill(ds):ds;const K=O=>{if(!(!(u.flags&1)||!u.dirty&&!O))if(t){const z=u.run();if(r||E||(m?z.some((P,I)=>jt(P,W[I])):jt(z,W))){g&&g();const P=tn;tn=u;try{const I=[z,W===ds?void 0:m&&W[0]===ds?[]:W,w];W=z,l?l(t,3,I):t(...I)}finally{tn=P}}}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 z of O)z();ps.delete(u)}},t?s?K(!0):W=u.run():o?o(K.bind(null,!0),!0):u.run(),T.pause=u.pause.bind(u),T.resume=u.resume.bind(u),T.stop=T,T}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(Q(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 rr=!1;function Sp(e,...t){if(rr)return;rr=!0,It();const n=$n.length?$n[$n.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=ka();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(`
`,...Ta(r))}Mt(),rr=!1}function ka(){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 Ta(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=kt+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(kt=0;kt{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=Es(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 lr(i);const l=ji(i);if(!l)return lr(i);let c=or(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=or(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},lr(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 or(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=or(W,t,n,s,r);return r&&r(ne),ne}};return te}function lr(e){if(ar(e))return e=Gt(e),e.children=null,e}function ji(e){if(!ar(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?Es(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,ar=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;u
${e}
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`${n}>
`}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='"+s+"",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=`",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Rt(e.text)}},Or=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},bt=class Jr{constructor(t){we(this,"options");we(this,"renderer");we(this,"textRenderer");this.options=t||un,this.options.renderer=this.options.renderer||new Os,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Or}static parse(t,n){return new Jr(n).parse(t)}static parseInline(t,n){return new Jr(n).parseInline(t)}parse(t){var s,r;this.renderer.parser=this;let n="";for(let i=0;i{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 Os(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 Ls(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="