agent-tool-chat 1.2.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,55 +1,65 @@
1
- "use strict";var Si=Object.defineProperty;var Ni=(e,t,n)=>t in e?Si(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var L=(e,t,n)=>Ni(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("vue"),Xe=require("element-plus");function Ri(e){let t="";return typeof e.content=="string"?t=e.content:e.content!=null&&(t=JSON.stringify(e.content)),e.tool_calls&&(t+=JSON.stringify(e.tool_calls)),e.name&&(t+=e.name),Math.ceil(t.length/2)||1}function Ti(e,t){const n=e.length;if(n===0)return e;let i=0,o=n-1;for(let s=n-1;s>=0;s--)if(i+=Ri(e[s]),o=s,i>t){o=Math.min(s+1,n-1);break}return o>0&&e[o].role==="tool"&&(o-=1),e.slice(o)}class ir{constructor(t){L(this,"messages",[]);L(this,"config");L(this,"listeners",new Set);L(this,"abortController",null);L(this,"_loading",!1);this.config={...t,maxToolRounds:t.maxToolRounds??6}}get loading(){return this._loading}updateProviderConfig(t){this.config.providerConfig={...this.config.providerConfig,...t}}initialize(t){this.messages.length=0,this.messages.push(...t)}clear(){var t;this.stop(),this.messages.length=0,(t=this.config.storage)==null||t.save([])}on(t){return this.listeners.add(t),()=>this.listeners.delete(t)}emit(t){this.listeners.forEach(n=>n(t))}async sendMessage(t){var o;const n=t.trim();if(!n||this._loading)return;this._loading=!0,this.abortController=new AbortController,this.emit({type:"status",loading:!0});const i={role:"user",content:n};this.messages.push(i),this.emit({type:"message",message:i});try{let s=0;const l=this.config.maxToolRounds;for(;s<l;){s++;const A={role:"assistant",content:""};this.messages.push(A),this.emit({type:"message",message:A});const a=this.buildApiMessages(),u=await this.config.provider.streamChat({config:this.config.providerConfig,messages:a,tools:this.config.tools.getDefinitions(),signal:this.abortController.signal,onContent:h=>{A.content+=h,this.emit({type:"stream:delta",delta:{content:h}})},onReasoning:h=>{this.emit({type:"stream:delta",delta:{reasoning:h}})}});if(A.content=u.content,this.emit({type:"stream:end",content:u.content,reasoning:u.reasoning}),u.tool_calls.length>0){A.tool_calls=u.tool_calls;for(const h of u.tool_calls){this.emit({type:"tool:start",call:h});const f=await this.config.tools.execute(h.function.name,h.function.arguments);this.emit({type:"tool:end",call:h,output:f}),this.messages.push({role:"tool",tool_call_id:h.id,content:f.result,name:h.function.name})}continue}break}await((o=this.config.storage)==null?void 0:o.save(this.messages))}catch(s){if((s==null?void 0:s.name)!=="AbortError")this.emit({type:"error",error:(s==null?void 0:s.message)||"请求出错"});else{const l=this.messages[this.messages.length-1];(l==null?void 0:l.role)==="assistant"&&!l.content&&(l.content="(已停止生成)")}}finally{this._loading=!1,this.abortController=null,this.emit({type:"status",loading:!1})}}stop(){var t;(t=this.abortController)==null||t.abort()}buildApiMessages(){const t=this.messages;let i=t.length>0&&t[t.length-1].role==="assistant"&&t[t.length-1].content===""&&!t[t.length-1].tool_calls?t.slice(0,-1):t;const o=this.config.maxHistoryMessages??0;o>0&&i.length>o&&(i=i.slice(i.length-o));const s=this.config.maxContextTokens??0;for(s>0&&(i=Ti(i,s));i.length&&i[0].role==="tool";)i=i.slice(1);return this.config.systemPrompt?[{role:"system",content:this.config.systemPrompt},...i]:[...i]}}class sr{constructor(){L(this,"_definitions",[]);L(this,"_handlers",new Map)}register(t,n){const i=t.function.name,o=this._definitions.findIndex(s=>s.function.name===i);return o!==-1&&this._definitions.splice(o,1),this._definitions.push(t),this._handlers.set(i,n),this}registerBatch(t){for(const n of t)this.register(n.definition,n.handler);return this}getDefinitions(){return[...this._definitions]}async execute(t,n){const i=this._handlers.get(t);if(!i)return{success:!1,result:`未知工具:${t}`};try{const o=n?JSON.parse(n):{};return await i(o)}catch(o){return{success:!1,result:`工具执行异常:${(o==null?void 0:o.message)||String(o)}`}}}}const Se={deepseek:{apiKey:"",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",temperature:0,thinking:!1,thinkingEffort:"low"},openai:{apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-4o-mini",temperature:0,thinking:!1,thinkingEffort:"low"},"openai-compatible":{apiKey:"",baseUrl:"",model:"",temperature:0,thinking:!1,thinkingEffort:"low"}},Nt={providerId:"deepseek",providerMode:"direct",proxyUrl:"http://localhost:3001/api/chat",providers:Se,mdTableClick:!0,mdListClick:!0,apiKey:Se.deepseek.apiKey,baseUrl:Se.deepseek.baseUrl,model:Se.deepseek.model,temperature:Se.deepseek.temperature,thinking:Se.deepseek.thinking,thinkingEffort:Se.deepseek.thinkingEffort};function Mi(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}}const go=Se.deepseek;Se.openai;const Rt=Se["openai-compatible"],It="deepseek",Ln=[{id:"deepseek",name:"DeepSeek",protocol:"openai-compatible",defaultBaseUrl:go.baseUrl,defaultModel:go.model,models:[{label:"deepseek-v4-flash",value:"deepseek-v4-flash"},{label:"deepseek-v4-pro",value:"deepseek-v4-pro"}],apiKeyUrl:"https://platform.deepseek.com/api_keys",capabilities:{thinking:!0,reasoningEffort:!0},buildBody(e,t){var n,i;e.thinking={type:((n=t.thinking)==null?void 0:n.type)==="enabled"?"enabled":"disabled"},((i=t.thinking)==null?void 0:i.type)==="enabled"&&t.thinking.effort&&(e.reasoning_effort=t.thinking.effort)}},{id:"shangshan",name:"上善",protocol:"openai-compatible",defaultBaseUrl:Rt.baseUrl,defaultModel:Rt.model,models:[],allowCustomModel:!0,capabilities:{}},{id:"openai-compatible-custom",name:"自定义(OpenAI 兼容协议)",protocol:"openai-compatible",defaultBaseUrl:Rt.baseUrl,defaultModel:Rt.model,models:[],allowCustomModel:!0,capabilities:{}}],$e=new Map(Ln.map(e=>[e.id,e]));function lr(e){$e.set(e.id,e)}function Ye(e){return e?$e.get(e)??$e.get(It):$e.get(It)}function Jn(){return Array.from($e.values())}function lt(e){const t=Se[e.id];return{apiKey:(t==null?void 0:t.apiKey)??"",baseUrl:e.defaultBaseUrl||(t==null?void 0:t.baseUrl)||"",model:e.defaultModel||(t==null?void 0:t.model)||"",temperature:(t==null?void 0:t.temperature)??0,thinking:(t==null?void 0:t.thinking)??!1,thinkingEffort:(t==null?void 0:t.thinkingEffort)??"low"}}const Ar=["apiKey","baseUrl","model","temperature","thinking","thinkingEffort"];function ar(e){return Ar.some(t=>e[t]!==void 0)}function cr(e){return e.providerId&&$e.has(e.providerId)?e.providerId:It}function ur(e){const t={};for(const n of Ar)e[n]!==void 0&&(t[n]=e[n]);return t}function dr(e){const t=e.providers[e.providerId];return t&&(e.apiKey=t.apiKey,e.baseUrl=t.baseUrl,e.model=t.model,e.temperature=t.temperature,e.thinking=t.thinking,e.thinkingEffort=t.thinkingEffort),e}function at(e){var l,A;const t=e??{},n={};for(const a of Jn())n[a.id]={...lt(a),...((l=t.providers)==null?void 0:l[a.id])??{}};for(const[a,u]of Object.entries(t.providers??{})){if(n[a])continue;const h=$e.get(a);n[a]={...h?lt(h):{...Rt},...u}}const i=cr(t);!((A=t.providers)!=null&&A[i])&&ar(t)&&(n[i]={...n[i]??lt(Ye(i)),...ur(t)});const s={providerId:t.providerId&&$e.has(t.providerId)&&n[t.providerId]?t.providerId:It,providerMode:t.providerMode??Nt.providerMode,proxyUrl:t.proxyUrl??Nt.proxyUrl,providers:n,mdTableClick:t.mdTableClick??Nt.mdTableClick,mdListClick:t.mdListClick??Nt.mdListClick,useTools:t.useTools};return dr(s)}function Wn(e,t){var o;if(!t)return at(e);const n={};for(const[s,l]of Object.entries(e.providers))n[s]={...l};for(const[s,l]of Object.entries(t.providers??{}))n[s]={...n[s]??{},...l};const i=cr(t);return!((o=t.providers)!=null&&o[i])&&ar(t)&&(n[i]={...n[i]??lt(Ye(i)),...ur(t)}),at({...e,...t,providers:n})}const Qi=Ln[0].models;function hr(e){return(e||"").trim().replace(/\/+$/,"")}function Ki(e){const t=hr(e);if(!t)throw new Error("未配置接口地址");return/\/chat\/completions$/.test(t)?t:`${t}/chat/completions`}function fr(e){return hr(e).replace(/\/api\/chat$/,"")}async function Gi(e){var n;let t=`请求失败(HTTP ${e.status})`;try{const i=await e.text();if(!i)return t;try{const o=JSON.parse(i);if((n=o==null?void 0:o.error)!=null&&n.message)return o.error.message;if(typeof(o==null?void 0:o.error)=="string")return o.error;if(o!=null&&o.message)return o.message}catch{return i.slice(0,300)}}catch{}return t}function Vt(e){const{preset:t,mode:n="direct"}=e;return{async streamChat(i){var O,te,q;const{config:{baseUrl:o,apiKey:s,model:l,temperature:A},messages:a,tools:u,signal:h,onContent:f,onReasoning:m}=i;if(n==="direct"&&!s)throw new Error("未配置 API Key");const _=n==="proxy"?`${fr(o)}/api/chat`:Ki(o),d={model:l,messages:a,stream:!0};t.capabilities.temperature!==!1&&typeof A=="number"&&(d.temperature=A),t.capabilities.tools!==!1&&(u!=null&&u.length)&&(d.tools=u,d.tool_choice="auto"),(O=t.buildBody)==null||O.call(t,d,i.config),i.config.extraBody&&Object.assign(d,i.config.extraBody),n==="proxy"&&(d.providerId=i.config.providerId??t.id);const C={"Content-Type":"application/json"};n==="direct"&&Object.assign(C,((te=t.buildHeaders)==null?void 0:te.call(t,s))??{Authorization:`Bearer ${s}`});const g=await fetch(_,{method:"POST",headers:C,body:JSON.stringify(d),signal:h});if(!g.ok||!g.body)throw new Error(await Gi(g));const E=g.body.getReader(),D=new TextDecoder("utf-8");let F="",k="",B="",M="stop";const K=new Map,S=U=>{if(!U)return;const j=U.index??0;K.has(j)||K.set(j,{id:"",type:"function",function:{name:"",arguments:""}});const J=K.get(j);U.id&&(J.id=U.id),U.type&&(J.type=U.type),U.function&&(U.function.name&&(J.function.name+=U.function.name),U.function.arguments&&(J.function.arguments+=U.function.arguments))},I=U=>{var Be;const j=(Be=U==null?void 0:U.choices)==null?void 0:Be[0];if(!j)return;const J=j.delta||{};typeof J.content=="string"&&J.content&&(k+=J.content,f==null||f(J.content));const fe=typeof J.reasoning_content=="string"?J.reasoning_content:typeof J.reasoning=="string"?J.reasoning:"";fe&&(B+=fe,m==null||m(fe)),Array.isArray(J.tool_calls)&&J.tool_calls.forEach(ye=>S(ye)),j.finish_reason&&(M=j.finish_reason)},W=()=>{const U=Array.from(K.values()).filter(j=>j.function.name);return{content:k,reasoning:B,tool_calls:U,finish_reason:M}};for(;;){const{done:U,value:j}=await E.read();if(U)break;F+=D.decode(j,{stream:!0});let J;for(;(J=F.indexOf(`
2
- `))!==-1;){const fe=F.slice(0,J).replace(/\r$/,"").trim();if(F=F.slice(J+1),!fe||fe.startsWith(":")||!fe.startsWith("data:"))continue;const Be=fe.slice(5).trim();if(Be==="[DONE]")return W();if(!Be)continue;let ye;try{ye=JSON.parse(Be)}catch{continue}if(ye!=null&&ye.error){const et=((q=ye.error)==null?void 0:q.message)||(typeof ye.error=="string"?ye.error:"模型服务返回错误");throw new Error(et)}I(ye)}}return W()}}}function pr(){return{streamChat(e){const t=Ye(e.config.providerId);if(!t)throw new Error("未找到当前模型提供方配置");return Vt({preset:t,mode:"proxy"}).streamChat(e)}}}const mr=new Map;function Wi(e,t){mr.set(e,t)}function gr(e,t){const n=mr.get(e);if(n)return n({id:e,mode:t});const i=Ye(e);if(!i||e&&i.id!==e)throw new Error(`未知模型提供方:${e}`);return t==="proxy"?pr():Vt({preset:i})}function Oi(e){var n,i,o,s,l;const t=[];return(n=e.displayHints)!=null&&n.suggestComponent&&t.push(`展示建议: 使用 ${e.displayHints.suggestComponent} 组件`),(i=e.displayHints)!=null&&i.resultFormat&&t.push(`格式: ${e.displayHints.resultFormat}`),(s=(o=e.displayHints)==null?void 0:o.previewFields)!=null&&s.length&&t.push(`预览字段: ${e.displayHints.previewFields.join(", ")}`),(l=e.displayHints)!=null&&l.summaryTemplate&&t.push(`概要模板: ${e.displayHints.summaryTemplate}`),t.length?t.join(" | "):""}function Cr(e){const t=[`【${e.name}】${e.description}`];for(const n of e.tools){const i=Oi(n);t.push(` - ${n.name}: ${n.description}`),i&&t.push(` ${i}`)}return t.join(`
3
- `)}function _r(e){const t=["你是一个 AI 助手,可以帮助用户完成各种操作。","","你可以使用以下工具包:",""];for(const n of e)t.push(Cr(n)),t.push("");return t.push("注意:"),t.push("1. 所有回复与思考/推理过程(reasoning / thinking)一律使用中文(禁止使用英文),保持简洁清晰;除非用户明确要求使用其他语言,此时思考与回复也相应使用该语言。"),t.push("2. 当你需要查询或操作数据时,调用对应工具包中的函数。"),t.push("3. 工具函数由宿主系统执行,你只需要传递正确的参数。"),t.push("4. 获取到工具结果后,回复用户并告知结果。"),t.push("5. 如果工具返回了结构化数据(如订单信息、系统状态等),在回复中清晰地展示给用户。"),t.push("6. 根据结果动态建议用户接下来可以做什么。"),t.push("7. 你返回的建议必须是中文,不能是英文或其他语言。"),t.push("8. 你返回的建议中涉及到工具要分条目,每个条目占一行,方便用户点击执行。"),t.push("9. 如果用户上传了文件,文件格式为(.txt、.json、.geojson等格式),你必须调用 open_mapview_file 工具在地图上展示,不要只回复文字。"),t.push(""),t.push("--- 文件上传规则 ---"),t.push("用户可能上传文件,文件以如下格式出现在消息中:"),t.push("已上传文件:"),t.push("1. **文件名**(类型,大小KB),文件ID:`fileId`"),t.push("你无法查看文件内容,只能看到文件名和类型。"),t.push("你必须根据文件名、扩展名和用户的文字指令,调用对应的工具来处理文件。"),t.push("如果某个工具需要处理该文件,在工具参数中传入 fileId。"),t.push('不要回复假性成功消息(如"已在地图上显示"),如果不调用工具,文件不会被实际处理。'),t.push("不要编造文件内容,不要假装你看到了文件数据。"),t.join(`
4
- `)}const Yi=`--- 重复指令处理规则 ---
1
+ "use strict";var Ji=Object.defineProperty;var Zi=(e,t,n)=>t in e?Ji(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Z=(e,t,n)=>Zi(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),ut=require("element-plus");function kr(e,t){const n=e??"";if(!t||t<=0||n.length<=t)return n;if(t<200)return`${n.slice(0,t)}…[已截断]`;const i=Math.floor(t*.6),r=t-i,s=`
2
+ …[已截断:原始 ${n.length} 字符,仅保留首尾]…
3
+ `;return`${n.slice(0,i)}${s}${n.slice(-r)}`}function Pi(e){let t="";return typeof e.content=="string"?t=e.content:e.content!=null&&(t=JSON.stringify(e.content)),e.tool_calls&&(t+=JSON.stringify(e.tool_calls)),e.name&&(t+=e.name),Math.ceil(t.length/2)||1}function zi(e,t){const n=e.length;if(n===0)return e;let i=0,r=n-1;for(let s=n-1;s>=0;s--)if(i+=Pi(e[s]),r=s,i>t){r=Math.min(s+1,n-1);break}return r>0&&e[r].role==="tool"&&(r-=1),e.slice(r)}class yr{constructor(t){Z(this,"messages",[]);Z(this,"config");Z(this,"listeners",new Set);Z(this,"abortController",null);Z(this,"_loading",!1);this.config={...t,maxToolRounds:t.maxToolRounds??6,maxToolResultChars:t.maxToolResultChars??3e4}}get loading(){return this._loading}updateProviderConfig(t){this.config.providerConfig={...this.config.providerConfig,...t}}initialize(t){this.messages.length=0,this.messages.push(...t)}clear(){var t;this.stop(),this.messages.length=0,(t=this.config.storage)==null||t.save([])}on(t){return this.listeners.add(t),()=>this.listeners.delete(t)}emit(t){this.listeners.forEach(n=>n(t))}async sendMessage(t){var r;const n=t.trim();if(!n||this._loading)return;this._loading=!0,this.abortController=new AbortController,this.emit({type:"status",loading:!0});const i={role:"user",content:n};this.messages.push(i),this.emit({type:"message",message:i});try{let s=0;const l=this.config.maxToolRounds;for(;s<l;){s++;const a={role:"assistant",content:""};this.messages.push(a),this.emit({type:"message",message:a});const c=this.buildApiMessages(),A=await this.config.provider.streamChat({config:this.config.providerConfig,messages:c,tools:this.config.tools.getDefinitions(),signal:this.abortController.signal,onContent:f=>{a.content+=f,this.emit({type:"stream:delta",delta:{content:f}})},onReasoning:f=>{this.emit({type:"stream:delta",delta:{reasoning:f}})}});if(a.content=A.content,this.emit({type:"stream:end",content:A.content,reasoning:A.reasoning,finishReason:A.finish_reason}),A.tool_calls.length>0){a.tool_calls=A.tool_calls;for(const f of A.tool_calls){this.emit({type:"tool:start",call:f});const h=await this.config.tools.execute(f.function.name,f.function.arguments);this.emit({type:"tool:end",call:f,output:h}),this.messages.push({role:"tool",tool_call_id:f.id,content:kr(h.result??"",this.config.maxToolResultChars??3e4),name:f.function.name})}continue}break}await((r=this.config.storage)==null?void 0:r.save(this.messages))}catch(s){if((s==null?void 0:s.name)!=="AbortError")this.dropTrailingEmptyAssistant(),this.emit({type:"error",error:(s==null?void 0:s.message)||"请求出错"});else{const l=this.messages[this.messages.length-1];(l==null?void 0:l.role)==="assistant"&&!l.content&&(l.content="(已停止生成)")}}finally{this._loading=!1,this.abortController=null,this.emit({type:"status",loading:!1})}}stop(){var t;(t=this.abortController)==null||t.abort()}dropTrailingEmptyAssistant(){const t=this.messages[this.messages.length-1];(t==null?void 0:t.role)==="assistant"&&!t.content&&!t.tool_calls&&this.messages.pop()}buildApiMessages(){const t=this.messages;let i=t.length>0&&t[t.length-1].role==="assistant"&&t[t.length-1].content===""&&!t[t.length-1].tool_calls?t.slice(0,-1):t;const r=this.config.maxHistoryMessages??0;r>0&&i.length>r&&(i=i.slice(i.length-r));const s=this.config.maxContextTokens??0;for(s>0&&(i=zi(i,s));i.length&&i[0].role==="tool";)i=i.slice(1);return this.config.systemPrompt?[{role:"system",content:this.config.systemPrompt},...i]:[...i]}}class Er{constructor(){Z(this,"_definitions",[]);Z(this,"_handlers",new Map)}register(t,n){const i=t.function.name,r=this._definitions.findIndex(s=>s.function.name===i);return r!==-1&&this._definitions.splice(r,1),this._definitions.push(t),this._handlers.set(i,n),this}registerBatch(t){for(const n of t)this.register(n.definition,n.handler);return this}getDefinitions(){return[...this._definitions]}async execute(t,n){const i=this._handlers.get(t);if(!i)return{success:!1,result:`未知工具:${t}`};try{const r=n?JSON.parse(n):{};return await i(r)}catch(r){return{success:!1,result:`工具执行异常:${(r==null?void 0:r.message)||String(r)}`}}}}const je={deepseek:{apiKey:"",baseUrl:"https://api.deepseek.com",model:"deepseek-v4-flash",temperature:0,thinking:!1,thinkingEffort:"low"},openai:{apiKey:"",baseUrl:"https://api.openai.com/v1",model:"gpt-4o-mini",temperature:0,thinking:!1,thinkingEffort:"low"},"openai-compatible":{apiKey:"",baseUrl:"",model:"",temperature:0,thinking:!1,thinkingEffort:"low"}},nn={providerId:"deepseek",providerMode:"direct",proxyUrl:"http://localhost:3001/api/chat",providers:je,mdTableClick:!0,mdListClick:!0,apiKey:je.deepseek.apiKey,baseUrl:je.deepseek.baseUrl,model:je.deepseek.model,temperature:je.deepseek.temperature,thinking:je.deepseek.thinking,thinkingEffort:je.deepseek.thinkingEffort};function ji(e){return{type:"function",function:{name:e.name,description:e.description,parameters:e.parameters}}}const Bo=je.deepseek;je.openai;const on=je["openai-compatible"],Lt="deepseek",ao=[{id:"deepseek",name:"DeepSeek",protocol:"openai-compatible",defaultBaseUrl:Bo.baseUrl,defaultModel:Bo.model,models:[{label:"deepseek-v4-flash",value:"deepseek-v4-flash"},{label:"deepseek-v4-pro",value:"deepseek-v4-pro"}],apiKeyUrl:"https://platform.deepseek.com/api_keys",capabilities:{thinking:!0,reasoningEffort:!0},buildBody(e,t){var n,i;e.thinking={type:((n=t.thinking)==null?void 0:n.type)==="enabled"?"enabled":"disabled"},((i=t.thinking)==null?void 0:i.type)==="enabled"&&t.thinking.effort&&(e.reasoning_effort=t.thinking.effort)}},{id:"shangshan",name:"上善",protocol:"openai-compatible",defaultBaseUrl:on.baseUrl,defaultModel:on.model,models:[],allowCustomModel:!0,capabilities:{}},{id:"openai-compatible-custom",name:"自定义(OpenAI 兼容协议)",protocol:"openai-compatible",defaultBaseUrl:on.baseUrl,defaultModel:on.model,models:[],allowCustomModel:!0,capabilities:{}}],yt=new Map(ao.map(e=>[e.id,e]));function Ir(e){yt.set(e.id,e)}function it(e){return e?yt.get(e)??yt.get(Lt):yt.get(Lt)}function co(){return Array.from(yt.values())}function Ft(e){const t=je[e.id];return{apiKey:(t==null?void 0:t.apiKey)??"",baseUrl:e.defaultBaseUrl||(t==null?void 0:t.baseUrl)||"",model:e.defaultModel||(t==null?void 0:t.model)||"",temperature:(t==null?void 0:t.temperature)??0,thinking:(t==null?void 0:t.thinking)??!1,thinkingEffort:(t==null?void 0:t.thinkingEffort)??"low"}}const br=["apiKey","baseUrl","model","temperature","thinking","thinkingEffort"];function Dr(e){return br.some(t=>e[t]!==void 0)}function wr(e){return e.providerId&&yt.has(e.providerId)?e.providerId:Lt}function Br(e){const t={};for(const n of br)e[n]!==void 0&&(t[n]=e[n]);return t}function vr(e){const t=e.providers[e.providerId];return t&&(e.apiKey=t.apiKey,e.baseUrl=t.baseUrl,e.model=t.model,e.temperature=t.temperature,e.thinking=t.thinking,e.thinkingEffort=t.thinkingEffort),e}function St(e){var l,a;const t=e??{},n={};for(const c of co())n[c.id]={...Ft(c),...((l=t.providers)==null?void 0:l[c.id])??{}};for(const[c,A]of Object.entries(t.providers??{})){if(n[c])continue;const f=yt.get(c);n[c]={...f?Ft(f):{...on},...A}}const i=wr(t);!((a=t.providers)!=null&&a[i])&&Dr(t)&&(n[i]={...n[i]??Ft(it(i)),...Br(t)});const s={providerId:t.providerId&&yt.has(t.providerId)&&n[t.providerId]?t.providerId:Lt,providerMode:t.providerMode??nn.providerMode,proxyUrl:t.proxyUrl??nn.proxyUrl,providers:n,mdTableClick:t.mdTableClick??nn.mdTableClick,mdListClick:t.mdListClick??nn.mdListClick,useTools:t.useTools};return vr(s)}function eo(e,t){var r;if(!t)return St(e);const n={};for(const[s,l]of Object.entries(e.providers))n[s]={...l};for(const[s,l]of Object.entries(t.providers??{}))n[s]={...n[s]??{},...l};const i=wr(t);return!((r=t.providers)!=null&&r[i])&&Dr(t)&&(n[i]={...n[i]??Ft(it(i)),...Br(t)}),St({...e,...t,providers:n})}const Xi=ao[0].models;function Fr(e){return(e||"").trim().replace(/\/+$/,"")}function $i(e){const t=Fr(e);if(!t)throw new Error("未配置接口地址");return/\/chat\/completions$/.test(t)?t:`${t}/chat/completions`}function xr(e){return Fr(e).replace(/\/api\/chat$/,"")}async function qi(e){var n;let t=`请求失败(HTTP ${e.status})`;try{const i=await e.text();if(!i)return t;try{const r=JSON.parse(i);if((n=r==null?void 0:r.error)!=null&&n.message)return r.error.message;if(typeof(r==null?void 0:r.error)=="string")return r.error;if(r!=null&&r.message)return r.message}catch{return i.slice(0,300)}}catch{}return t}function pn(e){const{preset:t,mode:n="direct"}=e;return{async streamChat(i){var W,H,q,Be,be;const{config:{baseUrl:r,apiKey:s,model:l,temperature:a},messages:c,tools:A,signal:f,onContent:h,onReasoning:p}=i;if(n==="direct"&&!s)throw new Error("未配置 API Key");const C=n==="proxy"?`${xr(r)}/api/chat`:$i(r),d={model:l,messages:c,stream:!0};t.capabilities.temperature!==!1&&typeof a=="number"&&(d.temperature=a),t.capabilities.tools!==!1&&(A!=null&&A.length)&&(d.tools=A,d.tool_choice="auto"),(W=t.buildBody)==null||W.call(t,d,i.config),i.config.extraBody&&Object.assign(d,i.config.extraBody),n==="proxy"&&(d.providerId=i.config.providerId??t.id);const w={"Content-Type":"application/json"};n==="direct"&&Object.assign(w,((H=t.buildHeaders)==null?void 0:H.call(t,s))??{Authorization:`Bearer ${s}`});const I=await fetch(C,{method:"POST",headers:w,body:JSON.stringify(d),signal:f});if(!I.ok)throw new Error(await qi(I));if((I.headers.get("content-type")||"").toLowerCase().includes("application/json")){const R=await I.json();if(R!=null&&R.error){const te=((q=R.error)==null?void 0:q.message)||(typeof R.error=="string"?R.error:"模型服务返回错误");throw new Error(te)}const ee=(Be=R==null?void 0:R.choices)==null?void 0:Be[0],z=(ee==null?void 0:ee.message)??{},X=typeof z.content=="string"?z.content:"",U=typeof z.reasoning_content=="string"?z.reasoning_content:typeof z.reasoning=="string"?z.reasoning:"",he=Array.isArray(z.tool_calls)?z.tool_calls.map(te=>{var Te,Oe;return{id:(te==null?void 0:te.id)||"",type:(te==null?void 0:te.type)||"function",function:{name:((Te=te==null?void 0:te.function)==null?void 0:Te.name)||"",arguments:((Oe=te==null?void 0:te.function)==null?void 0:Oe.arguments)||""}}}).filter(te=>te.function.name):[];return X&&(h==null||h(X)),U&&(p==null||p(U)),{content:X,reasoning:U,tool_calls:he,finish_reason:(ee==null?void 0:ee.finish_reason)||"stop",usage:R==null?void 0:R.usage}}if(!I.body)throw new Error("响应无内容");const y=I.body.getReader(),b=new TextDecoder("utf-8");let _="",k="",v="",Q="stop",P;const K=new Map,se=R=>{if(!R)return;const ee=R.index??0;K.has(ee)||K.set(ee,{id:"",type:"function",function:{name:"",arguments:""}});const z=K.get(ee);R.id&&(z.id=R.id),R.type&&(z.type=R.type),R.function&&(R.function.name&&(z.function.name+=R.function.name),R.function.arguments&&(z.function.arguments+=R.function.arguments))},S=R=>{var U;R!=null&&R.usage&&(P=R.usage);const ee=(U=R==null?void 0:R.choices)==null?void 0:U[0];if(!ee)return;const z=ee.delta||{};typeof z.content=="string"&&z.content&&(k+=z.content,h==null||h(z.content));const X=typeof z.reasoning_content=="string"?z.reasoning_content:typeof z.reasoning=="string"?z.reasoning:"";X&&(v+=X,p==null||p(X)),Array.isArray(z.tool_calls)&&z.tool_calls.forEach(he=>se(he)),ee.finish_reason&&(Q=ee.finish_reason)},M=()=>{const R=Array.from(K.values()).filter(ee=>ee.function.name);return{content:k,reasoning:v,tool_calls:R,finish_reason:Q,usage:P}};for(;;){const{done:R,value:ee}=await y.read();if(R)break;_+=b.decode(ee,{stream:!0});let z;for(;(z=_.indexOf(`
4
+ `))!==-1;){const X=_.slice(0,z).replace(/\r$/,"").trim();if(_=_.slice(z+1),!X||X.startsWith(":")||!X.startsWith("data:"))continue;const U=X.slice(5).trim();if(U==="[DONE]")return M();if(!U)continue;let he;try{he=JSON.parse(U)}catch{continue}if(he!=null&&he.error){const te=((be=he.error)==null?void 0:be.message)||(typeof he.error=="string"?he.error:"模型服务返回错误");throw new Error(te)}S(he)}}return M()}}}function Sr(){return{streamChat(e){const t=it(e.config.providerId);if(!t)throw new Error("未找到当前模型提供方配置");return pn({preset:t,mode:"proxy"}).streamChat(e)}}}const Nr=new Map;function es(e,t){Nr.set(e,t)}function Rr(e,t){const n=Nr.get(e);if(n)return n({id:e,mode:t});const i=it(e);if(!i||e&&i.id!==e)throw new Error(`未知模型提供方:${e}`);return t==="proxy"?Sr():pn({preset:i})}const to="REQUIREMENT_UNMET";function Tr(e){return e?(Array.isArray(e)?e:[e]).filter(Boolean):[]}async function ts(e,t,n){var r,s;const i=[];for(const l of e){if(!(l!=null&&l.check)||!n)continue;const a=l.action??((r=l.tools)!=null&&r.length?"call-tool":"ask-user");let c;try{c=await n({sessionId:t.sessionId,packageId:t.packageId,toolName:t.toolName,args:t.args,check:l.check,description:l.description})}catch(A){i.push({description:l.description,check:l.check,message:`前置条件校验异常:${(A==null?void 0:A.message)||"未知错误"}`,hint:l.hint,action:l.action??"block"});continue}c!=null&&c.ok||i.push({description:l.description,check:l.check,message:(c==null?void 0:c.message)||l.description,hint:(c==null?void 0:c.hint)??l.hint,suggestedTool:(c==null?void 0:c.suggestedTool)??((s=l.tools)==null?void 0:s[0]),action:(c==null?void 0:c.action)??a})}return i}function ns(e,t){var r,s,l;const n=(r=t.find(a=>a.hint))==null?void 0:r.hint,i=(s=t.find(a=>a.suggestedTool))==null?void 0:s.suggestedTool;return{ok:!1,code:to,tool:e,requirements:t.map(a=>({description:a.description,check:a.check,message:a.message})),...n?{hint:n}:{},...i?{suggestedTool:i}:{},action:((l=t[0])==null?void 0:l.action)??"block",retryable:!0}}function os(e){var t;try{const n=JSON.parse(e);if(n!=null&&n.hint)return String(n.hint);const i=(t=n==null?void 0:n.requirements)==null?void 0:t[0];if(i!=null&&i.message)return String(i.message);if(i!=null&&i.description)return String(i.description)}catch{}return e}function rs(e){const t=Tr(e.requires);return t.length?t.map(n=>{var r;let i=n.description;return(r=n.tools)!=null&&r.length&&(i+=`(建议先调用: ${n.tools.join(", ")})`),n.hint&&(i+=`;未满足时: ${n.hint}`),i}).join(";"):""}function is(e){var n,i,r,s,l;const t=[];return(n=e.displayHints)!=null&&n.suggestComponent&&t.push(`展示建议: 使用 ${e.displayHints.suggestComponent} 组件`),(i=e.displayHints)!=null&&i.resultFormat&&t.push(`格式: ${e.displayHints.resultFormat}`),(s=(r=e.displayHints)==null?void 0:r.previewFields)!=null&&s.length&&t.push(`预览字段: ${e.displayHints.previewFields.join(", ")}`),(l=e.displayHints)!=null&&l.summaryTemplate&&t.push(`概要模板: ${e.displayHints.summaryTemplate}`),t.length?t.join(" | "):""}function Mr(e){const t=[`【${e.name}】${e.description}`];for(const n of e.tools){const i=is(n);t.push(` - ${n.name}: ${n.description}`),i&&t.push(` ${i}`);const r=rs(n);r&&t.push(` 前置条件: ${r}`)}return t.join(`
5
+ `)}function Qr(e){const t=["你是一个 AI 助手,可以帮助用户完成各种操作。","","你可以使用以下工具包:",""];for(const n of e)t.push(Mr(n)),t.push("");return t.push("注意:"),t.push("1. 所有回复与思考/推理过程(reasoning / thinking)一律使用中文(禁止使用英文),保持简洁清晰;除非用户明确要求使用其他语言,此时思考与回复也相应使用该语言。"),t.push("2. 当你需要查询或操作数据时,调用对应工具包中的函数。"),t.push("3. 工具函数由宿主系统执行,你只需要传递正确的参数。"),t.push("4. 获取到工具结果后,回复用户并告知结果。"),t.push("5. 如果工具返回了结构化数据(如订单信息、系统状态等),在回复中清晰地展示给用户。"),t.push("6. 根据结果动态建议用户接下来可以做什么。"),t.push("7. 你返回的建议必须是中文,不能是英文或其他语言。"),t.push("8. 你返回的建议中涉及到工具要分条目,每个条目占一行,方便用户点击执行。"),t.push("9. 如果用户上传了文件,文件格式为(.txt、.json、.geojson等格式),你必须调用 open_mapview_file 工具在地图上展示,不要只回复文字。"),t.push(""),t.push("--- 文件上传规则 ---"),t.push("用户可能上传文件,文件以如下格式出现在消息中:"),t.push("已上传文件:"),t.push("1. **文件名**(类型,大小KB),文件ID:`fileId`"),t.push("你无法查看文件内容,只能看到文件名和类型。"),t.push("你必须根据文件名、扩展名和用户的文字指令,调用对应的工具来处理文件。"),t.push("如果某个工具需要处理该文件,在工具参数中传入 fileId。"),t.push('不要回复假性成功消息(如"已在地图上显示"),如果不调用工具,文件不会被实际处理。'),t.push("不要编造文件内容,不要假装你看到了文件数据。"),t.join(`
6
+ `)}const ss=`--- 重复指令处理规则 ---
5
7
  如果用户再次发送相同或类似的指令(即使之前已经执行过),必须重新调用对应的工具再次执行。
6
- 不得以"已经执行过""之前做过"等理由拒绝,也不能用历史中的工具结果代替重新执行。`;function Hi(e){const t=String(e).replace(/\s+/g,"");if(!t||!/^[\d+\-*/%().]+$/.test(t))throw new Error("表达式含非法字符");return Ui(t)}function Ui(e){let t=0;function n(){return e[t]??""}function i(u){return e[t]===u?(t++,!0):!1}function o(){const u=t;for(;/[\d.]/.test(n());)t++;const h=e.slice(u,t);if(!h)throw new Error("预期数字");const f=Number(h);if(Number.isNaN(f))throw new Error("无效数字");return f}function s(){if(i("-"))return-s();if(i("+"))return s();if(i("(")){const u=A();if(!i(")"))throw new Error("括号不匹配");return u}return o()}function l(){let u=s();for(;;)if(i("*"))u*=s();else if(i("/"))u/=s();else if(i("%"))u=(u%s()+s())%s();else break;return u}function A(){let u=l();for(;;)if(i("+"))u+=l();else if(i("-"))u-=l();else break;return u}const a=A();if(t!==e.length)throw new Error("无法解析的表达式");return a}const Mt={id:"__builtin",name:"内置工具",description:"开箱即用的通用工具(时间、计算、UUID、客户端信息)",tools:[{name:"get_current_time",description:"获取用户当前的时间、日期、时区与星期",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"card"}},{name:"calculate_expression",description:"安全计算数学表达式(支持 + - * / % 和括号)",parameters:{type:"object",properties:{expression:{type:"string",description:"数学表达式,如 (1+2)*3"}},required:["expression"]},displayHints:{resultFormat:"text"}},{name:"generate_uuid",description:"生成一个 UUID v4 随机标识符",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"text"}},{name:"get_client_info",description:"获取用户浏览器的基本信息(UA、平台、语言、屏幕尺寸)",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"card"}}]};function Vi(){return{get_current_time:()=>{const e=new Date;return{time:e.toLocaleTimeString(),date:e.toLocaleDateString(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,weekday:e.toLocaleDateString("zh-CN",{weekday:"long"})}},calculate_expression:e=>{if(!(e!=null&&e.expression))throw new Error("缺少 expression 参数");const t=Hi(String(e.expression));return{expression:e.expression,result:t}},generate_uuid:()=>{let e=[];const t="0123456789abcdef";for(let n=0;n<36;n++)e[n]=t.charAt(Math.floor(Math.random()*16));return e[14]="4",e[19]=t.charAt(parseInt(e[19],16)&3|8),e[8]=e[13]=e[18]=e[23]="-",{uuid:e.join("")}},get_client_info:()=>{var e;return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,languages:(e=navigator.languages)==null?void 0:e.join(", "),screen:`${window.screen.width}×${window.screen.height}`}}}}const Li=Vi();function kr(e,t){const n=Li[e];if(!n)throw new Error(`未知内置工具:${e}`);return n(t)}function Ji(e,t,n){var s;let i=null;if(e.type==="auto"&&(e={...e,type:Zn(e.data)}),e.type==="component"&&e.componentName){let l;e.packageId&&(l=t.find(A=>A.id===e.packageId)),!l&&n&&(l=t.find(A=>A.id===n)),(s=l==null?void 0:l.components)!=null&&s[e.componentName]&&(i=l.components[e.componentName])}const o=Zi(e);return{component:i,block:e,fallbackText:o}}function Zn(e){const t=Lt(e);return t&&t.length===1?"none":"table"}function Zi(e){switch(e.type){case"table":return Pi(e);case"card":return zi(e);case"list":return ji(e);case"none":return"";default:return JSON.stringify(e.data,null,2)}}function Lt(e){return e==null?null:Array.isArray(e)?e:typeof e!="object"?null:Array.isArray(e.data)?e.data:Array.isArray(e.list)?e.list:Array.isArray(e.items)?e.items:[e]}function Pi(e){const t=Lt(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
8
+ 不得以"已经执行过""之前做过"等理由拒绝,也不能用历史中的工具结果代替重新执行。`,ls=`--- 工具前置条件规则 ---
9
+ 1. 调用工具前先对照该工具的"前置条件";未满足时先补齐(调用建议的前置工具,或向用户确认),不要直接调用。
10
+ 2. 如果工具结果返回 {"ok":false,"code":"REQUIREMENT_UNMET"},禁止编造执行结果、禁止回复"已完成";
11
+ 必须按 hint / suggestedTool 补齐前置条件后重试同一工具。
12
+ 3. 属于"需要用户确认"的前置条件而用户尚未明确选择时,必须先向用户提问,禁止自行假设。`;function as(e){const t=String(e).replace(/\s+/g,"");if(!t||!/^[\d+\-*/%().]+$/.test(t))throw new Error("表达式含非法字符");return cs(t)}function cs(e){let t=0;function n(){return e[t]??""}function i(A){return e[t]===A?(t++,!0):!1}function r(){const A=t;for(;/[\d.]/.test(n());)t++;const f=e.slice(A,t);if(!f)throw new Error("预期数字");const h=Number(f);if(Number.isNaN(h))throw new Error("无效数字");return h}function s(){if(i("-"))return-s();if(i("+"))return s();if(i("(")){const A=a();if(!i(")"))throw new Error("括号不匹配");return A}return r()}function l(){let A=s();for(;;)if(i("*"))A*=s();else if(i("/"))A/=s();else if(i("%"))A=(A%s()+s())%s();else break;return A}function a(){let A=l();for(;;)if(i("+"))A+=l();else if(i("-"))A-=l();else break;return A}const c=a();if(t!==e.length)throw new Error("无法解析的表达式");return c}const sn={id:"__builtin",name:"内置工具",description:"开箱即用的通用工具(时间、计算、UUID、客户端信息)",tools:[{name:"get_current_time",alias:"获取当前时间",description:"获取用户当前的时间、日期、时区与星期",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"card"}},{name:"calculate_expression",alias:"计算表达式",description:"安全计算数学表达式(支持 + - * / % 和括号)",parameters:{type:"object",properties:{expression:{type:"string",description:"数学表达式,如 (1+2)*3"}},required:["expression"]},displayHints:{resultFormat:"text"}},{name:"generate_uuid",alias:"生成 UUID",description:"生成一个 UUID v4 随机标识符",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"text"}},{name:"get_client_info",alias:"获取客户端信息",description:"获取用户浏览器的基本信息(UA、平台、语言、屏幕尺寸)",parameters:{type:"object",properties:{}},displayHints:{resultFormat:"card"}}]};function As(){return{get_current_time:()=>{const e=new Date;return{时间:e.toLocaleTimeString(),日期:e.toLocaleDateString(),时区:Intl.DateTimeFormat().resolvedOptions().timeZone,星期:e.toLocaleDateString("zh-CN",{weekday:"long"})}},calculate_expression:e=>{if(!(e!=null&&e.expression))throw new Error("缺少 expression 参数");const t=as(String(e.expression));return{expression:e.expression,result:t}},generate_uuid:()=>{let e=[];const t="0123456789abcdef";for(let n=0;n<36;n++)e[n]=t.charAt(Math.floor(Math.random()*16));return e[14]="4",e[19]=t.charAt(parseInt(e[19],16)&3|8),e[8]=e[13]=e[18]=e[23]="-",{uuid:e.join("")}},get_client_info:()=>{var e;return{userAgent:navigator.userAgent,platform:navigator.platform,language:navigator.language,languages:(e=navigator.languages)==null?void 0:e.join(", "),screen:`${window.screen.width}×${window.screen.height}`}}}}const us=As();function Kr(e,t){const n=us[e];if(!n)throw new Error(`未知内置工具:${e}`);return n(t)}function Gr(e,t,n){var s;let i=null;if(e.type==="auto"&&(e={...e,type:Ao(e.data)}),e.type==="component"&&e.componentName){let l;e.packageId&&(l=t.find(a=>a.id===e.packageId)),!l&&n&&(l=t.find(a=>a.id===n)),(s=l==null?void 0:l.components)!=null&&s[e.componentName]&&(i=l.components[e.componentName])}const r=ds(e);return{component:i,block:e,fallbackText:r}}function Ao(e){const t=mn(e);return t&&t.length===1?"none":"table"}function ds(e){switch(e.type){case"table":return fs(e);case"card":return hs(e);case"list":return ps(e);case"none":return"";default:return JSON.stringify(e.data,null,2)}}function mn(e){return e==null?null:Array.isArray(e)?e:typeof e!="object"?null:Array.isArray(e.data)?e.data:Array.isArray(e.list)?e.list:Array.isArray(e.items)?e.items:[e]}function fs(e){const t=mn(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
7
13
 
8
- `:"",i=Object.keys(t[0]),o=`| ${i.join(" | ")} |`,s=`| ${i.map(()=>"---").join(" | ")} |`,l=t.map(A=>`| ${i.map(a=>String(A[a]??"")).join(" | ")} |`).join(`
9
- `);return`${n}${o}
14
+ `:"",i=Object.keys(t[0]),r=`| ${i.join(" | ")} |`,s=`| ${i.map(()=>"---").join(" | ")} |`,l=t.map(a=>`| ${i.map(c=>String(a[c]??"")).join(" | ")} |`).join(`
15
+ `);return`${n}${r}
10
16
  ${s}
11
- ${l}`}function zi(e){const t=Lt(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
17
+ ${l}`}function hs(e){const t=mn(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
12
18
 
13
- `:"",i=t.map(o=>(e.fields&&e.fields.length?e.fields.filter(A=>A in o):Object.keys(o)).map(A=>`- **${A}**: ${o[A]??""}`).join(`
19
+ `:"",i=t.map(r=>(e.fields&&e.fields.length?e.fields.filter(a=>a in r):Object.keys(r)).map(a=>`- **${a}**: ${r[a]??""}`).join(`
14
20
  `)).join(`
15
21
 
16
22
  ---
17
23
 
18
- `);return`${n}${i}`}function ji(e){const t=Lt(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
24
+ `);return`${n}${i}`}function ps(e){const t=mn(e.data);if(!(t!=null&&t.length))return"(无数据)";const n=e.title?`**${e.title}**
19
25
 
20
- `:"",i=t.map(o=>`- ${typeof o=="string"?o:Object.values(o).join(" - ")}`).join(`
21
- `);return`${n}${i}`}class Pn{constructor(){L(this,"exactHandlers",new Map);L(this,"regexHandlers",[]);L(this,"isChatOpen",()=>!0)}setChatOpenGetter(t){this.isChatOpen=t}on(t,n){return typeof t=="string"?(this.exactHandlers.has(t)||this.exactHandlers.set(t,new Set),this.exactHandlers.get(t).add(n),()=>this.off(t,n)):(this.regexHandlers.push({pattern:t,handler:n}),()=>this.off(t,n))}off(t,n){var i;if(typeof t=="string"){(i=this.exactHandlers.get(t))==null||i.delete(n);return}this.regexHandlers=this.regexHandlers.filter(o=>o.pattern!==t||o.handler!==n)}dispatch(t,n=!1){var i;if(!(n&&!this.isChatOpen())){(i=this.exactHandlers.get(t.type))==null||i.forEach(o=>o(t));for(const{pattern:o,handler:s}of this.regexHandlers)o.test(t.type)&&s(t)}}clear(){this.exactHandlers.clear(),this.regexHandlers=[]}}function Xi(){return new Pn}let yn=null;function ln(){return yn||(yn=new Pn),yn}const Er="agent:page-action";let Co=0,Qt=null,zn=ln(),In=null;function yr(e){In&&In(),In=zn.on(Er,t=>{e.pendingAction.value=t.payload})}function Ir(){const e=r.ref(null),t={pendingAction:e,dispatch(n){Co++,zn.dispatch({type:Er,timestamp:Date.now(),payload:{...n,actionId:Co}})},consume(){e.value=null}};return yr(t),t}function br(){return Qt||(Qt=Ir()),Qt}function Dr(e){zn=e||ln(),Qt&&yr(Qt)}function $i(e){const t=e.bridge||br();function n(o){const s=o.actionName&&e.handlers[o.actionName]||e.handlers["*"];s&&s(o)}function i(){const o=t.pendingAction.value;!o||o.page!==e.page||(t.consume(),r.nextTick(()=>n(o)))}r.onMounted(()=>{i()}),r.watch(()=>{var o;return(o=t.pendingAction.value)==null?void 0:o.actionId},o=>{o&&i()})}class qi{constructor(t,n){L(this,"bus");L(this,"rules");L(this,"cooldowns",new Map);L(this,"unsubscribers",[]);this.bus=t,this.rules=n}start(t){for(const n of this.rules){const i=this.bus.on(n.event,o=>{if(this.isOnCooldown(n)||(this.setCooldown(n),n.autoPopup&&t.onAutoPopup(),n.action==="silent"))return;const s=this.buildPrompt(n,o);s&&t.onRespond(s)});this.unsubscribers.push(i)}}stop(){for(const t of this.unsubscribers)t();this.unsubscribers=[],this.cooldowns.clear()}getBus(){return this.bus}isOnCooldown(t){if(!t.cooldown)return!1;const n=typeof t.event=="string"?t.event:t.event.source,i=this.cooldowns.get(n);return i?Date.now()<i:!1}setCooldown(t){if(!t.cooldown)return;const n=typeof t.event=="string"?t.event:t.event.source;this.cooldowns.set(n,Date.now()+t.cooldown)}buildPrompt(t,n){return t.prompt?t.prompt.replace(/\{\{payload\.([^}]+)\}\}/g,(i,o)=>{const s=n.payload[o];return s!==void 0?String(s):`{{payload.${o}}}`}):""}}function bn(){return`m_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function es(){let e=[],t="0123456789abcdef";for(let i=0;i<36;i++)e[i]=t.substr(Math.floor(Math.random()*16),1);return e[14]="4",e[19]=t.substr(e[19]&3|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}const _o="agent_chat_device_id";function en(){let e=localStorage.getItem(_o);return e||(e=es(),localStorage.setItem(_o,e)),e}function Dn(e){return fr(e)}function Bn(e){const t=[];for(const n of e)if(n.role==="user")t.push({role:"user",content:n.content});else if(n.role==="assistant"&&(t.push({role:"assistant",content:n.content,tool_calls:n.tool_calls}),n.toolResults))for(const i of n.toolResults)t.push({role:"tool",tool_call_id:i.callId,content:i.result,name:i.name});return t}function Br(e){return e===!0?Mt:Array.isArray(e)&&e.length?{...Mt,tools:Mt.tools.filter(t=>e.includes(t.name))}:null}function ts(e,t){const n=Br(t);return!n||!n.tools.length?e:[n,...e]}function wr(e){var Re,Y,N;const{toolPackages:t,onToolCall:n=async()=>({success:!0}),provider:i,providerConfig:o,systemPrompt:s,storagePrefix:l="agent_chat_",sendFileToLLM:A=!1,suggestedCommands:a=[],builtInTools:u=!0,providerPresets:h=[],maxContextTokens:f=48e3,maxHistoryMessages:m=60}=e;for(const y of h)lr(y);const _=ts(t,u),d={messages:`${l}messages`,settings:`${l}settings`},C=r.ref([]),g=r.ref(at(e.settings)),E=r.ref(!1),D=r.ref(""),F=new Map,k=r.ref(!1);let B=null;const M=((Re=e.businessEvents)==null?void 0:Re.bus)||ln();M.setChatOpenGetter(()=>k.value),(Y=e.businessEvents)!=null&&Y.bus&&Dr(e.businessEvents.bus),(N=e.businessEvents)!=null&&N.rules.length&&(B=new qi(M,e.businessEvents.rules),B.start({onAutoPopup:()=>{k.value=!0},onRespond:y=>{var x;D.value="",!(!((x=I())!=null&&x.apiKey)&&g.value.providerMode!=="proxy")&&ht(y)}})),r.onUnmounted(()=>{B==null||B.stop(),ct()});const K=new sr;for(const y of _){const x=y.id==="__builtin";for(const R of y.tools){const w=Mi(R);K.register(w,async H=>{if(x)return await Be(R,H);const z={packageId:y.id,toolName:R.name,args:H};return await fe(z,y,R)})}}const S=i||{streamChat(y){return gr(g.value.providerId,g.value.providerMode).streamChat(y)}};function I(){return g.value.providers[g.value.providerId]??g.value.providers[It]}function W(){const y=I(),x={...o},R=y.thinking?{type:"enabled",effort:y.thinkingEffort??"low"}:{type:"disabled"},w={...x,providerId:g.value.providerId,mode:g.value.providerMode,model:y.model,temperature:y.temperature,thinking:R};return g.value.providerMode==="proxy"?{...w,baseUrl:g.value.proxyUrl,apiKey:""}:{...w,baseUrl:y.baseUrl,apiKey:y.apiKey}}const O=Br(u);let te=s?O!=null&&O.tools.length?`${s}
26
+ `:"",i=t.map(r=>`- ${typeof r=="string"?r:Object.values(r).join(" - ")}`).join(`
27
+ `);return`${n}${i}`}class uo{constructor(){Z(this,"exactHandlers",new Map);Z(this,"regexHandlers",[]);Z(this,"isChatOpen",()=>!0)}setChatOpenGetter(t){this.isChatOpen=t}on(t,n){return typeof t=="string"?(this.exactHandlers.has(t)||this.exactHandlers.set(t,new Set),this.exactHandlers.get(t).add(n),()=>this.off(t,n)):(this.regexHandlers.push({pattern:t,handler:n}),()=>this.off(t,n))}off(t,n){var i;if(typeof t=="string"){(i=this.exactHandlers.get(t))==null||i.delete(n);return}this.regexHandlers=this.regexHandlers.filter(r=>r.pattern!==t||r.handler!==n)}dispatch(t,n=!1){var i;if(!(n&&!this.isChatOpen())){(i=this.exactHandlers.get(t.type))==null||i.forEach(r=>r(t));for(const{pattern:r,handler:s}of this.regexHandlers)r.test(t.type)&&s(t)}}clear(){this.exactHandlers.clear(),this.regexHandlers=[]}}function ms(){return new uo}let Vn=null;function Rn(){return Vn||(Vn=new uo),Vn}const Wr="agent:page-action";let vo=0,ln=null,fo=Rn(),On=null;function Vr(e){On&&On(),On=fo.on(Wr,t=>{e.pendingAction.value=t.payload})}function Or(){const e=o.ref(null),t={pendingAction:e,dispatch(n){vo++,fo.dispatch({type:Wr,timestamp:Date.now(),payload:{...n,actionId:vo}})},consume(){e.value=null}};return Vr(t),t}function Yr(){return ln||(ln=Or()),ln}function Ur(e){fo=e||Rn(),ln&&Vr(ln)}function gs(e){const t=e.bridge||Yr();function n(r){const s=r.actionName&&e.handlers[r.actionName]||e.handlers["*"];s&&s(r)}function i(){const r=t.pendingAction.value;!r||r.page!==e.page||(t.consume(),o.nextTick(()=>n(r)))}o.onMounted(()=>{i()}),o.watch(()=>{var r;return(r=t.pendingAction.value)==null?void 0:r.actionId},r=>{r&&i()})}class Cs{constructor(t,n){Z(this,"bus");Z(this,"rules");Z(this,"cooldowns",new Map);Z(this,"unsubscribers",[]);this.bus=t,this.rules=n}start(t){for(const n of this.rules){const i=this.bus.on(n.event,r=>{if(this.isOnCooldown(n)||(this.setCooldown(n),n.autoPopup&&t.onAutoPopup(),n.action==="silent"))return;const s=this.buildPrompt(n,r);s&&t.onRespond(s)});this.unsubscribers.push(i)}}stop(){for(const t of this.unsubscribers)t();this.unsubscribers=[],this.cooldowns.clear()}getBus(){return this.bus}isOnCooldown(t){if(!t.cooldown)return!1;const n=typeof t.event=="string"?t.event:t.event.source,i=this.cooldowns.get(n);return i?Date.now()<i:!1}setCooldown(t){if(!t.cooldown)return;const n=typeof t.event=="string"?t.event:t.event.source;this.cooldowns.set(n,Date.now()+t.cooldown)}buildPrompt(t,n){return t.prompt?t.prompt.replace(/\{\{payload\.([^}]+)\}\}/g,(i,r)=>{const s=n.payload[r];return s!==void 0?String(s):`{{payload.${r}}}`}):""}}const wn=24;function ho(e,t){var r;const n=String(e||"").replace(/\s+/g," ").trim();if(n)return n.length>wn?`${n.slice(0,wn)}…`:n;const i=(r=t==null?void 0:t.find(s=>s&&s.name))==null?void 0:r.name;return i?i.length>wn?`${i.slice(0,wn)}…`:i:"新对话"}function Fo(e){return[...e].sort((t,n)=>n.updatedAt-t.updatedAt)}function _s(){return`s_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function Hr(e){const t=`${e}sessions`,n=a=>`${e}session_${a}`,i=`${e}messages`;function r(){try{const a=localStorage.getItem(t);if(!a)return[];const c=JSON.parse(a);return Array.isArray(c)?c:[]}catch{return[]}}function s(a){localStorage.setItem(t,JSON.stringify(Fo(a)))}function l(){try{if(localStorage.getItem(t))return;const a=localStorage.getItem(i);if(!a)return;const c=JSON.parse(a);if(!Array.isArray(c)||!c.length)return;const A=c.find(d=>{var w;return d&&d.role==="user"&&(d.content||((w=d.files)==null?void 0:w.length))}),f="s_legacy",h=c[0],p=c[c.length-1],C={id:f,title:ho((A==null?void 0:A.content)??"",A==null?void 0:A.files),createdAt:Number(h==null?void 0:h.timestamp)||Date.now(),updatedAt:Number(p==null?void 0:p.timestamp)||Date.now(),messageCount:c.length};localStorage.setItem(n(f),JSON.stringify(c)),s([C]),localStorage.removeItem(i)}catch{}}return{async list(){return l(),Fo(r())},async create(a){const c=Date.now(),A={id:_s(),title:a||"新对话",createdAt:c,updatedAt:c,messageCount:0};return s([A,...r()]),localStorage.setItem(n(A.id),"[]"),A},async load(a){try{const c=localStorage.getItem(n(a));if(!c)return[];const A=JSON.parse(c);return Array.isArray(A)?A:[]}catch{return[]}},async save(a,c,A){localStorage.setItem(n(a),JSON.stringify(c));const f=r(),h=f.findIndex(C=>C.id===a);if(h===-1)return null;const p={...f[h],updatedAt:Date.now(),messageCount:c.length};return A!=null&&A.title&&(p.title=A.title),f[h]=p,s(f),p},async remove(a){localStorage.removeItem(n(a)),s(r().filter(c=>c.id!==a))}}}function Lr(e,t){const n=(e||"").replace(/\/+$/,""),i=`device_id=${encodeURIComponent(t)}`;async function r(l,a){var A;if(!n)throw new Error("未配置代理地址");const c=await fetch(`${n}${l}`,a);if(!c.ok){let f="";try{const h=await c.json();f=((A=h==null?void 0:h.error)==null?void 0:A.message)||""}catch{}throw new Error(f||`HTTP ${c.status}`)}return c.json()}function s(l){return{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}}return{async list(){const l=await r(`/api/sessions?${i}`);return Array.isArray(l==null?void 0:l.sessions)?l.sessions:[]},async create(l){const a=await r("/api/sessions",s({device_id:t,title:l}));return a==null?void 0:a.session},async load(l){const a=await r(`/api/sessions/${encodeURIComponent(l)}/messages?${i}`);return Array.isArray(a==null?void 0:a.messages)?a.messages:[]},async save(l,a,c){const A=await r(`/api/sessions/${encodeURIComponent(l)}/messages?${i}`,{...s({device_id:t,messages:a}),method:"PUT"});if(c!=null&&c.title){const f=await r(`/api/sessions/${encodeURIComponent(l)}?${i}`,{...s({device_id:t,title:c.title}),method:"PATCH"});return(f==null?void 0:f.session)??(A==null?void 0:A.session)??null}return(A==null?void 0:A.session)??null},async remove(l){await r(`/api/sessions/${encodeURIComponent(l)}?${i}`,{method:"DELETE"})}}}function xo(){return`m_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function ks(){let e=[],t="0123456789abcdef";for(let i=0;i<36;i++)e[i]=t.substr(Math.floor(Math.random()*16),1);return e[14]="4",e[19]=t.substr(e[19]&3|8,1),e[8]=e[13]=e[18]=e[23]="-",e.join("")}const no="agent_chat_device_id";function So(){let e=localStorage.getItem(no);return e||(e=ks(),localStorage.setItem(no,e)),e}function ys(e){localStorage.setItem(no,e)}function Es(e){return xr(e)}function No(e,t){var i;const n=[];for(const r of e)if(r.role==="user")n.push({role:"user",content:t?t(r):r.content});else if(r.role==="assistant"){if(!r.content&&!((i=r.tool_calls)!=null&&i.length))continue;if(n.push({role:"assistant",content:r.content,tool_calls:r.tool_calls}),r.toolResults)for(const s of r.toolResults)n.push({role:"tool",tool_call_id:s.callId,content:s.result,name:s.name})}return n}function Jr(e){return e===!0?sn:Array.isArray(e)&&e.length?{...sn,tools:sn.tools.filter(t=>e.includes(t.name))}:null}function Is(e,t){const n=Jr(t);return!n||!n.tools.length?e:[n,...e]}function Zr(e){var kn,Xt,Wt;const{toolPackages:t,onToolCall:n=async()=>({success:!0}),onCheckToolRequirement:i,provider:r,providerConfig:s,systemPrompt:l,storagePrefix:a="agent_chat_",sendFileToLLM:c=!1,suggestedCommands:A=[],builtInTools:f=!0,providerPresets:h=[],maxContextTokens:p=48e3,maxHistoryMessages:C=60,maxToolResultChars:d=3e4,disposeOnUnmount:w=!1}=e;for(const g of h)Ir(g);const I=Is(t,f),E={settings:`${a}settings`},y=o.ref([]),b=o.ref(St(e.settings)),_=o.ref(!1),k=o.ref(""),v=o.ref(""),Q=new Map,P=o.ref(!1),K=o.ref([]),se=o.ref(""),S=o.ref(!1);let M=null;const W=((kn=e.businessEvents)==null?void 0:kn.bus)||Rn();W.setChatOpenGetter(()=>P.value),(Xt=e.businessEvents)!=null&&Xt.bus&&Ur(e.businessEvents.bus),(Wt=e.businessEvents)!=null&&Wt.rules.length&&(M=new Cs(W,e.businessEvents.rules),M.start({onAutoPopup:()=>{P.value=!0},onRespond:g=>{var D;k.value="",!(!((D=be())!=null&&D.apiKey)&&b.value.providerMode!=="proxy")&&Mt(g)}}));const H=new Er,q=new Map;for(const g of I){const D=g.id==="__builtin";for(const G of g.tools){G.alias?q.set(G.name,G.alias):q.delete(G.name);const F=ji(G);H.register(F,async L=>{if(D)return await zt(G,L);const re={packageId:g.id,toolName:G.name,args:L};return await Rt(re,g,G)})}}const Be=r||{streamChat(g){return Rr(b.value.providerId,b.value.providerMode).streamChat(g)}};function be(){return b.value.providers[b.value.providerId]??b.value.providers[Lt]}function R(){const g=be(),D={...s},G=g.thinking?{type:"enabled",effort:g.thinkingEffort??"low"}:{type:"disabled"},F={...D,providerId:b.value.providerId,mode:b.value.providerMode,model:g.model,temperature:g.temperature,thinking:G};return b.value.providerMode==="proxy"?{...F,baseUrl:b.value.proxyUrl,apiKey:""}:{...F,baseUrl:g.baseUrl,apiKey:g.apiKey}}const ee=Jr(f);let z=l?ee!=null&&ee.tools.length?`${l}
22
28
 
23
- ${Cr(O)}`:s:_r(_);te=`${te}
29
+ ${Mr(ee)}`:l:Qr(I);z=`${z}
24
30
 
25
- ${Yi}`;const q=new ir({provider:S,providerConfig:W(),tools:K,systemPrompt:te,maxContextTokens:f,maxHistoryMessages:m});let U=[],j=!1;const J=[];async function fe(y,x,R){const w={toolCallId:`${Date.now()}_${Math.random().toString(36).slice(2,6)}`,packageId:y.packageId,toolName:y.toolName,args:y.args};try{const H=await n(w);U.push({pkg:x,toolDef:R,data:H,args:y.args});const z=R.displayHints;return j=(z==null?void 0:z.showModelContent)===!1&&(!!z.suggestComponent||["table","card","list"].includes(z.resultFormat)),{success:!0,result:typeof H=="string"?H:JSON.stringify(H)}}catch(H){return{success:!1,result:(H==null?void 0:H.message)||"工具执行失败"}}}async function Be(y,x){try{const R=await kr(y.name,x);U.push({pkg:Mt,toolDef:y,data:R,args:x});const w=y.displayHints;return j=(w==null?void 0:w.showModelContent)===!1&&(!!w.suggestComponent||["table","card","list"].includes(w.resultFormat)),{success:!0,result:typeof R=="string"?R:JSON.stringify(R)}}catch(R){return{success:!1,result:(R==null?void 0:R.message)||"内置工具执行失败"}}}function ye(){var w,H;const y=C.value[C.value.length-1];if(!y||y.role!=="assistant"){U=[];return}const x=[];let R=!1;for(const{pkg:z,toolDef:X,data:ne,args:le}of U){const oe=X.displayHints;if(oe){if(oe.suggestComponent){let _e=ne;if(oe.resultFormat==="map"){if((w=ne==null?void 0:ne.data)!=null&&w.fileId){const de=F.get(ne.data.fileId);de&&(_e=de.name.endsWith(".geojson")||de.name.endsWith(".json")?{data:{id:ne.data.fileId,wkt:"",geojson:de.data}}:{data:{id:ne.data.fileId,wkt:de.data,geojson:""}})}else if((H=ne==null?void 0:ne.data)!=null&&H.fileIds){const de=ne.data.fileIds.map(pe=>F.get(pe));if(de.filter(pe=>!pe).length)continue;const Me=[];de.forEach(pe=>{pe.name.endsWith(".geojson")||pe.name.endsWith(".json")?Me.push({id:pe.id,data:pe.data,type:"geojson"}):pe.name.endsWith(".txt")?Me.push({id:pe.id,data:pe.data,type:"wkt"}):pe.name.endsWith(".tif")?Me.push({id:pe.id,data:pe,type:"tif"}):Me.push({id:pe.id,data:pe.data,type:"unknown"})}),_e={...ne,data:Me}}}x.push({type:"component",packageId:z.id,componentName:oe.suggestComponent,data:_e})}else if(oe.resultFormat==="table"||oe.resultFormat==="card"||oe.resultFormat==="list"||oe.resultFormat==="auto"){const _e=Lt(ne);if(_e!=null&&_e.length){const de=oe.resultFormat==="auto"?Zn(ne):oe.resultFormat;if(de==="none")continue;x.push({type:de,title:$(oe.summaryTemplate,le),data:_e,fields:oe.previewFields,labelField:oe.labelField,selectable:oe.selectable})}}if(oe.showModelContent===!1&&(oe.suggestComponent||["table","card","list","auto"].includes(oe.resultFormat))&&(R=!0),oe.suggestedNext)if(oe.suggestedNextEvent){const _e=oe.suggestedNextEvent,de=M.on(_e,()=>et(_e));J.push({event:_e,text:oe.suggestedNext,unsub:de})}else y.suggestedNext=oe.suggestedNext}}R&&!x.length&&(R=!1),y.renderBlocks=x,y.hideMarkdown=R,U=[]}function et(y){const x=J.findIndex(w=>w.event===y);if(x===-1)return;const R=J[x];R.unsub(),J.splice(x,1);for(let w=C.value.length-1;w>=0;w--){const H=C.value[w];if(H.role==="assistant"){H.suggestedNext=R.text;break}}}function ct(){for(const y of J)y.unsub();J.length=0}function $(y,x){if(y)return y.replace(/\{(\w+)\}/g,(R,w)=>x[w]!==void 0?String(x[w]):R)}const ue=new Map;q.on(y=>{var x,R;switch(y.type){case"message":{if(y.message.role==="tool")break;const w={id:bn(),role:y.message.role,content:y.message.content,reasoning:"",status:y.message.role==="assistant"?"streaming":"done",timestamp:Date.now(),tool_calls:y.message.tool_calls};y.message.role==="assistant"&&j&&(w.hideMarkdown=!0,j=!1),C.value.push(w);break}case"stream:delta":{const w=C.value[C.value.length-1];(w==null?void 0:w.role)==="assistant"&&w.status==="streaming"&&(y.delta.content&&(w.content+=y.delta.content),y.delta.reasoning&&(w.reasoning=(w.reasoning||"")+y.delta.reasoning));break}case"stream:end":{const w=C.value[C.value.length-1];(w==null?void 0:w.role)==="assistant"&&(w.content=y.content,y.reasoning&&(w.reasoning=y.reasoning),w.status==="streaming"&&(w.status="done"));break}case"tool:start":{const w=C.value[C.value.length-1];if(!w||w.role!=="assistant")break;w.tool_calls||(w.tool_calls=[]),w.toolResults||(w.toolResults=[]);const H=w.toolResults.length;w.toolResults.push({callId:y.call.id,name:y.call.function.name,arguments:y.call.function.arguments,result:"",success:!1,status:"running"}),ue.set(y.call.id,{msgIndex:C.value.length-1,toolIndex:H}),w.tool_calls.find(z=>z.id===y.call.id)||w.tool_calls.push({id:y.call.id,type:"function",function:{name:y.call.function.name,arguments:y.call.function.arguments}});break}case"tool:end":{const w=ue.get(y.call.id);if(!w)break;const H=(R=(x=C.value[w.msgIndex])==null?void 0:x.toolResults)==null?void 0:R[w.toolIndex];H&&(H.result=y.output.result,H.success=y.output.success,H.status=y.output.success?"success":"error"),ue.delete(y.call.id);break}case"error":{D.value=y.error;const w=C.value[C.value.length-1];(w==null?void 0:w.role)==="assistant"&&(w.status="error",w.error=y.error);break}case"status":{if(E.value=y.loading,!y.loading){let w=null;for(const H of C.value)H.role==="assistant"&&H.status==="streaming"&&(H.status="done",!H.content&&!w&&(w=H));w&&(w.content="(已停止生成)"),ye()}break}}});function ve(){const y=at(e.settings);let x=null;try{const R=localStorage.getItem(d.settings);R&&(x=JSON.parse(R))}catch{x=null}g.value=x?Wn(y,x):y,q.updateProviderConfig(W())}function Ne(y){for(const x of y)if(x.files)for(const R of x.files)R.id&&F.set(R.id,R)}async function tt(){if(g.value.providerMode==="proxy"){try{const y=Dn(g.value.proxyUrl);if(!y)return;const x=await fetch(`${y}/api/messages?device_id=${encodeURIComponent(en())}`,{method:"GET"});if(!x.ok)return;const R=await x.json(),w=R==null?void 0:R.messages;Array.isArray(w)&&(C.value=w,Ne(w),q.initialize(Bn(w)))}catch{}return}try{const y=localStorage.getItem(d.messages);if(y){const x=JSON.parse(y);Array.isArray(x)&&(C.value=x,Ne(x),q.initialize(Bn(x)))}}catch{}}function ut(y){g.value=Wn(g.value,y),localStorage.setItem(d.settings,JSON.stringify(g.value)),q.updateProviderConfig(W())}async function Ve(){if(g.value.providerMode==="proxy"){try{const y=Dn(g.value.proxyUrl);if(!y)return;await fetch(`${y}/api/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({device_id:en(),messages:C.value})})}catch{}return}try{localStorage.setItem(d.messages,JSON.stringify(C.value))}catch{}}function dt(y){return y.startsWith("data:")}async function ht(y,x){const R=y.trim();if(!R&&(!x||x.length===0))return;D.value="";const w=I();if(g.value.providerMode==="direct"&&!(w!=null&&w.apiKey)){const z=Ye(g.value.providerId);D.value=`请先配置 ${(z==null?void 0:z.name)??"当前模型提供方"} 的 API Key。`;return}if(q.updateProviderConfig(W()),U=[],ue.clear(),x&&x.length>0){for(const X of x)X.id=bn(),F.set(X.id,{...X});const z={id:bn(),role:"user",content:R,status:"done",timestamp:Date.now(),files:x};C.value.push(z),q.initialize(Bn(C.value))}let H=R;x&&x.length>0&&(A?H=`已上传文件:
26
- ${x.map((X,ne)=>{const le=`${ne+1}. **${X.name}**(${X.type},${(X.size/1024).toFixed(1)}KB),文件ID:\`${X.id}\``;return dt(X.data)?`${le}
27
- ${X.data}`:`${le}
31
+ ${ss}
32
+
33
+ ${ls}`;const X=new yr({provider:Be,providerConfig:R(),tools:H,systemPrompt:z,maxContextTokens:p,maxHistoryMessages:C,maxToolResultChars:d});let U=[],he=null,te=[],Te;const Oe=[],Nt=new Set;function Pt(g){Nt.has(g)||(Nt.add(g),console.warn(`[agent-chat] 工具包 ${g} 声明了 requires.check,但未提供 onCheckToolRequirement,前置条件不会被拦截`))}async function Rt(g,D,G){const F={toolCallId:`${Date.now()}_${Math.random().toString(36).slice(2,6)}`,packageId:g.packageId,toolName:g.toolName,args:g.args},L=Tr(G.requires);if(L.length){!i&&L.some(ie=>ie.check)&&Pt(g.packageId);const re=await ts(L,{sessionId:se.value,packageId:g.packageId,toolName:g.toolName,args:g.args},i);if(re.length)return{success:!1,code:to,result:JSON.stringify(ns(g.toolName,re))}}try{const re=await n(F);return U.push({pkg:D,toolDef:G,data:re,args:g.args}),{success:!0,result:typeof re=="string"?re:JSON.stringify(re)}}catch(re){return{success:!1,result:(re==null?void 0:re.message)||"工具执行失败"}}}async function zt(g,D){try{const G=await Kr(g.name,D);return U.push({pkg:sn,toolDef:g,data:G,args:D}),{success:!0,result:typeof G=="string"?G:JSON.stringify(G)}}catch(G){return{success:!1,result:(G==null?void 0:G.message)||"内置工具执行失败"}}}function bt(g){var L,re;if(!U.length)return;if(!g||g.role!=="assistant"){U=[];return}const D=[];let G=!1,F=0;for(const{pkg:ie,toolDef:pt,data:xe,args:yn}of U){const ce=pt.displayHints;if(ce){if(ce.suggestComponent){let Se=xe;if(ce.resultFormat==="map"){if((L=xe==null?void 0:xe.data)!=null&&L.fileId){const Ne=Q.get(xe.data.fileId);Ne&&(Se=Ne.name.endsWith(".geojson")||Ne.name.endsWith(".json")?{data:{id:xe.data.fileId,wkt:"",geojson:Ne.data}}:{data:{id:xe.data.fileId,wkt:Ne.data,geojson:""}})}else if((re=xe==null?void 0:xe.data)!=null&&re.fileIds){const Ne=xe.data.fileIds.map(ke=>Q.get(ke));if(Ne.filter(ke=>!ke).length)continue;const Dt=[];Ne.forEach(ke=>{ke.name.endsWith(".geojson")||ke.name.endsWith(".json")?Dt.push({id:ke.id,data:ke.data,type:"geojson"}):ke.name.endsWith(".txt")?Dt.push({id:ke.id,data:ke.data,type:"wkt"}):ke.name.endsWith(".tif")?Dt.push({id:ke.id,data:ke,type:"tif"}):Dt.push({id:ke.id,data:ke.data,type:"unknown"})}),Se={...xe,data:Dt}}}te.push({type:"component",packageId:ie.id,componentName:ce.suggestComponent,data:Se}),F++}else if(ce.resultFormat==="table"||ce.resultFormat==="card"||ce.resultFormat==="list"||ce.resultFormat==="auto"){const Se=mn(xe);if(Se!=null&&Se.length){const Ne=ce.resultFormat==="auto"?Ao(xe):ce.resultFormat;if(Ne==="none")continue;D.push({type:Ne,title:le(ce.summaryTemplate,yn),data:Se,fields:ce.previewFields,labelField:ce.labelField,selectable:ce.selectable}),F++}}if(ce.showModelContent===!1&&(ce.suggestComponent||["table","card","list","auto"].includes(ce.resultFormat))&&(G=!0),ce.suggestedNext)if(ce.suggestedNextEvent){const Se=ce.suggestedNextEvent,Ne=W.on(Se,()=>j(Se));Oe.push({event:Se,text:ce.suggestedNext,unsub:Ne})}else Te=ce.suggestedNext}}G&&F===0&&(G=!1),g.renderBlocks=D,g.hideMarkdown=G,U=[]}function oe(){for(let g=y.value.length-1;g>=0;g--)if(y.value[g].role==="assistant")return y.value[g]}function pe(){if(te.length||Te){const g=oe();g&&(te.length&&(g.renderBlocks=[...g.renderBlocks??[],...te]),Te&&(g.suggestedNext=Te))}te=[],Te=void 0}function j(g){const D=Oe.findIndex(F=>F.event===g);if(D===-1)return;const G=Oe[D];G.unsub(),Oe.splice(D,1);for(let F=y.value.length-1;F>=0;F--){const L=y.value[F];if(L.role==="assistant"){L.suggestedNext=G.text;break}}}function Ye(){for(const g of Oe)g.unsub();Oe.length=0}function le(g,D){if(g)return g.replace(/\{(\w+)\}/g,(G,F)=>D[F]!==void 0?String(D[F]):G)}const Ue=new Map;X.on(g=>{var D,G;switch(g.type){case"message":{if(g.message.role==="tool")break;g.message.role==="assistant"&&U.length&&bt(y.value[y.value.length-1]);const F=g.message.role==="user"?he:null;F&&(he=null);const L={id:xo(),role:g.message.role,content:F?F.content:g.message.content,reasoning:"",status:g.message.role==="assistant"?"streaming":"done",timestamp:Date.now(),tool_calls:g.message.tool_calls,files:F==null?void 0:F.files};y.value.push(L);break}case"stream:delta":{const F=y.value[y.value.length-1];(F==null?void 0:F.role)==="assistant"&&F.status==="streaming"&&(g.delta.content&&(F.content+=g.delta.content),g.delta.reasoning&&(F.reasoning=(F.reasoning||"")+g.delta.reasoning));break}case"stream:end":{const F=y.value[y.value.length-1];(F==null?void 0:F.role)==="assistant"&&(F.content=g.content,g.finishReason==="length"&&F.content&&(F.content+=`
34
+
35
+ (回答已达长度上限被截断)`),g.reasoning&&(F.reasoning=g.reasoning),F.status==="streaming"&&(F.status="done"));break}case"tool:start":{const F=y.value[y.value.length-1];if(!F||F.role!=="assistant")break;F.tool_calls||(F.tool_calls=[]),F.toolResults||(F.toolResults=[]);const L=F.toolResults.length;F.toolResults.push({callId:g.call.id,name:g.call.function.name,alias:q.get(g.call.function.name),arguments:g.call.function.arguments,result:"",success:!1,status:"running"}),Ue.set(g.call.id,{msgIndex:y.value.length-1,toolIndex:L}),F.tool_calls.find(re=>re.id===g.call.id)||F.tool_calls.push({id:g.call.id,type:"function",function:{name:g.call.function.name,arguments:g.call.function.arguments}});break}case"tool:end":{const F=Ue.get(g.call.id);if(!F)break;const L=(G=(D=y.value[F.msgIndex])==null?void 0:D.toolResults)==null?void 0:G[F.toolIndex];L&&(L.result=g.output.result,L.success=g.output.success,g.output.code===to?(L.status="blocked",L.hint=os(g.output.result)):L.status=g.output.success?"success":"error"),Ue.delete(g.call.id);break}case"error":{k.value=g.error;const F=y.value[y.value.length-1];(F==null?void 0:F.role)==="assistant"&&(F.status="error",F.error=g.error);break}case"status":{if(_.value=g.loading,!g.loading){let F=null;for(const L of y.value)L.role==="assistant"&&L.status==="streaming"&&(L.status="done",!L.content&&!F&&(F=L));F&&(F.content="(已停止生成)"),bt(y.value[y.value.length-1]),pe()}break}}});function $e(){const g=St(e.settings);let D=null;try{const G=localStorage.getItem(E.settings);G&&(D=JSON.parse(G))}catch{D=null}b.value=D?eo(g,D):g,X.updateProviderConfig(R())}function Je(g){for(const D of g)if(D.toolResults){for(const G of D.toolResults)if(!G.alias){const F=q.get(G.name);F&&(G.alias=F)}}}function Tt(g){for(const D of g)if(D.files)for(const G of D.files)G.id&&Q.set(G.id,G)}const qe=`${a}current_session`;function dt(){return b.value.providerMode==="proxy"?Lr(Es(b.value.proxyUrl),So()):Hr(a)}let Me=dt();function Ze(){try{return localStorage.getItem(qe)||""}catch{return""}}function Ge(g){try{g?localStorage.setItem(qe,g):localStorage.removeItem(qe)}catch{}}function Pe(g){const D=K.value.filter(G=>G.id!==g.id);K.value=[g,...D].sort((G,F)=>F.updatedAt-G.updatedAt)}async function ft(g){if(!se.value)try{const D=await Me.create(g);Pe(D),se.value=D.id,Ge(D.id)}catch(D){v.value=`新会话创建失败:${(D==null?void 0:D.message)||"网络异常"}`,console.warn("[agent-chat] ensureSession failed",D)}}function N(){X.clear(),y.value=[],k.value="",U=[],te=[],Te=void 0,Ye(),Q.clear(),se.value="",Ge("")}async function T(g){const D=await Me.load(g);Je(D),y.value=D,Tt(D),X.initialize(No(D,He)),se.value=g,Ge(g)}async function me(){Me=dt(),S.value=!0;try{K.value=await Me.list();const g=Ze(),D=K.value.find(G=>G.id===g)??K.value[0];D?await T(D.id):N(),v.value=""}catch(g){v.value=`会话列表加载失败:${(g==null?void 0:g.message)||"网络异常"}`,console.warn("[agent-chat] initSessions failed",g),N()}finally{S.value=!1}}async function ne(){ht(),await ze()}async function Ce(g=2e3){const D=Date.now();for(;_.value&&Date.now()-D<g;)await new Promise(G=>setTimeout(G,20))}async function _e(){_.value&&(X.stop(),await Ce()),await ne(),N()}async function ve(g){if(!(!g||g===se.value)){_.value&&(X.stop(),await Ce()),await ne();try{await T(g)}catch(D){v.value=`会话加载失败:${(D==null?void 0:D.message)||"网络异常"}`,console.warn("[agent-chat] switchSession failed",D)}}}async function at(g){g===se.value&&_.value&&(X.stop(),await Ce());try{await Me.remove(g),K.value=K.value.filter(D=>D.id!==g),g===se.value&&N()}catch(D){v.value=`会话删除失败:${(D==null?void 0:D.message)||"网络异常"}`,console.warn("[agent-chat] deleteSession failed",D)}}function ct(g){const D=b.value.providerMode,G=b.value.proxyUrl;b.value=eo(b.value,g),localStorage.setItem(E.settings,JSON.stringify(b.value)),X.updateProviderConfig(R()),(D!==b.value.providerMode||G!==b.value.proxyUrl)&&(async()=>(await ne(),await me()))()}async function ze(){const g=se.value;if(g)try{const D=await Me.save(g,y.value);D&&Pe(D),v.value=""}catch(D){v.value=`对话记录保存失败:${(D==null?void 0:D.message)||"网络异常"}`,console.warn("[agent-chat] persistMessages failed",D)}}function ue(g){return g.startsWith("data:")}function et(g,D){return!D||D.length===0?g:c?`已上传文件:
36
+ ${D.map((L,re)=>{const ie=`${re+1}. **${L.name}**(${L.type},${(L.size/1024).toFixed(1)}KB),文件ID:\`${L.id}\``;return ue(L.data)?`${ie}
37
+ ${L.data}`:`${ie}
28
38
  \`\`\`
29
- ${X.data}
39
+ ${L.data}
30
40
  \`\`\``}).join(`
31
41
 
32
- `)}`+(R?`
42
+ `)}`+(g?`
33
43
 
34
- ${R}`:""):H=`已上传文件:
35
- ${x.map((X,ne)=>`${ne+1}. **${X.name}**(${X.type},${(X.size/1024).toFixed(1)}KB),文件ID:\`${X.id}\``).join(`
36
- `)}`+(R?`
44
+ ${g}`:""):`已上传文件:
45
+ ${D.map((F,L)=>`${L+1}. **${F.name}**(${F.type},${(F.size/1024).toFixed(1)}KB),文件ID:\`${F.id}\``).join(`
46
+ `)}`+(g?`
37
47
 
38
- ${R}`:"")),await q.sendMessage(H)}function nt(){q.stop()}async function ee(){if(ie(),q.clear(),C.value=[],D.value="",U=[],ct(),F.clear(),g.value.providerMode==="proxy")try{const y=Dn(g.value.proxyUrl);y&&await fetch(`${y}/api/messages?device_id=${encodeURIComponent(en())}`,{method:"DELETE"})}catch{}else localStorage.removeItem(d.messages)}const Le=r.computed(()=>{var y;return g.value.providerMode==="proxy"||!!((y=I())!=null&&y.apiKey)});r.onMounted(()=>{ve(),tt()});let Z=null;function ot(){Z&&clearTimeout(Z),Z=setTimeout(()=>{Z=null,Ve()},400)}function ie(){Z&&(clearTimeout(Z),Z=null)}return r.watch(C,()=>ot(),{deep:!0}),{messages:C,settings:g,loading:E,errorMsg:D,hasApiKey:Le,toolPackages:t,fileStore:F,visible:k,eventBus:M,deviceId:en(),sendMessage:ht,stopGeneration:nt,clearMessages:ee,saveSettings:ut,suggestedCommands:a}}function ns(){const e=Ye("deepseek");if(!e)throw new Error("未找到 DeepSeek 提供方配置");return Vt({preset:e})}function os(){const e=Ye("openai");if(!e)throw new Error("未找到 OpenAI 提供方配置");return Vt({preset:e})}function ko(e={}){const t=e.threshold??4,n=r.ref(null),i=r.ref(!1);let o=0,s=0,l=0,A=0,a=0,u=0,h=!1;function f(C){var M;const g=C.clientX-o,E=C.clientY-s;if(!h&&Math.hypot(g,E)>t&&(h=!0,i.value=!0,(M=e.onDragStart)==null||M.call(e)),!h)return;const D=Math.max(window.innerWidth-a,0),F=Math.max(window.innerHeight-u,0),k=Math.min(Math.max(l+g,0),D),B=Math.min(Math.max(A+E,0),F);n.value={x:k,y:B}}function m(){var C;window.removeEventListener("pointermove",f),window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),document.body.style.userSelect="",h&&((C=e.onDragMove)==null||C.call(e)),i.value=!1}function _(C,g){var D;if(C.button!==0||(D=e.disabled)!=null&&D.call(e))return;const E=g.getBoundingClientRect();l=E.left,A=E.top,a=E.width,u=E.height,o=C.clientX,s=C.clientY,h=!1,window.addEventListener("pointermove",f),window.addEventListener("pointerup",m),window.addEventListener("pointercancel",m),document.body.style.userSelect="none"}function d(){const C=h;return h=!1,C}return{pos:n,dragging:i,startDrag:_,consumeMoved:d}}/*! Element Plus Icons Vue v2.3.2 */var rs=r.defineComponent({name:"Bottom",__name:"bottom",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),is=rs,ss=r.defineComponent({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),r.createElementVNode("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),ls=ss,As=r.defineComponent({name:"Close",__name:"close",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),as=As,cs=r.defineComponent({name:"CopyDocument",__name:"copy-document",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),r.createElementVNode("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),us=cs,ds=r.defineComponent({name:"Cpu",__name:"cpu",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128"}),r.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32"})]))}}),hs=ds,fs=r.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ps=fs,ms=r.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),Fr=ms,gs=r.defineComponent({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Cs=gs,_s=r.defineComponent({name:"Paperclip",__name:"paperclip",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744z"})]))}}),ks=_s,Es=r.defineComponent({name:"Picture",__name:"picture",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),r.createElementVNode("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),ys=Es,Is=r.defineComponent({name:"Position",__name:"position",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992z"})]))}}),bs=Is,Ds=r.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),Bs=Ds,ws=r.defineComponent({name:"Setting",__name:"setting",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),Eo=ws,Fs=r.defineComponent({name:"Top",__name:"top",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),vs=Fs,xs=r.defineComponent({name:"UserFilled",__name:"user-filled",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}}),Ss=xs,Ns=r.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),Rs=Ns,Ts=r.defineComponent({name:"View",__name:"view",setup(e){return(t,n)=>(r.openBlock(),r.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[r.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Ms=Ts;const Qs={key:0,class:"render-block"},Ks={key:0,class:"render-block__title"},Gs={key:2,class:"render-block__cards"},Ws={class:"card-item"},Os={class:"card-label"},Ys={class:"card-value"},Hs={key:3,class:"render-block__table"},Us={key:4,class:"render-block__cards"},Vs={class:"card-label"},Ls={class:"card-value"},Js={key:5,class:"render-block__list"},Zs=400,Ps=320,zs=80,js=r.defineComponent({__name:"RenderBlock",props:{block:{},resolvedComponent:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,o=r.computed(()=>n.block.type==="auto"?Zn(n.block.data):n.block.type);function s(d){const C=n.block.fields;return C&&C.length?C.filter(g=>d!=null&&g in d):Object.keys(d??{})}const l=r.computed(()=>n.block.data||{}),A=r.computed(()=>n.block.selectable&&a.value.length>1),a=r.computed(()=>Array.isArray(l.value)?l.value:l.value.list?Array.isArray(l.value.list)?l.value.list:[]:l.value.items?Array.isArray(l.value.items)?l.value.items:[]:[l.value]),u=r.computed(()=>{var d;return a.value.length?(d=n.block.fields)!=null&&d.length?n.block.fields:Object.keys(a.value[0]):[]});function h(d){if(d==null)return 0;let C=0;for(const g of String(d))C+=/^[\u2E80-\u9FFF\uF900-\uFAFF\uFF00-\uFFEF]/.test(g)?14:8;return C}const f=r.computed(()=>{const d={};for(const C of u.value){let g=h(C);for(const E of a.value){const D=E!=null?E[C]:void 0;D!=null&&(g=Math.max(g,h(String(D))))}d[C]=Math.min(Ps,Math.max(zs,g+32))}return d});function m(d){return typeof d=="string"?d:Object.values(d).join(" - ")}function _(d){var g;const C=(n.block.labelField&&(d==null?void 0:d[n.block.labelField])!=null?d[n.block.labelField]:(g=n.block.fields)!=null&&g.length?d==null?void 0:d[n.block.fields[0]]:(d==null?void 0:d.name)??(d==null?void 0:d.title)??(d==null?void 0:d.id)??Object.values(d??{})[0])??"";i("select",`我选择 ${C}`)}return(d,C)=>{const g=r.resolveComponent("el-button");return o.value!=="none"?(r.openBlock(),r.createElementBlock("div",Qs,[e.block.title?(r.openBlock(),r.createElementBlock("div",Ks,r.toDisplayString(e.block.title),1)):r.createCommentVNode("",!0),e.resolvedComponent?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.resolvedComponent),{key:1,class:"render-block__component",data:e.block.data},null,8,["data"])):o.value==="component"?(r.openBlock(),r.createElementBlock("div",Gs,[r.createElementVNode("div",Ws,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s(a.value[0]),E=>(r.openBlock(),r.createElementBlock("div",{key:E,class:"card-field"},[r.createElementVNode("span",Os,r.toDisplayString(E)+":",1),r.createElementVNode("span",Ys,r.toDisplayString(a.value[0][E]),1)]))),128))])])):o.value==="table"?(r.openBlock(),r.createElementBlock("div",Hs,[r.createVNode(r.unref(Xe.ElTable),{data:a.value,"max-height":Zs,border:"",stripe:"",size:"small","table-layout":"fixed",style:{width:"100%"}},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,E=>(r.openBlock(),r.createBlock(r.unref(Xe.ElTableColumn),{key:E,prop:E,label:E,width:f.value[E],align:"center","show-overflow-tooltip":""},null,8,["prop","label","width"]))),128)),A.value?(r.openBlock(),r.createBlock(r.unref(Xe.ElTableColumn),{key:0,label:"操作","min-width":80,align:"center",fixed:"right"},{default:r.withCtx(({row:E})=>[r.createVNode(g,{size:"small",type:"primary",plain:"",onClick:D=>_(E)},{default:r.withCtx(()=>[...C[0]||(C[0]=[r.createTextVNode(" 选择 ",-1)])]),_:1},8,["onClick"])]),_:1})):r.createCommentVNode("",!0)]),_:1},8,["data"])])):o.value==="card"?(r.openBlock(),r.createElementBlock("div",Us,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(E,D)=>(r.openBlock(),r.createElementBlock("div",{key:D,class:"card-item"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s(E),F=>(r.openBlock(),r.createElementBlock("div",{key:F,class:"card-field"},[r.createElementVNode("span",Vs,r.toDisplayString(F)+":",1),r.createElementVNode("span",Ls,r.toDisplayString(E[F]),1)]))),128))]))),128))])):o.value==="list"?(r.openBlock(),r.createElementBlock("div",Js,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(a.value,(E,D)=>(r.openBlock(),r.createElementBlock("div",{key:D,class:"list-item"},r.toDisplayString(m(E)),1))),128))])):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)}}}),Bt=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},vr=Bt(js,[["__scopeId","data-v-ea599d5b"]]),Xs={key:0,class:"suggested-next"},$s={class:"suggested-next__text"},qs=r.defineComponent({__name:"SuggestedNext",props:{text:{}},emits:["execute"],setup(e,{emit:t}){const n=e,i=t;function o(){i("execute",n.text)}return(s,l)=>{const A=r.resolveComponent("el-button");return e.text?(r.openBlock(),r.createElementBlock("div",Xs,[l[1]||(l[1]=r.createElementVNode("span",{class:"suggested-next__icon"},"💡",-1)),r.createElementVNode("span",$s,r.toDisplayString(e.text),1),r.createVNode(A,{size:"small",type:"primary",plain:"",onClick:o},{default:r.withCtx(()=>[...l[0]||(l[0]=[r.createTextVNode("去执行",-1)])]),_:1})])):r.createCommentVNode("",!0)}}}),xr=Bt(qs,[["__scopeId","data-v-0e0e9b65"]]),yo={};function el(e){let t=yo[e];if(t)return t;t=yo[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function bt(e,t){typeof t!="string"&&(t=bt.defaultChars);const n=el(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let o="";for(let s=0,l=i.length;s<l;s+=3){const A=parseInt(i.slice(s+1,s+3),16);if(A<128){o+=n[A];continue}if((A&224)===192&&s+3<l){const a=parseInt(i.slice(s+4,s+6),16);if((a&192)===128){const u=A<<6&1984|a&63;u<128?o+="��":o+=String.fromCharCode(u),s+=3;continue}}if((A&240)===224&&s+6<l){const a=parseInt(i.slice(s+4,s+6),16),u=parseInt(i.slice(s+7,s+9),16);if((a&192)===128&&(u&192)===128){const h=A<<12&61440|a<<6&4032|u&63;h<2048||h>=55296&&h<=57343?o+="���":o+=String.fromCharCode(h),s+=6;continue}}if((A&248)===240&&s+9<l){const a=parseInt(i.slice(s+4,s+6),16),u=parseInt(i.slice(s+7,s+9),16),h=parseInt(i.slice(s+10,s+12),16);if((a&192)===128&&(u&192)===128&&(h&192)===128){let f=A<<18&1835008|a<<12&258048|u<<6&4032|h&63;f<65536||f>1114111?o+="����":(f-=65536,o+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),s+=9;continue}}o+="�"}return o})}bt.defaultChars=";/?:@&=+$,#";bt.componentChars="";const Io={};function tl(e){let t=Io[e];if(t)return t;t=Io[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function Jt(e,t,n){typeof t!="string"&&(n=t,t=Jt.defaultChars),typeof n>"u"&&(n=!0);const i=tl(t);let o="";for(let s=0,l=e.length;s<l;s++){const A=e.charCodeAt(s);if(n&&A===37&&s+2<l&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3))){o+=e.slice(s,s+3),s+=2;continue}if(A<128){o+=i[A];continue}if(A>=55296&&A<=57343){if(A>=55296&&A<=56319&&s+1<l){const a=e.charCodeAt(s+1);if(a>=56320&&a<=57343){o+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[s])}return o}Jt.defaultChars=";/?:@&=+$,-_.!~*'()#";Jt.componentChars="-_.!~*'()";function On(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function rn(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const nl=/^([a-z0-9.+-]+:)/i,ol=/:[0-9]*$/,rl=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,il=["<",">",'"',"`"," ","\r",`
39
- `," "],sl=["{","}","|","\\","^","`"].concat(il),ll=["'"].concat(sl),bo=["%","/","?",";","#"].concat(ll),Do=["/","?","#"],Al=255,Bo=/^[+a-z0-9A-Z_-]{0,63}$/,al=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,wo={javascript:!0,"javascript:":!0},Fo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function Yn(e,t){if(e&&e instanceof rn)return e;const n=new rn;return n.parse(e,t),n}rn.prototype.parse=function(e,t){let n,i,o,s=e;if(s=s.trim(),!t&&e.split("#").length===1){const u=rl.exec(s);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let l=nl.exec(s);if(l&&(l=l[0],n=l.toLowerCase(),this.protocol=l,s=s.substr(l.length)),(t||l||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=s.substr(0,2)==="//",o&&!(l&&wo[l])&&(s=s.substr(2),this.slashes=!0)),!wo[l]&&(o||l&&!Fo[l])){let u=-1;for(let d=0;d<Do.length;d++)i=s.indexOf(Do[d]),i!==-1&&(u===-1||i<u)&&(u=i);let h,f;u===-1?f=s.lastIndexOf("@"):f=s.lastIndexOf("@",u),f!==-1&&(h=s.slice(0,f),s=s.slice(f+1),this.auth=h),u=-1;for(let d=0;d<bo.length;d++)i=s.indexOf(bo[d]),i!==-1&&(u===-1||i<u)&&(u=i);u===-1&&(u=s.length),s[u-1]===":"&&u--;const m=s.slice(0,u);s=s.slice(u),this.parseHost(m),this.hostname=this.hostname||"";const _=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!_){const d=this.hostname.split(/\./);for(let C=0,g=d.length;C<g;C++){const E=d[C];if(E&&!E.match(Bo)){let D="";for(let F=0,k=E.length;F<k;F++)E.charCodeAt(F)>127?D+="x":D+=E[F];if(!D.match(Bo)){const F=d.slice(0,C),k=d.slice(C+1),B=E.match(al);B&&(F.push(B[1]),k.unshift(B[2])),k.length&&(s=k.join(".")+s),this.hostname=F.join(".");break}}}}this.hostname.length>Al&&(this.hostname=""),_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const A=s.indexOf("#");A!==-1&&(this.hash=s.substr(A),s=s.slice(0,A));const a=s.indexOf("?");return a!==-1&&(this.search=s.substr(a),s=s.slice(0,a)),s&&(this.pathname=s),Fo[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};rn.prototype.parseHost=function(e){let t=ol.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const cl=Object.freeze(Object.defineProperty({__proto__:null,decode:bt,encode:Jt,format:On,parse:Yn},Symbol.toStringTag,{value:"Module"})),Sr=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Nr=/[\0-\x1F\x7F-\x9F]/,ul=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,jn=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,Rr=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE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ECD-\uDEDC\uDEDF-\uDEEA\uDEEF-\uDEF8\uDF00-\uDF92\uDF94-\uDFEF\uDFFA]/,Tr=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,dl=Object.freeze(Object.defineProperty({__proto__:null,Any:Sr,Cc:Nr,Cf:ul,P:jn,S:Rr,Z:Tr},Symbol.toStringTag,{value:"Module"})),hl=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function fl(e){return e>=55296&&e<=57343||e>1114111?65533:hl.get(e)??e}function pl(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let o=0,s=0;o<n;o+=2){const l=t.charCodeAt(o),A=t.charCodeAt(o+1);i[s++]=l|A<<8}return i}const ml=pl("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAAB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AcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var De;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(De||(De={}));var ce;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ce||(ce={}));const vo=32;function Hn(e){return e>=ce.ZERO&&e<=ce.NINE}function gl(e){return e>=ce.UPPER_A&&e<=ce.UPPER_F||e>=ce.LOWER_A&&e<=ce.LOWER_F}function Cl(e){return e>=ce.UPPER_A&&e<=ce.UPPER_Z||e>=ce.LOWER_A&&e<=ce.LOWER_Z||Hn(e)}function _l(e){return e===ce.EQUALS||Cl(e)}var ge;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ge||(ge={}));var ze;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ze||(ze={}));class kl{constructor(t,n,i){L(this,"decodeTree");L(this,"emitCodePoint");L(this,"errors");L(this,"state",ge.EntityStart);L(this,"consumed",1);L(this,"result",0);L(this,"treeIndex",0);L(this,"excess",1);L(this,"decodeMode",ze.Strict);L(this,"runConsumed",0);this.decodeTree=t,this.emitCodePoint=n,this.errors=i}startEntity(t){this.decodeMode=t,this.state=ge.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,n){switch(this.state){case ge.EntityStart:return t.charCodeAt(n)===ce.NUM?(this.state=ge.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ge.NamedEntity,this.stateNamedEntity(t,n));case ge.NumericStart:return this.stateNumericStart(t,n);case ge.NumericDecimal:return this.stateNumericDecimal(t,n);case ge.NumericHex:return this.stateNumericHex(t,n);case ge.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|vo)===ce.LOWER_X?(this.state=ge.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ge.NumericDecimal,this.stateNumericDecimal(t,n))}stateNumericHex(t,n){for(;n<t.length;){const i=t.charCodeAt(n);if(Hn(i)||gl(i)){const o=i<=ce.NINE?i-ce.ZERO:(i|vo)-ce.LOWER_A+10;this.result=this.result*16+o,this.consumed++,n++}else return this.emitNumericEntity(i,3)}return-1}stateNumericDecimal(t,n){for(;n<t.length;){const i=t.charCodeAt(n);if(Hn(i))this.result=this.result*10+(i-ce.ZERO),this.consumed++,n++;else return this.emitNumericEntity(i,2)}return-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)==null||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===ce.SEMI)this.consumed+=1;else if(this.decodeMode===ze.Strict)return 0;return this.emitCodePoint(fl(this.result),this.consumed),this.errors&&(t!==ce.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let o=i[this.treeIndex],s=(o&De.VALUE_LENGTH)>>14;for(;n<t.length;){if(s===0&&(o&De.FLAG13)!==0){const A=(o&De.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const a=o&De.JUMP_TABLE;if(t.charCodeAt(n)!==a)return this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}for(;this.runConsumed<A;){if(n>=t.length)return-1;const a=this.runConsumed-1,u=i[this.treeIndex+1+(a>>1)],h=a%2===0?u&255:u>>8&255;if(t.charCodeAt(n)!==h)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(A>>1),o=i[this.treeIndex],s=(o&De.VALUE_LENGTH)>>14}if(n>=t.length)break;const l=t.charCodeAt(n);if(l===ce.SEMI&&s!==0&&(o&De.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=yl(i,o,this.treeIndex+Math.max(1,s),l),this.treeIndex<0)return this.result===0||this.decodeMode===ze.Attribute&&(s===0||_l(l))?0:this.emitNotTerminatedNamedEntity();if(o=i[this.treeIndex],s=(o&De.VALUE_LENGTH)>>14,s!==0){if(l===ce.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==ze.Strict&&(o&De.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}n++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var o;const{result:t,decodeTree:n}=this,i=(n[t]&De.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,i,this.consumed),(o=this.errors)==null||o.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~(De.VALUE_LENGTH|De.FLAG13):o[t+1],i),n===3&&this.emitCodePoint(o[t+2],i),i}end(){var t;switch(this.state){case ge.NamedEntity:return this.result!==0&&(this.decodeMode!==ze.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ge.NumericDecimal:return this.emitNumericEntity(0,2);case ge.NumericHex:return this.emitNumericEntity(0,3);case ge.NumericStart:return(t=this.errors)==null||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ge.EntityStart:return 0}}}function El(e){let t="";const n=new kl(e,i=>t+=String.fromCodePoint(i));return function(o,s){let l=0,A=0;for(;(A=o.indexOf("&",A))>=0;){t+=o.slice(l,A),n.startEntity(s);const u=n.write(o,A+1);if(u<0){l=A+n.end();break}l=A+u,A=u===0?l+1:l}const a=t+o.slice(l);return t="",a}}function yl(e,t,n,i){const o=(t&De.BRANCH_LENGTH)>>7,s=t&De.JUMP_TABLE;if(o===0)return s!==0&&i===s?n:-1;if(s){const u=i-s;return u<0||u>=o?-1:e[n+u]-1}const l=o+1>>1;let A=0,a=o-1;for(;A<=a;){const u=A+a>>>1,h=u>>1,m=e[n+h]>>(u&1)*8&255;if(m<i)A=u+1;else if(m>i)a=u-1;else return e[n+l+u]}return-1}const Il=El(ml);function Mr(e){return Il(e,ze.Strict)}var bl=class{constructor(e={}){L(this,"src_Any",Sr.source);L(this,"src_Cc",Nr.source);L(this,"src_Z",Tr.source);L(this,"src_P",jn.source);L(this,"src_ZPCc",[this.src_Z,this.src_P,this.src_Cc].join("|"));L(this,"src_ZCc",[this.src_Z,this.src_Cc].join("|"));L(this,"cache",{});L(this,"opts",{maxLength:1e4,urlAuth:!1,schema_names:[]});this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),o=this.escapeRE(t),s=`(?:(?!${this.src_ZCc}|${i}|${o}).)`;let l=`${i}${s}{0,1000}${o}`;for(let A=2;A<=n;A++)l=`${i}(?:${s}|${l}){0,1000}${o}`;return l}get_text_separators(){var e;return(e=this.cache).text_separators??(e.text_separators=/[><\uff5c]/)}get_pseudo_letter(){var e;return(e=this.cache).src_pseudo_letter??(e.src_pseudo_letter=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`))}get_ipv4_addr(){var e;return(e=this.cache).src_ip4??(e.src_ip4=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])"))}get_ipv6_addr(){var n;const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return(n=this.cache).src_ip6_addr??(n.src_ip6_addr=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`))}get_ipv6_url_host(){var e;return(e=this.cache).src_ip6_host??(e.src_ip6_host=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`))}get_ipv6_mail_host(){var e;return(e=this.cache).src_ipv6_mail_host??(e.src_ipv6_mail_host=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`))}get_auth(){var e;return(e=this.cache).src_auth??(e.src_auth=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`))}get_port(){var e;return(e=this.cache).src_port??(e.src_port=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"))}get_host_terminator(){var e;return(e=this.cache).src_host_terminator??(e.src_host_terminator=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`))}get_path_terminator(){var e;return(e=this.cache).src_path_terminator??(e.src_path_terminator=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`))}get_path(){var e;return(e=this.cache).src_path??(e.src_path=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`))}get_mail_name(){var e;return(e=this.cache).src_mail_name??(e.src_mail_name=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}"))}get_xn(){var e;return(e=this.cache).src_xn??(e.src_xn=new RegExp("xn--[a-z0-9\\-]{1,59}"))}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){var e;return(e=this.cache).src_domain_root??(e.src_domain_root=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`))}get_domain(){var e;return(e=this.cache).src_domain??(e.src_domain=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`))}get_url_host_port(){var e;return(e=this.cache).url_host_port??(e.url_host_port=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source))}get_fuzzy_url_host_port(){var e;return(e=this.cache).fuzzy_url_host_port??(e.fuzzy_url_host_port=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source))}get_mail_host(){var e;return(e=this.cache).src_mail_host??(e.src_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source))}get_fuzzy_mail_host(){var e;return(e=this.cache).src_fuzzy_mail_host??(e.src_fuzzy_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source))}get_path_extra(){var e;return(e=this.cache).src_path_extra??(e.src_path_extra=new RegExp(""))}get_fuzzy_mail_host_search(){var e;return(e=this.cache).mail_fuzzy_host_search??(e.mail_fuzzy_host_search=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig"))}get_fuzzy_link_search(){var e;return(e=this.cache).link_fuzzy_search??(e.link_fuzzy_search=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig"))}get_http_validator(){var e;return(e=this.cache).http_validator??(e.http_validator=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy"))}get_relative_proto_validator(){var e;return(e=this.cache).relative_proto_validator??(e.relative_proto_validator=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy"))}get_mail_name_validator(){var e;return(e=this.cache).mail_name_validator??(e.mail_name_validator=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`))}get_mailto_validator(){var e;return(e=this.cache).mailto_validator??(e.mailto_validator=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy"))}get_schema_names(){var e;return(e=this.cache).schema_names??(e.schema_names=new RegExp((this.opts.schema_names||[]).map(t=>this.escapeRE(t)).join("|")))}get_schema_search(){var e;return(e=this.cache).schema_search??(e.schema_search=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig"))}get_schema_at_start(){var e;return(e=this.cache).schema_at_start??(e.schema_at_start=new RegExp(`^${this.get_schema_search().source}`,"i"))}},wn={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const o=i.exec(e);return o?o[0].length:0},normalize:(e,t)=>t.normalize(e)},Dl={"http:":wn,"https:":wn,"ftp:":wn,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const o=i.exec(e);return o?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:o[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const o=i.exec(e);return o?o[0].length:0},normalize:(e,t)=>t.normalize(e)}},Bl="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",wl="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function Fl(){const e=wl.split("|");return Bl.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const o of t.slice(n+1))e.push(i+o)}),e}var vl={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:Fl(),urlAuth:!1,maxLength:1e4},xo=class{constructor(e,t,n,i){L(this,"schema");L(this,"index");L(this,"lastIndex");L(this,"raw");L(this,"text");L(this,"url");const o=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=o,this.text=o,this.url=o}},xl=class{constructor(e={}){L(this,"__opts__");L(this,"__schemas__");L(this,"re");const{rebuilder:t,...n}=e;this.__opts__={...vl,...n},this.__schemas__={...Dl},this.re=t||new bl,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,o)=>o.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),o=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const s=e.slice(Math.max(0,t.index-65),t.index);if(o.test(s))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,o,s,l,A,a,u=!1,h=!1,f=!1,m=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(o=this.re.get_fuzzy_mail_host_search(),o.lastIndex=0,s=this.re.get_mail_name_validator());;){const _=Math.max(m-1,0);if(o&&s&&!f&&(!A||A.index<m))for(o.lastIndex<_&&(o.lastIndex=_);;){const D=o.exec(e);if(!D){f=!0,A=void 0;break}const F=s.exec(e.slice(Math.max(0,D.index-65),D.index));if(F){if(A={schema:"mailto:",index:D.index-F[1].length,lastIndex:D.index+D[0].length},A.index>=m)break;o.lastIndex<_&&(o.lastIndex=_)}}if(i&&!h&&(!l||l.index<m))for(i.lastIndex<_&&(i.lastIndex=_);;){const D=i.exec(e);if(!D){h=!0,l=void 0;break}if(l={schema:"",index:D.index+D[1].length,lastIndex:D.index+D[0].length},l.index>=m)break;i.lastIndex<_&&(i.lastIndex=_)}let d=A;(!d||l&&(l.index<d.index||l.index===d.index&&l.lastIndex>d.lastIndex))&&(d=l);let C;if(!u)for(;;){if(!a){n.lastIndex<_&&(n.lastIndex=_);const k=n.exec(e);if(!k){u=!0;break}a={schema:k[2],index:k.index+k[1].length,lastIndex:k.index+k[0].length}}if(a.index<m){a=void 0;continue}if(d&&a.index>d.index)break;const D=a;a=void 0;const F=this.testSchemaAt(e,D.schema,D.lastIndex);if(F){C={schema:D.schema,index:D.index,lastIndex:D.lastIndex+F};break}}let g=C;if((!g||A&&(A.index<g.index||A.index===g.index&&A.lastIndex>g.lastIndex))&&(g=A),(!g||l&&(l.index<g.index||l.index===g.index&&l.lastIndex>g.lastIndex))&&(g=l),!g)break;g===A?A=void 0:g===l&&(l=void 0);const E=new xo(e,g.schema,g.index,g.lastIndex);E.schema?this.__schemas__[E.schema].normalize(E,this):this.normalize(E),t.push(E),m=g.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new xo(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const yt=2147483647,We=36,Xn=1,Kt=26,Sl=38,Nl=700,Qr=72,Kr=128,Gr="-",Rl=/^xn--/,Tl=/[^\0-\x7F]/,Ml=/[\x2E\u3002\uFF0E\uFF61]/g,Ql={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Fn=We-Xn,Oe=Math.floor,vn=String.fromCharCode;function Pe(e){throw new RangeError(Ql[e])}function Kl(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function Wr(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(Ml,".");const o=e.split("."),s=Kl(o,t).join(".");return i+s}function Or(e){const t=[];let n=0;const i=e.length;for(;n<i;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<i){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((o&1023)<<10)+(s&1023)+65536):(t.push(o),n--)}else t.push(o)}return t}const Gl=e=>String.fromCodePoint(...e),Wl=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:We},So=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Yr=function(e,t,n){let i=0;for(e=n?Oe(e/Nl):e>>1,e+=Oe(e/t);e>Fn*Kt>>1;i+=We)e=Oe(e/Fn);return Oe(i+(Fn+1)*e/(e+Sl))},Hr=function(e){const t=[],n=e.length;let i=0,o=Kr,s=Qr,l=e.lastIndexOf(Gr);l<0&&(l=0);for(let A=0;A<l;++A)e.charCodeAt(A)>=128&&Pe("not-basic"),t.push(e.charCodeAt(A));for(let A=l>0?l+1:0;A<n;){const a=i;for(let h=1,f=We;;f+=We){A>=n&&Pe("invalid-input");const m=Wl(e.charCodeAt(A++));m>=We&&Pe("invalid-input"),m>Oe((yt-i)/h)&&Pe("overflow"),i+=m*h;const _=f<=s?Xn:f>=s+Kt?Kt:f-s;if(m<_)break;const d=We-_;h>Oe(yt/d)&&Pe("overflow"),h*=d}const u=t.length+1;s=Yr(i-a,u,a==0),Oe(i/u)>yt-o&&Pe("overflow"),o+=Oe(i/u),i%=u,t.splice(i++,0,o)}return String.fromCodePoint(...t)},Ur=function(e){const t=[];e=Or(e);const n=e.length;let i=Kr,o=0,s=Qr;for(const a of e)a<128&&t.push(vn(a));const l=t.length;let A=l;for(l&&t.push(Gr);A<n;){let a=yt;for(const h of e)h>=i&&h<a&&(a=h);const u=A+1;a-i>Oe((yt-o)/u)&&Pe("overflow"),o+=(a-i)*u,i=a;for(const h of e)if(h<i&&++o>yt&&Pe("overflow"),h===i){let f=o;for(let m=We;;m+=We){const _=m<=s?Xn:m>=s+Kt?Kt:m-s;if(f<_)break;const d=f-_,C=We-_;t.push(vn(So(_+d%C,0))),f=Oe(d/C)}t.push(vn(So(f,0))),s=Yr(o,u,A===l),o=0,++A}++o,++i}return t.join("")},Ol=function(e){return Wr(e,function(t){return Rl.test(t)?Hr(t.slice(4).toLowerCase()):t})},Yl=function(e){return Wr(e,function(t){return Tl.test(t)?"xn--"+Ur(t):t})},No={version:"2.3.1",ucs2:{decode:Or,encode:Gl},decode:Hr,encode:Ur,toASCII:Yl,toUnicode:Ol};/*! markdown-it 15.0.0 https://github.com/markdown-it/markdown-it @license MIT */var Ro=Object.defineProperty,Vr=(e,t)=>{let n={};for(var i in e)Ro(n,i,{get:e[i],enumerable:!0});return Ro(n,Symbol.toStringTag,{value:"Module"}),n},Hl=Vr({arrayReplaceAt:()=>Jr,asciiTrim:()=>an,callable:()=>Lr,escapeHtml:()=>qe,escapeRE:()=>$l,fromCodePoint:()=>Gt,isMdAsciiPunct:()=>Yt,isPunctChar:()=>Pr,isPunctCharCode:()=>Ot,isSpace:()=>se,isValidEntityCode:()=>$n,isWhiteSpace:()=>Wt,lib:()=>ql,normalizeReference:()=>An,unescapeAll:()=>Dt,unescapeMd:()=>Jl});function Lr(e){const t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function Jr(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function $n(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Gt(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var Zr=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Ul=new RegExp(`${Zr.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),Vl=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Ll(e,t){if(t.charCodeAt(0)===35&&Vl.test(t)){const i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return $n(i)?Gt(i):e}const n=Mr(e);return n!==e?n:e}function Jl(e){return e.indexOf("\\")<0?e:e.replace(Zr,"$1")}function Dt(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Ul,function(t,n,i){return n||Ll(t,i)})}var Zl=/[&<>"]/,Pl=/[&<>"]/g,zl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function jl(e){return zl[e]}function qe(e){return Zl.test(e)?e.replace(Pl,jl):e}var Xl=/[.?*+^$[\]\\(){}|-]/g;function $l(e){return e.replace(Xl,"\\$&")}function se(e){switch(e){case 9:case 32:return!0}return!1}function Wt(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Pr(e){return jn.test(e)||Rr.test(e)}function Ot(e){return Pr(Gt(e))}function Yt(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function An(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function To(e){return e===32||e===9||e===10||e===13}function an(e){let t=0;for(;t<e.length&&To(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&To(e.charCodeAt(n));n--);return e.slice(t,n+1)}var ql={mdurl:cl,ucmicro:dl};function eA(e,t,n){let i,o,s,l;const A=e.posMax,a=e.pos;for(e.pos=t+1,i=1;e.pos<A;){if(s=e.src.charCodeAt(e.pos),s===93&&(i--,i===0)){o=!0;break}if(l=e.pos,e.md.inline.skipToken(e),s===91){if(l===e.pos-1)i++;else if(n)return e.pos=a,-1}}let u=-1;return o&&(u=e.pos),e.pos=a,u}function tA(e,t,n){let i,o=t;const s={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<n;){if(i=e.charCodeAt(o),i===10||i===60)return s;if(i===62)return s.pos=o+1,s.str=Dt(e.slice(t+1,o)),s.ok=!0,s;if(i===92&&o+1<n){o+=2;continue}o++}return s}let l=0;for(;o<n&&(i=e.charCodeAt(o),!(i===32||i<32||i===127));){if(i===92&&o+1<n){if(e.charCodeAt(o+1)===32){o++;continue}o+=2;continue}if(i===40&&(l++,l>32))return s;if(i===41){if(l===0)break;l--}o++}return t===o||l!==0||(s.str=Dt(e.slice(t,o)),s.pos=o,s.ok=!0),s}function nA(e,t,n,i){let o,s=t;const l={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)l.str=i.str,l.marker=i.marker;else{if(s>=n)return l;let A=e.charCodeAt(s);if(A!==34&&A!==39&&A!==40)return l;t++,s++,A===40&&(A=41),l.marker=A}for(;s<n;){if(o=e.charCodeAt(s),o===l.marker)return l.pos=s+1,l.str+=Dt(e.slice(t,s)),l.ok=!0,l;if(o===40&&l.marker===41)return l;o===92&&s+1<n&&s++,s++}return l.can_continue=!0,l.str+=Dt(e.slice(t,s)),l}var oA=Vr({parseLinkDestination:()=>tA,parseLinkLabel:()=>eA,parseLinkTitle:()=>nA});function Ht(e){"@babel/helpers - typeof";return Ht=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ht(e)}function rA(e,t){if(Ht(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(Ht(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iA(e){var t=rA(e,"string");return Ht(t)=="symbol"?t:t+""}function T(e,t,n){return(t=iA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At=class{constructor(e,t,n){T(this,"map",null),T(this,"level",0),T(this,"children",null),T(this,"content",""),T(this,"markup",""),T(this,"info",""),T(this,"block",!1),T(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},Ut=class{constructor(){T(this,"__rules__",[]),T(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){const e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(n=>{n&&e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(t=>{t.enabled&&this.__cache__[""].push(t.fn)}),e.forEach(t=>{this.__cache__[t]=[],this.__rules__.forEach(n=>{n.enabled&&n.alt.indexOf(t)>=0&&this.__cache__[t].push(n.fn)})})}at(e,t,n={}){const i=this.__find__(e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__[i].fn=t,this.__rules__[i].alt=n.alt||[],this.__cache__=null}before(e,t,n,i={}){const o=this.__find__(e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(o,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}after(e,t,n,i={}){const o=this.__find__(e);if(o===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(o+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const o=this.__find__(i);if(o<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[o].enabled=!0,n.push(i)}),this.__cache__=null,n}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(n=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const o=this.__find__(i);if(o<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[o].enabled=!1,n.push(i)}),this.__cache__=null,n}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},He={};He.code_inline=function(e,t,n,i,o){const s=e[t];return`<code${o.renderAttrs(s)}>${qe(s.content)}</code>`};He.code_block=function(e,t,n,i,o){const s=e[t];return`<pre${o.renderAttrs(s)}><code>${qe(e[t].content)}</code></pre>
40
- `};He.fence=function(e,t,n,i,o){const s=e[t],l=s.info?Dt(s.info).trim():"";let A="",a="";if(l){const h=l.split(/(\s+)/g);A=h[0],a=h.slice(2).join("")}let u;if(n.highlight?u=n.highlight(s.content,A,a)||qe(s.content):u=qe(s.content),u.indexOf("<pre")===0)return u+`
41
- `;if(l){const h=s.attrIndex("class"),f=s.attrs?s.attrs.slice():[];h<0?f.push(["class",`${n.langPrefix}${A}`]):(f[h]=[f[h][0],f[h][1]],f[h][1]+=` ${n.langPrefix}${A}`);const m={attrs:f};return`<pre><code${o.renderAttrs(m)}>${u}</code></pre>
42
- `}return`<pre><code${o.renderAttrs(s)}>${u}</code></pre>
43
- `};He.image=function(e,t,n,i,o){const s=e[t];return s.attrs[s.attrIndex("alt")][1]=o.renderInlineAsText(s.children,n,i),o.renderToken(e,t,n)};He.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
48
+ ${g}`:"")}const He=g=>et(g.content,g.files);async function Mt(g,D){const G=g.trim();if(!G&&(!D||D.length===0))return;k.value="";const F=be();if(b.value.providerMode==="direct"&&!(F!=null&&F.apiKey)){const re=it(b.value.providerId);k.value=`请先配置 ${(re==null?void 0:re.name)??"当前模型提供方"} 的 API Key。`;return}if(X.updateProviderConfig(R()),await ft(ho(G,D)),U=[],te=[],Te=void 0,Ue.clear(),v.value="",X.initialize(No(y.value,He)),D&&D.length>0){for(const re of D)re.id=xo(),Q.set(re.id,{...re});he={content:G,files:D}}const L=et(G,D);try{await X.sendMessage(L)}finally{he=null}}function Cn(){X.stop()}async function _n(){ht(),_.value&&(X.stop(),await Ce());const g=se.value;if(g)try{await Me.remove(g),K.value=K.value.filter(D=>D.id!==g),v.value=""}catch(D){v.value=`清空对话失败:${(D==null?void 0:D.message)||"网络异常"}`,console.warn("[agent-chat] clearMessages failed",D)}N()}const jt=o.computed(()=>{var g;return b.value.providerMode==="proxy"||!!((g=be())!=null&&g.apiKey)});let tt=null;function Qt(){tt&&clearTimeout(tt),tt=setTimeout(()=>{tt=null,ze()},400)}function ht(){tt&&(clearTimeout(tt),tt=null)}let Fe=null;Fe=o.watch(y,()=>Qt(),{deep:!0});let At=!1;function Kt(){At||(At=!0,$e(),me())}function Gt(){M==null||M.stop(),M=null,Ye(),te=[],Te=void 0,ht(),X.stop(),Fe==null||Fe(),Fe=null}return o.getCurrentInstance()?(o.onMounted(Kt),w&&o.onUnmounted(()=>Gt())):Kt(),{messages:y,settings:b,loading:_,errorMsg:k,syncError:v,hasApiKey:jt,toolPackages:t,fileStore:Q,visible:P,eventBus:W,deviceId:So(),setDeviceId:ys,sessions:K,currentSessionId:se,sessionsLoading:S,newSession:_e,switchSession:ve,deleteSession:at,sendMessage:Mt,stopGeneration:Cn,clearMessages:_n,saveSettings:ct,dispose:Gt,suggestedCommands:A}}function bs(){const e=it("deepseek");if(!e)throw new Error("未找到 DeepSeek 提供方配置");return pn({preset:e})}function Ds(){const e=it("openai");if(!e)throw new Error("未找到 OpenAI 提供方配置");return pn({preset:e})}function Ro(e={}){const t=e.threshold??4,n=o.ref(null),i=o.ref(!1);let r=0,s=0,l=0,a=0,c=0,A=0,f=!1;function h(w){var v;const I=w.clientX-r,E=w.clientY-s;if(!f&&Math.hypot(I,E)>t&&(f=!0,i.value=!0,(v=e.onDragStart)==null||v.call(e)),!f)return;const y=Math.max(window.innerWidth-c,0),b=Math.max(window.innerHeight-A,0),_=Math.min(Math.max(l+I,0),y),k=Math.min(Math.max(a+E,0),b);n.value={x:_,y:k}}function p(){var w;window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p),document.body.style.userSelect="",f&&((w=e.onDragMove)==null||w.call(e)),i.value=!1}function C(w,I){var y;if(w.button!==0||(y=e.disabled)!=null&&y.call(e))return;const E=I.getBoundingClientRect();l=E.left,a=E.top,c=E.width,A=E.height,r=w.clientX,s=w.clientY,f=!1,window.addEventListener("pointermove",h),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p),document.body.style.userSelect="none"}function d(){const w=f;return f=!1,w}return{pos:n,dragging:i,startDrag:C,consumeMoved:d}}/*! Element Plus Icons Vue v2.3.2 */var ws=o.defineComponent({name:"Bottom",__name:"bottom",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),Bs=ws,vs=o.defineComponent({name:"ChatDotRound",__name:"chat-dot-round",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.06 461.06 0 0 1-206.912-48.384l-175.616 58.56z"}),o.createElementVNode("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),Fs=vs,xs=o.defineComponent({name:"CircleCheck",__name:"circle-check",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),o.createElementVNode("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),Ss=xs,Ns=o.defineComponent({name:"CircleClose",__name:"circle-close",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),o.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Rs=Ns,Ts=o.defineComponent({name:"Clock",__name:"clock",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),o.createElementVNode("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),o.createElementVNode("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),Ms=Ts,Qs=o.defineComponent({name:"Close",__name:"close",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Ks=Qs,Gs=o.defineComponent({name:"CopyDocument",__name:"copy-document",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),o.createElementVNode("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),Ws=Gs,Vs=o.defineComponent({name:"Cpu",__name:"cpu",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128"}),o.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32m160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32m-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32M64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32m896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32m0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32"})]))}}),Os=Vs,Ys=o.defineComponent({name:"Delete",__name:"delete",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),Pr=Ys,Us=o.defineComponent({name:"Document",__name:"document",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),zr=Us,Hs=o.defineComponent({name:"FullScreen",__name:"full-screen",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Ls=Hs,Js=o.defineComponent({name:"Loading",__name:"loading",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Zs=Js,Ps=o.defineComponent({name:"Paperclip",__name:"paperclip",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M602.496 240.448A192 192 0 1 1 874.048 512l-316.8 316.8A256 256 0 0 1 195.2 466.752L602.496 59.456l45.248 45.248L240.448 512A192 192 0 0 0 512 783.552l316.8-316.8a128 128 0 1 0-181.056-181.056L353.6 579.904a32 32 0 1 0 45.248 45.248l294.144-294.144 45.312 45.248L444.096 670.4a96 96 0 1 1-135.744-135.744z"})]))}}),zs=Ps,js=o.defineComponent({name:"Picture",__name:"picture",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),o.createElementVNode("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64-64-64 64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),Xs=js,$s=o.defineComponent({name:"Plus",__name:"plus",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),jr=$s,qs=o.defineComponent({name:"Position",__name:"position",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m249.6 417.088 319.744 43.072 39.168 310.272L845.12 178.88zm-129.024 47.168a32 32 0 0 1-7.68-61.44l777.792-311.04a32 32 0 0 1 41.6 41.6l-310.336 775.68a32 32 0 0 1-61.44-7.808L512 516.992z"})]))}}),el=qs,tl=o.defineComponent({name:"Promotion",__name:"promotion",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"m64 448 832-320-128 704-446.08-243.328L832 192 242.816 545.472zm256 512V657.024L512 768z"})]))}}),Xr=tl,nl=o.defineComponent({name:"Setting",__name:"setting",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357 357 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a352 352 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357 357 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294 294 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293 293 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294 294 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288 288 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293 293 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a288 288 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),To=nl,ol=o.defineComponent({name:"Top",__name:"top",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),rl=ol,il=o.defineComponent({name:"UserFilled",__name:"user-filled",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M288 320a224 224 0 1 0 448 0 224 224 0 1 0-448 0m544 608H160a32 32 0 0 1-32-32v-96a160 160 0 0 1 160-160h448a160 160 0 0 1 160 160v96a32 32 0 0 1-32 32z"})]))}}),sl=il,ll=o.defineComponent({name:"VideoPause",__name:"video-pause",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32m192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32"})]))}}),al=ll,cl=o.defineComponent({name:"View",__name:"view",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Al=cl,ul=o.defineComponent({name:"Warning",__name:"warning",setup(e){return(t,n)=>(o.openBlock(),o.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[o.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),dl=ul;const fl={key:0,class:"render-block"},hl={key:0,class:"render-block__title"},pl={key:2,class:"render-block__cards"},ml={class:"card-item"},gl={class:"card-label"},Cl={class:"card-value"},_l={key:3,class:"render-block__table"},kl={key:4,class:"render-block__cards"},yl={class:"card-label"},El={class:"card-value"},Il={key:5,class:"render-block__list"},bl=400,Dl=320,wl=80,Bl=o.defineComponent({__name:"RenderBlock",props:{block:{},resolvedComponent:{}},emits:["select"],setup(e,{emit:t}){const n=e,i=t,r=o.computed(()=>n.block.type==="auto"?Ao(n.block.data):n.block.type);function s(d){const w=n.block.fields;return w&&w.length?w.filter(I=>d!=null&&I in d):Object.keys(d??{})}const l=o.computed(()=>n.block.data||{}),a=o.computed(()=>n.block.selectable&&c.value.length>1),c=o.computed(()=>Array.isArray(l.value)?l.value:l.value.list?Array.isArray(l.value.list)?l.value.list:[]:l.value.items?Array.isArray(l.value.items)?l.value.items:[]:[l.value]),A=o.computed(()=>{var d;return c.value.length?(d=n.block.fields)!=null&&d.length?n.block.fields:Object.keys(c.value[0]):[]});function f(d){if(d==null)return 0;let w=0;for(const I of String(d))w+=/^[\u2E80-\u9FFF\uF900-\uFAFF\uFF00-\uFFEF]/.test(I)?14:8;return w}const h=o.computed(()=>{const d={};for(const w of A.value){let I=f(w);for(const E of c.value){const y=E!=null?E[w]:void 0;y!=null&&(I=Math.max(I,f(String(y))))}d[w]=Math.min(Dl,Math.max(wl,I+32))}return d});function p(d){return typeof d=="string"?d:Object.values(d).join(" - ")}function C(d){var I;const w=(n.block.labelField&&(d==null?void 0:d[n.block.labelField])!=null?d[n.block.labelField]:(I=n.block.fields)!=null&&I.length?d==null?void 0:d[n.block.fields[0]]:(d==null?void 0:d.name)??(d==null?void 0:d.title)??(d==null?void 0:d.id)??Object.values(d??{})[0])??"";i("select",`我选择 ${w}`)}return(d,w)=>{const I=o.resolveComponent("el-button");return r.value!=="none"?(o.openBlock(),o.createElementBlock("div",fl,[e.block.title?(o.openBlock(),o.createElementBlock("div",hl,o.toDisplayString(e.block.title),1)):o.createCommentVNode("",!0),e.resolvedComponent?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.resolvedComponent),{key:1,class:"render-block__component",data:e.block.data},null,8,["data"])):r.value==="component"?(o.openBlock(),o.createElementBlock("div",pl,[o.createElementVNode("div",ml,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s(c.value[0]),E=>(o.openBlock(),o.createElementBlock("div",{key:E,class:"card-field"},[o.createElementVNode("span",gl,o.toDisplayString(E)+":",1),o.createElementVNode("span",Cl,o.toDisplayString(c.value[0][E]),1)]))),128))])])):r.value==="table"?(o.openBlock(),o.createElementBlock("div",_l,[o.createVNode(o.unref(ut.ElTable),{data:c.value,"max-height":bl,border:"",stripe:"",size:"small","table-layout":"fixed",style:{width:"100%"}},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(A.value,E=>(o.openBlock(),o.createBlock(o.unref(ut.ElTableColumn),{key:E,prop:E,label:E,width:h.value[E],align:"center","show-overflow-tooltip":""},null,8,["prop","label","width"]))),128)),a.value?(o.openBlock(),o.createBlock(o.unref(ut.ElTableColumn),{key:0,label:"操作","min-width":80,align:"center",fixed:"right"},{default:o.withCtx(({row:E})=>[o.createVNode(I,{size:"small",type:"primary",plain:"",onClick:y=>C(E)},{default:o.withCtx(()=>[...w[0]||(w[0]=[o.createTextVNode(" 选择 ",-1)])]),_:1},8,["onClick"])]),_:1})):o.createCommentVNode("",!0)]),_:1},8,["data"])])):r.value==="card"?(o.openBlock(),o.createElementBlock("div",kl,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(E,y)=>(o.openBlock(),o.createElementBlock("div",{key:y,class:"card-item"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s(E),b=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"card-field"},[o.createElementVNode("span",yl,o.toDisplayString(b)+":",1),o.createElementVNode("span",El,o.toDisplayString(E[b]),1)]))),128))]))),128))])):r.value==="list"?(o.openBlock(),o.createElementBlock("div",Il,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(E,y)=>(o.openBlock(),o.createElementBlock("div",{key:y,class:"list-item"},o.toDisplayString(p(E)),1))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}}}),It=(e,t)=>{const n=e.__vccOpts||e;for(const[i,r]of t)n[i]=r;return n},$r=It(Bl,[["__scopeId","data-v-d7f1b4ad"]]),vl={key:0,class:"suggested-next"},Fl={class:"suggested-next__text"},xl=o.defineComponent({__name:"SuggestedNext",props:{text:{}},emits:["execute"],setup(e,{emit:t}){const n=e,i=t;function r(){i("execute",n.text)}return(s,l)=>{const a=o.resolveComponent("el-button");return e.text?(o.openBlock(),o.createElementBlock("div",vl,[l[1]||(l[1]=o.createElementVNode("span",{class:"suggested-next__icon"},"💡",-1)),o.createElementVNode("span",Fl,o.toDisplayString(e.text),1),o.createVNode(a,{size:"small",type:"primary",plain:"",onClick:r},{default:o.withCtx(()=>[...l[0]||(l[0]=[o.createTextVNode("去执行",-1)])]),_:1})])):o.createCommentVNode("",!0)}}}),qr=It(xl,[["__scopeId","data-v-0e0e9b65"]]),Mo={};function Sl(e){let t=Mo[e];if(t)return t;t=Mo[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);t.push(i)}for(let n=0;n<e.length;n++){const i=e.charCodeAt(n);t[i]="%"+("0"+i.toString(16).toUpperCase()).slice(-2)}return t}function Jt(e,t){typeof t!="string"&&(t=Jt.defaultChars);const n=Sl(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(i){let r="";for(let s=0,l=i.length;s<l;s+=3){const a=parseInt(i.slice(s+1,s+3),16);if(a<128){r+=n[a];continue}if((a&224)===192&&s+3<l){const c=parseInt(i.slice(s+4,s+6),16);if((c&192)===128){const A=a<<6&1984|c&63;A<128?r+="��":r+=String.fromCharCode(A),s+=3;continue}}if((a&240)===224&&s+6<l){const c=parseInt(i.slice(s+4,s+6),16),A=parseInt(i.slice(s+7,s+9),16);if((c&192)===128&&(A&192)===128){const f=a<<12&61440|c<<6&4032|A&63;f<2048||f>=55296&&f<=57343?r+="���":r+=String.fromCharCode(f),s+=6;continue}}if((a&248)===240&&s+9<l){const c=parseInt(i.slice(s+4,s+6),16),A=parseInt(i.slice(s+7,s+9),16),f=parseInt(i.slice(s+10,s+12),16);if((c&192)===128&&(A&192)===128&&(f&192)===128){let h=a<<18&1835008|c<<12&258048|A<<6&4032|f&63;h<65536||h>1114111?r+="����":(h-=65536,r+=String.fromCharCode(55296+(h>>10),56320+(h&1023))),s+=9;continue}}r+="�"}return r})}Jt.defaultChars=";/?:@&=+$,#";Jt.componentChars="";const Qo={};function Nl(e){let t=Qo[e];if(t)return t;t=Qo[e]=[];for(let n=0;n<128;n++){const i=String.fromCharCode(n);/^[0-9a-z]$/i.test(i)?t.push(i):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function gn(e,t,n){typeof t!="string"&&(n=t,t=gn.defaultChars),typeof n>"u"&&(n=!0);const i=Nl(t);let r="";for(let s=0,l=e.length;s<l;s++){const a=e.charCodeAt(s);if(n&&a===37&&s+2<l&&/^[0-9a-f]{2}$/i.test(e.slice(s+1,s+3))){r+=e.slice(s,s+3),s+=2;continue}if(a<128){r+=i[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1<l){const c=e.charCodeAt(s+1);if(c>=56320&&c<=57343){r+=encodeURIComponent(e[s]+e[s+1]),s++;continue}}r+="%EF%BF%BD";continue}r+=encodeURIComponent(e[s])}return r}gn.defaultChars=";/?:@&=+$,-_.!~*'()#";gn.componentChars="-_.!~*'()";function oo(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Sn(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Rl=/^([a-z0-9.+-]+:)/i,Tl=/:[0-9]*$/,Ml=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,Ql=["<",">",'"',"`"," ","\r",`
49
+ `," "],Kl=["{","}","|","\\","^","`"].concat(Ql),Gl=["'"].concat(Kl),Ko=["%","/","?",";","#"].concat(Gl),Go=["/","?","#"],Wl=255,Wo=/^[+a-z0-9A-Z_-]{0,63}$/,Vl=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Vo={javascript:!0,"javascript:":!0},Oo={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function ro(e,t){if(e&&e instanceof Sn)return e;const n=new Sn;return n.parse(e,t),n}Sn.prototype.parse=function(e,t){let n,i,r,s=e;if(s=s.trim(),!t&&e.split("#").length===1){const A=Ml.exec(s);if(A)return this.pathname=A[1],A[2]&&(this.search=A[2]),this}let l=Rl.exec(s);if(l&&(l=l[0],n=l.toLowerCase(),this.protocol=l,s=s.substr(l.length)),(t||l||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(r=s.substr(0,2)==="//",r&&!(l&&Vo[l])&&(s=s.substr(2),this.slashes=!0)),!Vo[l]&&(r||l&&!Oo[l])){let A=-1;for(let d=0;d<Go.length;d++)i=s.indexOf(Go[d]),i!==-1&&(A===-1||i<A)&&(A=i);let f,h;A===-1?h=s.lastIndexOf("@"):h=s.lastIndexOf("@",A),h!==-1&&(f=s.slice(0,h),s=s.slice(h+1),this.auth=f),A=-1;for(let d=0;d<Ko.length;d++)i=s.indexOf(Ko[d]),i!==-1&&(A===-1||i<A)&&(A=i);A===-1&&(A=s.length),s[A-1]===":"&&A--;const p=s.slice(0,A);s=s.slice(A),this.parseHost(p),this.hostname=this.hostname||"";const C=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!C){const d=this.hostname.split(/\./);for(let w=0,I=d.length;w<I;w++){const E=d[w];if(E&&!E.match(Wo)){let y="";for(let b=0,_=E.length;b<_;b++)E.charCodeAt(b)>127?y+="x":y+=E[b];if(!y.match(Wo)){const b=d.slice(0,w),_=d.slice(w+1),k=E.match(Vl);k&&(b.push(k[1]),_.unshift(k[2])),_.length&&(s=_.join(".")+s),this.hostname=b.join(".");break}}}}this.hostname.length>Wl&&(this.hostname=""),C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=s.indexOf("#");a!==-1&&(this.hash=s.substr(a),s=s.slice(0,a));const c=s.indexOf("?");return c!==-1&&(this.search=s.substr(c),s=s.slice(0,c)),s&&(this.pathname=s),Oo[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Sn.prototype.parseHost=function(e){let t=Tl.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Ol=Object.freeze(Object.defineProperty({__proto__:null,decode:Jt,encode:gn,format:oo,parse:ro},Symbol.toStringTag,{value:"Module"})),ei=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ti=/[\0-\x1F\x7F-\x9F]/,Yl=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,po=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B4E\u1B4F\u1B5A-\u1B60\u1B7D-\u1B7F\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDD6E\uDEAD\uDED0\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9\uDFD4\uDFD5\uDFD7\uDFD8]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09\uDFE1]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDD6D-\uDD6F\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD839\uDDFF|\uD83A[\uDD5E\uDD5F]/,ni=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C1\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2429\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E5\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD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u202F\u205F\u3000]/,Ul=Object.freeze(Object.defineProperty({__proto__:null,Any:ei,Cc:ti,Cf:Yl,P:po,S:ni,Z:oi},Symbol.toStringTag,{value:"Module"})),Hl=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function Ll(e){return e>=55296&&e<=57343||e>1114111?65533:Hl.get(e)??e}function Jl(e){const t=atob(e),n=t.length&-2,i=new Uint16Array(n/2);for(let r=0,s=0;r<n;r+=2){const l=t.charCodeAt(r),a=t.charCodeAt(r+1);i[s++]=l|a<<8}return i}const Zl=Jl("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcg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AvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg");var Ke;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.FLAG13=8192]="FLAG13",e[e.BRANCH_LENGTH=8064]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ke||(Ke={}));var fe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(fe||(fe={}));const Yo=32;function io(e){return e>=fe.ZERO&&e<=fe.NINE}function Pl(e){return e>=fe.UPPER_A&&e<=fe.UPPER_F||e>=fe.LOWER_A&&e<=fe.LOWER_F}function zl(e){return e>=fe.UPPER_A&&e<=fe.UPPER_Z||e>=fe.LOWER_A&&e<=fe.LOWER_Z||io(e)}function jl(e){return e===fe.EQUALS||zl(e)}var Ee;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Ee||(Ee={}));var _t;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(_t||(_t={}));class Xl{constructor(t,n,i){Z(this,"decodeTree");Z(this,"emitCodePoint");Z(this,"errors");Z(this,"state",Ee.EntityStart);Z(this,"consumed",1);Z(this,"result",0);Z(this,"treeIndex",0);Z(this,"excess",1);Z(this,"decodeMode",_t.Strict);Z(this,"runConsumed",0);this.decodeTree=t,this.emitCodePoint=n,this.errors=i}startEntity(t){this.decodeMode=t,this.state=Ee.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1,this.runConsumed=0}write(t,n){switch(this.state){case Ee.EntityStart:return t.charCodeAt(n)===fe.NUM?(this.state=Ee.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ee.NamedEntity,this.stateNamedEntity(t,n));case Ee.NumericStart:return this.stateNumericStart(t,n);case Ee.NumericDecimal:return this.stateNumericDecimal(t,n);case Ee.NumericHex:return this.stateNumericHex(t,n);case Ee.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|Yo)===fe.LOWER_X?(this.state=Ee.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ee.NumericDecimal,this.stateNumericDecimal(t,n))}stateNumericHex(t,n){for(;n<t.length;){const i=t.charCodeAt(n);if(io(i)||Pl(i)){const r=i<=fe.NINE?i-fe.ZERO:(i|Yo)-fe.LOWER_A+10;this.result=this.result*16+r,this.consumed++,n++}else return this.emitNumericEntity(i,3)}return-1}stateNumericDecimal(t,n){for(;n<t.length;){const i=t.charCodeAt(n);if(io(i))this.result=this.result*10+(i-fe.ZERO),this.consumed++,n++;else return this.emitNumericEntity(i,2)}return-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)==null||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===fe.SEMI)this.consumed+=1;else if(this.decodeMode===_t.Strict)return 0;return this.emitCodePoint(Ll(this.result),this.consumed),this.errors&&(t!==fe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let r=i[this.treeIndex],s=(r&Ke.VALUE_LENGTH)>>14;for(;n<t.length;){if(s===0&&(r&Ke.FLAG13)!==0){const a=(r&Ke.BRANCH_LENGTH)>>7;if(this.runConsumed===0){const c=r&Ke.JUMP_TABLE;if(t.charCodeAt(n)!==c)return this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}for(;this.runConsumed<a;){if(n>=t.length)return-1;const c=this.runConsumed-1,A=i[this.treeIndex+1+(c>>1)],f=c%2===0?A&255:A>>8&255;if(t.charCodeAt(n)!==f)return this.runConsumed=0,this.result===0?0:this.emitNotTerminatedNamedEntity();n++,this.excess++,this.runConsumed++}this.runConsumed=0,this.treeIndex+=1+(a>>1),r=i[this.treeIndex],s=(r&Ke.VALUE_LENGTH)>>14}if(n>=t.length)break;const l=t.charCodeAt(n);if(l===fe.SEMI&&s!==0&&(r&Ke.FLAG13)!==0)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);if(this.treeIndex=ql(i,r,this.treeIndex+Math.max(1,s),l),this.treeIndex<0)return this.result===0||this.decodeMode===_t.Attribute&&(s===0||jl(l))?0:this.emitNotTerminatedNamedEntity();if(r=i[this.treeIndex],s=(r&Ke.VALUE_LENGTH)>>14,s!==0){if(l===fe.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==_t.Strict&&(r&Ke.FLAG13)===0&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}n++,this.excess++}return-1}emitNotTerminatedNamedEntity(){var r;const{result:t,decodeTree:n}=this,i=(n[t]&Ke.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,i,this.consumed),(r=this.errors)==null||r.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:r}=this;return this.emitCodePoint(n===1?r[t]&~(Ke.VALUE_LENGTH|Ke.FLAG13):r[t+1],i),n===3&&this.emitCodePoint(r[t+2],i),i}end(){var t;switch(this.state){case Ee.NamedEntity:return this.result!==0&&(this.decodeMode!==_t.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ee.NumericDecimal:return this.emitNumericEntity(0,2);case Ee.NumericHex:return this.emitNumericEntity(0,3);case Ee.NumericStart:return(t=this.errors)==null||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ee.EntityStart:return 0}}}function $l(e){let t="";const n=new Xl(e,i=>t+=String.fromCodePoint(i));return function(r,s){let l=0,a=0;for(;(a=r.indexOf("&",a))>=0;){t+=r.slice(l,a),n.startEntity(s);const A=n.write(r,a+1);if(A<0){l=a+n.end();break}l=a+A,a=A===0?l+1:l}const c=t+r.slice(l);return t="",c}}function ql(e,t,n,i){const r=(t&Ke.BRANCH_LENGTH)>>7,s=t&Ke.JUMP_TABLE;if(r===0)return s!==0&&i===s?n:-1;if(s){const A=i-s;return A<0||A>=r?-1:e[n+A]-1}const l=r+1>>1;let a=0,c=r-1;for(;a<=c;){const A=a+c>>>1,f=A>>1,p=e[n+f]>>(A&1)*8&255;if(p<i)a=A+1;else if(p>i)c=A-1;else return e[n+l+A]}return-1}const ea=$l(Zl);function ri(e){return ea(e,_t.Strict)}var ta=class{constructor(e={}){Z(this,"src_Any",ei.source);Z(this,"src_Cc",ti.source);Z(this,"src_Z",oi.source);Z(this,"src_P",po.source);Z(this,"src_ZPCc",[this.src_Z,this.src_P,this.src_Cc].join("|"));Z(this,"src_ZCc",[this.src_Z,this.src_Cc].join("|"));Z(this,"cache",{});Z(this,"opts",{maxLength:1e4,urlAuth:!1,schema_names:[]});this.opts={...this.opts,...e}}set(e={}){return this.opts={...this.opts,...e},this.cache={},this}escapeRE(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}nestedPairRE(e,t,n=4){const i=this.escapeRE(e),r=this.escapeRE(t),s=`(?:(?!${this.src_ZCc}|${i}|${r}).)`;let l=`${i}${s}{0,1000}${r}`;for(let a=2;a<=n;a++)l=`${i}(?:${s}|${l}){0,1000}${r}`;return l}get_text_separators(){var e;return(e=this.cache).text_separators??(e.text_separators=/[><\uff5c]/)}get_pseudo_letter(){var e;return(e=this.cache).src_pseudo_letter??(e.src_pseudo_letter=new RegExp(`(?:(?!${this.get_text_separators().source}|${this.src_ZPCc})${this.src_Any})`))}get_ipv4_addr(){var e;return(e=this.cache).src_ip4??(e.src_ip4=new RegExp("(?:(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])[.]){3}(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])"))}get_ipv6_addr(){var n;const e="[0-9A-Fa-f]{1,4}",t=`(?:(?:${e}:${e})|${this.get_ipv4_addr().source})`;return(n=this.cache).src_ip6_addr??(n.src_ip6_addr=new RegExp(`(?:(?:${e}:){6}${t}|::(?:${e}:){5}${t}|(?:${e})?::(?:${e}:){4}${t}|(?:(?:${e}:){0,1}${e})?::(?:${e}:){3}${t}|(?:(?:${e}:){0,2}${e})?::(?:${e}:){2}${t}|(?:(?:${e}:){0,3}${e})?::${e}:${t}|(?:(?:${e}:){0,4}${e})?::${t}|(?:(?:${e}:){0,5}${e})?::${e}|(?:(?:${e}:){0,6}${e})?::)`))}get_ipv6_url_host(){var e;return(e=this.cache).src_ip6_host??(e.src_ip6_host=new RegExp(`\\[${this.get_ipv6_addr().source}\\]`))}get_ipv6_mail_host(){var e;return(e=this.cache).src_ipv6_mail_host??(e.src_ipv6_mail_host=new RegExp(`\\[IPv6:${this.get_ipv6_addr().source}\\]`))}get_auth(){var e;return(e=this.cache).src_auth??(e.src_auth=new RegExp(`(?:(?:(?!${this.src_ZCc}|[@/\\[\\]()]).){1,50}@)?`))}get_port(){var e;return(e=this.cache).src_port??(e.src_port=new RegExp("(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?"))}get_host_terminator(){var e;return(e=this.cache).src_host_terminator??(e.src_host_terminator=new RegExp(`(?=$|${this.get_text_separators().source}|${this.src_ZPCc})(?!${this.opts["---"]?"-(?!--)|":"-|"}_|:\\d|\\.-|\\.(?!$|${this.src_ZPCc}))`))}get_path_terminator(){var e;return(e=this.cache).src_path_terminator??(e.src_path_terminator=new RegExp(`${this.src_ZPCc}|${this.get_text_separators().source}`))}get_path(){var e;return(e=this.cache).src_path??(e.src_path=new RegExp(`(?:[/?#](?:${this.nestedPairRE("[","]")}|${this.nestedPairRE("(",")")}|${this.nestedPairRE("{","}")}|\\"(?:(?!${this.src_ZCc}|["]).){1,100}\\"|\\'(?:(?!${this.src_ZCc}|[']).){1,100}\\'|\\'(?=${this.get_pseudo_letter().source}|[-])|\\.{2,20}[:]?[a-zA-Z0-9%/&]|\\.(?!${this.src_ZCc}|[.]|$)|`+(this.opts["---"]?"\\-(?!--(?:[^-]|$))(?:-{0,19})|":"\\-{1,20}|")+`,(?!${this.src_ZCc}|$)|;(?!${this.src_ZCc}|$)|\\!{1,20}(?!${this.src_ZCc}|[!]|$)|\\?(?!${this.src_ZCc}|[?]|$)|`+this.get_path_extra().source+`[\\\\/:%@#&=_~*]|(?!${this.get_path_terminator().source}).){1,${this.opts.maxLength}}|\\/)?`))}get_mail_name(){var e;return(e=this.cache).src_mail_name??(e.src_mail_name=new RegExp("[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9](?:[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9]|[.](?=[-!#$%&'*+/=?^_`{|}~a-zA-Z0-9])){0,63}"))}get_xn(){var e;return(e=this.cache).src_xn??(e.src_xn=new RegExp("xn--[a-z0-9\\-]{1,59}"))}get_tld(){if(this.cache.tld)return this.cache.tld;const e=[...new Set(this.opts.tlds||[])].sort().reverse().join("|");return this.cache.tld=new RegExp(`${e||"$#none#$"}|${this.get_xn().source}`),this.cache.tld}get_domain_root(){var e;return(e=this.cache).src_domain_root??(e.src_domain_root=new RegExp("(?:"+this.get_xn().source+`|${this.get_pseudo_letter().source}{1,63})`))}get_domain(){var e;return(e=this.cache).src_domain??(e.src_domain=new RegExp("(?:"+this.get_xn().source+`|(?:${this.get_pseudo_letter().source})|(?:${this.get_pseudo_letter().source}(?:-|${this.get_pseudo_letter().source}){0,61}${this.get_pseudo_letter().source}))`))}get_url_host_port(){var e;return(e=this.cache).url_host_port??(e.url_host_port=new RegExp("(?:"+this.get_ipv6_url_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,10}${this.get_domain().source}))`+this.get_port().source+this.get_host_terminator().source))}get_fuzzy_url_host_port(){var e;return(e=this.cache).fuzzy_url_host_port??(e.fuzzy_url_host_port=new RegExp("(?:"+(this.opts.fuzzyIP?this.get_ipv4_addr().source+"|":"")+`(?:(?:(?:${this.get_domain().source})\\.){1,10}(?:${this.get_tld().source})))`+this.get_host_terminator().source))}get_mail_host(){var e;return(e=this.cache).src_mail_host??(e.src_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})\\.){0,4}${this.get_domain().source}))`+this.get_host_terminator().source))}get_fuzzy_mail_host(){var e;return(e=this.cache).src_fuzzy_mail_host??(e.src_fuzzy_mail_host=new RegExp("(?:"+this.get_ipv6_mail_host().source+`|(?:(?:(?:${this.get_domain().source})[.]){1,4}${this.get_domain_root().source}))`+this.get_host_terminator().source))}get_path_extra(){var e;return(e=this.cache).src_path_extra??(e.src_path_extra=new RegExp(""))}get_fuzzy_mail_host_search(){var e;return(e=this.cache).mail_fuzzy_host_search??(e.mail_fuzzy_host_search=new RegExp(`@${this.get_fuzzy_mail_host().source}`,"ig"))}get_fuzzy_link_search(){var e;return(e=this.cache).link_fuzzy_search??(e.link_fuzzy_search=new RegExp(`(^|(?![.:/\\-_@])(?:[$+<=>^\`||]|${this.src_ZPCc}))(?:(?![$+<=>^\`||])${this.get_fuzzy_url_host_port().source}${this.get_path().source})`,"ig"))}get_http_validator(){var e;return(e=this.cache).http_validator??(e.http_validator=new RegExp("\\/\\/"+(this.opts.urlAuth?this.get_auth().source:"")+this.get_url_host_port().source+this.get_path().source,"iy"))}get_relative_proto_validator(){var e;return(e=this.cache).relative_proto_validator??(e.relative_proto_validator=new RegExp((this.opts.urlAuth?this.get_auth().source:"")+`(?:localhost|${this.get_ipv6_url_host().source}|(?:(?:${this.get_domain().source})[.]){1,10}${this.get_domain_root().source})`+this.get_port().source+this.get_host_terminator().source+this.get_path().source,"iy"))}get_mail_name_validator(){var e;return(e=this.cache).mail_name_validator??(e.mail_name_validator=new RegExp(`(?:^|${this.get_text_separators().source}|"|\\(|${this.src_ZCc})(${this.get_mail_name().source})$`))}get_mailto_validator(){var e;return(e=this.cache).mailto_validator??(e.mailto_validator=new RegExp(`${this.get_mail_name().source}@${this.get_mail_host().source}`,"iy"))}get_schema_names(){var e;return(e=this.cache).schema_names??(e.schema_names=new RegExp((this.opts.schema_names||[]).map(t=>this.escapeRE(t)).join("|")))}get_schema_search(){var e;return(e=this.cache).schema_search??(e.schema_search=new RegExp(`(^|(?!_)(?:[><|]|${this.src_ZPCc}))(${this.get_schema_names().source})`,"ig"))}get_schema_at_start(){var e;return(e=this.cache).schema_at_start??(e.schema_at_start=new RegExp(`^${this.get_schema_search().source}`,"i"))}},Yn={validate:(e,t,n)=>{const i=n.re.get_http_validator();i.lastIndex=t;const r=i.exec(e);return r?r[0].length:0},normalize:(e,t)=>t.normalize(e)},na={"http:":Yn,"https:":Yn,"ftp:":Yn,"//":{validate:function(e,t,n){const i=n.re.get_relative_proto_validator();i.lastIndex=t;const r=i.exec(e);return r?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r[0].length:0},normalize:(e,t)=>t.normalize(e)},"mailto:":{validate:function(e,t,n){const i=n.re.get_mailto_validator();i.lastIndex=t;const r=i.exec(e);return r?r[0].length:0},normalize:(e,t)=>t.normalize(e)}},oa="a:cdefgilmnoqrstuwxz|b:abdefghijmnorstvwyz|c:acdfghiklmnoruvwxyz|d:ejkmoz|e:cegrstu|f:ijkmor|g:abdefghilmnpqrstuwy|h:kmnrtu|i:delmnoqrst|j:emop|k:eghimnprwyz|l:abcikrstuvy|m:acdeghklmnopqrstuvwxyz|n:acefgilopruz|o:m|p:aefghklmnrstwy|q:a|r:eosuw|s:abcdeghijklmnortuvxyz|t:cdfghjklmnortvwz|u:agksyz|v:aceginu|w:fs|y:et|z:amw",ra="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф";function ia(){const e=ra.split("|");return oa.split("|").forEach(t=>{const n=t.indexOf(":"),i=t.slice(0,n);for(const r of t.slice(n+1))e.push(i+r)}),e}var sa={fuzzyLink:!1,fuzzyEmail:!0,fuzzyIP:!1,"---":!1,tlds:ia(),urlAuth:!1,maxLength:1e4},Uo=class{constructor(e,t,n,i){Z(this,"schema");Z(this,"index");Z(this,"lastIndex");Z(this,"raw");Z(this,"text");Z(this,"url");const r=e.slice(n,i);this.schema=t.toLowerCase(),this.index=n,this.lastIndex=i,this.raw=r,this.text=r,this.url=r}},la=class{constructor(e={}){Z(this,"__opts__");Z(this,"__schemas__");Z(this,"re");const{rebuilder:t,...n}=e;this.__opts__={...sa,...n},this.__schemas__={...na},this.re=t||new ta,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)})}add(e,t=null){if(!t)delete this.__schemas__[e];else{const n={normalize:(i,r)=>r.normalize(i),...t};this.__schemas__[e]=n}return this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}set(e={}){return this.__opts__={...this.__opts__,...e},this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}test(e){if(!e.length)return!1;let t,n;for(n=this.re.get_schema_search(),n.lastIndex=0;(t=n.exec(e))!==null;)if(this.testSchemaAt(e,t[2],n.lastIndex))return!0;if(this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(n=this.re.get_fuzzy_link_search(),n.lastIndex=0,n.exec(e)!==null))return!0;if(this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&e.indexOf("@")>=0){const i=this.re.get_fuzzy_mail_host_search(),r=this.re.get_mail_name_validator();for(i.lastIndex=0;(t=i.exec(e))!==null;){const s=e.slice(Math.max(0,t.index-65),t.index);if(r.test(s))return!0}}return!1}testSchemaAt(e,t,n){return this.__schemas__[t.toLowerCase()]?this.__schemas__[t.toLowerCase()].validate(e.slice(0,n+this.__opts__.maxLength),n,this):0}match(e){const t=[],n=this.re.get_schema_search();let i,r,s,l,a,c,A=!1,f=!1,h=!1,p=0;if(!e.length)return null;for(n.lastIndex=0,this.__opts__.fuzzyLink&&this.__schemas__["http:"]&&(i=this.re.get_fuzzy_link_search(),i.lastIndex=0),this.__opts__.fuzzyEmail&&this.__schemas__["mailto:"]&&(r=this.re.get_fuzzy_mail_host_search(),r.lastIndex=0,s=this.re.get_mail_name_validator());;){const C=Math.max(p-1,0);if(r&&s&&!h&&(!a||a.index<p))for(r.lastIndex<C&&(r.lastIndex=C);;){const y=r.exec(e);if(!y){h=!0,a=void 0;break}const b=s.exec(e.slice(Math.max(0,y.index-65),y.index));if(b){if(a={schema:"mailto:",index:y.index-b[1].length,lastIndex:y.index+y[0].length},a.index>=p)break;r.lastIndex<C&&(r.lastIndex=C)}}if(i&&!f&&(!l||l.index<p))for(i.lastIndex<C&&(i.lastIndex=C);;){const y=i.exec(e);if(!y){f=!0,l=void 0;break}if(l={schema:"",index:y.index+y[1].length,lastIndex:y.index+y[0].length},l.index>=p)break;i.lastIndex<C&&(i.lastIndex=C)}let d=a;(!d||l&&(l.index<d.index||l.index===d.index&&l.lastIndex>d.lastIndex))&&(d=l);let w;if(!A)for(;;){if(!c){n.lastIndex<C&&(n.lastIndex=C);const _=n.exec(e);if(!_){A=!0;break}c={schema:_[2],index:_.index+_[1].length,lastIndex:_.index+_[0].length}}if(c.index<p){c=void 0;continue}if(d&&c.index>d.index)break;const y=c;c=void 0;const b=this.testSchemaAt(e,y.schema,y.lastIndex);if(b){w={schema:y.schema,index:y.index,lastIndex:y.lastIndex+b};break}}let I=w;if((!I||a&&(a.index<I.index||a.index===I.index&&a.lastIndex>I.lastIndex))&&(I=a),(!I||l&&(l.index<I.index||l.index===I.index&&l.lastIndex>I.lastIndex))&&(I=l),!I)break;I===a?a=void 0:I===l&&(l=void 0);const E=new Uo(e,I.schema,I.index,I.lastIndex);E.schema?this.__schemas__[E.schema].normalize(E,this):this.normalize(E),t.push(E),p=I.lastIndex}return t.length?t:null}matchAtStart(e){if(!e.length)return null;const t=this.re.get_schema_at_start().exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);if(!n)return null;const i=new Uo(e,t[2],t.index+t[1].length,t.index+t[0].length+n);return this.__schemas__[i.schema].normalize(i,this),i}tlds(e,t=!1){return e=Array.isArray(e)?e:[e],t?this.__opts__.tlds=this.__opts__.tlds.concat(e):this.__opts__.tlds=e,this.re.set({...this.__opts__,schema_names:Object.keys(this.__schemas__)}),this}normalize(e){e.schema||(e.url=`http://${e.url}`),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url=`mailto:${e.url}`)}};const Ht=2147483647,ot=36,mo=1,an=26,aa=38,ca=700,ii=72,si=128,li="-",Aa=/^xn--/,ua=/[^\0-\x7F]/,da=/[\x2E\u3002\uFF0E\uFF61]/g,fa={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Un=ot-mo,rt=Math.floor,Hn=String.fromCharCode;function Ct(e){throw new RangeError(fa[e])}function ha(e,t){const n=[];let i=e.length;for(;i--;)n[i]=t(e[i]);return n}function ai(e,t){const n=e.split("@");let i="";n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(da,".");const r=e.split("."),s=ha(r,t).join(".");return i+s}function ci(e){const t=[];let n=0;const i=e.length;for(;n<i;){const r=e.charCodeAt(n++);if(r>=55296&&r<=56319&&n<i){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((r&1023)<<10)+(s&1023)+65536):(t.push(r),n--)}else t.push(r)}return t}const pa=e=>String.fromCodePoint(...e),ma=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ot},Ho=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},Ai=function(e,t,n){let i=0;for(e=n?rt(e/ca):e>>1,e+=rt(e/t);e>Un*an>>1;i+=ot)e=rt(e/Un);return rt(i+(Un+1)*e/(e+aa))},ui=function(e){const t=[],n=e.length;let i=0,r=si,s=ii,l=e.lastIndexOf(li);l<0&&(l=0);for(let a=0;a<l;++a)e.charCodeAt(a)>=128&&Ct("not-basic"),t.push(e.charCodeAt(a));for(let a=l>0?l+1:0;a<n;){const c=i;for(let f=1,h=ot;;h+=ot){a>=n&&Ct("invalid-input");const p=ma(e.charCodeAt(a++));p>=ot&&Ct("invalid-input"),p>rt((Ht-i)/f)&&Ct("overflow"),i+=p*f;const C=h<=s?mo:h>=s+an?an:h-s;if(p<C)break;const d=ot-C;f>rt(Ht/d)&&Ct("overflow"),f*=d}const A=t.length+1;s=Ai(i-c,A,c==0),rt(i/A)>Ht-r&&Ct("overflow"),r+=rt(i/A),i%=A,t.splice(i++,0,r)}return String.fromCodePoint(...t)},di=function(e){const t=[];e=ci(e);const n=e.length;let i=si,r=0,s=ii;for(const c of e)c<128&&t.push(Hn(c));const l=t.length;let a=l;for(l&&t.push(li);a<n;){let c=Ht;for(const f of e)f>=i&&f<c&&(c=f);const A=a+1;c-i>rt((Ht-r)/A)&&Ct("overflow"),r+=(c-i)*A,i=c;for(const f of e)if(f<i&&++r>Ht&&Ct("overflow"),f===i){let h=r;for(let p=ot;;p+=ot){const C=p<=s?mo:p>=s+an?an:p-s;if(h<C)break;const d=h-C,w=ot-C;t.push(Hn(Ho(C+d%w,0))),h=rt(d/w)}t.push(Hn(Ho(h,0))),s=Ai(r,A,a===l),r=0,++a}++r,++i}return t.join("")},ga=function(e){return ai(e,function(t){return Aa.test(t)?ui(t.slice(4).toLowerCase()):t})},Ca=function(e){return ai(e,function(t){return ua.test(t)?"xn--"+di(t):t})},Lo={version:"2.3.1",ucs2:{decode:ci,encode:pa},decode:ui,encode:di,toASCII:Ca,toUnicode:ga};/*! markdown-it 15.0.0 https://github.com/markdown-it/markdown-it @license MIT */var Jo=Object.defineProperty,fi=(e,t)=>{let n={};for(var i in e)Jo(n,i,{get:e[i],enumerable:!0});return Jo(n,Symbol.toStringTag,{value:"Module"}),n},_a=fi({arrayReplaceAt:()=>pi,asciiTrim:()=>Mn,callable:()=>hi,escapeHtml:()=>Et,escapeRE:()=>Fa,fromCodePoint:()=>cn,isMdAsciiPunct:()=>dn,isPunctChar:()=>gi,isPunctCharCode:()=>un,isSpace:()=>Ae,isValidEntityCode:()=>go,isWhiteSpace:()=>An,lib:()=>xa,normalizeReference:()=>Tn,unescapeAll:()=>Zt,unescapeMd:()=>Ia});function hi(e){const t=function(...n){return Reflect.construct(e,n,new.target&&new.target!==t?new.target:e)};return Object.defineProperty(t,"name",{value:e.name}),Object.setPrototypeOf(t,e),t.prototype=e.prototype,t}function pi(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function go(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function cn(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var mi=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,ka=new RegExp(`${mi.source}|${/&([a-z#][a-z0-9]{1,31});/gi.source}`,"gi"),ya=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Ea(e,t){if(t.charCodeAt(0)===35&&ya.test(t)){const i=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return go(i)?cn(i):e}const n=ri(e);return n!==e?n:e}function Ia(e){return e.indexOf("\\")<0?e:e.replace(mi,"$1")}function Zt(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(ka,function(t,n,i){return n||Ea(t,i)})}var ba=/[&<>"]/,Da=/[&<>"]/g,wa={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function Ba(e){return wa[e]}function Et(e){return ba.test(e)?e.replace(Da,Ba):e}var va=/[.?*+^$[\]\\(){}|-]/g;function Fa(e){return e.replace(va,"\\$&")}function Ae(e){switch(e){case 9:case 32:return!0}return!1}function An(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function gi(e){return po.test(e)||ni.test(e)}function un(e){return gi(cn(e))}function dn(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function Tn(e){return e=e.trim().replace(/\s+/g," "),e.toLowerCase().toUpperCase()}function Zo(e){return e===32||e===9||e===10||e===13}function Mn(e){let t=0;for(;t<e.length&&Zo(e.charCodeAt(t));t++);let n=e.length-1;for(;n>=t&&Zo(e.charCodeAt(n));n--);return e.slice(t,n+1)}var xa={mdurl:Ol,ucmicro:Ul};function Sa(e,t,n){let i,r,s,l;const a=e.posMax,c=e.pos;for(e.pos=t+1,i=1;e.pos<a;){if(s=e.src.charCodeAt(e.pos),s===93&&(i--,i===0)){r=!0;break}if(l=e.pos,e.md.inline.skipToken(e),s===91){if(l===e.pos-1)i++;else if(n)return e.pos=c,-1}}let A=-1;return r&&(A=e.pos),e.pos=c,A}function Na(e,t,n){let i,r=t;const s={ok:!1,pos:0,str:""};if(e.charCodeAt(r)===60){for(r++;r<n;){if(i=e.charCodeAt(r),i===10||i===60)return s;if(i===62)return s.pos=r+1,s.str=Zt(e.slice(t+1,r)),s.ok=!0,s;if(i===92&&r+1<n){r+=2;continue}r++}return s}let l=0;for(;r<n&&(i=e.charCodeAt(r),!(i===32||i<32||i===127));){if(i===92&&r+1<n){if(e.charCodeAt(r+1)===32){r++;continue}r+=2;continue}if(i===40&&(l++,l>32))return s;if(i===41){if(l===0)break;l--}r++}return t===r||l!==0||(s.str=Zt(e.slice(t,r)),s.pos=r,s.ok=!0),s}function Ra(e,t,n,i){let r,s=t;const l={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(i)l.str=i.str,l.marker=i.marker;else{if(s>=n)return l;let a=e.charCodeAt(s);if(a!==34&&a!==39&&a!==40)return l;t++,s++,a===40&&(a=41),l.marker=a}for(;s<n;){if(r=e.charCodeAt(s),r===l.marker)return l.pos=s+1,l.str+=Zt(e.slice(t,s)),l.ok=!0,l;if(r===40&&l.marker===41)return l;r===92&&s+1<n&&s++,s++}return l.can_continue=!0,l.str+=Zt(e.slice(t,s)),l}var Ta=fi({parseLinkDestination:()=>Na,parseLinkLabel:()=>Sa,parseLinkTitle:()=>Ra});function fn(e){"@babel/helpers - typeof";return fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fn(e)}function Ma(e,t){if(fn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var i=n.call(e,t);if(fn(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qa(e){var t=Ma(e,"string");return fn(t)=="symbol"?t:t+""}function V(e,t,n){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xt=class{constructor(e,t,n){V(this,"map",null),V(this,"level",0),V(this,"children",null),V(this,"content",""),V(this,"markup",""),V(this,"info",""),V(this,"block",!1),V(this,"hidden",!1),this.type=e,this.tag=t,this.attrs=null,this.nesting=n,this.meta=null}attrIndex(e){if(!this.attrs)return-1;const t=this.attrs;for(let n=0,i=t.length;n<i;n++)if(t[n][0]===e)return n;return-1}attrPush(e){this.attrs?this.attrs.push(e):this.attrs=[e]}attrSet(e,t){const n=this.attrIndex(e),i=[e,t];n<0?this.attrPush(i):this.attrs[n]=i}attrGet(e){const t=this.attrIndex(e);let n=null;return t>=0&&(n=this.attrs[t][1]),n}attrJoin(e,t){const n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=`${this.attrs[n][1]} ${t}`}},hn=class{constructor(){V(this,"__rules__",[]),V(this,"__cache__",null)}__find__(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1}__compile__(){const e=new Set;this.__rules__.forEach(t=>{t.enabled&&t.alt.forEach(n=>{n&&e.add(n)})}),this.__cache__=Object.create(null),this.__cache__[""]=[],this.__rules__.forEach(t=>{t.enabled&&this.__cache__[""].push(t.fn)}),e.forEach(t=>{this.__cache__[t]=[],this.__rules__.forEach(n=>{n.enabled&&n.alt.indexOf(t)>=0&&this.__cache__[t].push(n.fn)})})}at(e,t,n={}){const i=this.__find__(e);if(i===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__[i].fn=t,this.__rules__[i].alt=n.alt||[],this.__cache__=null}before(e,t,n,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}after(e,t,n,i={}){const r=this.__find__(e);if(r===-1)throw new Error(`Parser rule not found: ${e}`);this.__rules__.splice(r+1,0,{name:t,enabled:!0,fn:n,alt:i.alt||[]}),this.__cache__=null}push(e,t,n={}){this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null}enable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!0,n.push(i)}),this.__cache__=null,n}enableOnly(e,t=!1){Array.isArray(e)||(e=[e]),this.__rules__.forEach(n=>{n.enabled=!1}),this.enable(e,t)}disable(e,t=!1){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(i=>{const r=this.__find__(i);if(r<0){if(t)return;throw new Error(`Rules manager: invalid rule name ${i}`)}this.__rules__[r].enabled=!1,n.push(i)}),this.__cache__=null,n}getRules(e){return this.__cache__||this.__compile__(),this.__cache__[e]||[]}},st={};st.code_inline=function(e,t,n,i,r){const s=e[t];return`<code${r.renderAttrs(s)}>${Et(s.content)}</code>`};st.code_block=function(e,t,n,i,r){const s=e[t];return`<pre${r.renderAttrs(s)}><code>${Et(e[t].content)}</code></pre>
50
+ `};st.fence=function(e,t,n,i,r){const s=e[t],l=s.info?Zt(s.info).trim():"";let a="",c="";if(l){const f=l.split(/(\s+)/g);a=f[0],c=f.slice(2).join("")}let A;if(n.highlight?A=n.highlight(s.content,a,c)||Et(s.content):A=Et(s.content),A.indexOf("<pre")===0)return A+`
51
+ `;if(l){const f=s.attrIndex("class"),h=s.attrs?s.attrs.slice():[];f<0?h.push(["class",`${n.langPrefix}${a}`]):(h[f]=[h[f][0],h[f][1]],h[f][1]+=` ${n.langPrefix}${a}`);const p={attrs:h};return`<pre><code${r.renderAttrs(p)}>${A}</code></pre>
52
+ `}return`<pre><code${r.renderAttrs(s)}>${A}</code></pre>
53
+ `};st.image=function(e,t,n,i,r){const s=e[t];return s.attrs[s.attrIndex("alt")][1]=r.renderInlineAsText(s.children,n,i),r.renderToken(e,t,n)};st.hardbreak=function(e,t,n){return n.xhtmlOut?`<br />
44
54
  `:`<br>
45
- `};He.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
55
+ `};st.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br />
46
56
  `:`<br>
47
57
  `:`
48
- `};He.text=function(e,t){return qe(e[t].content)};He.html_block=function(e,t){return e[t].content};He.html_inline=function(e,t){return e[t].content};var zr=class{constructor(){T(this,"rules",Object.assign({},He))}renderAttrs(e){let t,n,i;if(!e.attrs)return"";for(i="",t=0,n=e.attrs.length;t<n;t++)i+=` ${qe(e.attrs[t][0])}="${qe(String(e.attrs[t][1]))}"`;return i}renderToken(e,t,n){const i=e[t];let o="";if(i.hidden)return"";let s=t-1;for(;s>=0&&e[s].hidden&&e[s].nesting===0;)s--;i.block&&i.nesting!==-1&&s>=0&&e[s].hidden&&e[s].nesting===-1&&(o+=`
49
- `),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(o+=" /");let l=!1;if(i.block&&(l=!0,i.nesting===1)){let A=t+1;for(;A<e.length&&e[A].hidden&&e[A].nesting===0;)A++;if(A<e.length){const a=e[A];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(l=!1)}}return o+=l?`>
50
- `:">",o}renderInline(e,t,n){let i="";const o=this.rules;for(let s=0,l=e.length;s<l;s++){const A=e[s].type;typeof o[A]<"u"?i+=o[A](e,s,t,n,this):i+=this.renderToken(e,s,t)}return i}renderInlineAsText(e,t,n){let i="";for(let o=0,s=e.length;o<s;o++)switch(e[o].type){case"text":case"code_inline":i+=e[o].content;break;case"image":i+=this.renderInlineAsText(e[o].children,t,n);break;case"html_inline":case"html_block":i+=e[o].content;break;case"softbreak":case"hardbreak":i+=`
51
- `}return i}render(e,t,n){let i="";const o=this.rules;for(let s=0,l=e.length;s<l;s++){const A=e[s].type;A==="inline"?i+=this.renderInline(e[s].children,t,n):typeof o[A]<"u"?i+=o[A](e,s,t,n,this):i+=this.renderToken(e,s,t)}return i}},jr=class{constructor(e,t,n){T(this,"tokens",[]),T(this,"inlineMode",!1),T(this,"Token",At),this.src=e,this.env=n,this.md=t}},sA=/\r\n?|\n/g,lA=/\0/g;function AA(e){let t;t=e.src.replace(sA,`
52
- `),t=t.replace(lA,"�"),e.src=t}function aA(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function cA(e){const t=e.tokens;let n=0;for(let i=0;i<t.length;i++)t[i].type!=="reference_definition"&&(i!==n&&(t[n]=t[i]),n++);t.length!==n&&(t.length=n)}function uA(e){const t=e.tokens;for(let n=0,i=t.length;n<i;n++){const o=t[n];o.type==="inline"&&e.md.inline.parse(o.content,e.md,e.env,o.children)}}function dA(e){return/^<a[>\s]/i.test(e)}function hA(e){return/^<\/a\s*>/i.test(e)}function fA(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let o=t[n].children,s=0;for(let l=o.length-1;l>=0;l--){const A=o[l];if(A.type==="link_close"){for(l--;o[l].level!==A.level&&o[l].type!=="link_open";)l--;continue}if(A.type==="html_inline"&&(dA(A.content)&&s>0&&s--,hA(A.content)&&s++),!(s>0)&&A.type==="text"&&e.md.linkify.test(A.content)){const a=A.content;let u=e.md.linkify.match(a);const h=[];let f=A.level,m=0;u.length>0&&u[0].index===0&&l>0&&o[l-1].type==="text_special"&&(u=u.slice(1));for(let _=0;_<u.length;_++){const d=u[_].url,C=e.md.normalizeLink(d);if(!e.md.validateLink(C))continue;let g=u[_].text;u[_].schema?u[_].schema==="mailto:"&&!/^mailto:/i.test(g)?g=e.md.normalizeLinkText(`mailto:${g}`).replace(/^mailto:/,""):g=e.md.normalizeLinkText(g):g=e.md.normalizeLinkText(`http://${g}`).replace(/^http:\/\//,"");const E=u[_].index;if(E>m){const B=new e.Token("text","",0);B.content=a.slice(m,E),B.level=f,h.push(B)}const D=new e.Token("link_open","a",1);D.attrs=[["href",C]],D.level=f++,D.markup="linkify",D.info="auto",h.push(D);const F=new e.Token("text","",0);F.content=g,F.level=f,h.push(F);const k=new e.Token("link_close","a",-1);k.level=--f,k.markup="linkify",k.info="auto",h.push(k),m=u[_].lastIndex}if(m<a.length){const _=new e.Token("text","",0);_.content=a.slice(m),_.level=f,h.push(_)}t[n].children=o=Jr(o,l,h)}}}}var Xr=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,pA=/\((c|tm|r)\)/i,mA=/\((c|tm|r)\)/gi,gA={c:"©",r:"®",tm:"™"};function CA(e,t){return gA[t.toLowerCase()]}function _A(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(mA,CA)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function kA(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&Xr.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function EA(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(pA.test(e.tokens[t].content)&&_A(e.tokens[t].children),Xr.test(e.tokens[t].content)&&kA(e.tokens[t].children))}var yA=/['"]/,Mo=/['"]/g,Qo="’";function tn(e,t,n,i){e[t]||(e[t]=[]),e[t].push({pos:n,ch:i})}function IA(e,t){let n="",i=0;t.sort((o,s)=>o.pos-s.pos);for(let o=0;o<t.length;o++){const s=t[o];n+=e.slice(i,s.pos)+s.ch,i=s.pos+1}return n+e.slice(i)}function bA(e,t){let n;const i=[],o={};for(let s=0;s<e.length;s++){const l=e[s],A=e[s].level;for(n=i.length-1;n>=0&&!(i[n].level<=A);n--);if(i.length=n+1,l.type!=="text")continue;const a=l.content;let u=0;const h=a.length;e:for(;u<h;){Mo.lastIndex=u;const f=Mo.exec(a);if(!f)break;let m=!0,_=!0;u=f.index+1;const d=f[0]==="'";let C=32;if(f.index-1>=0)C=a.charCodeAt(f.index-1);else for(n=s-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){C=e[n].content.charCodeAt(e[n].content.length-1);break}let g=32;if(u<h)g=a.charCodeAt(u);else for(n=s+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){g=e[n].content.charCodeAt(0);break}const E=Yt(C)||Ot(C),D=Yt(g)||Ot(g),F=Wt(C),k=Wt(g);if(k?m=!1:D&&(F||E||(m=!1)),F?_=!1:E&&(k||D||(_=!1)),g===34&&f[0]==='"'&&C>=48&&C<=57&&(_=m=!1),m&&_&&(m=E,_=D),!m&&!_){d&&tn(o,s,f.index,Qo);continue}if(_)for(n=i.length-1;n>=0;n--){let B=i[n];if(i[n].level<A)break;if(B.single===d&&i[n].level===A){B=i[n];let M,K;d?(M=t.md.options.quotes[2],K=t.md.options.quotes[3]):(M=t.md.options.quotes[0],K=t.md.options.quotes[1]),tn(o,s,f.index,K),tn(o,B.token,B.pos,M),i.length=n;continue e}}m?i.push({token:s,pos:f.index,single:d,level:A}):_&&d&&tn(o,s,f.index,Qo)}}Object.keys(o).forEach(function(s){const l=Number(s);e[l].content=IA(e[l].content,o[s])})}function DA(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!yA.test(e.tokens[t].content)||bA(e.tokens[t].children,e)}function BA(e){let t,n;const i=e.length;for(t=0;t<i;t++)e[t].type==="text_special"&&(e[t].type="text");for(t=n=0;t<i;t++)e[t].type==="text"&&t+1<i&&e[t+1].type==="text"?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}function wA(e){let t,n;const i=e.tokens,o=i.length;for(let s=0;s<o;s++){if(i[s].type!=="inline")continue;const l=i[s].children,A=l.length;for(t=0;t<A;t++)l[t].type==="text_special"&&(l[t].type="text"),l[t].children&&BA(l[t].children);for(t=n=0;t<A;t++)l[t].type==="text"&&t+1<A&&l[t+1].type==="text"?l[t+1].content=l[t].content+l[t+1].content:(t!==n&&(l[n]=l[t]),n++);t!==n&&(l.length=n)}}var xn=[["normalize",AA],["block",aA],["strip_references",cA],["inline",uA],["linkify",fA],["replacements",EA],["smartquotes",DA],["text_join",wA]],$r=class{constructor(){T(this,"ruler",new Ut),T(this,"State",jr);for(let e=0;e<xn.length;e++)this.ruler.push(xn[e][0],xn[e][1])}process(e){const t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)}},qr=class{constructor(e,t,n,i){T(this,"bMarks",[]),T(this,"eMarks",[]),T(this,"tShift",[]),T(this,"sCount",[]),T(this,"bsCount",[]),T(this,"blkIndent",0),T(this,"line",0),T(this,"lineMax",0),T(this,"tight",!1),T(this,"listIndent",-1),T(this,"parentType","root"),T(this,"level",0),T(this,"Token",At),this.src=e,this.md=t,this.env=n,this.tokens=i;const o=this.src;for(let s=0,l=0,A=0,a=0,u=o.length,h=!1;l<u;l++){const f=o.charCodeAt(l);if(!h)if(se(f)){A++,f===9?a+=4-a%4:a++;continue}else h=!0;(f===10||l===u-1)&&(f!==10&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(A),this.sCount.push(a),this.bsCount.push(0),h=!1,A=0,a=0,s=l+1)}this.bMarks.push(o.length),this.eMarks.push(o.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){const i=new At(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&se(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!se(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";const o=new Array(t-e);for(let s=0,l=e;l<t;l++,s++){let A=0;const a=this.bMarks[l];let u=a,h;for(l+1<t||i?h=this.eMarks[l]+1:h=this.eMarks[l];u<h&&A<n;){const f=this.src.charCodeAt(u);if(se(f))f===9?A+=4-(A+this.bsCount[l])%4:A++;else if(u-a<this.tShift[l])A++;else break;u++}A>n?o[s]=new Array(A-n+1).join(" ")+this.src.slice(u,h):o[s]=this.src.slice(u,h)}return o.join("")}},FA=65536;function Sn(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function Ko(e){const t=[],n=e.length;let i=0,o=e.charCodeAt(i),s=!1,l=0,A="";for(;i<n;)o===124&&(s?(A+=e.substring(l,i-1),l=i):(t.push(A+e.substring(l,i)),A="",l=i+1)),s=o===92,i++,o=e.charCodeAt(i);return t.push(A+e.substring(l)),t}function vA(e,t,n,i){if(t+2>n)return!1;let o=t+1;if(e.sCount[o]<e.blkIndent||e.sCount[o]-e.blkIndent>=4)return!1;let s=e.bMarks[o]+e.tShift[o];if(s>=e.eMarks[o])return!1;const l=e.src.charCodeAt(s++);if(l!==124&&l!==45&&l!==58||s>=e.eMarks[o])return!1;const A=e.src.charCodeAt(s++);if(A!==124&&A!==45&&A!==58&&!se(A)||l===45&&se(A))return!1;for(;s<e.eMarks[o];){const k=e.src.charCodeAt(s);if(k!==124&&k!==45&&k!==58&&!se(k))return!1;s++}let a=Sn(e,t+1),u=a.split("|");const h=[];for(let k=0;k<u.length;k++){const B=u[k].trim();if(!B){if(k===0||k===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(B))return!1;B.charCodeAt(B.length-1)===58?h.push(B.charCodeAt(0)===58?"center":"right"):B.charCodeAt(0)===58?h.push("left"):h.push("")}if(a=Sn(e,t).trim(),a.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;u=Ko(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const f=u.length;if(f===0||f!==h.length)return!1;if(i)return!0;const m=e.parentType;e.parentType="table";const _=e.md.block.ruler.getRules("blockquote"),d=e.push("table_open","table",1),C=[t,0];d.map=C;const g=e.push("thead_open","thead",1);g.map=[t,t+1];const E=e.push("tr_open","tr",1);E.map=[t,t+1];for(let k=0;k<u.length;k++){const B=e.push("th_open","th",1);h[k]&&(B.attrs=[["style",`text-align:${h[k]}`]]);const M=e.push("inline","",0);M.content=u[k].trim(),M.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let D,F=0;for(o=t+2;o<n&&!(e.sCount[o]<e.blkIndent);o++){let k=!1;for(let M=0,K=_.length;M<K;M++)if(_[M](e,o,n,!0)){k=!0;break}if(k||(a=Sn(e,o).trim(),!a)||e.sCount[o]-e.blkIndent>=4||(u=Ko(a),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),F+=f-u.length,F>FA))break;if(o===t+2){const M=e.push("tbody_open","tbody",1);M.map=D=[t+2,0]}const B=e.push("tr_open","tr",1);B.map=[o,o+1];for(let M=0;M<f;M++){const K=e.push("td_open","td",1);h[M]&&(K.attrs=[["style",`text-align:${h[M]}`]]);const S=e.push("inline","",0);S.content=u[M]?u[M].trim():"",S.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return D&&(e.push("tbody_close","tbody",-1),D[1]=o),e.push("table_close","table",-1),C[1]=o,e.parentType=m,e.line=o,!0}function xA(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,o=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,o=i;continue}break}e.line=o;const s=e.push("code_block","code",0);return s.content=e.getLines(t,o,4+e.blkIndent,!1)+`
53
- `,s.map=[t,e.line],!0}function SA(e,t,n,i){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||o+3>s)return!1;const l=e.src.charCodeAt(o);if(l!==126&&l!==96)return!1;let A=o;o=e.skipChars(o,l);let a=o-A;if(a<3)return!1;const u=e.src.slice(A,o),h=e.src.slice(o,s);if(l===96&&h.indexOf(String.fromCharCode(l))>=0)return!1;if(i)return!0;let f=t,m=!1;for(;f++,!(f>=n||(o=A=e.bMarks[f]+e.tShift[f],s=e.eMarks[f],o<s&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(o)===l&&!(e.sCount[f]-e.blkIndent>=4)&&(o=e.skipChars(o,l),!(o-A<a)&&(o=e.skipSpaces(o),!(o<s)))){m=!0;break}a=e.sCount[t],e.line=f+(m?1:0);const _=e.push("fence","code",0);return _.info=h,_.content=e.getLines(t+1,f,a,!0),_.markup=u,_.map=[t,e.line],!0}function NA(e,t,n,i){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];const l=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==62)return!1;if(i)return!0;const A=[],a=[],u=[],h=[],f=e.md.block.ruler.getRules("blockquote"),m=e.parentType;e.parentType="blockquote";let _=!1,d;for(d=t;d<n;d++){const F=e.sCount[d]<e.blkIndent;if(o=e.bMarks[d]+e.tShift[d],s=e.eMarks[d],o>=s)break;if(e.src.charCodeAt(o++)===62&&!F){let B=e.sCount[d]+1,M,K;e.src.charCodeAt(o)===32?(o++,B++,K=!1,M=!0):e.src.charCodeAt(o)===9?(M=!0,(e.bsCount[d]+B)%4===3?(o++,B++,K=!1):K=!0):M=!1;let S=B;for(A.push(e.bMarks[d]),e.bMarks[d]=o;o<s;){const I=e.src.charCodeAt(o);if(se(I))I===9?S+=4-(S+e.bsCount[d]+(K?1:0))%4:S++;else break;o++}_=o>=s,a.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(M?1:0),u.push(e.sCount[d]),e.sCount[d]=S-B,h.push(e.tShift[d]),e.tShift[d]=o-e.bMarks[d];continue}if(_)break;let k=!1;for(let B=0,M=f.length;B<M;B++)if(f[B](e,d,n,!0)){k=!0;break}if(k){e.lineMax=d,e.blkIndent!==0&&(A.push(e.bMarks[d]),a.push(e.bsCount[d]),h.push(e.tShift[d]),u.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}A.push(e.bMarks[d]),a.push(e.bsCount[d]),h.push(e.tShift[d]),u.push(e.sCount[d]),e.sCount[d]=-1}const C=e.blkIndent;e.blkIndent=0;const g=e.push("blockquote_open","blockquote",1);g.markup=">";const E=[t,0];g.map=E,e.md.block.tokenize(e,t,d);const D=e.push("blockquote_close","blockquote",-1);D.markup=">",e.lineMax=l,e.parentType=m,E[1]=e.line;for(let F=0;F<h.length;F++)e.bMarks[F+t]=A[F],e.tShift[F+t]=h[F],e.sCount[F+t]=u[F],e.bsCount[F+t]=a[F];return e.blkIndent=C,!0}function RA(e,t,n,i){const o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.bMarks[t]+e.tShift[t];const l=e.src.charCodeAt(s++);if(l!==42&&l!==45&&l!==95)return!1;let A=1;for(;s<o;){const u=e.src.charCodeAt(s++);if(u!==l&&!se(u))return!1;u===l&&A++}if(A<3)return!1;if(i)return!0;e.line=t+1;const a=e.push("hr","hr",0);return a.map=[t,e.line],a.markup=Array(A+1).join(String.fromCharCode(l)),!0}function Go(e,t){const n=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const o=e.src.charCodeAt(i++);return o!==42&&o!==45&&o!==43||i<n&&!se(e.src.charCodeAt(i))?-1:i}function Wo(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let o=n;if(o+1>=i)return-1;let s=e.src.charCodeAt(o++);if(s<48||s>57)return-1;for(;;){if(o>=i)return-1;if(s=e.src.charCodeAt(o++),s>=48&&s<=57){if(o-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return o<i&&(s=e.src.charCodeAt(o),!se(s))?-1:o}function TA(e,t){const n=e.level+2;for(let i=t+2,o=e.tokens.length-2;i<o;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function MA(e,t,n,i){let o,s,l,A,a=t,u=!0;if(e.sCount[a]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[a]-e.listIndent>=4&&e.sCount[a]<e.blkIndent)return!1;let h=!1;i&&e.parentType==="paragraph"&&e.sCount[a]>=e.blkIndent&&(h=!0);let f,m,_;if((_=Wo(e,a))>=0){if(f=!0,l=e.bMarks[a]+e.tShift[a],m=Number(e.src.slice(l,_-1)),h&&m!==1)return!1}else if((_=Go(e,a))>=0)f=!1;else return!1;if(h&&e.skipSpaces(_)>=e.eMarks[a])return!1;if(i)return!0;const d=e.src.charCodeAt(_-1),C=e.tokens.length;f?(A=e.push("ordered_list_open","ol",1),m!==1&&(A.attrs=[["start",m]])):A=e.push("bullet_list_open","ul",1);const g=[a,0];A.map=g,A.markup=String.fromCharCode(d);let E=!1;const D=e.md.block.ruler.getRules("list"),F=e.parentType;for(e.parentType="list";a<n;){s=_,o=e.eMarks[a];const k=e.sCount[a]+_-(e.bMarks[a]+e.tShift[a]);let B=k;for(;s<o;){const j=e.src.charCodeAt(s);if(j===9)B+=4-(B+e.bsCount[a])%4;else if(j===32)B++;else break;s++}const M=s;let K;M>=o?K=1:K=B-k,K>4&&(K=1);const S=k+K;A=e.push("list_item_open","li",1),A.markup=String.fromCharCode(d);const I=[a,0];A.map=I,f&&(A.info=e.src.slice(l,_-1));const W=e.tight,O=e.tShift[a],te=e.sCount[a],q=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=S,e.tight=!0,e.tShift[a]=M-e.bMarks[a],e.sCount[a]=B,M>=o&&e.isEmpty(a+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,a,n),(!e.tight||E)&&(u=!1),E=e.line-a>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=q,e.tShift[a]=O,e.sCount[a]=te,e.tight=W,A=e.push("list_item_close","li",-1),A.markup=String.fromCharCode(d),a=e.line,I[1]=a,a>=n||e.sCount[a]<e.blkIndent||e.sCount[a]-e.blkIndent>=4)break;let U=!1;for(let j=0,J=D.length;j<J;j++)if(D[j](e,a,n,!0)){U=!0;break}if(U)break;if(f){if(_=Wo(e,a),_<0)break;l=e.bMarks[a]+e.tShift[a]}else if(_=Go(e,a),_<0)break;if(d!==e.src.charCodeAt(_-1))break}return f?A=e.push("ordered_list_close","ol",-1):A=e.push("bullet_list_close","ul",-1),A.markup=String.fromCharCode(d),g[1]=a,e.line=a,e.parentType=F,u&&TA(e,C),!0}function QA(e,t,n,i){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(o)!==91)return!1;function A(k){const B=e.lineMax;if(k>=B||e.isEmpty(k))return null;let M=!1;if(e.sCount[k]-e.blkIndent>3&&(M=!0),e.sCount[k]<0&&(M=!0),!M){const I=e.md.block.ruler.getRules("reference"),W=e.parentType;e.parentType="reference";let O=!1;for(let te=0,q=I.length;te<q;te++)if(I[te](e,k,B,!0)){O=!0;break}if(e.parentType=W,O)return null}const K=e.bMarks[k]+e.tShift[k],S=e.eMarks[k];return e.src.slice(K,S+1)}let a=e.src.slice(o,s+1);s=a.length;let u=-1;for(o=1;o<s;o++){const k=a.charCodeAt(o);if(k===91)return!1;if(k===93){u=o;break}else if(k===10){const B=A(l);B!==null&&(a+=B,s=a.length,l++)}else if(k===92&&(o++,o<s&&a.charCodeAt(o)===10)){const B=A(l);B!==null&&(a+=B,s=a.length,l++)}}if(u<0||a.charCodeAt(u+1)!==58)return!1;for(o=u+2;o<s;o++){const k=a.charCodeAt(o);if(k===10){const B=A(l);B!==null&&(a+=B,s=a.length,l++)}else if(!se(k))break}const h=e.md.helpers.parseLinkDestination(a,o,s);if(!h.ok)return!1;const f=e.md.normalizeLink(h.str);if(!e.md.validateLink(f))return!1;o=h.pos;const m=o,_=l,d=o;for(;o<s;o++){const k=a.charCodeAt(o);if(k===10){const B=A(l);B!==null&&(a+=B,s=a.length,l++)}else if(!se(k))break}let C=e.md.helpers.parseLinkTitle(a,o,s);for(;C.can_continue;){const k=A(l);if(k===null)break;a+=k,o=s,s=a.length,l++,C=e.md.helpers.parseLinkTitle(a,o,s,C)}let g;for(o<s&&d!==o&&C.ok?(g=C.str,o=C.pos):(g="",o=m,l=_);o<s&&se(a.charCodeAt(o));)o++;if(o<s&&a.charCodeAt(o)!==10&&g)for(g="",o=m,l=_;o<s&&se(a.charCodeAt(o));)o++;if(o<s&&a.charCodeAt(o)!==10)return!1;const E=An(a.slice(1,u));if(!E)return!1;if(i)return!0;typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[E]>"u"&&(e.env.references[E]={title:g,href:f});const D=e.push("reference_definition","",0);D.map=[t,l],D.hidden=!0;const F=Object.create(null);return F.label=E,D.meta=F,e.line=l,!0}var KA=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ei=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,ti="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",GA=new RegExp(`^(?:${ei}|${ti}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),WA=new RegExp(`^(?:${ei}|${ti})`),it=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${KA.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${WA.source}\\s*$`),/^$/,!1]];function OA(e,t,n,i){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(o)!==60)return!1;let l=e.src.slice(o,s),A=0;for(;A<it.length&&!it[A][0].test(l);A++);if(A===it.length)return!1;if(i)return it[A][2];let a=t+1;const u=it[A][1].test("");if(!it[A][1].test(l)){for(;a<n&&!(e.sCount[a]<e.blkIndent&&(u||!e.isEmpty(a)));a++)if(o=e.bMarks[a]+e.tShift[a],s=e.eMarks[a],l=e.src.slice(o,s),it[A][1].test(l)){l.length!==0&&a++;break}}e.line=a;const h=e.push("html_block","",0);return h.map=[t,a],h.content=e.getLines(t,a,e.blkIndent,!0),!0}function YA(e,t,n,i){let o=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let l=e.src.charCodeAt(o);if(l!==35||o>=s)return!1;let A=1;for(l=e.src.charCodeAt(++o);l===35&&o<s&&A<=6;)A++,l=e.src.charCodeAt(++o);if(A>6||o<s&&!se(l))return!1;if(i)return!0;s=e.skipSpacesBack(s,o);const a=e.skipCharsBack(s,35,o);a>o&&se(e.src.charCodeAt(a-1))&&(s=a),e.line=t+1;const u=e.push("heading_open",`h${A}`,1);u.markup="########".slice(0,A),u.map=[t,e.line];const h=e.push("inline","",0);h.content=an(e.src.slice(o,s)),h.map=[t,e.line],h.children=[];const f=e.push("heading_close",`h${A}`,-1);return f.markup="########".slice(0,A),!0}function HA(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const o=e.parentType;e.parentType="paragraph";let s=0,l,A=t+1;for(;A<n&&!e.isEmpty(A);A++){if(e.sCount[A]-e.blkIndent>3)continue;if(e.sCount[A]>=e.blkIndent){let _=e.bMarks[A]+e.tShift[A];const d=e.eMarks[A];if(_<d&&(l=e.src.charCodeAt(_),(l===45||l===61)&&(_=e.skipChars(_,l),_=e.skipSpaces(_),_>=d))){s=l===61?1:2;break}}if(e.sCount[A]<0)continue;let m=!1;for(let _=0,d=i.length;_<d;_++)if(i[_](e,A,n,!0)){m=!0;break}if(m)break}if(!s)return e.parentType=o,!1;const a=an(e.getLines(t,A,e.blkIndent,!1));e.line=A+1;const u=e.push("heading_open",`h${s}`,1);u.markup=String.fromCharCode(l),u.map=[t,e.line];const h=e.push("inline","",0);h.content=a,h.map=[t,e.line-1],h.children=[];const f=e.push("heading_close",`h${s}`,-1);return f.markup=String.fromCharCode(l),e.parentType=o,!0}function UA(e,t,n){const i=e.md.block.ruler.getRules("paragraph"),o=e.parentType;let s=t+1;for(e.parentType="paragraph";s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)continue;let u=!1;for(let h=0,f=i.length;h<f;h++)if(i[h](e,s,n,!0)){u=!0;break}if(u)break}const l=an(e.getLines(t,s,e.blkIndent,!1));e.line=s;const A=e.push("paragraph_open","p",1);A.map=[t,e.line];const a=e.push("inline","",0);return a.content=l,a.map=[t,e.line],a.children=[],e.push("paragraph_close","p",-1),e.parentType=o,!0}var nn=[["table",vA,["paragraph","reference"]],["code",xA],["fence",SA,["paragraph","reference","blockquote","list"]],["blockquote",NA,["paragraph","reference","blockquote","list"]],["hr",RA,["paragraph","reference","blockquote","list"]],["list",MA,["paragraph","reference","blockquote"]],["reference",QA],["html_block",OA,["paragraph","reference","blockquote"]],["heading",YA,["paragraph","reference","blockquote"]],["lheading",HA],["paragraph",UA]],ni=class{constructor(){T(this,"ruler",new Ut),T(this,"State",qr);for(let e=0;e<nn.length;e++)this.ruler.push(nn[e][0],nn[e][1],{alt:(nn[e][2]||[]).slice()})}tokenize(e,t,n){const i=this.ruler.getRules(""),o=i.length,s=e.md.options.maxNesting;let l=t,A=!1;for(;l<n&&(e.line=l=e.skipEmptyLines(l),!(l>=n||e.sCount[l]<e.blkIndent));){if(e.level>=s){e.line=n;break}const a=e.line;let u=!1;for(let h=0;h<o;h++)if(u=i[h](e,l,n,!1),u){if(a>=e.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");e.tight=!A,e.isEmpty(e.line-1)&&(A=!0),l=e.line,l<n&&e.isEmpty(l)&&(A=!0,l++,e.line=l)}}parse(e,t,n,i){if(!e)return;const o=new this.State(e,t,n,i);this.tokenize(o,o.line,o.lineMax)}},oi=class{constructor(e,t,n,i){T(this,"pos",0),T(this,"level",0),T(this,"pending",""),T(this,"pendingLevel",0),T(this,"cache",{}),T(this,"backticks",{}),T(this,"backticksScanned",!1),T(this,"linkLevel",0),T(this,"delimiters",[]),T(this,"_prev_delimiters",[]),T(this,"Token",At),this.src=e,this.env=n,this.md=t,this.tokens=i,this.tokens_meta=Array(i.length),this.posMax=this.src.length}pushPending(){const e=new At("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){this.pending&&this.pushPending();const i=new At(e,t,n);let o;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],o={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(o),i}scanDelims(e,t){const n=this.posMax,i=this.src.charCodeAt(e);let o;if(e===0)o=32;else if(e===1)o=this.src.charCodeAt(0),(o&63488)===55296&&(o=65533);else if(o=this.src.charCodeAt(e-1),(o&64512)===56320){const d=this.src.charCodeAt(e-2);o=(d&64512)===55296?65536+(d-55296<<10)+(o-56320):65533}else(o&64512)===55296&&(o=65533);let s=e;for(;s<n&&this.src.charCodeAt(s)===i;)s++;const l=s-e;let A=s<n?this.src.charCodeAt(s):32;if((A&64512)===55296){const d=this.src.charCodeAt(s+1);A=(d&64512)===56320?65536+(A-55296<<10)+(d-56320):65533}else(A&64512)===56320&&(A=65533);const a=Yt(o)||Ot(o),u=Yt(A)||Ot(A),h=Wt(o),f=Wt(A),m=!f&&(!u||h||a),_=!h&&(!a||f||u);return{can_open:m&&(t||!_||a),can_close:_&&(t||!m||u),length:l}}};function VA(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function LA(e,t){let n=e.pos;for(;n<e.posMax&&!VA(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var JA=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function ZA(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const o=e.pending.match(JA);if(!o)return!1;const s=o[1],l=e.md.linkify.matchAtStart(e.src.slice(n-s.length));if(!l)return!1;let A=l.url;if(A.length<=s.length)return!1;let a=A.length;for(;a>0&&A.charCodeAt(a-1)===42;)a--;a!==A.length&&(A=A.slice(0,a));const u=e.md.normalizeLink(A);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const h=e.push("link_open","a",1);h.attrs=[["href",u]],h.markup="linkify",h.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(A);const m=e.push("link_close","a",-1);m.markup="linkify",m.info="auto"}return e.pos+=A.length-s.length,!0}function PA(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,o=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let s=i-1;for(;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<o&&se(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var qn=[];for(let e=0;e<256;e++)qn.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){qn[e.charCodeAt(0)]=1});function zA(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let o=e.src.charCodeAt(n);if(o===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(o=e.src.charCodeAt(n),!!se(o));)n++;return e.pos=n,!0}if(o===32){if(!t){const A=e.push("text_special","",0);A.content="\\",A.markup="\\",A.info="escape"}return e.pos=n,!0}let s=e.src[n];if(o>=55296&&o<=56319&&n+1<i){const A=e.src.charCodeAt(n+1);A>=56320&&A<=57343&&(s+=e.src[n+1],n++)}const l="\\"+s;if(!t){const A=e.push("text_special","",0);o<256&&qn[o]!==0?A.content=s:A.content=l,A.markup=l,A.info="escape"}return e.pos=n+1,!0}function jA(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(i,n),l=s.length;if(e.backticksScanned&&(e.backticks[l]||0)<=i)return t||(e.pending+=s),e.pos+=l,!0;let A=n,a;for(;(a=e.src.indexOf("`",A))!==-1;){for(A=a+1;A<o&&e.src.charCodeAt(A)===96;)A++;const u=A-a;if(u===l){if(!t){const h=e.push("code_inline","code",0);h.markup=s,h.content=e.src.slice(n,a).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=A,!0}e.backticks[u]=a}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=l,!0}function XA(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const o=e.scanDelims(e.pos,!0);let s=o.length;const l=String.fromCharCode(i);if(s<2)return!1;let A;s%2&&(A=e.push("text","",0),A.content=l,s--);for(let a=0;a<s;a+=2)A=e.push("text","",0),A.content=l+l,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close});return e.pos+=o.length,!0}function Oo(e,t){let n;const i=[],o=t.length;for(let s=0;s<o;s++){const l=t[s];if(l.marker!==126||l.end===-1)continue;const A=t[l.end];n=e.tokens[l.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[A.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[A.token-1].type==="text"&&e.tokens[A.token-1].content==="~"&&i.push(A.token-1)}for(;i.length;){const s=i.pop();let l=s+1;for(;l<e.tokens.length&&e.tokens[l].type==="s_close";)l++;l--,s!==l&&(n=e.tokens[l],e.tokens[l]=e.tokens[s],e.tokens[s]=n)}}function $A(e){const t=e.tokens_meta,n=e.tokens_meta.length;Oo(e,e.delimiters);for(let o=0;o<n;o++){var i;const s=(i=t[o])===null||i===void 0?void 0:i.delimiters;s&&Oo(e,s)}}var ri={tokenize:XA,postProcess:$A};function qA(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;const o=e.scanDelims(e.pos,i===42);for(let s=0;s<o.length;s++){const l=e.push("text","",0);l.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:o.length,token:e.tokens.length-1,end:-1,open:o.can_open,close:o.can_close})}return e.pos+=o.length,!0}function Yo(e,t){const n=t.length;for(let i=n-1;i>=0;i--){const o=t[i];if(o.marker!==95&&o.marker!==42||o.end===-1)continue;const s=t[o.end],l=i>0&&t[i-1].end===o.end+1&&t[i-1].marker===o.marker&&t[i-1].token===o.token-1&&t[o.end+1].token===s.token+1,A=String.fromCharCode(o.marker),a=e.tokens[o.token];a.type=l?"strong_open":"em_open",a.tag=l?"strong":"em",a.nesting=1,a.markup=l?A+A:A,a.content="";const u=e.tokens[s.token];u.type=l?"strong_close":"em_close",u.tag=l?"strong":"em",u.nesting=-1,u.markup=l?A+A:A,u.content="",l&&(e.tokens[t[i-1].token].content="",e.tokens[t[o.end+1].token].content="",i--)}}function ea(e){const t=e.tokens_meta,n=e.tokens_meta.length;Yo(e,e.delimiters);for(let o=0;o<n;o++){var i;const s=(i=t[o])===null||i===void 0?void 0:i.delimiters;s&&Yo(e,s)}}var ii={tokenize:qA,postProcess:ea};function ta(e,t){let n,i,o,s,l="",A="",a=e.pos,u=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const h=e.pos,f=e.posMax,m=e.pos+1,_=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(_<0)return!1;let d=_+1;if(d<f&&e.src.charCodeAt(d)===40){for(u=!1,d++;d<f&&(n=e.src.charCodeAt(d),!(!se(n)&&n!==10));d++);if(d>=f)return!1;if(a=d,o=e.md.helpers.parseLinkDestination(e.src,d,e.posMax),o.ok){for(l=e.md.normalizeLink(o.str),e.md.validateLink(l)?d=o.pos:l="",a=d;d<f&&(n=e.src.charCodeAt(d),!(!se(n)&&n!==10));d++);if(o=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<f&&a!==d&&o.ok)for(A=o.str,d=o.pos;d<f&&(n=e.src.charCodeAt(d),!(!se(n)&&n!==10));d++);}(d>=f||e.src.charCodeAt(d)!==41)&&(u=!0),d++}if(u){if(typeof e.env.references>"u")return!1;if(d<f&&e.src.charCodeAt(d)===91?(a=d+1,d=e.md.helpers.parseLinkLabel(e,d),d>=0?i=e.src.slice(a,d++):d=_+1):d=_+1,i||(i=e.src.slice(m,_)),i=An(i),s=e.env.references[i],!s)return e.pos=h,!1;l=s.href,A=s.title}if(!t){e.pos=m,e.posMax=_;const C=e.push("link_open","a",1),g=[["href",l]];if(C.attrs=g,A&&g.push(["title",A]),i){const E=Object.create(null);E.label=i,C.meta=E}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=f,!0}function na(e,t){let n,i,o,s,l,A,a,u,h="";const f=e.pos,m=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const _=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if(s=d+1,s<m&&e.src.charCodeAt(s)===40){for(s++;s<m&&(n=e.src.charCodeAt(s),!(!se(n)&&n!==10));s++);if(s>=m)return!1;for(u=s,A=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),A.ok&&(h=e.md.normalizeLink(A.str),e.md.validateLink(h)?s=A.pos:h=""),u=s;s<m&&(n=e.src.charCodeAt(s),!(!se(n)&&n!==10));s++);if(A=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<m&&u!==s&&A.ok)for(a=A.str,s=A.pos;s<m&&(n=e.src.charCodeAt(s),!(!se(n)&&n!==10));s++);else a="";if(s>=m||e.src.charCodeAt(s)!==41)return e.pos=f,!1;s++}else{if(typeof e.env.references>"u")return!1;if(s<m&&e.src.charCodeAt(s)===91?(u=s+1,s=e.md.helpers.parseLinkLabel(e,s),s>=0?o=e.src.slice(u,s++):s=d+1):s=d+1,o||(o=e.src.slice(_,d)),o=An(o),l=e.env.references[o],!l)return e.pos=f,!1;h=l.href,a=l.title}if(!t){i=e.src.slice(_,d);const C=[];e.md.inline.parse(i,e.md,e.env,C);const g=e.push("image","img",0),E=[["src",h],["alt",""]];if(g.attrs=E,g.children=C,g.content=i,a&&E.push(["title",a]),o){const D=Object.create(null);D.label=o,g.meta=D}}return e.pos=s,e.posMax=m,!0}var oa=/^([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])?)*)$/,ra=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function ia(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,o=e.posMax;for(;;){if(++n>=o)return!1;const l=e.src.charCodeAt(n);if(l===60)return!1;if(l===62)break}const s=e.src.slice(i+1,n);if(ra.test(s)){const l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){const A=e.push("link_open","a",1);A.attrs=[["href",l]],A.markup="autolink",A.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(s);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=s.length+2,!0}if(oa.test(s)){const l=e.md.normalizeLink(`mailto:${s}`);if(!e.md.validateLink(l))return!1;if(!t){const A=e.push("link_open","a",1);A.attrs=[["href",l]],A.markup="autolink",A.info="auto";const a=e.push("text","",0);a.content=e.md.normalizeLinkText(s);const u=e.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return e.pos+=s.length+2,!0}return!1}function sa(e){return/^<a[>\s]/i.test(e)}function la(e){return/^<\/a\s*>/i.test(e)}function Aa(e){const t=e|32;return t>=97&&t<=122}function aa(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const o=e.src.charCodeAt(i+1);if(o!==33&&o!==63&&o!==47&&!Aa(o))return!1;const s=e.src.slice(i).match(GA);if(!s)return!1;if(!t){const l=e.push("html_inline","",0);l.content=s[0],sa(l.content)&&e.linkLevel++,la(l.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}var ca=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,ua=/^&([a-z][a-z0-9]{1,31});/i;function da(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(ca);if(o){if(!t){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),l=e.push("text_special","",0);l.content=$n(s)?Gt(s):Gt(65533),l.markup=o[0],l.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(ua);if(o){const s=Mr(o[0]);if(s!==o[0]){if(!t){const l=e.push("text_special","",0);l.content=s,l.markup=o[0],l.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function Ho(e){const t={},n=e.length;if(!n)return;let i=0,o=-2;const s=[];for(let l=0;l<n;l++){const A=e[l];if(s.push(0),(e[i].marker!==A.marker||o!==A.token-1)&&(i=l),o=A.token,A.length=A.length||0,!A.close)continue;t.hasOwnProperty(A.marker)||(t[A.marker]=[-1,-1,-1,-1,-1,-1]);const a=t[A.marker][(A.open?3:0)+A.length%3];let u=i-s[i]-1,h=u;for(;u>a;u-=s[u]+1){const f=e[u];if(f.marker===A.marker&&f.open&&f.end<0){let m=!1;if((f.close||A.open)&&(f.length+A.length)%3===0&&(f.length%3!==0||A.length%3!==0)&&(m=!0),!m){const _=u>0&&!e[u-1].open?s[u-1]+1:0;s[l]=l-u+_,s[u]=_,A.open=!1,f.end=l,f.close=!1,h=-1,o=-2;break}}}h!==-1&&(t[A.marker][(A.open?3:0)+(A.length||0)%3]=h)}}function ha(e){const t=e.tokens_meta,n=e.tokens_meta.length;Ho(e.delimiters);for(let o=0;o<n;o++){var i;const s=(i=t[o])===null||i===void 0?void 0:i.delimiters;s&&Ho(s)}}function fa(e){let t,n,i=0;const o=e.tokens,s=e.tokens.length;for(t=n=0;t<s;t++)o[t].nesting<0&&i--,o[t].level=i,o[t].nesting>0&&i++,o[t].type==="text"&&t+1<s&&o[t+1].type==="text"?o[t+1].content=o[t].content+o[t+1].content:(t!==n&&(o[n]=o[t]),n++);t!==n&&(o.length=n)}var Nn=[["text",LA],["linkify",ZA],["newline",PA],["escape",zA],["backticks",jA],["strikethrough",ri.tokenize],["emphasis",ii.tokenize],["link",ta],["image",na],["autolink",ia],["html_inline",aa],["entity",da]],Rn=[["balance_pairs",ha],["strikethrough",ri.postProcess],["emphasis",ii.postProcess],["fragments_join",fa]],si=class{constructor(){T(this,"ruler",new Ut),T(this,"ruler2",new Ut),T(this,"State",oi);for(let e=0;e<Nn.length;e++)this.ruler.push(Nn[e][0],Nn[e][1]);for(let e=0;e<Rn.length;e++)this.ruler2.push(Rn[e][0],Rn[e][1])}skipToken(e){const t=e.pos,n=this.ruler.getRules(""),i=n.length,o=e.md.options.maxNesting,s=e.cache;if(typeof s[t]<"u"){e.pos=s[t];return}let l=!1;if(e.level<o){for(let A=0;A<i;A++)if(e.level++,l=n[A](e,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,o=e.md.options.maxNesting;for(;e.pos<i;){const s=e.pos;let l=!1;if(e.level<o){for(let A=0;A<n;A++)if(l=t[A](e,!1),l){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,i){const o=new this.State(e,t,n,i);this.tokenize(o);const s=this.ruler2.getRules(""),l=s.length;for(let A=0;A<l;A++)s[A](o)}},pa={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},ma=/^(vbscript|javascript|file|data):/,ga=/^data:image\/(gif|png|jpeg|webp);/,Uo=["http:","https:","mailto:"],Ue=class{validateLink(e){const t=e.trim().toLowerCase();return ma.test(t)?ga.test(t):!0}normalizeLink(e){const t=Yn(e,!0);if(t.hostname&&(!t.protocol||Uo.indexOf(t.protocol)>=0))try{t.hostname=No.toASCII(t.hostname)}catch{}return Jt(On(t))}normalizeLinkText(e){const t=Yn(e,!0);if(t.hostname&&(!t.protocol||Uo.indexOf(t.protocol)>=0))try{t.hostname=No.toUnicode(t.hostname)}catch{}return bt(On(t),bt.defaultChars+"%")}constructor(...e){T(this,"inline",new si),T(this,"block",new ni),T(this,"core",new $r),T(this,"renderer",new zr),T(this,"linkify",new xl),T(this,"utils",Hl),T(this,"helpers",Object.assign({},oA));const[t,n]=e;typeof t=="string"?(this.configure(t),n&&this.set(n)):(this.configure("default"),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e=="string"){const o=e;if(t=pa[o],!t)throw new Error(`Wrong 'markdown-it' preset "${o}", check name`)}else t=e;if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});const n=t.components;if(n){var i;["core","block","inline"].forEach(s=>{var l;const A=(l=n[s])===null||l===void 0?void 0:l.rules;A&&this[s].ruler.enableOnly(A)});const o=(i=n.inline)===null||i===void 0?void 0:i.rules2;o&&this.inline.ruler2.enableOnly(o)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(o=>{n=n.concat(this[o].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(o=>n.indexOf(o)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${i}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(o=>{n=n.concat(this[o].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(o=>n.indexOf(o)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${i}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};T(Ue,"Token",At);T(Ue,"Ruler",Ut);T(Ue,"Renderer",zr);T(Ue,"ParserCore",$r);T(Ue,"StateCore",jr);T(Ue,"ParserBlock",ni);T(Ue,"StateBlock",qr);T(Ue,"ParserInline",si);T(Ue,"StateInline",oi);var Ca=Lr(Ue);/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Vo(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function _a(e){if(Array.isArray(e))return e}function ka(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,o,s,l,A=[],a=!0,u=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(a=(i=s.call(n)).done)&&(A.push(i.value),A.length!==t);a=!0);}catch(h){u=!0,o=h}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return A}}function Ea(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
54
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ya(e,t){return _a(e)||ka(e,t)||Ia(e,t)||Ea()}function Ia(e,t){if(e){if(typeof e=="string")return Vo(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vo(e,t):void 0}}const li=Object.entries,Lo=Object.setPrototypeOf,ba=Object.isFrozen,Da=Object.getPrototypeOf,Ba=Object.getOwnPropertyDescriptor;let ke=Object.freeze,Ee=Object.seal,Et=Object.create,Ai=typeof Reflect<"u"&&Reflect,Un=Ai.apply,Vn=Ai.construct;ke||(ke=function(t){return t});Ee||(Ee=function(t){return t});Un||(Un=function(t,n){for(var i=arguments.length,o=new Array(i>2?i-2:0),s=2;s<i;s++)o[s-2]=arguments[s];return t.apply(n,o)});Vn||(Vn=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return new t(...i)});const _t=he(Array.prototype.forEach),wa=he(Array.prototype.lastIndexOf),Jo=he(Array.prototype.pop),kt=he(Array.prototype.push),Fa=he(Array.prototype.splice),je=Array.isArray,Tt=he(String.prototype.toLowerCase),Tn=he(String.prototype.toString),Zo=he(String.prototype.match),xt=he(String.prototype.replace),Po=he(String.prototype.indexOf),va=he(String.prototype.trim),xa=he(Number.prototype.toString),Sa=he(Boolean.prototype.toString),zo=typeof BigInt>"u"?null:he(BigInt.prototype.toString),jo=typeof Symbol>"u"?null:he(Symbol.prototype.toString),Ce=he(Object.prototype.hasOwnProperty),St=he(Object.prototype.toString),me=he(RegExp.prototype.test),st=Na(TypeError);function he(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return Un(e,t,i)}}function Na(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Vn(e,n)}}function P(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tt;if(Lo&&Lo(e,null),!je(t))return e;let i=t.length;for(;i--;){let o=t[i];if(typeof o=="string"){const s=n(o);s!==o&&(ba(t)||(t[i]=s),o=s)}e[o]=!0}return e}function Ra(e){for(let t=0;t<e.length;t++)Ce(e,t)||(e[t]=null);return e}function Ie(e){const t=Et(null);for(const i of li(e)){var n=ya(i,2);const o=n[0],s=n[1];Ce(e,o)&&(je(s)?t[o]=Ra(s):s&&typeof s=="object"&&s.constructor===Object?t[o]=Ie(s):t[o]=s)}return t}function Ta(e){switch(typeof e){case"string":return e;case"number":return xa(e);case"boolean":return Sa(e);case"bigint":return zo?zo(e):"0";case"symbol":return jo?jo(e):"Symbol()";case"undefined":return St(e);case"function":case"object":{if(e===null)return St(e);const t=e,n=Te(t,"toString");if(typeof n=="function"){const i=n(t);return typeof i=="string"?i:St(i)}return St(e)}default:return St(e)}}function Te(e,t){for(;e!==null;){const i=Ba(e,t);if(i){if(i.get)return he(i.get);if(typeof i.value=="function")return he(i.value)}e=Da(e)}function n(){return null}return n}function Ma(e){try{return me(e,""),!0}catch{return!1}}const Xo=ke(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mn=ke(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Qn=ke(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Qa=ke(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Kn=ke(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ka=ke(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),$o=ke(["#text"]),qo=ke(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Gn=ke(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),er=ke(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),on=ke(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ga=Ee(/{{[\w\W]*|^[\w\W]*}}/g),Wa=Ee(/<%[\w\W]*|^[\w\W]*%>/g),Oa=Ee(/\${[\w\W]*/g),Ya=Ee(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ha=Ee(/^aria-[\-\w]+$/),tr=Ee(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ua=Ee(/^(?:\w+script|data):/i),Va=Ee(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),La=Ee(/^html$/i),Ja=Ee(/^[a-z][.\w]*(-[.\w]+)+$/i),nr=Ee(/<[/\w!]/g),or=Ee(/<[/\w]/g),Za=Ee(/<\/no(script|embed|frames)/i),Pa=Ee(/\/>/i),xe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},za=function(){return typeof window>"u"?null:window},ja=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(i=n.getAttribute(o));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},rr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ze=function(t,n,i,o){return Ce(t,n)&&je(t[n])?P(o.base?Ie(o.base):{},t[n],o.transform):i};function ai(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:za();const t=v=>ai(v);if(t.version="3.4.13",t.removed=[],!e||!e.document||e.document.nodeType!==xe.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const i=n,o=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,A=e.Element,a=e.NodeFilter,u=e.NamedNodeMap;u===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,f=e.trustedTypes,m=A.prototype,_=Te(m,"cloneNode"),d=Te(m,"remove"),C=Te(m,"nextSibling"),g=Te(m,"childNodes"),E=Te(m,"parentNode"),D=Te(m,"shadowRoot"),F=Te(m,"attributes"),k=l&&l.prototype?Te(l.prototype,"nodeType"):null,B=l&&l.prototype?Te(l.prototype,"nodeName"):null,M=l&&l.prototype?Te(l.prototype,"ownerDocument"):null;if(typeof s=="function"){const v=n.createElement("template");v.content&&v.content.ownerDocument&&(n=v.content.ownerDocument)}let K,S="",I,W=!1,O=0;const te=function(){if(O>0)throw st('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},q=function(c){te(),O++;try{return K.createHTML(c)}finally{O--}},U=function(c){te(),O++;try{return K.createScriptURL(c)}finally{O--}},j=function(){return W||(I=ja(f,o),W=!0),I},J=n,fe=J.implementation,Be=J.createNodeIterator,ye=J.createDocumentFragment,et=J.getElementsByTagName,ct=i.importNode;let $=rr();t.isSupported=typeof li=="function"&&typeof E=="function"&&fe&&fe.createHTMLDocument!==void 0;const ue=Ga,ve=Wa,Ne=Oa,tt=Ya,ut=Ha,Ve=Ua,dt=Va,ht=Ja;let nt=tr,ee=null;const Le=P({},[...Xo,...Mn,...Qn,...Kn,...$o]);let Z=null;const ot=P({},[...qo,...Gn,...er,...on]);let ie=Object.seal(Et(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}})),Re=null,Y=null;const N=Object.seal(Et(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let y=!0,x=!0,R=!1,w=!0,H=!1,z=!0,X=!1,ne=!1,le=null,oe=null,_e=!1,de=!1,ft=!1,Me=!1,pe=!0,cn=!1;const eo="user-content-";let un=!0,Zt=!1,pt={},Qe=null;const dn=P({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let to=null;const no=P({},["audio","video","img","source","image","track"]);let hn=null;const oo=P({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pt="http://www.w3.org/1998/Math/MathML",zt="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let mt=Ke,fn=!1,pn=null;const pi=P({},[Pt,zt,Ke],Tn),ro=ke(["mi","mo","mn","ms","mtext"]);let mn=P({},ro);const io=ke(["annotation-xml"]);let gn=P({},io);const mi=P({},["title","style","font","a","script"]);let wt=null;const gi=["application/xhtml+xml","text/html"],Ci="text/html";let Ae=null,gt=null;const _i=n.createElement("form"),so=function(c){return c instanceof RegExp||c instanceof Function},Cn=function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(gt&&gt===c)return;(!c||typeof c!="object")&&(c={}),c=Ie(c),wt=gi.indexOf(c.PARSER_MEDIA_TYPE)===-1?Ci:c.PARSER_MEDIA_TYPE,Ae=wt==="application/xhtml+xml"?Tn:Tt,ee=Ze(c,"ALLOWED_TAGS",Le,{transform:Ae}),Z=Ze(c,"ALLOWED_ATTR",ot,{transform:Ae}),pn=Ze(c,"ALLOWED_NAMESPACES",pi,{transform:Tn}),hn=Ze(c,"ADD_URI_SAFE_ATTR",oo,{transform:Ae,base:oo}),to=Ze(c,"ADD_DATA_URI_TAGS",no,{transform:Ae,base:no}),Qe=Ze(c,"FORBID_CONTENTS",dn,{transform:Ae}),Re=Ze(c,"FORBID_TAGS",Ie({}),{transform:Ae}),Y=Ze(c,"FORBID_ATTR",Ie({}),{transform:Ae}),pt=Ce(c,"USE_PROFILES")?c.USE_PROFILES&&typeof c.USE_PROFILES=="object"?Ie(c.USE_PROFILES):c.USE_PROFILES:!1,y=c.ALLOW_ARIA_ATTR!==!1,x=c.ALLOW_DATA_ATTR!==!1,R=c.ALLOW_UNKNOWN_PROTOCOLS||!1,w=c.ALLOW_SELF_CLOSE_IN_ATTR!==!1,H=c.SAFE_FOR_TEMPLATES||!1,z=c.SAFE_FOR_XML!==!1,X=c.WHOLE_DOCUMENT||!1,de=c.RETURN_DOM||!1,ft=c.RETURN_DOM_FRAGMENT||!1,Me=c.RETURN_TRUSTED_TYPE||!1,_e=c.FORCE_BODY||!1,pe=c.SANITIZE_DOM!==!1,cn=c.SANITIZE_NAMED_PROPS||!1,un=c.KEEP_CONTENT!==!1,Zt=c.IN_PLACE||!1,nt=Ma(c.ALLOWED_URI_REGEXP)?c.ALLOWED_URI_REGEXP:tr,mt=typeof c.NAMESPACE=="string"?c.NAMESPACE:Ke,mn=Ce(c,"MATHML_TEXT_INTEGRATION_POINTS")&&c.MATHML_TEXT_INTEGRATION_POINTS&&typeof c.MATHML_TEXT_INTEGRATION_POINTS=="object"?Ie(c.MATHML_TEXT_INTEGRATION_POINTS):P({},ro),gn=Ce(c,"HTML_INTEGRATION_POINTS")&&c.HTML_INTEGRATION_POINTS&&typeof c.HTML_INTEGRATION_POINTS=="object"?Ie(c.HTML_INTEGRATION_POINTS):P({},io);const p=Ce(c,"CUSTOM_ELEMENT_HANDLING")&&c.CUSTOM_ELEMENT_HANDLING&&typeof c.CUSTOM_ELEMENT_HANDLING=="object"?Ie(c.CUSTOM_ELEMENT_HANDLING):Et(null);if(ie=Et(null),Ce(p,"tagNameCheck")&&so(p.tagNameCheck)&&(ie.tagNameCheck=p.tagNameCheck),Ce(p,"attributeNameCheck")&&so(p.attributeNameCheck)&&(ie.attributeNameCheck=p.attributeNameCheck),Ce(p,"allowCustomizedBuiltInElements")&&typeof p.allowCustomizedBuiltInElements=="boolean"&&(ie.allowCustomizedBuiltInElements=p.allowCustomizedBuiltInElements),Ee(ie),H&&(x=!1),ft&&(de=!0),pt&&(ee=P({},$o),Z=Et(null),pt.html===!0&&(P(ee,Xo),P(Z,qo)),pt.svg===!0&&(P(ee,Mn),P(Z,Gn),P(Z,on)),pt.svgFilters===!0&&(P(ee,Qn),P(Z,Gn),P(Z,on)),pt.mathMl===!0&&(P(ee,Kn),P(Z,er),P(Z,on))),N.tagCheck=null,N.attributeCheck=null,Ce(c,"ADD_TAGS")&&(typeof c.ADD_TAGS=="function"?N.tagCheck=c.ADD_TAGS:je(c.ADD_TAGS)&&(ee===Le&&(ee=Ie(ee)),P(ee,c.ADD_TAGS,Ae))),Ce(c,"ADD_ATTR")&&(typeof c.ADD_ATTR=="function"?N.attributeCheck=c.ADD_ATTR:je(c.ADD_ATTR)&&(Z===ot&&(Z=Ie(Z)),P(Z,c.ADD_ATTR,Ae))),Ce(c,"ADD_URI_SAFE_ATTR")&&je(c.ADD_URI_SAFE_ATTR)&&P(hn,c.ADD_URI_SAFE_ATTR,Ae),Ce(c,"FORBID_CONTENTS")&&je(c.FORBID_CONTENTS)&&(Qe===dn&&(Qe=Ie(Qe)),P(Qe,c.FORBID_CONTENTS,Ae)),Ce(c,"ADD_FORBID_CONTENTS")&&je(c.ADD_FORBID_CONTENTS)&&(Qe===dn&&(Qe=Ie(Qe)),P(Qe,c.ADD_FORBID_CONTENTS,Ae)),un&&(ee["#text"]=!0),X&&P(ee,["html","head","body"]),ee.table&&(P(ee,["tbody"]),delete Re.tbody),c.TRUSTED_TYPES_POLICY){if(typeof c.TRUSTED_TYPES_POLICY.createHTML!="function")throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof c.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw st('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const b=K;K=c.TRUSTED_TYPES_POLICY;try{S=q("")}catch(Q){throw K=b,Q}}else c.TRUSTED_TYPES_POLICY===null?(K=void 0,S=""):(K===void 0&&(K=j()),K&&typeof S=="string"&&(S=q("")));ke&&ke(c),gt=c},lo=P({},[...Mn,...Qn,...Qa]),Ao=P({},[...Kn,...Ka]),ki=function(c,p,b){return p.namespaceURI===Ke?c==="svg":p.namespaceURI===Pt?c==="svg"&&(b==="annotation-xml"||mn[b]):!!lo[c]},Ei=function(c,p,b){return p.namespaceURI===Ke?c==="math":p.namespaceURI===zt?c==="math"&&gn[b]:!!Ao[c]},yi=function(c,p,b){return p.namespaceURI===zt&&!gn[b]||p.namespaceURI===Pt&&!mn[b]?!1:!Ao[c]&&(mi[c]||!lo[c])},Ii=function(c){let p=E(c);(!p||!p.tagName)&&(p={namespaceURI:mt,tagName:"template"});const b=Tt(c.tagName),Q=Tt(p.tagName);return pn[c.namespaceURI]?c.namespaceURI===zt?ki(b,p,Q):c.namespaceURI===Pt?Ei(b,p,Q):c.namespaceURI===Ke?yi(b,p,Q):!!(wt==="application/xhtml+xml"&&pn[c.namespaceURI]):!1},Je=function(c){kt(t.removed,{element:c});try{E(c).removeChild(c)}catch{if(d(c),!E(c))throw st("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},jt=function(c){Ft(c);const p=g(c);if(p){const Q=[];_t(p,G=>{kt(Q,G)}),_t(Q,G=>{try{d(G)}catch{}})}const b=F(c);if(b)for(let Q=b.length-1;Q>=0;--Q){const G=b[Q],V=G&&G.name;if(typeof V=="string")try{c.removeAttribute(V)}catch{}}},rt=function(c,p){try{kt(t.removed,{attribute:p.getAttributeNode(c),from:p})}catch{kt(t.removed,{attribute:null,from:p})}if(p.removeAttribute(c),c==="is")if(de||ft)try{Je(p)}catch{}else try{p.setAttribute(c,"")}catch{}},bi=function(c){const p=F(c);if(p)for(let b=p.length-1;b>=0;--b){const Q=p[b],G=Q&&Q.name;if(!(typeof G!="string"||Z[Ae(G)]))try{c.removeAttribute(G)}catch{}}},Ft=function(c){const p=[c];for(;p.length>0;){const b=p.pop();(k?k(b):b.nodeType)===xe.element&&bi(b);const G=g(b);if(G)for(let V=G.length-1;V>=0;--V)p.push(G[V])}},Di=function(c){if(!z)return;const p=[c];for(;p.length>0;){const b=p.pop(),Q=k?k(b):b.nodeType;if(Q===xe.processingInstruction||Q===xe.comment&&me(or,b.data)){try{d(b)}catch{}continue}if(Q===xe.element){const V=b,re=Ae(B?B(b):b.nodeName);try{V.hasAttribute&&V.hasAttribute("patchsrc")&&V.removeAttribute("patchsrc"),V.hasAttribute&&V.hasAttribute("for")&&re!=="label"&&re!=="output"&&V.removeAttribute("for")}catch{}}const G=g(b);if(G)for(let V=G.length-1;V>=0;--V)p.push(G[V])}},ao=function(c){let p=null,b=null;if(_e)c="<remove></remove>"+c;else{const V=Zo(c,/^[\r\n\t ]+/);b=V&&V[0]}wt==="application/xhtml+xml"&&mt===Ke&&(c='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+c+"</body></html>");const Q=K?q(c):c;if(mt===Ke)try{p=new h().parseFromString(Q,wt)}catch{}if(!p||!p.documentElement){p=fe.createDocument(mt,"template",null);try{p.documentElement.innerHTML=fn?S:Q}catch{}}const G=p.body||p.documentElement;return c&&b&&G.insertBefore(n.createTextNode(b),G.childNodes[0]||null),mt===Ke?et.call(p,X?"html":"body")[0]:X?p.documentElement:G},co=function(c){const p=M?M(c):c.ownerDocument;return Be.call(p||c,c,a.SHOW_ELEMENT|a.SHOW_COMMENT|a.SHOW_TEXT|a.SHOW_PROCESSING_INSTRUCTION|a.SHOW_CDATA_SECTION,null)},Xt=function(c){return c=xt(c,ue," "),c=xt(c,ve," "),c=xt(c,Ne," "),c},_n=function(c){var p;c.normalize();const b=M?M(c):c.ownerDocument,Q=Be.call(b||c,c,a.SHOW_TEXT|a.SHOW_COMMENT|a.SHOW_CDATA_SECTION|a.SHOW_PROCESSING_INSTRUCTION,null);let G=Q.nextNode();for(;G;)G.data=Xt(G.data),G=Q.nextNode();const V=(p=c.querySelectorAll)===null||p===void 0?void 0:p.call(c,"template");V&&_t(V,re=>{Ct(re.content)&&_n(re.content)})},$t=function(c){const p=B?B(c):null;return typeof p!="string"||Ae(p)!=="form"?!1:typeof c.nodeName!="string"||typeof c.textContent!="string"||typeof c.removeChild!="function"||c.attributes!==F(c)||typeof c.removeAttribute!="function"||typeof c.setAttribute!="function"||typeof c.namespaceURI!="string"||typeof c.insertBefore!="function"||typeof c.hasChildNodes!="function"||c.nodeType!==k(c)||c.childNodes!==g(c)},Ct=function(c){if(!k||typeof c!="object"||c===null)return!1;try{return k(c)===xe.documentFragment}catch{return!1}},vt=function(c){if(!k||typeof c!="object"||c===null)return!1;try{return typeof k(c)=="number"}catch{return!1}};function Ge(v,c,p){v.length!==0&&_t(v,b=>{b.call(t,c,p,gt)})}const Bi=function(c,p){return!!(z&&c.hasChildNodes()&&!vt(c.firstElementChild)&&me(nr,c.textContent)&&me(nr,c.innerHTML)||z&&c.namespaceURI===Ke&&p==="style"&&vt(c.firstElementChild)||c.nodeType===xe.processingInstruction||z&&c.nodeType===xe.comment&&me(or,c.data))},wi=function(c,p,b){if(!Re[p]&&po(p)&&(ie.tagNameCheck instanceof RegExp&&me(ie.tagNameCheck,p)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(p)))return!1;if(un&&!Qe[p]){const Q=E(c),G=g(c);if(G&&Q){const V=G.length;for(let re=V-1;re>=0;--re){const ae=c===b?_(G[re],!0):G[re];Q.insertBefore(ae,C(c))}}}return Je(c),!0},uo=function(c,p,b,Q){return c.length===0?p:p===b||p===Q?Ie(p):p},ho=function(c,p){if(Ge($.beforeSanitizeElements,c,null),c!==p&&E(c)===null)return Zt&&Ft(c),!0;if($t(c))return Je(c),!0;const b=Ae(B?B(c):c.nodeName);if(ee=uo($.uponSanitizeElement,ee,Le,le),Ge($.uponSanitizeElement,c,{tagName:b,allowedTags:ee}),c!==p&&E(c)===null)return Zt&&Ft(c),!0;if(Bi(c,b))return Je(c),!0;if(Re[b]||!(N.tagCheck instanceof Function&&N.tagCheck(b))&&!ee[b]){const G=wi(c,b,p);return G===!1&&Ge($.afterSanitizeElements,c,null),G}if((k?k(c):c.nodeType)===xe.element&&!Ii(c)||(b==="noscript"||b==="noembed"||b==="noframes")&&me(Za,c.innerHTML))return Je(c),!0;if(H&&c.nodeType===xe.text){const G=Xt(c.textContent);c.textContent!==G&&(kt(t.removed,{element:c.cloneNode()}),c.textContent=G)}return Ge($.afterSanitizeElements,c,null),!1},fo=function(c,p,b){if(Y[p]||z&&p==="patchsrc"||z&&p==="for"&&c!=="label"&&c!=="output"||pe&&(p==="id"||p==="name")&&(b in n||b in _i))return!1;const Q=Z[p]||N.attributeCheck instanceof Function&&N.attributeCheck(p,c);if(!(x&&me(tt,p))){if(!(y&&me(ut,p))){if(Q){if(!hn[p]){if(!me(nt,xt(b,dt,""))){if(!((p==="src"||p==="xlink:href"||p==="href")&&c!=="script"&&Po(b,"data:")===0&&to[c])){if(!(R&&!me(Ve,xt(b,dt,"")))){if(b)return!1}}}}}else if(!(po(c)&&(ie.tagNameCheck instanceof RegExp&&me(ie.tagNameCheck,c)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(c))&&(ie.attributeNameCheck instanceof RegExp&&me(ie.attributeNameCheck,p)||ie.attributeNameCheck instanceof Function&&ie.attributeNameCheck(p,c))||p==="is"&&ie.allowCustomizedBuiltInElements&&(ie.tagNameCheck instanceof RegExp&&me(ie.tagNameCheck,b)||ie.tagNameCheck instanceof Function&&ie.tagNameCheck(b))))return!1}}return!0},Fi=P({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),po=function(c){return!Fi[Tt(c)]&&me(ht,c)},vi=function(c,p,b,Q){if(K&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!b)switch(f.getAttributeType(c,p)){case"TrustedHTML":return q(Q);case"TrustedScriptURL":return U(Q)}return Q},xi=function(c,p,b,Q){try{b?c.setAttributeNS(b,p,Q):c.setAttribute(p,Q),$t(c)?Je(c):Jo(t.removed)}catch{rt(p,c)}},mo=function(c){Ge($.beforeSanitizeAttributes,c,null);const p=c.attributes;if(!p||$t(c))return;Z=uo($.uponSanitizeAttribute,Z,ot,oe);const b={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let Q=p.length;const G=Ae(c.nodeName);for(;Q--;){const V=p[Q],re=V.name,ae=V.namespaceURI,we=V.value,Fe=Ae(re),En=we;let be=re==="value"?En:va(En);if(b.attrName=Fe,b.attrValue=be,b.keepAttr=!0,b.forceKeepAttr=void 0,Ge($.uponSanitizeAttribute,c,b),be=b.attrValue,cn&&(Fe==="id"||Fe==="name")&&Po(be,eo)!==0&&(rt(re,c),be=eo+be),z&&me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,be)){rt(re,c);continue}if(Fe==="attributename"&&Zo(be,"href")){rt(re,c);continue}if(!b.forceKeepAttr){if(!b.keepAttr){rt(re,c);continue}if(!w&&me(Pa,be)){rt(re,c);continue}if(H&&(be=Xt(be)),!fo(G,Fe,be)){rt(re,c);continue}be=vi(G,Fe,ae,be),be!==En&&xi(c,re,ae,be)}}Ge($.afterSanitizeAttributes,c,null)},qt=function(c){let p=null;const b=co(c);for(Ge($.beforeSanitizeShadowDOM,c,null);p=b.nextNode();)if(Ge($.uponSanitizeShadowNode,p,null),ho(p,c),mo(p),Ct(p.content)&&qt(p.content),(k?k(p):p.nodeType)===xe.element){const G=D(p);Ct(G)&&(kn(G),qt(G))}Ge($.afterSanitizeShadowDOM,c,null)},kn=function(c){const p=[{node:c,shadow:null}];for(;p.length>0;){const b=p.pop();if(b.shadow){qt(b.shadow);continue}const Q=b.node,V=(k?k(Q):Q.nodeType)===xe.element,re=g(Q);if(re)for(let ae=re.length-1;ae>=0;--ae)p.push({node:re[ae],shadow:null});if(V){const ae=B?B(Q):null;if(typeof ae=="string"&&Ae(ae)==="template"){const we=Q.content;Ct(we)&&p.push({node:we,shadow:null})}}if(V){const ae=D(Q);Ct(ae)&&p.push({node:null,shadow:ae},{node:ae,shadow:null})}}};return t.sanitize=function(v){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},p=null,b=null,Q=null,G=null;if(fn=!v,fn&&(v="<!-->"),typeof v!="string"&&!vt(v)&&(v=Ta(v),typeof v!="string"))throw st("dirty is not a string, aborting");if(!t.isSupported)return v;ne?(ee=le,Z=oe):Cn(c),($.uponSanitizeElement.length>0||$.uponSanitizeAttribute.length>0)&&(ee=Ie(ee)),$.uponSanitizeAttribute.length>0&&(Z=Ie(Z)),t.removed=[];const V=Zt&&typeof v!="string"&&vt(v);if(V){Di(v);const we=B?B(v):v.nodeName;if(typeof we=="string"){const Fe=Ae(we);if(!ee[Fe]||Re[Fe])throw jt(v),st("root node is forbidden and cannot be sanitized in-place")}if($t(v))throw jt(v),st("root node is clobbered and cannot be sanitized in-place");try{kn(v)}catch(Fe){throw jt(v),Fe}}else if(vt(v))p=ao("<!---->"),b=p.ownerDocument.importNode(v,!0),b.nodeType===xe.element&&b.nodeName==="BODY"||b.nodeName==="HTML"?p=b:p.appendChild(b),kn(b);else{if(!de&&!H&&!X&&v.indexOf("<")===-1)return K&&Me?q(v):v;if(p=ao(v),!p)return de?null:Me?S:""}p&&_e&&Je(p.firstChild);const re=V?v:p;try{const we=co(re);for(;Q=we.nextNode();)ho(Q,re),mo(Q),Ct(Q.content)&&qt(Q.content)}catch(we){throw V&&(jt(v),_t(t.removed,Fe=>{Fe.element&&Ft(Fe.element)})),we}if(V)return _t(t.removed,we=>{we.element&&Ft(we.element)}),H&&_n(v),v;if(de){if(H&&_n(p),ft)for(G=ye.call(p.ownerDocument);p.firstChild;)G.appendChild(p.firstChild);else G=p;return(Z.shadowroot||Z.shadowrootmode)&&(G=ct.call(i,G,!0)),G}let ae=X?p.outerHTML:p.innerHTML;return X&&ee["!doctype"]&&p.ownerDocument&&p.ownerDocument.doctype&&p.ownerDocument.doctype.name&&me(La,p.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+p.ownerDocument.doctype.name+`>
55
- `+ae),H&&(ae=Xt(ae)),K&&Me?q(ae):ae},t.setConfig=function(){let v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cn(v),ne=!0,le=ee,oe=Z},t.clearConfig=function(){gt=null,ne=!1,le=null,oe=null,K=I,S=""},t.isValidAttribute=function(v,c,p){gt||Cn({});const b=Ae(v),Q=Ae(c);return fo(b,Q,p)},t.addHook=function(v,c){typeof c=="function"&&Ce($,v)&&kt($[v],c)},t.removeHook=function(v,c){if(Ce($,v)){if(c!==void 0){const p=wa($[v],c);return p===-1?void 0:Fa($[v],p,1)[0]}return Jo($[v])}},t.removeHooks=function(v){Ce($,v)&&($[v]=[])},t.removeAllHooks=function(){$=rr()},t}var Xa=ai();const sn=new Ca({html:!1,linkify:!0,breaks:!0}),$a=sn.renderer.rules.fence;sn.renderer.rules.fence=(e,t,n,i,o)=>{var u;const l=((u=e[t].info)==null?void 0:u.trim().split(/\s+/)[0])||"",A=sn.utils.escapeHtml(l)||"code",a=$a(e,t,n,i,o);return`<div class="md-code-block"><div class="md-code-block__head"><span class="md-code-block__lang">${A}</span><span class="md-code-block__copy" data-md-copy>复制</span></div>`+a+"</div>"};function qa(e){if(!e)return"";const t=sn.render(e);return Xa.sanitize(t)}function ci(e){return/\.tiff?$/i.test(e)}function ec(e){var t;try{const n=e.slice(0,e.indexOf(",")),i=e.slice(e.indexOf(",")+1),o=((t=n.match(/^data:([^;]+)/))==null?void 0:t[1])||"",s=atob(i),l=new Uint8Array(s.length);for(let A=0;A<s.length;A++)l[A]=s.charCodeAt(A);return new Blob([l],{type:o})}catch{return null}}function ui(e){var t;return e.blob instanceof Blob?e.blob:(t=e.data)!=null&&t.startsWith("data:")?ec(e.data):null}const tc={class:"message-avatar"},nc={class:"message-body"},oc={class:"message-time"},rc={key:0,class:"message-files"},ic=["src","alt","onClick"],sc={class:"file-info"},lc={class:"file-name"},Ac={class:"file-size"},ac={key:1,class:"message-user-text"},cc={class:"message-actions"},uc={key:0,class:"message-reasoning"},dc={key:0,class:"reasoning-content"},hc=["innerHTML"],fc={key:3,class:"typing-dots"},pc={key:4,class:"message-error"},mc=r.defineComponent({__name:"ChatMessage",props:{message:{},toolPackages:{},mdTableClick:{type:Boolean},mdListClick:{type:Boolean}},emits:["execute"],setup(e,{emit:t}){const n=e,i=t,o=r.computed(()=>qa(n.message.content)),s=r.computed(()=>!!n.message.hideMarkdown),l=r.ref(!1),A=r.ref([]),a=r.ref(0),u=[];function h(S){var W;if((W=S.data)!=null&&W.startsWith("data:"))return S.data;const I=ui(S);if(I){const O=URL.createObjectURL(I);return u.push(O),O}return""}function f(S){var O;const I=(O=n.message.files)==null?void 0:O.filter(te=>te.type.startsWith("image/")).map(h).filter(Boolean);if(!(I!=null&&I.length))return;const W=h(S);a.value=Math.max(0,I.indexOf(W)),A.value=I}function m(){u.forEach(S=>URL.revokeObjectURL(S)),u.length=0,A.value=[]}function _(S){if(!S)return"";const I=new Date(S),W=String(I.getHours()).padStart(2,"0"),O=String(I.getMinutes()).padStart(2,"0");return`${W}:${O}`}function d(S){var W;if(S.type!=="component"||!S.componentName)return null;let I=S.packageId?n.toolPackages.find(O=>O.id===S.packageId):null;return I||(I=n.toolPackages.find(O=>O.components&&S.componentName in O.components)),I||(I=n.toolPackages[n.toolPackages.length-1]),I&&((W=I.components)==null?void 0:W[S.componentName])||null}function C(S){i("execute",S)}function g(){const S=window.getSelection();return!!S&&S.toString().length>0}async function E(S){try{await navigator.clipboard.writeText(S),Xe.ElMessage.success("已复制")}catch{Xe.ElMessage.error("复制失败,请手动复制")}}async function D(){await E(n.message.content)}async function F(S){var O;const I=S.closest("[data-md-copy]");if(!I)return;const W=(O=I.closest(".md-code-block"))==null?void 0:O.querySelector("pre code");W!=null&&W.textContent&&await E(W.textContent)}function k(S){const I=[];let W=S.nextElementSibling;for(;W&&!/^H[1-6]$/.test(W.tagName);)I.push(W),W=W.nextElementSibling;const O=S.hasAttribute("data-collapsed");S.toggleAttribute("data-collapsed",!O),I.forEach(te=>{te.style.display=O?"":"none"})}async function B(S){var O;const I=S.querySelector("td, th"),W=(O=I==null?void 0:I.textContent)==null?void 0:O.trim();W&&i("execute",`我选择 ${W}`)}function M(S){var W;const I=(W=S.textContent)==null?void 0:W.trim();I&&i("execute",I)}function K(S){if(g())return;const I=S.target;if(I.closest("a"))return;if(I.closest("[data-md-copy]")){F(I);return}const W=I.closest("h1,h2,h3,h4,h5,h6");if(W){k(W);return}if(n.mdTableClick){const O=I.closest("table tr");if(O&&!O.closest("thead")){const te=O.parentElement;te&&/^TBODY$/i.test(te.tagName)&&B(O);return}}if(n.mdListClick){const O=I.closest("li");O&&M(O)}}return(S,I)=>{var q;const W=r.resolveComponent("el-icon"),O=r.resolveComponent("el-tooltip"),te=r.resolveComponent("el-image-viewer");return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["chat-message",[`role-${e.message.role}`,{"is-streaming":e.message.status==="streaming"}]])},[r.createElementVNode("div",tc,[e.message.role==="user"?(r.openBlock(),r.createBlock(W,{key:0},{default:r.withCtx(()=>[r.createVNode(r.unref(Ss))]),_:1})):(r.openBlock(),r.createBlock(W,{key:1},{default:r.withCtx(()=>[r.createVNode(r.unref(ls))]),_:1}))]),r.createElementVNode("div",nc,[r.createElementVNode("span",oc,r.toDisplayString(_(e.message.timestamp)),1),(q=e.message.files)!=null&&q.length?(r.openBlock(),r.createElementBlock("div",rc,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.message.files,(U,j)=>{var J,fe;return r.openBlock(),r.createElementBlock("div",{key:j,class:r.normalizeClass(["message-file",{"is-image":U.type.startsWith("image/")&&((J=U.data)==null?void 0:J.startsWith("data:"))}])},[U.type.startsWith("image/")&&((fe=U.data)!=null&&fe.startsWith("data:"))?(r.openBlock(),r.createElementBlock("img",{key:0,src:U.data,alt:U.name,class:"file-image",onClick:Be=>f(U)},null,8,ic)):(r.openBlock(),r.createBlock(W,{key:1},{default:r.withCtx(()=>[r.createVNode(r.unref(Fr))]),_:1})),r.createElementVNode("div",sc,[r.createElementVNode("span",lc,r.toDisplayString(U.name),1),r.createElementVNode("span",Ac,r.toDisplayString((U.size/1024).toFixed(1))+" KB",1)])],2)}),128))])):r.createCommentVNode("",!0),e.message.role==="user"?(r.openBlock(),r.createElementBlock("div",ac,r.toDisplayString(e.message.content),1)):r.createCommentVNode("",!0),e.message.role==="assistant"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createElementVNode("div",cc,[r.createVNode(O,{content:"复制完整回复","show-after":300,placement:"top"},{default:r.withCtx(()=>[r.createElementVNode("button",{class:"message-action-btn",type:"button",onClick:D},[r.createVNode(W,null,{default:r.withCtx(()=>[r.createVNode(r.unref(us))]),_:1})])]),_:1})]),e.message.reasoning?(r.openBlock(),r.createElementBlock("div",uc,[r.createElementVNode("button",{class:"reasoning-toggle",onClick:I[0]||(I[0]=U=>l.value=!l.value)},[r.createVNode(W,{style:{"margin-right":"4px"}},{default:r.withCtx(()=>[r.createVNode(r.unref(hs))]),_:1}),I[1]||(I[1]=r.createTextVNode(" 推理过程 ",-1)),r.createElementVNode("span",{class:r.normalizeClass(["reasoning-toggle__arrow",{open:l.value}])},"▾",2)]),l.value?(r.openBlock(),r.createElementBlock("pre",dc,r.toDisplayString(e.message.reasoning),1)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),s.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["message-content markdown-body",{"is-table-clickable":e.mdTableClick,"is-list-clickable":e.mdListClick}]),innerHTML:o.value,onClick:K},null,10,hc)),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(e.message.renderBlocks,(U,j)=>(r.openBlock(),r.createBlock(vr,{key:j,block:U,"resolved-component":d(U),onSelect:C},null,8,["block","resolved-component"]))),128)),e.message.suggestedNext?(r.openBlock(),r.createBlock(xr,{key:2,text:e.message.suggestedNext,onExecute:C},null,8,["text"])):r.createCommentVNode("",!0)],64)):r.createCommentVNode("",!0),e.message.status==="streaming"?(r.openBlock(),r.createElementBlock("div",fc,[...I[2]||(I[2]=[r.createElementVNode("i",null,null,-1),r.createElementVNode("i",null,null,-1),r.createElementVNode("i",null,null,-1)])])):r.createCommentVNode("",!0),e.message.status==="error"?(r.openBlock(),r.createElementBlock("div",pc,r.toDisplayString(e.message.error),1)):r.createCommentVNode("",!0)]),A.value.length?(r.openBlock(),r.createBlock(te,{key:0,"initial-index":a.value,"url-list":A.value,onClose:m},null,8,["initial-index","url-list"])):r.createCommentVNode("",!0)],2)}}}),di=Bt(mc,[["__scopeId","data-v-7317da3a"]]),gc={class:"chat-input"},Cc={key:0,class:"chat-input__files"},_c={class:"chat-input__wrap"},kc={class:"chat-input__actions"},Ec=r.defineComponent({__name:"ChatInput",props:{loading:{type:Boolean},disabled:{type:Boolean},placeholder:{}},emits:["send"],setup(e,{emit:t}){const n=e,i=t,o=r.ref(""),s=r.ref([]),l=r.ref(null),A=r.computed(()=>(o.value.trim().length>0||s.value.length>0)&&!n.disabled);function a(){var E;(E=l.value)==null||E.click()}const u=new Set(["text/plain","text/html","text/css","text/javascript","text/typescript","text/markdown","text/csv","text/xml","application/json","application/xml","application/javascript","application/typescript","application/yaml","application/x-yaml"]);function h(E){var D;if(E.type.startsWith("text/")||u.has(E.type))return!0;if(E.type===""||E.type.startsWith("application/")){const F=(D=E.name.split(".").pop())==null?void 0:D.toLowerCase();return new Set(["txt","md","json","geojson","xml","yml","yaml","csv","ts","js","tsx","jsx","vue","html","css","scss","less","sh","bat","ps1","py","java","c","cpp","h","hpp","go","rs","rb","php","sql","toml","ini","cfg","conf","log","env","gitignore","dockerfile","wkt","wkb","kml","gpx","geojson","topojson","xlsx","docx"]).has(F??"")}return!1}function f(E){return new Promise(D=>{const F={id:"",name:E.name,size:E.size,type:E.type,blob:E};if(ci(E.name)){D({...F,data:""});return}const k=new FileReader;k.onload=()=>{D({...F,data:k.result})},h(E)?k.readAsText(E):k.readAsDataURL(E)})}async function m(E){var F;const D=E.target;if((F=D.files)!=null&&F.length){for(const k of Array.from(D.files)){const B=await f(k);s.value.push(B)}D.value=""}}function _(E){s.value.splice(E,1)}function d(E){E.shiftKey||(E.preventDefault(),C())}function C(){if(!A.value||n.loading)return;const E=o.value.trim();i("send",E,s.value),o.value="",s.value=[]}function g(){!s.value.length||n.disabled||n.loading||(i("send","预览",s.value),s.value=[])}return(E,D)=>{const F=r.resolveComponent("el-icon"),k=r.resolveComponent("el-tag"),B=r.resolveComponent("el-button"),M=r.resolveComponent("el-input"),K=r.resolveComponent("el-tooltip");return r.openBlock(),r.createElementBlock("div",gc,[s.value.length?(r.openBlock(),r.createElementBlock("div",Cc,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,(S,I)=>(r.openBlock(),r.createBlock(k,{key:I,closable:"",size:"small",type:S.type.startsWith("image/")?"success":"info",onClose:W=>_(I)},{default:r.withCtx(()=>[S.type.startsWith("image/")?(r.openBlock(),r.createBlock(F,{key:0,style:{"margin-right":"4px"}},{default:r.withCtx(()=>[r.createVNode(r.unref(ys))]),_:1})):(r.openBlock(),r.createBlock(F,{key:1,style:{"margin-right":"4px"}},{default:r.withCtx(()=>[r.createVNode(r.unref(Fr))]),_:1})),r.createTextVNode(" "+r.toDisplayString(S.name),1)]),_:2},1032,["type","onClose"]))),128)),r.createVNode(B,{class:"chat-input__preview",size:"small",plain:"",disabled:e.disabled||e.loading,onClick:g},{default:r.withCtx(()=>[r.createVNode(F,{style:{"margin-right":"2px"}},{default:r.withCtx(()=>[r.createVNode(r.unref(Ms))]),_:1}),D[1]||(D[1]=r.createTextVNode("预览 ",-1))]),_:1},8,["disabled"])])):r.createCommentVNode("",!0),r.createElementVNode("div",_c,[r.createVNode(M,{modelValue:o.value,"onUpdate:modelValue":D[0]||(D[0]=S=>o.value=S),type:"textarea",autosize:{minRows:1,maxRows:6},resize:"none",placeholder:e.placeholder,onKeydown:r.withKeys(d,["enter"])},null,8,["modelValue","placeholder"]),r.createElementVNode("div",kc,[r.createVNode(K,{content:"上传文件",placement:"top"},{default:r.withCtx(()=>[r.createVNode(B,{text:"",circle:"",onClick:a},{default:r.withCtx(()=>[r.createVNode(F,null,{default:r.withCtx(()=>[r.createVNode(r.unref(ks))]),_:1})]),_:1})]),_:1}),r.createElementVNode("input",{ref_key:"fileInputRef",ref:l,type:"file",multiple:"",hidden:"",onChange:m},null,544),r.createVNode(K,{content:"Enter 发送,Shift+Enter 换行",placement:"top"},{default:r.withCtx(()=>[r.createVNode(B,{class:"chat-input__send",type:"primary",icon:r.unref(Bs),loading:e.loading,disabled:!A.value,circle:"",onClick:C},null,8,["icon","loading","disabled"])]),_:1})])])])}}}),hi=Bt(Ec,[["__scopeId","data-v-e7db63f0"]]),yc={class:"form-tip"},Ic={class:"temp-row"},bc={class:"temp-val"},Dc=r.defineComponent({__name:"ChatSettings",props:{modelValue:{type:Boolean},settings:{},deviceId:{}},emits:["update:modelValue","save"],setup(e,{emit:t}){const n=e,i=t,o=Jn(),s=r.ref(n.modelValue);r.watch(()=>n.modelValue,f=>{s.value=f,f&&(l.value=at(n.settings))}),r.watch(s,f=>i("update:modelValue",f));const l=r.ref(at(n.settings)),A=r.computed(()=>Ye(l.value.providerId)??o[0]),a=r.computed(()=>{const f=l.value.providers[l.value.providerId];if(f)return f;const m=lt(A.value);return l.value.providers[l.value.providerId]=m,m});function u(f){if(!(!f||f===l.value.providerId)){if(!l.value.providers[f]){const m=Ye(f);m&&(l.value.providers[f]=lt(m))}l.value.providerId=f}}function h(){if(l.value.providerMode==="direct"){if(!a.value.apiKey){Xe.ElMessage.warning("请填写 API Key");return}if(!a.value.baseUrl){Xe.ElMessage.warning("请填写接口地址");return}}i("save",JSON.parse(JSON.stringify(l.value))),s.value=!1}return(f,m)=>{const _=r.resolveComponent("el-radio"),d=r.resolveComponent("el-radio-group"),C=r.resolveComponent("el-form-item"),g=r.resolveComponent("el-option"),E=r.resolveComponent("el-select"),D=r.resolveComponent("el-input"),F=r.resolveComponent("el-link"),k=r.resolveComponent("el-slider"),B=r.resolveComponent("el-switch"),M=r.resolveComponent("el-form"),K=r.resolveComponent("el-button"),S=r.resolveComponent("el-dialog");return r.openBlock(),r.createBlock(S,{modelValue:s.value,"onUpdate:modelValue":m[11]||(m[11]=I=>s.value=I),title:"AI 助手设置",width:"520px","append-to-body":""},{footer:r.withCtx(()=>[r.createVNode(K,{onClick:m[10]||(m[10]=I=>s.value=!1)},{default:r.withCtx(()=>[...m[21]||(m[21]=[r.createTextVNode("取消",-1)])]),_:1}),r.createVNode(K,{type:"primary",onClick:h},{default:r.withCtx(()=>[...m[22]||(m[22]=[r.createTextVNode("保存",-1)])]),_:1})]),default:r.withCtx(()=>[r.createVNode(M,{model:l.value,"label-width":"110px","label-position":"right"},{default:r.withCtx(()=>[r.createVNode(C,{label:"调用模式"},{default:r.withCtx(()=>[r.createVNode(d,{modelValue:l.value.providerMode,"onUpdate:modelValue":m[0]||(m[0]=I=>l.value.providerMode=I)},{default:r.withCtx(()=>[r.createVNode(_,{value:"direct"},{default:r.withCtx(()=>[...m[12]||(m[12]=[r.createTextVNode("前端直连",-1)])]),_:1}),r.createVNode(_,{value:"proxy"},{default:r.withCtx(()=>[...m[13]||(m[13]=[r.createTextVNode("后端代理",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),r.createVNode(C,{label:"模型提供方"},{default:r.withCtx(()=>[r.createVNode(E,{"model-value":l.value.providerId,style:{width:"100%"},"onUpdate:modelValue":u},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(o),I=>(r.openBlock(),r.createBlock(g,{key:I.id,label:I.name,value:I.id},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1}),l.value.providerMode==="direct"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[r.createVNode(C,{label:"API Key"},{default:r.withCtx(()=>[r.createVNode(D,{modelValue:a.value.apiKey,"onUpdate:modelValue":m[1]||(m[1]=I=>a.value.apiKey=I),type:"password",placeholder:"xxxxxxxxxxxxxxxx",clearable:""},null,8,["modelValue"]),r.createElementVNode("div",yc,[A.value.apiKeyUrl?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[m[14]||(m[14]=r.createTextVNode(" 在 ",-1)),r.createVNode(F,{type:"primary",href:A.value.apiKeyUrl,target:"_blank"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(A.value.name)+" 开放平台 ",1)]),_:1},8,["href"]),m[15]||(m[15]=r.createTextVNode(" 获取。 ",-1))],64)):r.createCommentVNode("",!0)])]),_:1}),r.createVNode(C,{label:"接口地址"},{default:r.withCtx(()=>[r.createVNode(D,{modelValue:a.value.baseUrl,"onUpdate:modelValue":m[2]||(m[2]=I=>a.value.baseUrl=I),placeholder:A.value.defaultBaseUrl||"https://example.com/v1",clearable:""},null,8,["modelValue","placeholder"])]),_:1})],64)):(r.openBlock(),r.createBlock(C,{key:1,label:"代理地址"},{default:r.withCtx(()=>[r.createVNode(D,{modelValue:l.value.proxyUrl,"onUpdate:modelValue":m[3]||(m[3]=I=>l.value.proxyUrl=I),placeholder:"http://localhost:3001/api/chat",clearable:"",disabled:""},null,8,["modelValue"]),m[16]||(m[16]=r.createElementVNode("div",{class:"form-tip"}," API Key 与上游地址由服务端按当前模型提供方配置。 ",-1))]),_:1})),A.value.models.length>0?(r.openBlock(),r.createBlock(C,{key:2,label:"模型"},{default:r.withCtx(()=>[r.createVNode(E,{modelValue:a.value.model,"onUpdate:modelValue":m[4]||(m[4]=I=>a.value.model=I),style:{width:"100%"},filterable:"","default-first-option":"","allow-create":A.value.allowCustomModel!==!1,placeholder:A.value.models.length?"请选择或输入模型名":"请输入模型名"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.value.models,I=>(r.openBlock(),r.createBlock(g,{key:I.value,label:I.label,value:I.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","allow-create","placeholder"])]),_:1})):r.createCommentVNode("",!0),r.createVNode(C,{label:"温度"},{default:r.withCtx(()=>[r.createElementVNode("div",Ic,[r.createVNode(k,{modelValue:a.value.temperature,"onUpdate:modelValue":m[5]||(m[5]=I=>a.value.temperature=I),disabled:a.value.thinking||A.value.capabilities.temperature===!1,min:0,max:2,step:.1,style:{flex:"1"}},null,8,["modelValue","disabled"]),r.createElementVNode("span",bc,r.toDisplayString(Number(a.value.temperature).toFixed(1)),1)]),m[17]||(m[17]=r.createElementVNode("div",{class:"form-tip"},"思考模式开启时温度不生效",-1))]),_:1}),A.value.capabilities.thinking?(r.openBlock(),r.createElementBlock(r.Fragment,{key:3},[r.createVNode(C,{label:"思考模式"},{default:r.withCtx(()=>[r.createVNode(B,{modelValue:a.value.thinking,"onUpdate:modelValue":m[6]||(m[6]=I=>a.value.thinking=I)},null,8,["modelValue"]),m[18]||(m[18]=r.createElementVNode("span",{class:"form-tip-inline"},"开启后模型进行推理/思维链(reasoning),适合复杂任务",-1))]),_:1}),r.createVNode(C,{label:"思考强度"},{default:r.withCtx(()=>[r.createVNode(E,{modelValue:a.value.thinkingEffort,"onUpdate:modelValue":m[7]||(m[7]=I=>a.value.thinkingEffort=I),disabled:!a.value.thinking,style:{width:"100%"}},{default:r.withCtx(()=>[r.createVNode(g,{label:"低",value:"low"}),r.createVNode(g,{label:"高",value:"high"}),r.createVNode(g,{label:"最高",value:"max"})]),_:1},8,["modelValue","disabled"])]),_:1})],64)):r.createCommentVNode("",!0),r.createVNode(C,{label:"md表格点击"},{default:r.withCtx(()=>[r.createVNode(B,{modelValue:l.value.mdTableClick,"onUpdate:modelValue":m[8]||(m[8]=I=>l.value.mdTableClick=I)},null,8,["modelValue"]),m[19]||(m[19]=r.createElementVNode("span",{class:"form-tip-inline"},'开启后点击回复中的 md 表格行会向助手发送"我选择 X"',-1))]),_:1}),r.createVNode(C,{label:"md列表点击"},{default:r.withCtx(()=>[r.createVNode(B,{modelValue:l.value.mdListClick,"onUpdate:modelValue":m[9]||(m[9]=I=>l.value.mdListClick=I)},null,8,["modelValue"]),m[20]||(m[20]=r.createElementVNode("span",{class:"form-tip-inline"},"开启后点击回复中的列表项会把该项内容作为指令发送",-1))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),fi=Bt(Dc,[["__scopeId","data-v-6282664f"]]),Bc={class:"chat-panel-root"},wc={class:"ai-fab__label"},Fc={class:"chat-panel__title"},vc={class:"chat-panel__ops"},xc={class:"chat-panel__scroll-wrap"},Sc={key:0,class:"chat-empty"},Nc={class:"chat-empty__logo"},Rc={key:0,class:"chat-empty__commands"},Tc={class:"chat-panel__nav-count"},Mc=["disabled"],Qc=["disabled"],Kc={key:0,class:"chat-panel__error"},Gc={class:"chat-panel__footer"},Wc={key:0,class:"chat-panel__stop"},Oc=r.defineComponent({__name:"ChatPanel",props:{chat:{},options:{},showFab:{type:Boolean,default:!0}},setup(e){const t=e,n={get_current_time:{label:"现在几点",text:"现在几点了?"},calculate_expression:{label:"帮我计算",text:"帮我计算 (1+2)*3"},generate_uuid:{label:"生成 UUID",text:"帮我生成一个 UUID"},get_client_info:{label:"客户端信息",text:"获取我的客户端信息"}};function i(Y){const N=Y??{toolPackages:[]};let y;return N.suggestedCommands!==void 0?y=N.suggestedCommands:N.builtInTools===!1?y=[]:Array.isArray(N.builtInTools)?y=N.builtInTools.map(x=>n[x]).filter(Boolean):y=Object.values(n),{...N,toolPackages:N.toolPackages??[],suggestedCommands:y}}const o=t.chat?null:wr(i(t.options)),s=t.chat??o,{messages:l,settings:A,loading:a,errorMsg:u,hasApiKey:h,visible:f,toolPackages:m,sendMessage:_,stopGeneration:d,clearMessages:C,saveSettings:g,deviceId:E,suggestedCommands:D}=s,F=r.ref(!1),k=r.ref(!1),B=r.ref(null),M=r.ref(null),K=r.ref(null),{pos:S,startDrag:I,consumeMoved:W}=ko({onDragStart:()=>{O.value=!0}}),O=r.ref(!1),{pos:te,startDrag:q}=ko({disabled:()=>k.value}),U=r.computed(()=>S.value?{left:`${S.value.x}px`,top:`${S.value.y}px`,right:"auto",bottom:"auto"}:{}),j=r.computed(()=>k.value||!te.value?{}:{left:`${te.value.x}px`,top:`${te.value.y}px`,right:"auto",bottom:"auto"});function J(Y){M.value&&I(Y,M.value)}function fe(){W()||ye()}function Be(Y){Y.target.closest(".chat-panel__ops")||K.value&&q(Y,K.value)}function ye(){f.value=!f.value}function et(){f.value=!1}function ct(){k.value=!k.value}function $(){r.nextTick(()=>{requestAnimationFrame(()=>{const Y=B.value;Y&&Y.scrollTo({top:Y.scrollHeight,behavior:"smooth"})})})}const ue=r.computed(()=>l.value.map((Y,N)=>Y.role==="user"?N:-1).filter(Y=>Y>=0)),ve=r.ref(0),Ne=r.ref(!1);let tt=null,ut=!1,Ve=0;function dt(Y){var y,x,R;const N=(x=B.value)==null?void 0:x.querySelector(`[data-msg-id="${(y=l.value[Y])==null?void 0:y.id}"]`);N&&((R=B.value)==null||R.scrollTo({top:Math.max(0,N.offsetTop-12),behavior:"smooth"}),ht(N))}function ht(Y){Y.classList.add("is-locate"),tt&&clearTimeout(tt),tt=setTimeout(()=>{Y.classList.remove("is-locate")},1200)}function nt(Y){if(!ue.value.length)return;const N=Math.min(Math.max(ve.value+Y,0),ue.value.length-1);ve.value=N,Ne.value=!0,dt(ue.value[N])}function ee(){ve.value=ue.value.length?ue.value.length-1:0,Ne.value=!1,$()}function Le(Y,N){Ne.value=!1,ve.value=ue.value.length?ue.value.length-1:0,_(Y,N),$()}function Z(Y){g(Y)}function ot(){Xe.ElMessageBox.confirm("确定要清空所有对话记录吗?","提示",{type:"warning",confirmButtonText:"清空",cancelButtonText:"取消"}).then(()=>{C()}).catch(()=>{})}function ie(Y){if(!ue.value.length)return;const N=Y.getBoundingClientRect(),y=N.top+N.height/2;let x=0,R=1/0;ue.value.forEach((w,H)=>{var ne;const z=Y.querySelector(`[data-msg-id="${(ne=l.value[w])==null?void 0:ne.id}"]`);if(!z)return;const X=Math.abs(z.getBoundingClientRect().top-y);X<R&&(R=X,x=H)}),ve.value=x}function Re(){const Y=B.value;Y&&(Ve&&cancelAnimationFrame(Ve),Ve=requestAnimationFrame(()=>{ie(Y);const N=Y.scrollHeight-Y.scrollTop-Y.clientHeight<60;Ne.value=!N}))}return r.onMounted(()=>{var Y;(Y=B.value)==null||Y.addEventListener("scroll",Re,{passive:!0})}),r.onBeforeUnmount(()=>{var Y;(Y=B.value)==null||Y.removeEventListener("scroll",Re),Ve&&cancelAnimationFrame(Ve)}),r.watch(f,Y=>{Y&&!ut&&(ut=!0,l.value.length&&ee())}),r.watch(()=>l.value.map(Y=>{var N;return Y.content+Y.status+(((N=Y.renderBlocks)==null?void 0:N.length)||0)}).join("|"),()=>{Ne.value||(ve.value=ue.value.length?ue.value.length-1:0,$())}),(Y,N)=>{const y=r.resolveComponent("ChatDotRound"),x=r.resolveComponent("el-icon"),R=r.resolveComponent("el-tag"),w=r.resolveComponent("el-button"),H=r.resolveComponent("el-tooltip"),z=r.resolveComponent("SemiSelect"),X=r.resolveComponent("el-alert");return r.openBlock(),r.createElementBlock("div",Bc,[e.showFab?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"fabRef",ref:M,class:r.normalizeClass(["ai-fab",{"ai-fab--active":r.unref(f),"ai-fab--dragged":O.value}]),style:r.normalizeStyle(U.value),onPointerdown:J,onClick:fe},[r.createElementVNode("span",wc,r.toDisplayString(r.unref(f)?"收起":"AI 助手"),1)],38)):r.createCommentVNode("",!0),r.createVNode(r.Transition,{name:"panel"},{default:r.withCtx(()=>{var ne;return[r.withDirectives(r.createElementVNode("div",{ref_key:"panelRef",ref:K,class:r.normalizeClass(["chat-panel",{"chat-panel--fullscreen":k.value}]),style:r.normalizeStyle(j.value)},[r.createElementVNode("div",{class:"chat-panel__header",onPointerdown:Be},[r.createElementVNode("div",Fc,[r.createVNode(x,{class:"title-icon"},{default:r.withCtx(()=>[r.createVNode(y)]),_:1}),N[7]||(N[7]=r.createElementVNode("span",null,"AI 智能助手",-1)),r.unref(h)?(r.openBlock(),r.createBlock(R,{key:0,size:"small",type:"success",effect:"plain"},{default:r.withCtx(()=>[...N[5]||(N[5]=[r.createTextVNode("已配置",-1)])]),_:1})):(r.openBlock(),r.createBlock(R,{key:1,size:"small",type:"warning",effect:"plain"},{default:r.withCtx(()=>[...N[6]||(N[6]=[r.createTextVNode("未配置",-1)])]),_:1}))]),r.createElementVNode("div",vc,[r.createVNode(H,{content:"设置",placement:"bottom"},{default:r.withCtx(()=>[r.createVNode(w,{text:"",circle:"",onClick:N[0]||(N[0]=le=>F.value=!0)},{default:r.withCtx(()=>[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(Eo))]),_:1})]),_:1})]),_:1}),r.createVNode(H,{content:"清空对话",placement:"bottom"},{default:r.withCtx(()=>[r.createVNode(w,{text:"",circle:"",disabled:!r.unref(l).length,onClick:ot},{default:r.withCtx(()=>[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(ps))]),_:1})]),_:1},8,["disabled"])]),_:1}),r.createVNode(H,{content:k.value?"退出全屏":"全屏",placement:"bottom"},{default:r.withCtx(()=>[r.createVNode(w,{text:"",circle:"",onClick:ct},{default:r.withCtx(()=>[k.value?(r.openBlock(),r.createBlock(x,{key:1},{default:r.withCtx(()=>[r.createVNode(z)]),_:1})):(r.openBlock(),r.createBlock(x,{key:0},{default:r.withCtx(()=>[r.createVNode(r.unref(Cs))]),_:1}))]),_:1})]),_:1},8,["content"]),r.createVNode(H,{content:"关闭",placement:"bottom"},{default:r.withCtx(()=>[r.createVNode(w,{text:"",circle:"",onClick:et},{default:r.withCtx(()=>[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(as))]),_:1})]),_:1})]),_:1})])],32),r.createElementVNode("div",xc,[r.createElementVNode("div",{ref_key:"scrollRef",ref:B,class:"chat-panel__body"},[r.unref(l).length?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:1},r.renderList(r.unref(l),le=>(r.openBlock(),r.createBlock(di,{key:le.id,message:le,"tool-packages":r.unref(m),"md-table-click":r.unref(A).mdTableClick,"md-list-click":r.unref(A).mdListClick,"data-msg-id":le.id,onExecute:Le},null,8,["message","tool-packages","md-table-click","md-list-click","data-msg-id"]))),128)):(r.openBlock(),r.createElementBlock("div",Sc,[r.createElementVNode("div",Nc,[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(y)]),_:1})]),N[9]||(N[9]=r.createElementVNode("h3",null,"你好,我是系统 AI 助手",-1)),N[10]||(N[10]=r.createElementVNode("p",{class:"chat-empty__desc"},[r.createTextVNode(" 我可以帮你"),r.createElementVNode("span",{class:"hl"},"查询数据"),r.createTextVNode("、"),r.createElementVNode("span",{class:"hl"},"执行操作"),r.createTextVNode("。试试输入指令: ")],-1)),(ne=r.unref(D))!=null&&ne.length?(r.openBlock(),r.createElementBlock("div",Rc,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(D),le=>(r.openBlock(),r.createBlock(w,{key:le.text,size:"small",type:"primary",round:"",plain:"",onClick:oe=>Le(le.text)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(le.label),1)]),_:2},1032,["onClick"]))),128))])):r.createCommentVNode("",!0),r.unref(h)?r.createCommentVNode("",!0):(r.openBlock(),r.createBlock(w,{key:1,type:"primary",icon:r.unref(Eo),onClick:N[1]||(N[1]=le=>F.value=!0)},{default:r.withCtx(()=>[...N[8]||(N[8]=[r.createTextVNode(" 先配置 API Key ",-1)])]),_:1},8,["icon"]))]))],512),r.createVNode(r.Transition,{name:"fade"},{default:r.withCtx(()=>[ue.value.length?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["chat-panel__nav",{"is-suppressed-scroll":Ne.value}])},[r.createElementVNode("div",Tc,r.toDisplayString(ve.value+1)+"/"+r.toDisplayString(ue.value.length),1),r.createVNode(H,{content:"上一个用户消息",placement:"left","show-after":300},{default:r.withCtx(()=>[r.createElementVNode("button",{class:"chat-panel__nav-btn",disabled:ve.value<=0,type:"button",onClick:N[2]||(N[2]=le=>nt(-1))},[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(vs))]),_:1})],8,Mc)]),_:1}),r.createVNode(H,{content:"下一个用户消息",placement:"left","show-after":300},{default:r.withCtx(()=>[r.createElementVNode("button",{class:"chat-panel__nav-btn",disabled:ve.value>=ue.value.length-1,type:"button",onClick:N[3]||(N[3]=le=>nt(1))},[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(is))]),_:1})],8,Qc)]),_:1}),r.createVNode(H,{content:"最新消息",placement:"left","show-after":300},{default:r.withCtx(()=>[r.createElementVNode("button",{class:"chat-panel__nav-btn",type:"button",onClick:ee},[r.createVNode(x,null,{default:r.withCtx(()=>[r.createVNode(r.unref(bs))]),_:1})])]),_:1})],2)):r.createCommentVNode("",!0)]),_:1})]),r.createVNode(r.Transition,{name:"fade"},{default:r.withCtx(()=>[r.unref(u)?(r.openBlock(),r.createElementBlock("div",Kc,[r.createVNode(X,{title:r.unref(u),type:"error","show-icon":"",closable:!1},null,8,["title"])])):r.createCommentVNode("",!0)]),_:1}),r.createElementVNode("div",Gc,[r.unref(a)?(r.openBlock(),r.createElementBlock("div",Wc,[r.createVNode(w,{size:"small",icon:r.unref(Rs),onClick:r.unref(d)},{default:r.withCtx(()=>[...N[11]||(N[11]=[r.createTextVNode("停止生成",-1)])]),_:1},8,["icon","onClick"])])):r.createCommentVNode("",!0),r.createVNode(hi,{loading:r.unref(a),placeholder:r.unref(h)?"输入指令...":"请先配置 API Key",onSend:Le},null,8,["loading","placeholder"])]),r.createVNode(fi,{modelValue:F.value,"onUpdate:modelValue":N[4]||(N[4]=le=>F.value=le),settings:r.unref(A),"device-id":r.unref(E),onSave:Z},null,8,["modelValue","settings","device-id"])],6),[[r.vShow,r.unref(f)]])]}),_:1})])}}}),Yc=Bt(Oc,[["__scopeId","data-v-5dde3b27"]]);function Hc(e){if(typeof e!="string")return e;try{const t=JSON.parse(e);return t!==null&&(typeof t=="object"||Array.isArray(t))?t:e}catch{return e}}const Uc=Object.freeze(Object.defineProperty({__proto__:null,parseStringToObject:Hc},Symbol.toStringTag,{value:"Module"}));exports.Agent=ir;exports.BUILTIN_TOOL_PACKAGE=Mt;exports.ChatInput=hi;exports.ChatMessageComp=di;exports.ChatPanel=Yc;exports.ChatSettingsComp=fi;exports.DEFAULT_PROVIDER_ID=It;exports.DEFAULT_PROVIDER_SETTINGS=Se;exports.DEFAULT_SETTINGS=Nt;exports.EventBus=Pn;exports.MODEL_OPTIONS=Qi;exports.PROVIDER_PRESETS=Ln;exports.ParseUtils=Uc;exports.RenderBlockComp=vr;exports.SuggestedNext=xr;exports.ToolRegistry=sr;exports.blobFromAttachment=ui;exports.buildSystemPrompt=_r;exports.createAgentBridge=Ir;exports.createDeepSeekProvider=ns;exports.createEventBus=Xi;exports.createOpenAICompatibleProvider=Vt;exports.createOpenAIProvider=os;exports.createProvider=gr;exports.createProviderSettings=lt;exports.createProxyProvider=pr;exports.getDefaultBridge=br;exports.getDefaultEventBus=ln;exports.getProviderPreset=Ye;exports.isTifFile=ci;exports.listProviderPresets=Jn;exports.mergeSettings=Wn;exports.normalizeSettings=at;exports.registerProvider=Wi;exports.registerProviderPreset=lr;exports.resolveRenderBlock=Ji;exports.runBuiltinToolHandler=kr;exports.setBridgeBus=Dr;exports.syncLegacySettings=dr;exports.useAgentChat=wr;exports.usePageAgentBridge=$i;
58
+ `};st.text=function(e,t){return Et(e[t].content)};st.html_block=function(e,t){return e[t].content};st.html_inline=function(e,t){return e[t].content};var Ci=class{constructor(){V(this,"rules",Object.assign({},st))}renderAttrs(e){let t,n,i;if(!e.attrs)return"";for(i="",t=0,n=e.attrs.length;t<n;t++)i+=` ${Et(e.attrs[t][0])}="${Et(String(e.attrs[t][1]))}"`;return i}renderToken(e,t,n){const i=e[t];let r="";if(i.hidden)return"";let s=t-1;for(;s>=0&&e[s].hidden&&e[s].nesting===0;)s--;i.block&&i.nesting!==-1&&s>=0&&e[s].hidden&&e[s].nesting===-1&&(r+=`
59
+ `),r+=(i.nesting===-1?"</":"<")+i.tag,r+=this.renderAttrs(i),i.nesting===0&&n.xhtmlOut&&(r+=" /");let l=!1;if(i.block&&(l=!0,i.nesting===1)){let a=t+1;for(;a<e.length&&e[a].hidden&&e[a].nesting===0;)a++;if(a<e.length){const c=e[a];(c.type==="inline"||c.hidden||c.nesting===-1&&c.tag===i.tag)&&(l=!1)}}return r+=l?`>
60
+ `:">",r}renderInline(e,t,n){let i="";const r=this.rules;for(let s=0,l=e.length;s<l;s++){const a=e[s].type;typeof r[a]<"u"?i+=r[a](e,s,t,n,this):i+=this.renderToken(e,s,t)}return i}renderInlineAsText(e,t,n){let i="";for(let r=0,s=e.length;r<s;r++)switch(e[r].type){case"text":case"code_inline":i+=e[r].content;break;case"image":i+=this.renderInlineAsText(e[r].children,t,n);break;case"html_inline":case"html_block":i+=e[r].content;break;case"softbreak":case"hardbreak":i+=`
61
+ `}return i}render(e,t,n){let i="";const r=this.rules;for(let s=0,l=e.length;s<l;s++){const a=e[s].type;a==="inline"?i+=this.renderInline(e[s].children,t,n):typeof r[a]<"u"?i+=r[a](e,s,t,n,this):i+=this.renderToken(e,s,t)}return i}},_i=class{constructor(e,t,n){V(this,"tokens",[]),V(this,"inlineMode",!1),V(this,"Token",xt),this.src=e,this.env=n,this.md=t}},Ka=/\r\n?|\n/g,Ga=/\0/g;function Wa(e){let t;t=e.src.replace(Ka,`
62
+ `),t=t.replace(Ga,"�"),e.src=t}function Va(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function Oa(e){const t=e.tokens;let n=0;for(let i=0;i<t.length;i++)t[i].type!=="reference_definition"&&(i!==n&&(t[n]=t[i]),n++);t.length!==n&&(t.length=n)}function Ya(e){const t=e.tokens;for(let n=0,i=t.length;n<i;n++){const r=t[n];r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)}}function Ua(e){return/^<a[>\s]/i.test(e)}function Ha(e){return/^<\/a\s*>/i.test(e)}function La(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,i=t.length;n<i;n++){if(t[n].type!=="inline"||!e.md.linkify.test(t[n].content))continue;let r=t[n].children,s=0;for(let l=r.length-1;l>=0;l--){const a=r[l];if(a.type==="link_close"){for(l--;r[l].level!==a.level&&r[l].type!=="link_open";)l--;continue}if(a.type==="html_inline"&&(Ua(a.content)&&s>0&&s--,Ha(a.content)&&s++),!(s>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const c=a.content;let A=e.md.linkify.match(c);const f=[];let h=a.level,p=0;A.length>0&&A[0].index===0&&l>0&&r[l-1].type==="text_special"&&(A=A.slice(1));for(let C=0;C<A.length;C++){const d=A[C].url,w=e.md.normalizeLink(d);if(!e.md.validateLink(w))continue;let I=A[C].text;A[C].schema?A[C].schema==="mailto:"&&!/^mailto:/i.test(I)?I=e.md.normalizeLinkText(`mailto:${I}`).replace(/^mailto:/,""):I=e.md.normalizeLinkText(I):I=e.md.normalizeLinkText(`http://${I}`).replace(/^http:\/\//,"");const E=A[C].index;if(E>p){const k=new e.Token("text","",0);k.content=c.slice(p,E),k.level=h,f.push(k)}const y=new e.Token("link_open","a",1);y.attrs=[["href",w]],y.level=h++,y.markup="linkify",y.info="auto",f.push(y);const b=new e.Token("text","",0);b.content=I,b.level=h,f.push(b);const _=new e.Token("link_close","a",-1);_.level=--h,_.markup="linkify",_.info="auto",f.push(_),p=A[C].lastIndex}if(p<c.length){const C=new e.Token("text","",0);C.content=c.slice(p),C.level=h,f.push(C)}t[n].children=r=pi(r,l,f)}}}}var ki=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,Ja=/\((c|tm|r)\)/i,Za=/\((c|tm|r)\)/gi,Pa={c:"©",r:"®",tm:"™"};function za(e,t){return Pa[t.toLowerCase()]}function ja(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&(i.content=i.content.replace(Za,za)),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function Xa(e){let t=0;for(let n=e.length-1;n>=0;n--){const i=e[n];i.type==="text"&&!t&&ki.test(i.content)&&(i.content=i.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/gm,"$1—").replace(/(^|\s)--(?=\s|$)/gm,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/gm,"$1–")),i.type==="link_open"&&i.info==="auto"&&t--,i.type==="link_close"&&i.info==="auto"&&t++}}function $a(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(Ja.test(e.tokens[t].content)&&ja(e.tokens[t].children),ki.test(e.tokens[t].content)&&Xa(e.tokens[t].children))}var qa=/['"]/,Po=/['"]/g,zo="’";function Bn(e,t,n,i){e[t]||(e[t]=[]),e[t].push({pos:n,ch:i})}function ec(e,t){let n="",i=0;t.sort((r,s)=>r.pos-s.pos);for(let r=0;r<t.length;r++){const s=t[r];n+=e.slice(i,s.pos)+s.ch,i=s.pos+1}return n+e.slice(i)}function tc(e,t){let n;const i=[],r={};for(let s=0;s<e.length;s++){const l=e[s],a=e[s].level;for(n=i.length-1;n>=0&&!(i[n].level<=a);n--);if(i.length=n+1,l.type!=="text")continue;const c=l.content;let A=0;const f=c.length;e:for(;A<f;){Po.lastIndex=A;const h=Po.exec(c);if(!h)break;let p=!0,C=!0;A=h.index+1;const d=h[0]==="'";let w=32;if(h.index-1>=0)w=c.charCodeAt(h.index-1);else for(n=s-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){w=e[n].content.charCodeAt(e[n].content.length-1);break}let I=32;if(A<f)I=c.charCodeAt(A);else for(n=s+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){I=e[n].content.charCodeAt(0);break}const E=dn(w)||un(w),y=dn(I)||un(I),b=An(w),_=An(I);if(_?p=!1:y&&(b||E||(p=!1)),b?C=!1:E&&(_||y||(C=!1)),I===34&&h[0]==='"'&&w>=48&&w<=57&&(C=p=!1),p&&C&&(p=E,C=y),!p&&!C){d&&Bn(r,s,h.index,zo);continue}if(C)for(n=i.length-1;n>=0;n--){let k=i[n];if(i[n].level<a)break;if(k.single===d&&i[n].level===a){k=i[n];let v,Q;d?(v=t.md.options.quotes[2],Q=t.md.options.quotes[3]):(v=t.md.options.quotes[0],Q=t.md.options.quotes[1]),Bn(r,s,h.index,Q),Bn(r,k.token,k.pos,v),i.length=n;continue e}}p?i.push({token:s,pos:h.index,single:d,level:a}):C&&d&&Bn(r,s,h.index,zo)}}Object.keys(r).forEach(function(s){const l=Number(s);e[l].content=ec(e[l].content,r[s])})}function nc(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!qa.test(e.tokens[t].content)||tc(e.tokens[t].children,e)}function oc(e){let t,n;const i=e.length;for(t=0;t<i;t++)e[t].type==="text_special"&&(e[t].type="text");for(t=n=0;t<i;t++)e[t].type==="text"&&t+1<i&&e[t+1].type==="text"?e[t+1].content=e[t].content+e[t+1].content:(t!==n&&(e[n]=e[t]),n++);t!==n&&(e.length=n)}function rc(e){let t,n;const i=e.tokens,r=i.length;for(let s=0;s<r;s++){if(i[s].type!=="inline")continue;const l=i[s].children,a=l.length;for(t=0;t<a;t++)l[t].type==="text_special"&&(l[t].type="text"),l[t].children&&oc(l[t].children);for(t=n=0;t<a;t++)l[t].type==="text"&&t+1<a&&l[t+1].type==="text"?l[t+1].content=l[t].content+l[t+1].content:(t!==n&&(l[n]=l[t]),n++);t!==n&&(l.length=n)}}var Ln=[["normalize",Wa],["block",Va],["strip_references",Oa],["inline",Ya],["linkify",La],["replacements",$a],["smartquotes",nc],["text_join",rc]],yi=class{constructor(){V(this,"ruler",new hn),V(this,"State",_i);for(let e=0;e<Ln.length;e++)this.ruler.push(Ln[e][0],Ln[e][1])}process(e){const t=this.ruler.getRules("");for(let n=0,i=t.length;n<i;n++)t[n](e)}},Ei=class{constructor(e,t,n,i){V(this,"bMarks",[]),V(this,"eMarks",[]),V(this,"tShift",[]),V(this,"sCount",[]),V(this,"bsCount",[]),V(this,"blkIndent",0),V(this,"line",0),V(this,"lineMax",0),V(this,"tight",!1),V(this,"listIndent",-1),V(this,"parentType","root"),V(this,"level",0),V(this,"Token",xt),this.src=e,this.md=t,this.env=n,this.tokens=i;const r=this.src;for(let s=0,l=0,a=0,c=0,A=r.length,f=!1;l<A;l++){const h=r.charCodeAt(l);if(!f)if(Ae(h)){a++,h===9?c+=4-c%4:c++;continue}else f=!0;(h===10||l===A-1)&&(h!==10&&l++,this.bMarks.push(s),this.eMarks.push(l),this.tShift.push(a),this.sCount.push(c),this.bsCount.push(0),f=!1,a=0,c=0,s=l+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}push(e,t,n){const i=new xt(e,t,n);return i.block=!0,n<0&&this.level--,i.level=this.level,n>0&&this.level++,this.tokens.push(i),i}isEmpty(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]}skipEmptyLines(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e}skipSpaces(e){for(let t=this.src.length;e<t&&Ae(this.src.charCodeAt(e));e++);return e}skipSpacesBack(e,t){if(e<=t)return e;for(;e>t;)if(!Ae(this.src.charCodeAt(--e)))return e+1;return e}skipChars(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e}skipCharsBack(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e}getLines(e,t,n,i){if(e>=t)return"";const r=new Array(t-e);for(let s=0,l=e;l<t;l++,s++){let a=0;const c=this.bMarks[l];let A=c,f;for(l+1<t||i?f=this.eMarks[l]+1:f=this.eMarks[l];A<f&&a<n;){const h=this.src.charCodeAt(A);if(Ae(h))h===9?a+=4-(a+this.bsCount[l])%4:a++;else if(A-c<this.tShift[l])a++;else break;A++}a>n?r[s]=new Array(a-n+1).join(" ")+this.src.slice(A,f):r[s]=this.src.slice(A,f)}return r.join("")}},ic=65536;function Jn(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];return e.src.slice(n,i)}function jo(e){const t=[],n=e.length;let i=0,r=e.charCodeAt(i),s=!1,l=0,a="";for(;i<n;)r===124&&(s?(a+=e.substring(l,i-1),l=i):(t.push(a+e.substring(l,i)),a="",l=i+1)),s=r===92,i++,r=e.charCodeAt(i);return t.push(a+e.substring(l)),t}function sc(e,t,n,i){if(t+2>n)return!1;let r=t+1;if(e.sCount[r]<e.blkIndent||e.sCount[r]-e.blkIndent>=4)return!1;let s=e.bMarks[r]+e.tShift[r];if(s>=e.eMarks[r])return!1;const l=e.src.charCodeAt(s++);if(l!==124&&l!==45&&l!==58||s>=e.eMarks[r])return!1;const a=e.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58&&!Ae(a)||l===45&&Ae(a))return!1;for(;s<e.eMarks[r];){const _=e.src.charCodeAt(s);if(_!==124&&_!==45&&_!==58&&!Ae(_))return!1;s++}let c=Jn(e,t+1),A=c.split("|");const f=[];for(let _=0;_<A.length;_++){const k=A[_].trim();if(!k){if(_===0||_===A.length-1)continue;return!1}if(!/^:?-+:?$/.test(k))return!1;k.charCodeAt(k.length-1)===58?f.push(k.charCodeAt(0)===58?"center":"right"):k.charCodeAt(0)===58?f.push("left"):f.push("")}if(c=Jn(e,t).trim(),c.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;A=jo(c),A.length&&A[0]===""&&A.shift(),A.length&&A[A.length-1]===""&&A.pop();const h=A.length;if(h===0||h!==f.length)return!1;if(i)return!0;const p=e.parentType;e.parentType="table";const C=e.md.block.ruler.getRules("blockquote"),d=e.push("table_open","table",1),w=[t,0];d.map=w;const I=e.push("thead_open","thead",1);I.map=[t,t+1];const E=e.push("tr_open","tr",1);E.map=[t,t+1];for(let _=0;_<A.length;_++){const k=e.push("th_open","th",1);f[_]&&(k.attrs=[["style",`text-align:${f[_]}`]]);const v=e.push("inline","",0);v.content=A[_].trim(),v.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let y,b=0;for(r=t+2;r<n&&!(e.sCount[r]<e.blkIndent);r++){let _=!1;for(let v=0,Q=C.length;v<Q;v++)if(C[v](e,r,n,!0)){_=!0;break}if(_||(c=Jn(e,r).trim(),!c)||e.sCount[r]-e.blkIndent>=4||(A=jo(c),A.length&&A[0]===""&&A.shift(),A.length&&A[A.length-1]===""&&A.pop(),b+=h-A.length,b>ic))break;if(r===t+2){const v=e.push("tbody_open","tbody",1);v.map=y=[t+2,0]}const k=e.push("tr_open","tr",1);k.map=[r,r+1];for(let v=0;v<h;v++){const Q=e.push("td_open","td",1);f[v]&&(Q.attrs=[["style",`text-align:${f[v]}`]]);const P=e.push("inline","",0);P.content=A[v]?A[v].trim():"",P.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return y&&(e.push("tbody_close","tbody",-1),y[1]=r),e.push("table_close","table",-1),w[1]=r,e.parentType=p,e.line=r,!0}function lc(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let i=t+1,r=i;for(;i<n;){if(e.isEmpty(i)){i++;continue}if(e.sCount[i]-e.blkIndent>=4){i++,r=i;continue}break}e.line=r;const s=e.push("code_block","code",0);return s.content=e.getLines(t,r,4+e.blkIndent,!1)+`
63
+ `,s.map=[t,e.line],!0}function ac(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||r+3>s)return!1;const l=e.src.charCodeAt(r);if(l!==126&&l!==96)return!1;let a=r;r=e.skipChars(r,l);let c=r-a;if(c<3)return!1;const A=e.src.slice(a,r),f=e.src.slice(r,s);if(l===96&&f.indexOf(String.fromCharCode(l))>=0)return!1;if(i)return!0;let h=t,p=!1;for(;h++,!(h>=n||(r=a=e.bMarks[h]+e.tShift[h],s=e.eMarks[h],r<s&&e.sCount[h]<e.blkIndent));)if(e.src.charCodeAt(r)===l&&!(e.sCount[h]-e.blkIndent>=4)&&(r=e.skipChars(r,l),!(r-a<c)&&(r=e.skipSpaces(r),!(r<s)))){p=!0;break}c=e.sCount[t],e.line=h+(p?1:0);const C=e.push("fence","code",0);return C.info=f,C.content=e.getLines(t+1,h,c,!0),C.markup=A,C.map=[t,e.line],!0}function cc(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];const l=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==62)return!1;if(i)return!0;const a=[],c=[],A=[],f=[],h=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let C=!1,d;for(d=t;d<n;d++){const b=e.sCount[d]<e.blkIndent;if(r=e.bMarks[d]+e.tShift[d],s=e.eMarks[d],r>=s)break;if(e.src.charCodeAt(r++)===62&&!b){let k=e.sCount[d]+1,v,Q;e.src.charCodeAt(r)===32?(r++,k++,Q=!1,v=!0):e.src.charCodeAt(r)===9?(v=!0,(e.bsCount[d]+k)%4===3?(r++,k++,Q=!1):Q=!0):v=!1;let P=k;for(a.push(e.bMarks[d]),e.bMarks[d]=r;r<s;){const K=e.src.charCodeAt(r);if(Ae(K))K===9?P+=4-(P+e.bsCount[d]+(Q?1:0))%4:P++;else break;r++}C=r>=s,c.push(e.bsCount[d]),e.bsCount[d]=e.sCount[d]+1+(v?1:0),A.push(e.sCount[d]),e.sCount[d]=P-k,f.push(e.tShift[d]),e.tShift[d]=r-e.bMarks[d];continue}if(C)break;let _=!1;for(let k=0,v=h.length;k<v;k++)if(h[k](e,d,n,!0)){_=!0;break}if(_){e.lineMax=d,e.blkIndent!==0&&(a.push(e.bMarks[d]),c.push(e.bsCount[d]),f.push(e.tShift[d]),A.push(e.sCount[d]),e.sCount[d]-=e.blkIndent);break}a.push(e.bMarks[d]),c.push(e.bsCount[d]),f.push(e.tShift[d]),A.push(e.sCount[d]),e.sCount[d]=-1}const w=e.blkIndent;e.blkIndent=0;const I=e.push("blockquote_open","blockquote",1);I.markup=">";const E=[t,0];I.map=E,e.md.block.tokenize(e,t,d);const y=e.push("blockquote_close","blockquote",-1);y.markup=">",e.lineMax=l,e.parentType=p,E[1]=e.line;for(let b=0;b<f.length;b++)e.bMarks[b+t]=a[b],e.tShift[b+t]=f[b],e.sCount[b+t]=A[b],e.bsCount[b+t]=c[b];return e.blkIndent=w,!0}function Ac(e,t,n,i){const r=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.bMarks[t]+e.tShift[t];const l=e.src.charCodeAt(s++);if(l!==42&&l!==45&&l!==95)return!1;let a=1;for(;s<r;){const A=e.src.charCodeAt(s++);if(A!==l&&!Ae(A))return!1;A===l&&a++}if(a<3)return!1;if(i)return!0;e.line=t+1;const c=e.push("hr","hr",0);return c.map=[t,e.line],c.markup=Array(a+1).join(String.fromCharCode(l)),!0}function Xo(e,t){const n=e.eMarks[t];let i=e.bMarks[t]+e.tShift[t];const r=e.src.charCodeAt(i++);return r!==42&&r!==45&&r!==43||i<n&&!Ae(e.src.charCodeAt(i))?-1:i}function $o(e,t){const n=e.bMarks[t]+e.tShift[t],i=e.eMarks[t];let r=n;if(r+1>=i)return-1;let s=e.src.charCodeAt(r++);if(s<48||s>57)return-1;for(;;){if(r>=i)return-1;if(s=e.src.charCodeAt(r++),s>=48&&s<=57){if(r-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return r<i&&(s=e.src.charCodeAt(r),!Ae(s))?-1:r}function uc(e,t){const n=e.level+2;for(let i=t+2,r=e.tokens.length-2;i<r;i++)e.tokens[i].level===n&&e.tokens[i].type==="paragraph_open"&&(e.tokens[i+2].hidden=!0,e.tokens[i].hidden=!0,i+=2)}function dc(e,t,n,i){let r,s,l,a,c=t,A=!0;if(e.sCount[c]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[c]-e.listIndent>=4&&e.sCount[c]<e.blkIndent)return!1;let f=!1;i&&e.parentType==="paragraph"&&e.sCount[c]>=e.blkIndent&&(f=!0);let h,p,C;if((C=$o(e,c))>=0){if(h=!0,l=e.bMarks[c]+e.tShift[c],p=Number(e.src.slice(l,C-1)),f&&p!==1)return!1}else if((C=Xo(e,c))>=0)h=!1;else return!1;if(f&&e.skipSpaces(C)>=e.eMarks[c])return!1;if(i)return!0;const d=e.src.charCodeAt(C-1),w=e.tokens.length;h?(a=e.push("ordered_list_open","ol",1),p!==1&&(a.attrs=[["start",p]])):a=e.push("bullet_list_open","ul",1);const I=[c,0];a.map=I,a.markup=String.fromCharCode(d);let E=!1;const y=e.md.block.ruler.getRules("list"),b=e.parentType;for(e.parentType="list";c<n;){s=C,r=e.eMarks[c];const _=e.sCount[c]+C-(e.bMarks[c]+e.tShift[c]);let k=_;for(;s<r;){const q=e.src.charCodeAt(s);if(q===9)k+=4-(k+e.bsCount[c])%4;else if(q===32)k++;else break;s++}const v=s;let Q;v>=r?Q=1:Q=k-_,Q>4&&(Q=1);const P=_+Q;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(d);const K=[c,0];a.map=K,h&&(a.info=e.src.slice(l,C-1));const se=e.tight,S=e.tShift[c],M=e.sCount[c],W=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=P,e.tight=!0,e.tShift[c]=v-e.bMarks[c],e.sCount[c]=k,v>=r&&e.isEmpty(c+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,c,n),(!e.tight||E)&&(A=!1),E=e.line-c>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=W,e.tShift[c]=S,e.sCount[c]=M,e.tight=se,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(d),c=e.line,K[1]=c,c>=n||e.sCount[c]<e.blkIndent||e.sCount[c]-e.blkIndent>=4)break;let H=!1;for(let q=0,Be=y.length;q<Be;q++)if(y[q](e,c,n,!0)){H=!0;break}if(H)break;if(h){if(C=$o(e,c),C<0)break;l=e.bMarks[c]+e.tShift[c]}else if(C=Xo(e,c),C<0)break;if(d!==e.src.charCodeAt(C-1))break}return h?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(d),I[1]=c,e.line=c,e.parentType=b,A&&uc(e,w),!0}function fc(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t],l=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(r)!==91)return!1;function a(_){const k=e.lineMax;if(_>=k||e.isEmpty(_))return null;let v=!1;if(e.sCount[_]-e.blkIndent>3&&(v=!0),e.sCount[_]<0&&(v=!0),!v){const K=e.md.block.ruler.getRules("reference"),se=e.parentType;e.parentType="reference";let S=!1;for(let M=0,W=K.length;M<W;M++)if(K[M](e,_,k,!0)){S=!0;break}if(e.parentType=se,S)return null}const Q=e.bMarks[_]+e.tShift[_],P=e.eMarks[_];return e.src.slice(Q,P+1)}let c=e.src.slice(r,s+1);s=c.length;let A=-1;for(r=1;r<s;r++){const _=c.charCodeAt(r);if(_===91)return!1;if(_===93){A=r;break}else if(_===10){const k=a(l);k!==null&&(c+=k,s=c.length,l++)}else if(_===92&&(r++,r<s&&c.charCodeAt(r)===10)){const k=a(l);k!==null&&(c+=k,s=c.length,l++)}}if(A<0||c.charCodeAt(A+1)!==58)return!1;for(r=A+2;r<s;r++){const _=c.charCodeAt(r);if(_===10){const k=a(l);k!==null&&(c+=k,s=c.length,l++)}else if(!Ae(_))break}const f=e.md.helpers.parseLinkDestination(c,r,s);if(!f.ok)return!1;const h=e.md.normalizeLink(f.str);if(!e.md.validateLink(h))return!1;r=f.pos;const p=r,C=l,d=r;for(;r<s;r++){const _=c.charCodeAt(r);if(_===10){const k=a(l);k!==null&&(c+=k,s=c.length,l++)}else if(!Ae(_))break}let w=e.md.helpers.parseLinkTitle(c,r,s);for(;w.can_continue;){const _=a(l);if(_===null)break;c+=_,r=s,s=c.length,l++,w=e.md.helpers.parseLinkTitle(c,r,s,w)}let I;for(r<s&&d!==r&&w.ok?(I=w.str,r=w.pos):(I="",r=p,l=C);r<s&&Ae(c.charCodeAt(r));)r++;if(r<s&&c.charCodeAt(r)!==10&&I)for(I="",r=p,l=C;r<s&&Ae(c.charCodeAt(r));)r++;if(r<s&&c.charCodeAt(r)!==10)return!1;const E=Tn(c.slice(1,A));if(!E)return!1;if(i)return!0;typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[E]>"u"&&(e.env.references[E]={title:I,href:h});const y=e.push("reference_definition","",0);y.map=[t,l],y.hidden=!0;const b=Object.create(null);return b.label=E,y.meta=b,e.line=l,!0}var hc=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ii=`<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^"'=<>\`\\x00-\\x20]+|'[^']*'|"[^"]*"))?)*\\s*\\/?>`,bi="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",pc=new RegExp(`^(?:${Ii}|${bi}|<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->|<[?][\\s\\S]*?[?]>|<![A-Za-z][^>]*>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>)`),mc=new RegExp(`^(?:${Ii}|${bi})`),Bt=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Za-z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp(`^</?(${hc.join("|")})(?=(\\s|/?>|$))`,"i"),/^$/,!0],[new RegExp(`${mc.source}\\s*$`),/^$/,!1]];function gc(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(r)!==60)return!1;let l=e.src.slice(r,s),a=0;for(;a<Bt.length&&!Bt[a][0].test(l);a++);if(a===Bt.length)return!1;if(i)return Bt[a][2];let c=t+1;const A=Bt[a][1].test("");if(!Bt[a][1].test(l)){for(;c<n&&!(e.sCount[c]<e.blkIndent&&(A||!e.isEmpty(c)));c++)if(r=e.bMarks[c]+e.tShift[c],s=e.eMarks[c],l=e.src.slice(r,s),Bt[a][1].test(l)){l.length!==0&&c++;break}}e.line=c;const f=e.push("html_block","",0);return f.map=[t,c],f.content=e.getLines(t,c,e.blkIndent,!0),!0}function Cc(e,t,n,i){let r=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let l=e.src.charCodeAt(r);if(l!==35||r>=s)return!1;let a=1;for(l=e.src.charCodeAt(++r);l===35&&r<s&&a<=6;)a++,l=e.src.charCodeAt(++r);if(a>6||r<s&&!Ae(l))return!1;if(i)return!0;s=e.skipSpacesBack(s,r);const c=e.skipCharsBack(s,35,r);c>r&&Ae(e.src.charCodeAt(c-1))&&(s=c),e.line=t+1;const A=e.push("heading_open",`h${a}`,1);A.markup="########".slice(0,a),A.map=[t,e.line];const f=e.push("inline","",0);f.content=Mn(e.src.slice(r,s)),f.map=[t,e.line],f.children=[];const h=e.push("heading_close",`h${a}`,-1);return h.markup="########".slice(0,a),!0}function _c(e,t,n){const i=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const r=e.parentType;e.parentType="paragraph";let s=0,l,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let C=e.bMarks[a]+e.tShift[a];const d=e.eMarks[a];if(C<d&&(l=e.src.charCodeAt(C),(l===45||l===61)&&(C=e.skipChars(C,l),C=e.skipSpaces(C),C>=d))){s=l===61?1:2;break}}if(e.sCount[a]<0)continue;let p=!1;for(let C=0,d=i.length;C<d;C++)if(i[C](e,a,n,!0)){p=!0;break}if(p)break}if(!s)return e.parentType=r,!1;const c=Mn(e.getLines(t,a,e.blkIndent,!1));e.line=a+1;const A=e.push("heading_open",`h${s}`,1);A.markup=String.fromCharCode(l),A.map=[t,e.line];const f=e.push("inline","",0);f.content=c,f.map=[t,e.line-1],f.children=[];const h=e.push("heading_close",`h${s}`,-1);return h.markup=String.fromCharCode(l),e.parentType=r,!0}function kc(e,t,n){const i=e.md.block.ruler.getRules("paragraph"),r=e.parentType;let s=t+1;for(e.parentType="paragraph";s<n&&!e.isEmpty(s);s++){if(e.sCount[s]-e.blkIndent>3||e.sCount[s]<0)continue;let A=!1;for(let f=0,h=i.length;f<h;f++)if(i[f](e,s,n,!0)){A=!0;break}if(A)break}const l=Mn(e.getLines(t,s,e.blkIndent,!1));e.line=s;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const c=e.push("inline","",0);return c.content=l,c.map=[t,e.line],c.children=[],e.push("paragraph_close","p",-1),e.parentType=r,!0}var vn=[["table",sc,["paragraph","reference"]],["code",lc],["fence",ac,["paragraph","reference","blockquote","list"]],["blockquote",cc,["paragraph","reference","blockquote","list"]],["hr",Ac,["paragraph","reference","blockquote","list"]],["list",dc,["paragraph","reference","blockquote"]],["reference",fc],["html_block",gc,["paragraph","reference","blockquote"]],["heading",Cc,["paragraph","reference","blockquote"]],["lheading",_c],["paragraph",kc]],Di=class{constructor(){V(this,"ruler",new hn),V(this,"State",Ei);for(let e=0;e<vn.length;e++)this.ruler.push(vn[e][0],vn[e][1],{alt:(vn[e][2]||[]).slice()})}tokenize(e,t,n){const i=this.ruler.getRules(""),r=i.length,s=e.md.options.maxNesting;let l=t,a=!1;for(;l<n&&(e.line=l=e.skipEmptyLines(l),!(l>=n||e.sCount[l]<e.blkIndent));){if(e.level>=s){e.line=n;break}const c=e.line;let A=!1;for(let f=0;f<r;f++)if(A=i[f](e,l,n,!1),A){if(c>=e.line)throw new Error("block rule didn't increment state.line");break}if(!A)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),l=e.line,l<n&&e.isEmpty(l)&&(a=!0,l++,e.line=l)}}parse(e,t,n,i){if(!e)return;const r=new this.State(e,t,n,i);this.tokenize(r,r.line,r.lineMax)}},wi=class{constructor(e,t,n,i){V(this,"pos",0),V(this,"level",0),V(this,"pending",""),V(this,"pendingLevel",0),V(this,"cache",{}),V(this,"backticks",{}),V(this,"backticksScanned",!1),V(this,"linkLevel",0),V(this,"delimiters",[]),V(this,"_prev_delimiters",[]),V(this,"Token",xt),this.src=e,this.env=n,this.md=t,this.tokens=i,this.tokens_meta=Array(i.length),this.posMax=this.src.length}pushPending(){const e=new xt("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e}push(e,t,n){this.pending&&this.pushPending();const i=new xt(e,t,n);let r;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),i.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(i),this.tokens_meta.push(r),i}scanDelims(e,t){const n=this.posMax,i=this.src.charCodeAt(e);let r;if(e===0)r=32;else if(e===1)r=this.src.charCodeAt(0),(r&63488)===55296&&(r=65533);else if(r=this.src.charCodeAt(e-1),(r&64512)===56320){const d=this.src.charCodeAt(e-2);r=(d&64512)===55296?65536+(d-55296<<10)+(r-56320):65533}else(r&64512)===55296&&(r=65533);let s=e;for(;s<n&&this.src.charCodeAt(s)===i;)s++;const l=s-e;let a=s<n?this.src.charCodeAt(s):32;if((a&64512)===55296){const d=this.src.charCodeAt(s+1);a=(d&64512)===56320?65536+(a-55296<<10)+(d-56320):65533}else(a&64512)===56320&&(a=65533);const c=dn(r)||un(r),A=dn(a)||un(a),f=An(r),h=An(a),p=!h&&(!A||f||c),C=!f&&(!c||h||A);return{can_open:p&&(t||!C||c),can_close:C&&(t||!p||A),length:l}}};function yc(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Ec(e,t){let n=e.pos;for(;n<e.posMax&&!yc(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}var Ic=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function bc(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,i=e.posMax;if(n+3>i||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const r=e.pending.match(Ic);if(!r)return!1;const s=r[1],l=e.md.linkify.matchAtStart(e.src.slice(n-s.length));if(!l)return!1;let a=l.url;if(a.length<=s.length)return!1;let c=a.length;for(;c>0&&a.charCodeAt(c-1)===42;)c--;c!==a.length&&(a=a.slice(0,c));const A=e.md.normalizeLink(a);if(!e.md.validateLink(A))return!1;if(!t){e.pending=e.pending.slice(0,-s.length);const f=e.push("link_open","a",1);f.attrs=[["href",A]],f.markup="linkify",f.info="auto";const h=e.push("text","",0);h.content=e.md.normalizeLinkText(a);const p=e.push("link_close","a",-1);p.markup="linkify",p.info="auto"}return e.pos+=a.length-s.length,!0}function Dc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const i=e.pending.length-1,r=e.posMax;if(!t)if(i>=0&&e.pending.charCodeAt(i)===32)if(i>=1&&e.pending.charCodeAt(i-1)===32){let s=i-1;for(;s>=1&&e.pending.charCodeAt(s-1)===32;)s--;e.pending=e.pending.slice(0,s),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<r&&Ae(e.src.charCodeAt(n));)n++;return e.pos=n,!0}var Co=[];for(let e=0;e<256;e++)Co.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Co[e.charCodeAt(0)]=1});function wc(e,t){let n=e.pos;const i=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=i))return!1;let r=e.src.charCodeAt(n);if(r===10){for(t||e.push("hardbreak","br",0),n++;n<i&&(r=e.src.charCodeAt(n),!!Ae(r));)n++;return e.pos=n,!0}if(r===32){if(!t){const a=e.push("text_special","",0);a.content="\\",a.markup="\\",a.info="escape"}return e.pos=n,!0}let s=e.src[n];if(r>=55296&&r<=56319&&n+1<i){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(s+=e.src[n+1],n++)}const l="\\"+s;if(!t){const a=e.push("text_special","",0);r<256&&Co[r]!==0?a.content=s:a.content=l,a.markup=l,a.info="escape"}return e.pos=n+1,!0}function Bc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const r=e.posMax;for(;n<r&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(i,n),l=s.length;if(e.backticksScanned&&(e.backticks[l]||0)<=i)return t||(e.pending+=s),e.pos+=l,!0;let a=n,c;for(;(c=e.src.indexOf("`",a))!==-1;){for(a=c+1;a<r&&e.src.charCodeAt(a)===96;)a++;const A=a-c;if(A===l){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=a,!0}e.backticks[A]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=l,!0}function vc(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==126)return!1;const r=e.scanDelims(e.pos,!0);let s=r.length;const l=String.fromCharCode(i);if(s<2)return!1;let a;s%2&&(a=e.push("text","",0),a.content=l,s--);for(let c=0;c<s;c+=2)a=e.push("text","",0),a.content=l+l,e.delimiters.push({marker:i,length:0,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return e.pos+=r.length,!0}function qo(e,t){let n;const i=[],r=t.length;for(let s=0;s<r;s++){const l=t[s];if(l.marker!==126||l.end===-1)continue;const a=t[l.end];n=e.tokens[l.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&i.push(a.token-1)}for(;i.length;){const s=i.pop();let l=s+1;for(;l<e.tokens.length&&e.tokens[l].type==="s_close";)l++;l--,s!==l&&(n=e.tokens[l],e.tokens[l]=e.tokens[s],e.tokens[s]=n)}}function Fc(e){const t=e.tokens_meta,n=e.tokens_meta.length;qo(e,e.delimiters);for(let r=0;r<n;r++){var i;const s=(i=t[r])===null||i===void 0?void 0:i.delimiters;s&&qo(e,s)}}var Bi={tokenize:vc,postProcess:Fc};function xc(e,t){const n=e.pos,i=e.src.charCodeAt(n);if(t||i!==95&&i!==42)return!1;const r=e.scanDelims(e.pos,i===42);for(let s=0;s<r.length;s++){const l=e.push("text","",0);l.content=String.fromCharCode(i),e.delimiters.push({marker:i,length:r.length,token:e.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return e.pos+=r.length,!0}function er(e,t){const n=t.length;for(let i=n-1;i>=0;i--){const r=t[i];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const s=t[r.end],l=i>0&&t[i-1].end===r.end+1&&t[i-1].marker===r.marker&&t[i-1].token===r.token-1&&t[r.end+1].token===s.token+1,a=String.fromCharCode(r.marker),c=e.tokens[r.token];c.type=l?"strong_open":"em_open",c.tag=l?"strong":"em",c.nesting=1,c.markup=l?a+a:a,c.content="";const A=e.tokens[s.token];A.type=l?"strong_close":"em_close",A.tag=l?"strong":"em",A.nesting=-1,A.markup=l?a+a:a,A.content="",l&&(e.tokens[t[i-1].token].content="",e.tokens[t[r.end+1].token].content="",i--)}}function Sc(e){const t=e.tokens_meta,n=e.tokens_meta.length;er(e,e.delimiters);for(let r=0;r<n;r++){var i;const s=(i=t[r])===null||i===void 0?void 0:i.delimiters;s&&er(e,s)}}var vi={tokenize:xc,postProcess:Sc};function Nc(e,t){let n,i,r,s,l="",a="",c=e.pos,A=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const f=e.pos,h=e.posMax,p=e.pos+1,C=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(C<0)return!1;let d=C+1;if(d<h&&e.src.charCodeAt(d)===40){for(A=!1,d++;d<h&&(n=e.src.charCodeAt(d),!(!Ae(n)&&n!==10));d++);if(d>=h)return!1;if(c=d,r=e.md.helpers.parseLinkDestination(e.src,d,e.posMax),r.ok){for(l=e.md.normalizeLink(r.str),e.md.validateLink(l)?d=r.pos:l="",c=d;d<h&&(n=e.src.charCodeAt(d),!(!Ae(n)&&n!==10));d++);if(r=e.md.helpers.parseLinkTitle(e.src,d,e.posMax),d<h&&c!==d&&r.ok)for(a=r.str,d=r.pos;d<h&&(n=e.src.charCodeAt(d),!(!Ae(n)&&n!==10));d++);}(d>=h||e.src.charCodeAt(d)!==41)&&(A=!0),d++}if(A){if(typeof e.env.references>"u")return!1;if(d<h&&e.src.charCodeAt(d)===91?(c=d+1,d=e.md.helpers.parseLinkLabel(e,d),d>=0?i=e.src.slice(c,d++):d=C+1):d=C+1,i||(i=e.src.slice(p,C)),i=Tn(i),s=e.env.references[i],!s)return e.pos=f,!1;l=s.href,a=s.title}if(!t){e.pos=p,e.posMax=C;const w=e.push("link_open","a",1),I=[["href",l]];if(w.attrs=I,a&&I.push(["title",a]),i){const E=Object.create(null);E.label=i,w.meta=E}e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=d,e.posMax=h,!0}function Rc(e,t){let n,i,r,s,l,a,c,A,f="";const h=e.pos,p=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const C=e.pos+2,d=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(d<0)return!1;if(s=d+1,s<p&&e.src.charCodeAt(s)===40){for(s++;s<p&&(n=e.src.charCodeAt(s),!(!Ae(n)&&n!==10));s++);if(s>=p)return!1;for(A=s,a=e.md.helpers.parseLinkDestination(e.src,s,e.posMax),a.ok&&(f=e.md.normalizeLink(a.str),e.md.validateLink(f)?s=a.pos:f=""),A=s;s<p&&(n=e.src.charCodeAt(s),!(!Ae(n)&&n!==10));s++);if(a=e.md.helpers.parseLinkTitle(e.src,s,e.posMax),s<p&&A!==s&&a.ok)for(c=a.str,s=a.pos;s<p&&(n=e.src.charCodeAt(s),!(!Ae(n)&&n!==10));s++);else c="";if(s>=p||e.src.charCodeAt(s)!==41)return e.pos=h,!1;s++}else{if(typeof e.env.references>"u")return!1;if(s<p&&e.src.charCodeAt(s)===91?(A=s+1,s=e.md.helpers.parseLinkLabel(e,s),s>=0?r=e.src.slice(A,s++):s=d+1):s=d+1,r||(r=e.src.slice(C,d)),r=Tn(r),l=e.env.references[r],!l)return e.pos=h,!1;f=l.href,c=l.title}if(!t){i=e.src.slice(C,d);const w=[];e.md.inline.parse(i,e.md,e.env,w);const I=e.push("image","img",0),E=[["src",f],["alt",""]];if(I.attrs=E,I.children=w,I.content=i,c&&E.push(["title",c]),r){const y=Object.create(null);y.label=r,I.meta=y}}return e.pos=s,e.posMax=p,!0}var Tc=/^([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])?)*)$/,Mc=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Qc(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const i=e.pos,r=e.posMax;for(;;){if(++n>=r)return!1;const l=e.src.charCodeAt(n);if(l===60)return!1;if(l===62)break}const s=e.src.slice(i+1,n);if(Mc.test(s)){const l=e.md.normalizeLink(s);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const A=e.push("link_close","a",-1);A.markup="autolink",A.info="auto"}return e.pos+=s.length+2,!0}if(Tc.test(s)){const l=e.md.normalizeLink(`mailto:${s}`);if(!e.md.validateLink(l))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",l]],a.markup="autolink",a.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const A=e.push("link_close","a",-1);A.markup="autolink",A.info="auto"}return e.pos+=s.length+2,!0}return!1}function Kc(e){return/^<a[>\s]/i.test(e)}function Gc(e){return/^<\/a\s*>/i.test(e)}function Wc(e){const t=e|32;return t>=97&&t<=122}function Vc(e,t){if(!e.md.options.html)return!1;const n=e.posMax,i=e.pos;if(e.src.charCodeAt(i)!==60||i+2>=n)return!1;const r=e.src.charCodeAt(i+1);if(r!==33&&r!==63&&r!==47&&!Wc(r))return!1;const s=e.src.slice(i).match(pc);if(!s)return!1;if(!t){const l=e.push("html_inline","",0);l.content=s[0],Kc(l.content)&&e.linkLevel++,Gc(l.content)&&e.linkLevel--}return e.pos+=s[0].length,!0}var Oc=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Yc=/^&([a-z][a-z0-9]{1,31});/i;function Uc(e,t){const n=e.pos,i=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=i)return!1;if(e.src.charCodeAt(n+1)===35){const r=e.src.slice(n).match(Oc);if(r){if(!t){const s=r[1][0].toLowerCase()==="x"?parseInt(r[1].slice(1),16):parseInt(r[1],10),l=e.push("text_special","",0);l.content=go(s)?cn(s):cn(65533),l.markup=r[0],l.info="entity"}return e.pos+=r[0].length,!0}}else{const r=e.src.slice(n).match(Yc);if(r){const s=ri(r[0]);if(s!==r[0]){if(!t){const l=e.push("text_special","",0);l.content=s,l.markup=r[0],l.info="entity"}return e.pos+=r[0].length,!0}}}return!1}function tr(e){const t={},n=e.length;if(!n)return;let i=0,r=-2;const s=[];for(let l=0;l<n;l++){const a=e[l];if(s.push(0),(e[i].marker!==a.marker||r!==a.token-1)&&(i=l),r=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const c=t[a.marker][(a.open?3:0)+a.length%3];let A=i-s[i]-1,f=A;for(;A>c;A-=s[A]+1){const h=e[A];if(h.marker===a.marker&&h.open&&h.end<0){let p=!1;if((h.close||a.open)&&(h.length+a.length)%3===0&&(h.length%3!==0||a.length%3!==0)&&(p=!0),!p){const C=A>0&&!e[A-1].open?s[A-1]+1:0;s[l]=l-A+C,s[A]=C,a.open=!1,h.end=l,h.close=!1,f=-1,r=-2;break}}}f!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=f)}}function Hc(e){const t=e.tokens_meta,n=e.tokens_meta.length;tr(e.delimiters);for(let r=0;r<n;r++){var i;const s=(i=t[r])===null||i===void 0?void 0:i.delimiters;s&&tr(s)}}function Lc(e){let t,n,i=0;const r=e.tokens,s=e.tokens.length;for(t=n=0;t<s;t++)r[t].nesting<0&&i--,r[t].level=i,r[t].nesting>0&&i++,r[t].type==="text"&&t+1<s&&r[t+1].type==="text"?r[t+1].content=r[t].content+r[t+1].content:(t!==n&&(r[n]=r[t]),n++);t!==n&&(r.length=n)}var Zn=[["text",Ec],["linkify",bc],["newline",Dc],["escape",wc],["backticks",Bc],["strikethrough",Bi.tokenize],["emphasis",vi.tokenize],["link",Nc],["image",Rc],["autolink",Qc],["html_inline",Vc],["entity",Uc]],Pn=[["balance_pairs",Hc],["strikethrough",Bi.postProcess],["emphasis",vi.postProcess],["fragments_join",Lc]],Fi=class{constructor(){V(this,"ruler",new hn),V(this,"ruler2",new hn),V(this,"State",wi);for(let e=0;e<Zn.length;e++)this.ruler.push(Zn[e][0],Zn[e][1]);for(let e=0;e<Pn.length;e++)this.ruler2.push(Pn[e][0],Pn[e][1])}skipToken(e){const t=e.pos,n=this.ruler.getRules(""),i=n.length,r=e.md.options.maxNesting,s=e.cache;if(typeof s[t]<"u"){e.pos=s[t];return}let l=!1;if(e.level<r){for(let a=0;a<i;a++)if(e.level++,l=n[a](e,!0),e.level--,l){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;l||e.pos++,s[t]=e.pos}tokenize(e){const t=this.ruler.getRules(""),n=t.length,i=e.posMax,r=e.md.options.maxNesting;for(;e.pos<i;){const s=e.pos;let l=!1;if(e.level<r){for(let a=0;a<n;a++)if(l=t[a](e,!1),l){if(s>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(l){if(e.pos>=i)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()}parse(e,t,n,i){const r=new this.State(e,t,n,i);this.tokenize(r);const s=this.ruler2.getRules(""),l=s.length;for(let a=0;a<l;a++)s[a](r)}},Jc={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","strip_references","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Zc=/^(vbscript|javascript|file|data):/,Pc=/^data:image\/(gif|png|jpeg|webp);/,nr=["http:","https:","mailto:"],lt=class{validateLink(e){const t=e.trim().toLowerCase();return Zc.test(t)?Pc.test(t):!0}normalizeLink(e){const t=ro(e,!0);if(t.hostname&&(!t.protocol||nr.indexOf(t.protocol)>=0))try{t.hostname=Lo.toASCII(t.hostname)}catch{}return gn(oo(t))}normalizeLinkText(e){const t=ro(e,!0);if(t.hostname&&(!t.protocol||nr.indexOf(t.protocol)>=0))try{t.hostname=Lo.toUnicode(t.hostname)}catch{}return Jt(oo(t),Jt.defaultChars+"%")}constructor(...e){V(this,"inline",new Fi),V(this,"block",new Di),V(this,"core",new yi),V(this,"renderer",new Ci),V(this,"linkify",new la),V(this,"utils",_a),V(this,"helpers",Object.assign({},Ta));const[t,n]=e;typeof t=="string"?(this.configure(t),n&&this.set(n)):(this.configure("default"),this.set(t||{}))}set(e){return Object.assign(this.options,e),this}configure(e){let t;if(typeof e=="string"){const r=e;if(t=Jc[r],!t)throw new Error(`Wrong 'markdown-it' preset "${r}", check name`)}else t=e;if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");t.options&&(this.options={...t.options});const n=t.components;if(n){var i;["core","block","inline"].forEach(s=>{var l;const a=(l=n[s])===null||l===void 0?void 0:l.rules;a&&this[s].ruler.enableOnly(a)});const r=(i=n.inline)===null||i===void 0?void 0:i.rules2;r&&this.inline.ruler2.enableOnly(r)}return this}enable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(r=>{n=n.concat(this[r].ruler.enable(e,!0))}),n=n.concat(this.inline.ruler2.enable(e,!0));const i=e.filter(r=>n.indexOf(r)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to enable unknown rule(s): ${i}`);return this}disable(e,t=!1){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(r=>{n=n.concat(this[r].ruler.disable(e,!0))}),n=n.concat(this.inline.ruler2.disable(e,!0));const i=e.filter(r=>n.indexOf(r)<0);if(i.length&&!t)throw new Error(`MarkdownIt. Failed to disable unknown rule(s): ${i}`);return this}use(e,...t){return e.apply(e,[this,...t]),this}parse(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens}render(e,t={}){return this.renderer.render(this.parse(e,t),this.options,t)}parseInline(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens}renderInline(e,t={}){return this.renderer.render(this.parseInline(e,t),this.options,t)}};V(lt,"Token",xt);V(lt,"Ruler",hn);V(lt,"Renderer",Ci);V(lt,"ParserCore",yi);V(lt,"StateCore",_i);V(lt,"ParserBlock",Di);V(lt,"StateBlock",Ei);V(lt,"ParserInline",Fi);V(lt,"StateInline",wi);var zc=hi(lt);/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function jc(e){if(Array.isArray(e))return e}function Xc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var i,r,s,l,a=[],c=!0,A=!1;try{if(s=(n=n.call(e)).next,t!==0)for(;!(c=(i=s.call(n)).done)&&(a.push(i.value),a.length!==t);c=!0);}catch(f){A=!0,r=f}finally{try{if(!c&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(A)throw r}}return a}}function $c(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
64
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qc(e,t){return jc(e)||Xc(e,t)||eA(e,t)||$c()}function eA(e,t){if(e){if(typeof e=="string")return or(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?or(e,t):void 0}}const xi=Object.entries,rr=Object.setPrototypeOf,tA=Object.isFrozen,nA=Object.getPrototypeOf,oA=Object.getOwnPropertyDescriptor;let De=Object.freeze,we=Object.seal,Ut=Object.create,Si=typeof Reflect<"u"&&Reflect,so=Si.apply,lo=Si.construct;De||(De=function(t){return t});we||(we=function(t){return t});so||(so=function(t,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];return t.apply(n,r)});lo||(lo=function(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return new t(...i)});const Ot=ge(Array.prototype.forEach),rA=ge(Array.prototype.lastIndexOf),ir=ge(Array.prototype.pop),Yt=ge(Array.prototype.push),iA=ge(Array.prototype.splice),kt=Array.isArray,rn=ge(String.prototype.toLowerCase),zn=ge(String.prototype.toString),sr=ge(String.prototype.match),en=ge(String.prototype.replace),lr=ge(String.prototype.indexOf),sA=ge(String.prototype.trim),lA=ge(Number.prototype.toString),aA=ge(Boolean.prototype.toString),ar=typeof BigInt>"u"?null:ge(BigInt.prototype.toString),cr=typeof Symbol>"u"?null:ge(Symbol.prototype.toString),Ie=ge(Object.prototype.hasOwnProperty),tn=ge(Object.prototype.toString),ye=ge(RegExp.prototype.test),vt=cA(TypeError);function ge(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return so(e,t,i)}}function cA(e){return function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return lo(e,n)}}function $(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rn;if(rr&&rr(e,null),!kt(t))return e;let i=t.length;for(;i--;){let r=t[i];if(typeof r=="string"){const s=n(r);s!==r&&(tA(t)||(t[i]=s),r=s)}e[r]=!0}return e}function AA(e){for(let t=0;t<e.length;t++)Ie(e,t)||(e[t]=null);return e}function Re(e){const t=Ut(null);for(const i of xi(e)){var n=qc(i,2);const r=n[0],s=n[1];Ie(e,r)&&(kt(s)?t[r]=AA(s):s&&typeof s=="object"&&s.constructor===Object?t[r]=Re(s):t[r]=s)}return t}function uA(e){switch(typeof e){case"string":return e;case"number":return lA(e);case"boolean":return aA(e);case"bigint":return ar?ar(e):"0";case"symbol":return cr?cr(e):"Symbol()";case"undefined":return tn(e);case"function":case"object":{if(e===null)return tn(e);const t=e,n=Xe(t,"toString");if(typeof n=="function"){const i=n(t);return typeof i=="string"?i:tn(i)}return tn(e)}default:return tn(e)}}function Xe(e,t){for(;e!==null;){const i=oA(e,t);if(i){if(i.get)return ge(i.get);if(typeof i.value=="function")return ge(i.value)}e=nA(e)}function n(){return null}return n}function dA(e){try{return ye(e,""),!0}catch{return!1}}const Ar=De(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),jn=De(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Xn=De(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),fA=De(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$n=De(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hA=De(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ur=De(["#text"]),dr=De(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),qn=De(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),fr=De(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Fn=De(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pA=we(/{{[\w\W]*|^[\w\W]*}}/g),mA=we(/<%[\w\W]*|^[\w\W]*%>/g),gA=we(/\${[\w\W]*/g),CA=we(/^data-[\-\w.\u00B7-\uFFFF]+$/),_A=we(/^aria-[\-\w]+$/),hr=we(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),kA=we(/^(?:\w+script|data):/i),yA=we(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),EA=we(/^html$/i),IA=we(/^[a-z][.\w]*(-[.\w]+)+$/i),pr=we(/<[/\w!]/g),mr=we(/<[/\w]/g),bA=we(/<\/no(script|embed|frames)/i),DA=we(/\/>/i),Le={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},wA=function(){return typeof window>"u"?null:window},BA=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const s="dompurify"+(i?"#"+i:"");try{return t.createPolicy(s,{createHTML(l){return l},createScriptURL(l){return l}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},gr=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},gt=function(t,n,i,r){return Ie(t,n)&&kt(t[n])?$(r.base?Re(r.base):{},t[n],r.transform):i};function Ni(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wA();const t=x=>Ni(x);if(t.version="3.4.13",t.removed=[],!e||!e.document||e.document.nodeType!==Le.document||!e.Element)return t.isSupported=!1,t;let n=e.document;const i=n,r=i.currentScript;e.DocumentFragment;const s=e.HTMLTemplateElement,l=e.Node,a=e.Element,c=e.NodeFilter,A=e.NamedNodeMap;A===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const f=e.DOMParser,h=e.trustedTypes,p=a.prototype,C=Xe(p,"cloneNode"),d=Xe(p,"remove"),w=Xe(p,"nextSibling"),I=Xe(p,"childNodes"),E=Xe(p,"parentNode"),y=Xe(p,"shadowRoot"),b=Xe(p,"attributes"),_=l&&l.prototype?Xe(l.prototype,"nodeType"):null,k=l&&l.prototype?Xe(l.prototype,"nodeName"):null,v=l&&l.prototype?Xe(l.prototype,"ownerDocument"):null;if(typeof s=="function"){const x=n.createElement("template");x.content&&x.content.ownerDocument&&(n=x.content.ownerDocument)}let Q,P="",K,se=!1,S=0;const M=function(){if(S>0)throw vt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},W=function(u){M(),S++;try{return Q.createHTML(u)}finally{S--}},H=function(u){M(),S++;try{return Q.createScriptURL(u)}finally{S--}},q=function(){return se||(K=BA(h,r),se=!0),K},Be=n,be=Be.implementation,R=Be.createNodeIterator,ee=Be.createDocumentFragment,z=Be.getElementsByTagName,X=i.importNode;let U=gr();t.isSupported=typeof xi=="function"&&typeof E=="function"&&be&&be.createHTMLDocument!==void 0;const he=pA,te=mA,Te=gA,Oe=CA,Nt=_A,Pt=kA,Rt=yA,zt=IA;let bt=hr,oe=null;const pe=$({},[...Ar,...jn,...Xn,...$n,...ur]);let j=null;const Ye=$({},[...dr,...qn,...fr,...Fn]);let le=Object.seal(Ut(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}})),Ue=null,$e=null;const Je=Object.seal(Ut(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Tt=!0,qe=!0,dt=!1,Me=!0,Ze=!1,Ge=!0,Pe=!1,ft=!1,N=null,T=null,me=!1,ne=!1,Ce=!1,_e=!1,ve=!0,at=!1;const ct="user-content-";let ze=!0,ue=!1,et={},He=null;const Mt=$({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Cn=null;const _n=$({},["audio","video","img","source","image","track"]);let jt=null;const tt=$({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",ht="http://www.w3.org/2000/svg",Fe="http://www.w3.org/1999/xhtml";let At=Fe,Kt=!1,Gt=null;const kn=$({},[Qt,ht,Fe],zn),Xt=De(["mi","mo","mn","ms","mtext"]);let Wt=$({},Xt);const g=De(["annotation-xml"]);let D=$({},g);const G=$({},["title","style","font","a","script"]);let F=null;const L=["application/xhtml+xml","text/html"],re="text/html";let ie=null,pt=null;const xe=n.createElement("form"),yn=function(u){return u instanceof RegExp||u instanceof Function},ce=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(pt&&pt===u)return;(!u||typeof u!="object")&&(u={}),u=Re(u),F=L.indexOf(u.PARSER_MEDIA_TYPE)===-1?re:u.PARSER_MEDIA_TYPE,ie=F==="application/xhtml+xml"?zn:rn,oe=gt(u,"ALLOWED_TAGS",pe,{transform:ie}),j=gt(u,"ALLOWED_ATTR",Ye,{transform:ie}),Gt=gt(u,"ALLOWED_NAMESPACES",kn,{transform:zn}),jt=gt(u,"ADD_URI_SAFE_ATTR",tt,{transform:ie,base:tt}),Cn=gt(u,"ADD_DATA_URI_TAGS",_n,{transform:ie,base:_n}),He=gt(u,"FORBID_CONTENTS",Mt,{transform:ie}),Ue=gt(u,"FORBID_TAGS",Re({}),{transform:ie}),$e=gt(u,"FORBID_ATTR",Re({}),{transform:ie}),et=Ie(u,"USE_PROFILES")?u.USE_PROFILES&&typeof u.USE_PROFILES=="object"?Re(u.USE_PROFILES):u.USE_PROFILES:!1,Tt=u.ALLOW_ARIA_ATTR!==!1,qe=u.ALLOW_DATA_ATTR!==!1,dt=u.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=u.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ze=u.SAFE_FOR_TEMPLATES||!1,Ge=u.SAFE_FOR_XML!==!1,Pe=u.WHOLE_DOCUMENT||!1,ne=u.RETURN_DOM||!1,Ce=u.RETURN_DOM_FRAGMENT||!1,_e=u.RETURN_TRUSTED_TYPE||!1,me=u.FORCE_BODY||!1,ve=u.SANITIZE_DOM!==!1,at=u.SANITIZE_NAMED_PROPS||!1,ze=u.KEEP_CONTENT!==!1,ue=u.IN_PLACE||!1,bt=dA(u.ALLOWED_URI_REGEXP)?u.ALLOWED_URI_REGEXP:hr,At=typeof u.NAMESPACE=="string"?u.NAMESPACE:Fe,Wt=Ie(u,"MATHML_TEXT_INTEGRATION_POINTS")&&u.MATHML_TEXT_INTEGRATION_POINTS&&typeof u.MATHML_TEXT_INTEGRATION_POINTS=="object"?Re(u.MATHML_TEXT_INTEGRATION_POINTS):$({},Xt),D=Ie(u,"HTML_INTEGRATION_POINTS")&&u.HTML_INTEGRATION_POINTS&&typeof u.HTML_INTEGRATION_POINTS=="object"?Re(u.HTML_INTEGRATION_POINTS):$({},g);const m=Ie(u,"CUSTOM_ELEMENT_HANDLING")&&u.CUSTOM_ELEMENT_HANDLING&&typeof u.CUSTOM_ELEMENT_HANDLING=="object"?Re(u.CUSTOM_ELEMENT_HANDLING):Ut(null);if(le=Ut(null),Ie(m,"tagNameCheck")&&yn(m.tagNameCheck)&&(le.tagNameCheck=m.tagNameCheck),Ie(m,"attributeNameCheck")&&yn(m.attributeNameCheck)&&(le.attributeNameCheck=m.attributeNameCheck),Ie(m,"allowCustomizedBuiltInElements")&&typeof m.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=m.allowCustomizedBuiltInElements),we(le),Ze&&(qe=!1),Ce&&(ne=!0),et&&(oe=$({},ur),j=Ut(null),et.html===!0&&($(oe,Ar),$(j,dr)),et.svg===!0&&($(oe,jn),$(j,qn),$(j,Fn)),et.svgFilters===!0&&($(oe,Xn),$(j,qn),$(j,Fn)),et.mathMl===!0&&($(oe,$n),$(j,fr),$(j,Fn))),Je.tagCheck=null,Je.attributeCheck=null,Ie(u,"ADD_TAGS")&&(typeof u.ADD_TAGS=="function"?Je.tagCheck=u.ADD_TAGS:kt(u.ADD_TAGS)&&(oe===pe&&(oe=Re(oe)),$(oe,u.ADD_TAGS,ie))),Ie(u,"ADD_ATTR")&&(typeof u.ADD_ATTR=="function"?Je.attributeCheck=u.ADD_ATTR:kt(u.ADD_ATTR)&&(j===Ye&&(j=Re(j)),$(j,u.ADD_ATTR,ie))),Ie(u,"ADD_URI_SAFE_ATTR")&&kt(u.ADD_URI_SAFE_ATTR)&&$(jt,u.ADD_URI_SAFE_ATTR,ie),Ie(u,"FORBID_CONTENTS")&&kt(u.FORBID_CONTENTS)&&(He===Mt&&(He=Re(He)),$(He,u.FORBID_CONTENTS,ie)),Ie(u,"ADD_FORBID_CONTENTS")&&kt(u.ADD_FORBID_CONTENTS)&&(He===Mt&&(He=Re(He)),$(He,u.ADD_FORBID_CONTENTS,ie)),ze&&(oe["#text"]=!0),Pe&&$(oe,["html","head","body"]),oe.table&&($(oe,["tbody"]),delete Ue.tbody),u.TRUSTED_TYPES_POLICY){if(typeof u.TRUSTED_TYPES_POLICY.createHTML!="function")throw vt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof u.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const B=Q;Q=u.TRUSTED_TYPES_POLICY;try{P=W("")}catch(O){throw Q=B,O}}else u.TRUSTED_TYPES_POLICY===null?(Q=void 0,P=""):(Q===void 0&&(Q=q()),Q&&typeof P=="string"&&(P=W("")));De&&De(u),pt=u},Se=$({},[...jn,...Xn,...fA]),Ne=$({},[...$n,...hA]),Qn=function(u,m,B){return m.namespaceURI===Fe?u==="svg":m.namespaceURI===Qt?u==="svg"&&(B==="annotation-xml"||Wt[B]):!!Se[u]},Dt=function(u,m,B){return m.namespaceURI===Fe?u==="math":m.namespaceURI===ht?u==="math"&&D[B]:!!Ne[u]},ke=function(u,m,B){return m.namespaceURI===ht&&!D[B]||m.namespaceURI===Qt&&!Wt[B]?!1:!Ne[u]&&(G[u]||!Se[u])},_o=function(u){let m=E(u);(!m||!m.tagName)&&(m={namespaceURI:At,tagName:"template"});const B=rn(u.tagName),O=rn(m.tagName);return Gt[u.namespaceURI]?u.namespaceURI===ht?Qn(B,m,O):u.namespaceURI===Qt?Dt(B,m,O):u.namespaceURI===Fe?ke(B,m,O):!!(F==="application/xhtml+xml"&&Gt[u.namespaceURI]):!1},mt=function(u){Yt(t.removed,{element:u});try{E(u).removeChild(u)}catch{if(d(u),!E(u))throw vt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},En=function(u){$t(u);const m=I(u);if(m){const O=[];Ot(m,Y=>{Yt(O,Y)}),Ot(O,Y=>{try{d(Y)}catch{}})}const B=b(u);if(B)for(let O=B.length-1;O>=0;--O){const Y=B[O],J=Y&&Y.name;if(typeof J=="string")try{u.removeAttribute(J)}catch{}}},wt=function(u,m){try{Yt(t.removed,{attribute:m.getAttributeNode(u),from:m})}catch{Yt(t.removed,{attribute:null,from:m})}if(m.removeAttribute(u),u==="is")if(ne||Ce)try{mt(m)}catch{}else try{m.setAttribute(u,"")}catch{}},Wi=function(u){const m=b(u);if(m)for(let B=m.length-1;B>=0;--B){const O=m[B],Y=O&&O.name;if(!(typeof Y!="string"||j[ie(Y)]))try{u.removeAttribute(Y)}catch{}}},$t=function(u){const m=[u];for(;m.length>0;){const B=m.pop();(_?_(B):B.nodeType)===Le.element&&Wi(B);const Y=I(B);if(Y)for(let J=Y.length-1;J>=0;--J)m.push(Y[J])}},Vi=function(u){if(!Ge)return;const m=[u];for(;m.length>0;){const B=m.pop(),O=_?_(B):B.nodeType;if(O===Le.processingInstruction||O===Le.comment&&ye(mr,B.data)){try{d(B)}catch{}continue}if(O===Le.element){const J=B,ae=ie(k?k(B):B.nodeName);try{J.hasAttribute&&J.hasAttribute("patchsrc")&&J.removeAttribute("patchsrc"),J.hasAttribute&&J.hasAttribute("for")&&ae!=="label"&&ae!=="output"&&J.removeAttribute("for")}catch{}}const Y=I(B);if(Y)for(let J=Y.length-1;J>=0;--J)m.push(Y[J])}},ko=function(u){let m=null,B=null;if(me)u="<remove></remove>"+u;else{const J=sr(u,/^[\r\n\t ]+/);B=J&&J[0]}F==="application/xhtml+xml"&&At===Fe&&(u='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+u+"</body></html>");const O=Q?W(u):u;if(At===Fe)try{m=new f().parseFromString(O,F)}catch{}if(!m||!m.documentElement){m=be.createDocument(At,"template",null);try{m.documentElement.innerHTML=Kt?P:O}catch{}}const Y=m.body||m.documentElement;return u&&B&&Y.insertBefore(n.createTextNode(B),Y.childNodes[0]||null),At===Fe?z.call(m,Pe?"html":"body")[0]:Pe?m.documentElement:Y},yo=function(u){const m=v?v(u):u.ownerDocument;return R.call(m||u,u,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},In=function(u){return u=en(u,he," "),u=en(u,te," "),u=en(u,Te," "),u},Kn=function(u){var m;u.normalize();const B=v?v(u):u.ownerDocument,O=R.call(B||u,u,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let Y=O.nextNode();for(;Y;)Y.data=In(Y.data),Y=O.nextNode();const J=(m=u.querySelectorAll)===null||m===void 0?void 0:m.call(u,"template");J&&Ot(J,ae=>{Vt(ae.content)&&Kn(ae.content)})},bn=function(u){const m=k?k(u):null;return typeof m!="string"||ie(m)!=="form"?!1:typeof u.nodeName!="string"||typeof u.textContent!="string"||typeof u.removeChild!="function"||u.attributes!==b(u)||typeof u.removeAttribute!="function"||typeof u.setAttribute!="function"||typeof u.namespaceURI!="string"||typeof u.insertBefore!="function"||typeof u.hasChildNodes!="function"||u.nodeType!==_(u)||u.childNodes!==I(u)},Vt=function(u){if(!_||typeof u!="object"||u===null)return!1;try{return _(u)===Le.documentFragment}catch{return!1}},qt=function(u){if(!_||typeof u!="object"||u===null)return!1;try{return typeof _(u)=="number"}catch{return!1}};function nt(x,u,m){x.length!==0&&Ot(x,B=>{B.call(t,u,m,pt)})}const Oi=function(u,m){return!!(Ge&&u.hasChildNodes()&&!qt(u.firstElementChild)&&ye(pr,u.textContent)&&ye(pr,u.innerHTML)||Ge&&u.namespaceURI===Fe&&m==="style"&&qt(u.firstElementChild)||u.nodeType===Le.processingInstruction||Ge&&u.nodeType===Le.comment&&ye(mr,u.data))},Yi=function(u,m,B){if(!Ue[m]&&Do(m)&&(le.tagNameCheck instanceof RegExp&&ye(le.tagNameCheck,m)||le.tagNameCheck instanceof Function&&le.tagNameCheck(m)))return!1;if(ze&&!He[m]){const O=E(u),Y=I(u);if(Y&&O){const J=Y.length;for(let ae=J-1;ae>=0;--ae){const de=u===B?C(Y[ae],!0):Y[ae];O.insertBefore(de,w(u))}}}return mt(u),!0},Eo=function(u,m,B,O){return u.length===0?m:m===B||m===O?Re(m):m},Io=function(u,m){if(nt(U.beforeSanitizeElements,u,null),u!==m&&E(u)===null)return ue&&$t(u),!0;if(bn(u))return mt(u),!0;const B=ie(k?k(u):u.nodeName);if(oe=Eo(U.uponSanitizeElement,oe,pe,N),nt(U.uponSanitizeElement,u,{tagName:B,allowedTags:oe}),u!==m&&E(u)===null)return ue&&$t(u),!0;if(Oi(u,B))return mt(u),!0;if(Ue[B]||!(Je.tagCheck instanceof Function&&Je.tagCheck(B))&&!oe[B]){const Y=Yi(u,B,m);return Y===!1&&nt(U.afterSanitizeElements,u,null),Y}if((_?_(u):u.nodeType)===Le.element&&!_o(u)||(B==="noscript"||B==="noembed"||B==="noframes")&&ye(bA,u.innerHTML))return mt(u),!0;if(Ze&&u.nodeType===Le.text){const Y=In(u.textContent);u.textContent!==Y&&(Yt(t.removed,{element:u.cloneNode()}),u.textContent=Y)}return nt(U.afterSanitizeElements,u,null),!1},bo=function(u,m,B){if($e[m]||Ge&&m==="patchsrc"||Ge&&m==="for"&&u!=="label"&&u!=="output"||ve&&(m==="id"||m==="name")&&(B in n||B in xe))return!1;const O=j[m]||Je.attributeCheck instanceof Function&&Je.attributeCheck(m,u);if(!(qe&&ye(Oe,m))){if(!(Tt&&ye(Nt,m))){if(O){if(!jt[m]){if(!ye(bt,en(B,Rt,""))){if(!((m==="src"||m==="xlink:href"||m==="href")&&u!=="script"&&lr(B,"data:")===0&&Cn[u])){if(!(dt&&!ye(Pt,en(B,Rt,"")))){if(B)return!1}}}}}else if(!(Do(u)&&(le.tagNameCheck instanceof RegExp&&ye(le.tagNameCheck,u)||le.tagNameCheck instanceof Function&&le.tagNameCheck(u))&&(le.attributeNameCheck instanceof RegExp&&ye(le.attributeNameCheck,m)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(m,u))||m==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&ye(le.tagNameCheck,B)||le.tagNameCheck instanceof Function&&le.tagNameCheck(B))))return!1}}return!0},Ui=$({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Do=function(u){return!Ui[rn(u)]&&ye(zt,u)},Hi=function(u,m,B,O){if(Q&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!B)switch(h.getAttributeType(u,m)){case"TrustedHTML":return W(O);case"TrustedScriptURL":return H(O)}return O},Li=function(u,m,B,O){try{B?u.setAttributeNS(B,m,O):u.setAttribute(m,O),bn(u)?mt(u):ir(t.removed)}catch{wt(m,u)}},wo=function(u){nt(U.beforeSanitizeAttributes,u,null);const m=u.attributes;if(!m||bn(u))return;j=Eo(U.uponSanitizeAttribute,j,Ye,T);const B={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:j,forceKeepAttr:void 0};let O=m.length;const Y=ie(u.nodeName);for(;O--;){const J=m[O],ae=J.name,de=J.namespaceURI,We=J.value,Ve=ie(ae),Wn=We;let Qe=ae==="value"?Wn:sA(Wn);if(B.attrName=Ve,B.attrValue=Qe,B.keepAttr=!0,B.forceKeepAttr=void 0,nt(U.uponSanitizeAttribute,u,B),Qe=B.attrValue,at&&(Ve==="id"||Ve==="name")&&lr(Qe,ct)!==0&&(wt(ae,u),Qe=ct+Qe),Ge&&ye(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Qe)){wt(ae,u);continue}if(Ve==="attributename"&&sr(Qe,"href")){wt(ae,u);continue}if(!B.forceKeepAttr){if(!B.keepAttr){wt(ae,u);continue}if(!Me&&ye(DA,Qe)){wt(ae,u);continue}if(Ze&&(Qe=In(Qe)),!bo(Y,Ve,Qe)){wt(ae,u);continue}Qe=Hi(Y,Ve,de,Qe),Qe!==Wn&&Li(u,ae,de,Qe)}}nt(U.afterSanitizeAttributes,u,null)},Dn=function(u){let m=null;const B=yo(u);for(nt(U.beforeSanitizeShadowDOM,u,null);m=B.nextNode();)if(nt(U.uponSanitizeShadowNode,m,null),Io(m,u),wo(m),Vt(m.content)&&Dn(m.content),(_?_(m):m.nodeType)===Le.element){const Y=y(m);Vt(Y)&&(Gn(Y),Dn(Y))}nt(U.afterSanitizeShadowDOM,u,null)},Gn=function(u){const m=[{node:u,shadow:null}];for(;m.length>0;){const B=m.pop();if(B.shadow){Dn(B.shadow);continue}const O=B.node,J=(_?_(O):O.nodeType)===Le.element,ae=I(O);if(ae)for(let de=ae.length-1;de>=0;--de)m.push({node:ae[de],shadow:null});if(J){const de=k?k(O):null;if(typeof de=="string"&&ie(de)==="template"){const We=O.content;Vt(We)&&m.push({node:We,shadow:null})}}if(J){const de=y(O);Vt(de)&&m.push({node:null,shadow:de},{node:de,shadow:null})}}};return t.sanitize=function(x){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=null,B=null,O=null,Y=null;if(Kt=!x,Kt&&(x="<!-->"),typeof x!="string"&&!qt(x)&&(x=uA(x),typeof x!="string"))throw vt("dirty is not a string, aborting");if(!t.isSupported)return x;ft?(oe=N,j=T):ce(u),(U.uponSanitizeElement.length>0||U.uponSanitizeAttribute.length>0)&&(oe=Re(oe)),U.uponSanitizeAttribute.length>0&&(j=Re(j)),t.removed=[];const J=ue&&typeof x!="string"&&qt(x);if(J){Vi(x);const We=k?k(x):x.nodeName;if(typeof We=="string"){const Ve=ie(We);if(!oe[Ve]||Ue[Ve])throw En(x),vt("root node is forbidden and cannot be sanitized in-place")}if(bn(x))throw En(x),vt("root node is clobbered and cannot be sanitized in-place");try{Gn(x)}catch(Ve){throw En(x),Ve}}else if(qt(x))m=ko("<!---->"),B=m.ownerDocument.importNode(x,!0),B.nodeType===Le.element&&B.nodeName==="BODY"||B.nodeName==="HTML"?m=B:m.appendChild(B),Gn(B);else{if(!ne&&!Ze&&!Pe&&x.indexOf("<")===-1)return Q&&_e?W(x):x;if(m=ko(x),!m)return ne?null:_e?P:""}m&&me&&mt(m.firstChild);const ae=J?x:m;try{const We=yo(ae);for(;O=We.nextNode();)Io(O,ae),wo(O),Vt(O.content)&&Dn(O.content)}catch(We){throw J&&(En(x),Ot(t.removed,Ve=>{Ve.element&&$t(Ve.element)})),We}if(J)return Ot(t.removed,We=>{We.element&&$t(We.element)}),Ze&&Kn(x),x;if(ne){if(Ze&&Kn(m),Ce)for(Y=ee.call(m.ownerDocument);m.firstChild;)Y.appendChild(m.firstChild);else Y=m;return(j.shadowroot||j.shadowrootmode)&&(Y=X.call(i,Y,!0)),Y}let de=Pe?m.outerHTML:m.innerHTML;return Pe&&oe["!doctype"]&&m.ownerDocument&&m.ownerDocument.doctype&&m.ownerDocument.doctype.name&&ye(EA,m.ownerDocument.doctype.name)&&(de="<!DOCTYPE "+m.ownerDocument.doctype.name+`>
65
+ `+de),Ze&&(de=In(de)),Q&&_e?W(de):de},t.setConfig=function(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ce(x),ft=!0,N=oe,T=j},t.clearConfig=function(){pt=null,ft=!1,N=null,T=null,Q=K,P=""},t.isValidAttribute=function(x,u,m){pt||ce({});const B=ie(x),O=ie(u);return bo(B,O,m)},t.addHook=function(x,u){typeof u=="function"&&Ie(U,x)&&Yt(U[x],u)},t.removeHook=function(x,u){if(Ie(U,x)){if(u!==void 0){const m=rA(U[x],u);return m===-1?void 0:iA(U[x],m,1)[0]}return ir(U[x])}},t.removeHooks=function(x){Ie(U,x)&&(U[x]=[])},t.removeAllHooks=function(){U=gr()},t}var vA=Ni();const Nn=new zc({html:!1,linkify:!0,breaks:!0}),FA=Nn.renderer.rules.fence;Nn.renderer.rules.fence=(e,t,n,i,r)=>{var A;const l=((A=e[t].info)==null?void 0:A.trim().split(/\s+/)[0])||"",a=Nn.utils.escapeHtml(l)||"code",c=FA(e,t,n,i,r);return`<div class="md-code-block"><div class="md-code-block__head"><span class="md-code-block__lang">${a}</span><span class="md-code-block__copy" data-md-copy>复制</span></div>`+c+"</div>"};function xA(e){if(!e)return"";const t=Nn.render(e);return vA.sanitize(t)}function Ri(e){return/\.tiff?$/i.test(e)}function SA(e){var t;try{const n=e.slice(0,e.indexOf(",")),i=e.slice(e.indexOf(",")+1),r=((t=n.match(/^data:([^;]+)/))==null?void 0:t[1])||"",s=atob(i),l=new Uint8Array(s.length);for(let a=0;a<s.length;a++)l[a]=s.charCodeAt(a);return new Blob([l],{type:r})}catch{return null}}function Ti(e){var t;return e.blob instanceof Blob?e.blob:(t=e.data)!=null&&t.startsWith("data:")?SA(e.data):null}const NA={class:"message-avatar"},RA={class:"message-body"},TA={class:"message-time"},MA={key:0,class:"message-files"},QA=["src","alt","onClick"],KA={class:"file-info"},GA={class:"file-name"},WA={class:"file-size"},VA={key:1,class:"message-user-text"},OA={class:"message-actions"},YA={key:0,class:"message-reasoning"},UA={key:0,class:"reasoning-content"},HA={key:1,class:"message-tools"},LA=["title"],JA={class:"message-tool__name"},ZA={class:"message-tool__status"},PA=["innerHTML"],zA={key:3,class:"typing-dots"},jA={key:4,class:"message-error"},XA=o.defineComponent({__name:"ChatMessage",props:{message:{},toolPackages:{},mdTableClick:{type:Boolean},mdListClick:{type:Boolean}},emits:["execute"],setup(e,{emit:t}){const n=e,i=t,r=o.computed(()=>xA(n.message.content)),s=o.computed(()=>!!n.message.hideMarkdown),l=o.computed(()=>{var M,W,H;const S=n.message;return S.role!=="assistant"?!0:!!((M=S.content)!=null&&M.trim()||S.reasoning||(W=S.renderBlocks)!=null&&W.length||S.suggestedNext||(H=S.toolResults)!=null&&H.length||S.error||S.status==="streaming")});function a(S){return S==="running"?"执行中":S==="success"?"已完成":S==="blocked"?"缺少前置条件":"失败"}function c(S){return S.status==="blocked"?S.hint||S.result||S.name:S.status==="error"?S.result||S.name:S.alias||S.name}const A=o.ref(!1),f=o.ref([]),h=o.ref(0),p=[];function C(S){var W;if((W=S.data)!=null&&W.startsWith("data:"))return S.data;const M=Ti(S);if(M){const H=URL.createObjectURL(M);return p.push(H),H}return""}function d(S){var H;const M=(H=n.message.files)==null?void 0:H.filter(q=>q.type.startsWith("image/")).map(C).filter(Boolean);if(!(M!=null&&M.length))return;const W=C(S);h.value=Math.max(0,M.indexOf(W)),f.value=M}function w(){p.forEach(S=>URL.revokeObjectURL(S)),p.length=0,f.value=[]}function I(S){if(!S)return"";const M=new Date(S),W=String(M.getHours()).padStart(2,"0"),H=String(M.getMinutes()).padStart(2,"0");return`${W}:${H}`}function E(S){var H;if(S.type!=="component"||!S.componentName)return null;const M=Gr(S,n.toolPackages).component;if(M)return M;const W=n.toolPackages.find(q=>q.components&&S.componentName in q.components);return((H=W==null?void 0:W.components)==null?void 0:H[S.componentName])||null}function y(S){i("execute",S)}function b(){const S=window.getSelection();return!!S&&S.toString().length>0}async function _(S){try{await navigator.clipboard.writeText(S),ut.ElMessage.success("已复制")}catch{ut.ElMessage.error("复制失败,请手动复制")}}async function k(){await _(n.message.content)}async function v(S){var H;const M=S.closest("[data-md-copy]");if(!M)return;const W=(H=M.closest(".md-code-block"))==null?void 0:H.querySelector("pre code");W!=null&&W.textContent&&await _(W.textContent)}function Q(S){const M=[];let W=S.nextElementSibling;for(;W&&!/^H[1-6]$/.test(W.tagName);)M.push(W),W=W.nextElementSibling;const H=S.hasAttribute("data-collapsed");S.toggleAttribute("data-collapsed",!H),M.forEach(q=>{q.style.display=H?"":"none"})}async function P(S){var H;const M=S.querySelector("td, th"),W=(H=M==null?void 0:M.textContent)==null?void 0:H.trim();W&&i("execute",`我选择 ${W}`)}function K(S){var W;const M=(W=S.textContent)==null?void 0:W.trim();M&&i("execute",M)}function se(S){if(b())return;const M=S.target;if(M.closest("a"))return;if(M.closest("[data-md-copy]")){v(M);return}const W=M.closest("h1,h2,h3,h4,h5,h6");if(W){Q(W);return}if(n.mdTableClick){const H=M.closest("table tr");if(H&&!H.closest("thead")){const q=H.parentElement;q&&/^TBODY$/i.test(q.tagName)&&P(H);return}}if(n.mdListClick){const H=M.closest("li");H&&K(H)}}return(S,M)=>{var Be,be;const W=o.resolveComponent("el-icon"),H=o.resolveComponent("el-tooltip"),q=o.resolveComponent("el-image-viewer");return l.value?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["chat-message",[`role-${e.message.role}`,{"is-streaming":e.message.status==="streaming"}]])},[o.createElementVNode("div",NA,[e.message.role==="user"?(o.openBlock(),o.createBlock(W,{key:0},{default:o.withCtx(()=>[o.createVNode(o.unref(sl))]),_:1})):(o.openBlock(),o.createBlock(W,{key:1},{default:o.withCtx(()=>[o.createVNode(o.unref(Fs))]),_:1}))]),o.createElementVNode("div",RA,[o.createElementVNode("span",TA,o.toDisplayString(I(e.message.timestamp)),1),(Be=e.message.files)!=null&&Be.length?(o.openBlock(),o.createElementBlock("div",MA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.message.files,(R,ee)=>{var z,X;return o.openBlock(),o.createElementBlock("div",{key:ee,class:o.normalizeClass(["message-file",{"is-image":R.type.startsWith("image/")&&((z=R.data)==null?void 0:z.startsWith("data:"))}])},[R.type.startsWith("image/")&&((X=R.data)!=null&&X.startsWith("data:"))?(o.openBlock(),o.createElementBlock("img",{key:0,src:R.data,alt:R.name,class:"file-image",onClick:U=>d(R)},null,8,QA)):(o.openBlock(),o.createBlock(W,{key:1},{default:o.withCtx(()=>[o.createVNode(o.unref(zr))]),_:1})),o.createElementVNode("div",KA,[o.createElementVNode("span",GA,o.toDisplayString(R.name),1),o.createElementVNode("span",WA,o.toDisplayString((R.size/1024).toFixed(1))+" KB",1)])],2)}),128))])):o.createCommentVNode("",!0),e.message.role==="user"?(o.openBlock(),o.createElementBlock("div",VA,o.toDisplayString(e.message.content),1)):o.createCommentVNode("",!0),e.message.role==="assistant"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:2},[o.createElementVNode("div",OA,[o.createVNode(H,{content:"复制完整回复","show-after":300,placement:"top"},{default:o.withCtx(()=>[o.createElementVNode("button",{class:"message-action-btn",type:"button",onClick:k},[o.createVNode(W,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ws))]),_:1})])]),_:1})]),e.message.reasoning?(o.openBlock(),o.createElementBlock("div",YA,[o.createElementVNode("button",{class:"reasoning-toggle",onClick:M[0]||(M[0]=R=>A.value=!A.value)},[o.createVNode(W,{style:{"margin-right":"4px"}},{default:o.withCtx(()=>[o.createVNode(o.unref(Os))]),_:1}),M[1]||(M[1]=o.createTextVNode(" 推理过程 ",-1)),o.createElementVNode("span",{class:o.normalizeClass(["reasoning-toggle__arrow",{open:A.value}])},"▾",2)]),A.value?(o.openBlock(),o.createElementBlock("pre",UA,o.toDisplayString(e.message.reasoning),1)):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0),(be=e.message.toolResults)!=null&&be.length?(o.openBlock(),o.createElementBlock("div",HA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.message.toolResults,R=>(o.openBlock(),o.createElementBlock("div",{key:R.callId,class:o.normalizeClass(["message-tool",`is-${R.status}`]),title:c(R)},[o.createVNode(W,{class:o.normalizeClass(["message-tool__icon",{"is-spinning":R.status==="running"}])},{default:o.withCtx(()=>[R.status==="running"?(o.openBlock(),o.createBlock(o.unref(Zs),{key:0})):R.status==="success"?(o.openBlock(),o.createBlock(o.unref(Ss),{key:1})):R.status==="blocked"?(o.openBlock(),o.createBlock(o.unref(dl),{key:2})):(o.openBlock(),o.createBlock(o.unref(Rs),{key:3}))]),_:2},1032,["class"]),o.createElementVNode("span",JA,o.toDisplayString(R.alias||R.name),1),o.createElementVNode("span",ZA,o.toDisplayString(a(R.status)),1)],10,LA))),128))])):o.createCommentVNode("",!0),s.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",{key:2,class:o.normalizeClass(["message-content markdown-body",{"is-table-clickable":e.mdTableClick,"is-list-clickable":e.mdListClick}]),innerHTML:r.value,onClick:se},null,10,PA)),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.message.renderBlocks,(R,ee)=>(o.openBlock(),o.createBlock($r,{key:ee,block:R,"resolved-component":E(R),onSelect:y},null,8,["block","resolved-component"]))),128)),e.message.suggestedNext?(o.openBlock(),o.createBlock(qr,{key:3,text:e.message.suggestedNext,onExecute:y},null,8,["text"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),e.message.status==="streaming"?(o.openBlock(),o.createElementBlock("div",zA,[...M[2]||(M[2]=[o.createElementVNode("i",null,null,-1),o.createElementVNode("i",null,null,-1),o.createElementVNode("i",null,null,-1)])])):o.createCommentVNode("",!0),e.message.status==="error"?(o.openBlock(),o.createElementBlock("div",jA,o.toDisplayString(e.message.error),1)):o.createCommentVNode("",!0)]),f.value.length?(o.openBlock(),o.createBlock(q,{key:0,"initial-index":h.value,"url-list":f.value,onClose:w},null,8,["initial-index","url-list"])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0)}}}),Mi=It(XA,[["__scopeId","data-v-25c0f8d1"]]),$A={class:"chat-input"},qA={key:0,class:"chat-input__files"},eu={class:"chat-input__wrap"},tu={class:"chat-input__actions"},nu=o.defineComponent({__name:"ChatInput",props:{loading:{type:Boolean},disabled:{type:Boolean},placeholder:{}},emits:["send"],setup(e,{emit:t}){const n=e,i=t,r=o.ref(""),s=o.ref([]),l=o.ref(null),a=o.computed(()=>(r.value.trim().length>0||s.value.length>0)&&!n.disabled);function c(){var E;(E=l.value)==null||E.click()}const A=new Set(["text/plain","text/html","text/css","text/javascript","text/typescript","text/markdown","text/csv","text/xml","application/json","application/xml","application/javascript","application/typescript","application/yaml","application/x-yaml"]);function f(E){var y;if(E.type.startsWith("text/")||A.has(E.type))return!0;if(E.type===""||E.type.startsWith("application/")){const b=(y=E.name.split(".").pop())==null?void 0:y.toLowerCase();return new Set(["txt","md","json","geojson","xml","yml","yaml","csv","ts","js","tsx","jsx","vue","html","css","scss","less","sh","bat","ps1","py","java","c","cpp","h","hpp","go","rs","rb","php","sql","toml","ini","cfg","conf","log","env","gitignore","dockerfile","wkt","wkb","kml","gpx","geojson","topojson","xlsx","docx"]).has(b??"")}return!1}function h(E){return new Promise(y=>{const b={id:"",name:E.name,size:E.size,type:E.type,blob:E};if(Ri(E.name)){y({...b,data:""});return}const _=new FileReader;_.onload=()=>{y({...b,data:_.result})},f(E)?_.readAsText(E):_.readAsDataURL(E)})}async function p(E){var b;const y=E.target;if((b=y.files)!=null&&b.length){for(const _ of Array.from(y.files)){const k=await h(_);s.value.push(k)}y.value=""}}function C(E){s.value.splice(E,1)}function d(E){E.shiftKey||(E.preventDefault(),w())}function w(){if(!a.value||n.loading)return;const E=r.value.trim();i("send",E,s.value),r.value="",s.value=[]}function I(){!s.value.length||n.disabled||n.loading||(i("send","预览",s.value),s.value=[])}return(E,y)=>{const b=o.resolveComponent("el-icon"),_=o.resolveComponent("el-tag"),k=o.resolveComponent("el-button"),v=o.resolveComponent("el-input"),Q=o.resolveComponent("el-tooltip");return o.openBlock(),o.createElementBlock("div",$A,[s.value.length?(o.openBlock(),o.createElementBlock("div",qA,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(P,K)=>(o.openBlock(),o.createBlock(_,{key:K,closable:"",size:"small",type:P.type.startsWith("image/")?"success":"info",onClose:se=>C(K)},{default:o.withCtx(()=>[P.type.startsWith("image/")?(o.openBlock(),o.createBlock(b,{key:0,style:{"margin-right":"4px"}},{default:o.withCtx(()=>[o.createVNode(o.unref(Xs))]),_:1})):(o.openBlock(),o.createBlock(b,{key:1,style:{"margin-right":"4px"}},{default:o.withCtx(()=>[o.createVNode(o.unref(zr))]),_:1})),o.createTextVNode(" "+o.toDisplayString(P.name),1)]),_:2},1032,["type","onClose"]))),128)),o.createVNode(k,{class:"chat-input__preview",size:"small",plain:"",disabled:e.disabled||e.loading,onClick:I},{default:o.withCtx(()=>[o.createVNode(b,{style:{"margin-right":"2px"}},{default:o.withCtx(()=>[o.createVNode(o.unref(Al))]),_:1}),y[1]||(y[1]=o.createTextVNode("预览 ",-1))]),_:1},8,["disabled"])])):o.createCommentVNode("",!0),o.createElementVNode("div",eu,[o.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":y[0]||(y[0]=P=>r.value=P),type:"textarea",autosize:{minRows:1,maxRows:6},resize:"none",placeholder:e.placeholder,onKeydown:o.withKeys(d,["enter"])},null,8,["modelValue","placeholder"]),o.createElementVNode("div",tu,[o.createVNode(Q,{content:"上传文件",placement:"top"},{default:o.withCtx(()=>[o.createVNode(k,{text:"",circle:"",onClick:c},{default:o.withCtx(()=>[o.createVNode(b,null,{default:o.withCtx(()=>[o.createVNode(o.unref(zs))]),_:1})]),_:1})]),_:1}),o.createElementVNode("input",{ref_key:"fileInputRef",ref:l,type:"file",multiple:"",hidden:"",onChange:p},null,544),o.createVNode(Q,{content:"Enter 发送,Shift+Enter 换行",placement:"top"},{default:o.withCtx(()=>[o.createVNode(k,{class:"chat-input__send",type:"primary",icon:o.unref(Xr),loading:e.loading,disabled:!a.value,circle:"",onClick:w},null,8,["icon","loading","disabled"])]),_:1})])])])}}}),Qi=It(nu,[["__scopeId","data-v-e7db63f0"]]),ou={class:"form-tip"},ru={class:"temp-row"},iu={class:"temp-val"},su=o.defineComponent({__name:"ChatSettings",props:{modelValue:{type:Boolean},settings:{},deviceId:{}},emits:["update:modelValue","save"],setup(e,{emit:t}){const n=e,i=t,r=co(),s=o.ref(n.modelValue);o.watch(()=>n.modelValue,h=>{s.value=h,h&&(l.value=St(n.settings))}),o.watch(s,h=>i("update:modelValue",h));const l=o.ref(St(n.settings)),a=o.computed(()=>it(l.value.providerId)??r[0]),c=o.computed(()=>{const h=l.value.providers[l.value.providerId];if(h)return h;const p=Ft(a.value);return l.value.providers[l.value.providerId]=p,p});function A(h){if(!(!h||h===l.value.providerId)){if(!l.value.providers[h]){const p=it(h);p&&(l.value.providers[h]=Ft(p))}l.value.providerId=h}}function f(){if(l.value.providerMode==="direct"){if(!c.value.apiKey){ut.ElMessage.warning("请填写 API Key");return}if(!c.value.baseUrl){ut.ElMessage.warning("请填写接口地址");return}}i("save",JSON.parse(JSON.stringify(l.value))),s.value=!1}return(h,p)=>{const C=o.resolveComponent("el-radio"),d=o.resolveComponent("el-radio-group"),w=o.resolveComponent("el-form-item"),I=o.resolveComponent("el-option"),E=o.resolveComponent("el-select"),y=o.resolveComponent("el-input"),b=o.resolveComponent("el-link"),_=o.resolveComponent("el-slider"),k=o.resolveComponent("el-switch"),v=o.resolveComponent("el-form"),Q=o.resolveComponent("el-button"),P=o.resolveComponent("el-dialog");return o.openBlock(),o.createBlock(P,{modelValue:s.value,"onUpdate:modelValue":p[11]||(p[11]=K=>s.value=K),title:"AI 助手设置",width:"520px","append-to-body":""},{footer:o.withCtx(()=>[o.createVNode(Q,{onClick:p[10]||(p[10]=K=>s.value=!1)},{default:o.withCtx(()=>[...p[21]||(p[21]=[o.createTextVNode("取消",-1)])]),_:1}),o.createVNode(Q,{type:"primary",onClick:f},{default:o.withCtx(()=>[...p[22]||(p[22]=[o.createTextVNode("保存",-1)])]),_:1})]),default:o.withCtx(()=>[o.createVNode(v,{model:l.value,"label-width":"110px","label-position":"right"},{default:o.withCtx(()=>[o.createVNode(w,{label:"调用模式"},{default:o.withCtx(()=>[o.createVNode(d,{modelValue:l.value.providerMode,"onUpdate:modelValue":p[0]||(p[0]=K=>l.value.providerMode=K)},{default:o.withCtx(()=>[o.createVNode(C,{value:"direct"},{default:o.withCtx(()=>[...p[12]||(p[12]=[o.createTextVNode("前端直连",-1)])]),_:1}),o.createVNode(C,{value:"proxy"},{default:o.withCtx(()=>[...p[13]||(p[13]=[o.createTextVNode("后端代理",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),o.createVNode(w,{label:"模型提供方"},{default:o.withCtx(()=>[o.createVNode(E,{"model-value":l.value.providerId,style:{width:"100%"},"onUpdate:modelValue":A},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(r),K=>(o.openBlock(),o.createBlock(I,{key:K.id,label:K.name,value:K.id},null,8,["label","value"]))),128))]),_:1},8,["model-value"])]),_:1}),l.value.providerMode==="direct"?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(w,{label:"API Key"},{default:o.withCtx(()=>[o.createVNode(y,{modelValue:c.value.apiKey,"onUpdate:modelValue":p[1]||(p[1]=K=>c.value.apiKey=K),type:"password",placeholder:"xxxxxxxxxxxxxxxx",clearable:""},null,8,["modelValue"]),o.createElementVNode("div",ou,[a.value.apiKeyUrl?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[p[14]||(p[14]=o.createTextVNode(" 在 ",-1)),o.createVNode(b,{type:"primary",href:a.value.apiKeyUrl,target:"_blank"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a.value.name)+" 开放平台 ",1)]),_:1},8,["href"]),p[15]||(p[15]=o.createTextVNode(" 获取。 ",-1))],64)):o.createCommentVNode("",!0)])]),_:1}),o.createVNode(w,{label:"接口地址"},{default:o.withCtx(()=>[o.createVNode(y,{modelValue:c.value.baseUrl,"onUpdate:modelValue":p[2]||(p[2]=K=>c.value.baseUrl=K),placeholder:a.value.defaultBaseUrl||"https://example.com/v1",clearable:""},null,8,["modelValue","placeholder"])]),_:1})],64)):(o.openBlock(),o.createBlock(w,{key:1,label:"代理地址"},{default:o.withCtx(()=>[o.createVNode(y,{modelValue:l.value.proxyUrl,"onUpdate:modelValue":p[3]||(p[3]=K=>l.value.proxyUrl=K),placeholder:"http://localhost:3001/api/chat",clearable:"",disabled:""},null,8,["modelValue"]),p[16]||(p[16]=o.createElementVNode("div",{class:"form-tip"}," API Key 与上游地址由服务端按当前模型提供方配置。 ",-1))]),_:1})),a.value.models.length>0?(o.openBlock(),o.createBlock(w,{key:2,label:"模型"},{default:o.withCtx(()=>[o.createVNode(E,{modelValue:c.value.model,"onUpdate:modelValue":p[4]||(p[4]=K=>c.value.model=K),style:{width:"100%"},filterable:"","default-first-option":"","allow-create":a.value.allowCustomModel!==!1,placeholder:a.value.models.length?"请选择或输入模型名":"请输入模型名"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value.models,K=>(o.openBlock(),o.createBlock(I,{key:K.value,label:K.label,value:K.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","allow-create","placeholder"])]),_:1})):o.createCommentVNode("",!0),o.createVNode(w,{label:"温度"},{default:o.withCtx(()=>[o.createElementVNode("div",ru,[o.createVNode(_,{modelValue:c.value.temperature,"onUpdate:modelValue":p[5]||(p[5]=K=>c.value.temperature=K),disabled:c.value.thinking||a.value.capabilities.temperature===!1,min:0,max:2,step:.1,style:{flex:"1"}},null,8,["modelValue","disabled"]),o.createElementVNode("span",iu,o.toDisplayString(Number(c.value.temperature).toFixed(1)),1)]),p[17]||(p[17]=o.createElementVNode("div",{class:"form-tip"},"思考模式开启时温度不生效",-1))]),_:1}),a.value.capabilities.thinking?(o.openBlock(),o.createElementBlock(o.Fragment,{key:3},[o.createVNode(w,{label:"思考模式"},{default:o.withCtx(()=>[o.createVNode(k,{modelValue:c.value.thinking,"onUpdate:modelValue":p[6]||(p[6]=K=>c.value.thinking=K)},null,8,["modelValue"]),p[18]||(p[18]=o.createElementVNode("span",{class:"form-tip-inline"},"开启后模型进行推理/思维链(reasoning),适合复杂任务",-1))]),_:1}),o.createVNode(w,{label:"思考强度"},{default:o.withCtx(()=>[o.createVNode(E,{modelValue:c.value.thinkingEffort,"onUpdate:modelValue":p[7]||(p[7]=K=>c.value.thinkingEffort=K),disabled:!c.value.thinking,style:{width:"100%"}},{default:o.withCtx(()=>[o.createVNode(I,{label:"低",value:"low"}),o.createVNode(I,{label:"高",value:"high"}),o.createVNode(I,{label:"最高",value:"max"})]),_:1},8,["modelValue","disabled"])]),_:1})],64)):o.createCommentVNode("",!0),o.createVNode(w,{label:"md表格点击"},{default:o.withCtx(()=>[o.createVNode(k,{modelValue:l.value.mdTableClick,"onUpdate:modelValue":p[8]||(p[8]=K=>l.value.mdTableClick=K)},null,8,["modelValue"]),p[19]||(p[19]=o.createElementVNode("span",{class:"form-tip-inline"},'开启后点击回复中的 md 表格行会向助手发送"我选择 X"',-1))]),_:1}),o.createVNode(w,{label:"md列表点击"},{default:o.withCtx(()=>[o.createVNode(k,{modelValue:l.value.mdListClick,"onUpdate:modelValue":p[9]||(p[9]=K=>l.value.mdListClick=K)},null,8,["modelValue"]),p[20]||(p[20]=o.createElementVNode("span",{class:"form-tip-inline"},"开启后点击回复中的列表项会把该项内容作为指令发送",-1))]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}}),Ki=It(su,[["__scopeId","data-v-6282664f"]]),lu={class:"session-drawer"},au={key:0,class:"session-drawer__loading"},cu={key:2,class:"session-list"},Au=["onClick"],uu={class:"session-item__body"},du=["title"],fu={class:"session-item__meta"},hu={key:0},pu=["onClick"],mu=o.defineComponent({__name:"SessionDrawer",props:{modelValue:{type:Boolean},sessions:{},currentId:{default:""},loading:{type:Boolean,default:!1}},emits:["update:modelValue","create","select","remove"],setup(e,{emit:t}){const n=t;function i(l){n("update:modelValue",l)}function r(l){return String(l).padStart(2,"0")}function s(l){if(!l)return"";const a=new Date(l),c=new Date;if(a.getFullYear()===c.getFullYear()&&a.getMonth()===c.getMonth()&&a.getDate()===c.getDate())return`${r(a.getHours())}:${r(a.getMinutes())}`;const f=new Date(c);return f.setDate(c.getDate()-1),a.getFullYear()===f.getFullYear()&&a.getMonth()===f.getMonth()&&a.getDate()===f.getDate()?"昨天":a.getFullYear()===c.getFullYear()?`${r(a.getMonth()+1)}-${r(a.getDate())}`:`${a.getFullYear()}-${r(a.getMonth()+1)}-${r(a.getDate())}`}return(l,a)=>{const c=o.resolveComponent("el-button"),A=o.resolveComponent("el-empty"),f=o.resolveComponent("el-icon"),h=o.resolveComponent("el-tooltip"),p=o.resolveComponent("el-drawer");return o.openBlock(),o.createBlock(p,{"model-value":e.modelValue,title:"历史对话",direction:"rtl",size:"320px","append-to-body":"","onUpdate:modelValue":i},{default:o.withCtx(()=>[o.createElementVNode("div",lu,[o.createVNode(c,{class:"session-drawer__new",type:"primary",plain:"",icon:o.unref(jr),onClick:a[0]||(a[0]=C=>n("create"))},{default:o.withCtx(()=>[...a[1]||(a[1]=[o.createTextVNode(" 新对话 ",-1)])]),_:1},8,["icon"]),e.loading?(o.openBlock(),o.createElementBlock("div",au,"加载中…")):e.sessions.length?(o.openBlock(),o.createElementBlock("div",cu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.sessions,C=>(o.openBlock(),o.createElementBlock("div",{key:C.id,class:o.normalizeClass(["session-item",{"is-active":C.id===e.currentId}]),onClick:d=>n("select",C.id)},[o.createElementVNode("div",uu,[o.createElementVNode("div",{class:"session-item__title",title:C.title},o.toDisplayString(C.title||"新对话"),9,du),o.createElementVNode("div",fu,[o.createElementVNode("span",null,o.toDisplayString(s(C.updatedAt)),1),C.messageCount?(o.openBlock(),o.createElementBlock("span",hu,o.toDisplayString(C.messageCount)+" 条消息",1)):o.createCommentVNode("",!0)])]),o.createVNode(h,{content:"删除该会话",placement:"left","show-after":300},{default:o.withCtx(()=>[o.createElementVNode("button",{class:"session-item__del",type:"button",onClick:o.withModifiers(d=>n("remove",C.id),["stop"])},[o.createVNode(f,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Pr))]),_:1})],8,pu)]),_:2},1024)],10,Au))),128))])):(o.openBlock(),o.createBlock(A,{key:1,description:"暂无历史对话","image-size":70}))])]),_:1},8,["model-value"])}}}),gu=It(mu,[["__scopeId","data-v-42d4ed19"]]),Cr="ai-selection-send",_r=8,xn=8,Cu=o.defineComponent({__name:"SelectionSend",props:{container:{},disabled:{type:Boolean,default:!1}},emits:["send"],setup(e,{expose:t,emit:n}){const i=e,r=n,s=o.ref(!1),l=o.ref({left:0,top:0}),a=o.ref(null);let c="";function A(){const k=window.getSelection();return!k||k.isCollapsed||k.rangeCount===0?"":k.toString().replace(/\u00a0/g," ").trim()}function f(k){const v=i.container;return!k||!v?!1:v===k||v.contains(k)}function h(){s.value=!1,c=""}function p(k){const v=a.value,Q=(v==null?void 0:v.offsetWidth)||92,P=(v==null?void 0:v.offsetHeight)||30;let K=k.left+k.width/2-Q/2,se=k.top-P-_r;se<xn&&(se=k.bottom+_r);const S=Math.max(xn,window.innerWidth-Q-xn);K=Math.min(Math.max(xn,K),S),l.value={left:K,top:se}}function C(){const k=window.getSelection();if(!k||k.isCollapsed||k.rangeCount===0||!f(k.anchorNode)||!f(k.focusNode))return h();const v=A();if(!v)return h();const Q=k.getRangeAt(0).getBoundingClientRect();if(!Q||Q.width===0&&Q.height===0)return h();c=v,s.value=!0,o.nextTick(()=>p(Q))}function d(k){var Q;const v=k.target;(Q=v==null?void 0:v.closest)!=null&&Q.call(v,`.${Cr}`)||window.setTimeout(C,0)}function w(){C()}function I(){s.value&&(A()||h())}function E(k){var Q;const v=k.target;(Q=v==null?void 0:v.closest)!=null&&Q.call(v,`.${Cr}`)||h()}function y(){h()}function b(){h()}function _(){var v;if(i.disabled)return;const k=c||A();if(!k){h();return}r("send",k),h(),(v=window.getSelection())==null||v.removeAllRanges()}return o.onMounted(()=>{document.addEventListener("mouseup",d),document.addEventListener("touchend",d,{passive:!0}),document.addEventListener("keyup",w),document.addEventListener("selectionchange",I),document.addEventListener("mousedown",E),window.addEventListener("scroll",y,!0),window.addEventListener("resize",b)}),o.onBeforeUnmount(()=>{document.removeEventListener("mouseup",d),document.removeEventListener("touchend",d),document.removeEventListener("keyup",w),document.removeEventListener("selectionchange",I),document.removeEventListener("mousedown",E),window.removeEventListener("scroll",y,!0),window.removeEventListener("resize",b)}),t({hide:h}),(k,v)=>{const Q=o.resolveComponent("el-icon");return o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.createVNode(o.Transition,{name:"sel-send-fade"},{default:o.withCtx(()=>[s.value?(o.openBlock(),o.createElementBlock("button",{key:0,ref_key:"btnRef",ref:a,type:"button",class:o.normalizeClass(["ai-selection-send",{"is-disabled":e.disabled}]),style:o.normalizeStyle({left:`${l.value.left}px`,top:`${l.value.top}px`}),onMousedown:v[0]||(v[0]=o.withModifiers(()=>{},["prevent"])),onClick:_},[o.createVNode(Q,{class:"ai-selection-send__icon"},{default:o.withCtx(()=>[o.createVNode(o.unref(Xr))]),_:1}),v[1]||(v[1]=o.createElementVNode("span",null,"发送",-1))],38)):o.createCommentVNode("",!0)]),_:1})])}}}),Gi=It(Cu,[["__scopeId","data-v-a4fae753"]]),_u={class:"chat-panel-root"},ku={class:"ai-fab__label"},yu={class:"chat-panel__title"},Eu={class:"chat-panel__ops"},Iu={class:"chat-panel__scroll-wrap"},bu={key:0,class:"chat-empty"},Du={class:"chat-empty__logo"},wu={key:0,class:"chat-empty__commands"},Bu={class:"chat-panel__nav-count"},vu=["disabled"],Fu=["disabled"],xu={key:0,class:"chat-panel__error"},Su={class:"chat-panel__footer"},Nu={key:0,class:"chat-panel__stop"},Ru=o.defineComponent({__name:"ChatPanel",props:{chat:{},options:{},showFab:{type:Boolean,default:!0}},setup(e){const t=e,n={get_current_time:{label:"现在几点",text:"现在几点了?"},calculate_expression:{label:"帮我计算",text:"帮我计算 (1+2)*3"},generate_uuid:{label:"生成 UUID",text:"帮我生成一个 UUID"},get_client_info:{label:"客户端信息",text:"获取我的客户端信息"}};function i(N){const T=N??{toolPackages:[]};let me;return T.suggestedCommands!==void 0?me=T.suggestedCommands:T.builtInTools===!1?me=[]:Array.isArray(T.builtInTools)?me=T.builtInTools.map(ne=>n[ne]).filter(Boolean):me=Object.values(n),{...T,toolPackages:T.toolPackages??[],suggestedCommands:me}}const r=t.chat?null:Zr(i(t.options)),s=t.chat??r,{messages:l,settings:a,loading:c,errorMsg:A,hasApiKey:f,visible:h,toolPackages:p,sendMessage:C,stopGeneration:d,clearMessages:w,saveSettings:I,deviceId:E,suggestedCommands:y}=s,b=o.ref(!1),_=o.ref(!1),k=o.ref(!1),v=o.computed(()=>{var N;return((N=s.sessions)==null?void 0:N.value)??[]}),Q=o.computed(()=>{var N;return((N=s.currentSessionId)==null?void 0:N.value)??""}),P=o.computed(()=>{var N;return((N=s.sessionsLoading)==null?void 0:N.value)??!1});function K(){var N;_.value=!1,(N=s.newSession)==null||N.call(s)}function se(N){var T;_.value=!1,(T=s.switchSession)==null||T.call(s,N)}function S(N){ut.ElMessageBox.confirm("确定删除该会话记录吗?删除后不可恢复。","提示",{type:"warning",confirmButtonText:"删除",cancelButtonText:"取消"}).then(()=>{var T;return(T=s.deleteSession)==null?void 0:T.call(s,N)}).catch(()=>{})}const M=o.ref(null),W=o.ref(null),H=o.ref(null),q=o.ref(null),Be=o.computed(()=>{var N;return((N=s.syncError)==null?void 0:N.value)??""}),be=o.computed(()=>A.value||Be.value),{pos:R,startDrag:ee,consumeMoved:z}=Ro({onDragStart:()=>{X.value=!0}}),X=o.ref(!1),{pos:U,startDrag:he}=Ro({disabled:()=>k.value}),te=o.computed(()=>R.value?{left:`${R.value.x}px`,top:`${R.value.y}px`,right:"auto",bottom:"auto"}:{}),Te=o.computed(()=>k.value||!U.value?{}:{left:`${U.value.x}px`,top:`${U.value.y}px`,right:"auto",bottom:"auto"});function Oe(N){H.value&&ee(N,H.value)}function Nt(){z()||Rt()}function Pt(N){N.target.closest(".chat-panel__ops")||q.value&&he(N,q.value)}function Rt(){h.value=!h.value}function zt(){_.value=!1,h.value=!1}function bt(){k.value=!k.value}function oe(){o.nextTick(()=>{requestAnimationFrame(()=>{const N=M.value;N&&N.scrollTo({top:N.scrollHeight,behavior:"smooth"})})})}const pe=o.computed(()=>l.value.map((N,T)=>N.role==="user"?T:-1).filter(N=>N>=0)),j=o.ref(0),Ye=o.ref(!1);let le=null,Ue=!1,$e=0;function Je(N){var me,ne,Ce;const T=(ne=M.value)==null?void 0:ne.querySelector(`[data-msg-id="${(me=l.value[N])==null?void 0:me.id}"]`);T&&((Ce=M.value)==null||Ce.scrollTo({top:Math.max(0,T.offsetTop-12),behavior:"smooth"}),Tt(T))}function Tt(N){N.classList.add("is-locate"),le&&clearTimeout(le),le=setTimeout(()=>{N.classList.remove("is-locate")},1200)}function qe(N){if(!pe.value.length)return;const T=Math.min(Math.max(j.value+N,0),pe.value.length-1);j.value=T,Ye.value=!0,Je(pe.value[T])}function dt(){j.value=pe.value.length?pe.value.length-1:0,Ye.value=!1,oe()}function Me(N,T){Ye.value=!1,j.value=pe.value.length?pe.value.length-1:0,C(N,T),oe()}function Ze(N){I(N)}function Ge(){ut.ElMessageBox.confirm("确定要清空所有对话记录吗?","提示",{type:"warning",confirmButtonText:"清空",cancelButtonText:"取消"}).then(()=>{w()}).catch(()=>{})}function Pe(N){if(!pe.value.length)return;const T=N.getBoundingClientRect(),me=T.top+T.height/2;let ne=0,Ce=1/0;pe.value.forEach((_e,ve)=>{var ze;const at=N.querySelector(`[data-msg-id="${(ze=l.value[_e])==null?void 0:ze.id}"]`);if(!at)return;const ct=Math.abs(at.getBoundingClientRect().top-me);ct<Ce&&(Ce=ct,ne=ve)}),j.value=ne}function ft(){const N=M.value;N&&($e&&cancelAnimationFrame($e),$e=requestAnimationFrame(()=>{Pe(N);const T=N.scrollHeight-N.scrollTop-N.clientHeight<60;Ye.value=!T}))}return o.onMounted(()=>{var N;(N=M.value)==null||N.addEventListener("scroll",ft,{passive:!0})}),o.onBeforeUnmount(()=>{var N;(N=M.value)==null||N.removeEventListener("scroll",ft),$e&&cancelAnimationFrame($e)}),o.watch(h,N=>{var T;N&&!Ue&&(Ue=!0,l.value.length&&dt()),N||(T=W.value)==null||T.hide()}),o.watch(()=>l.value.map(N=>{var T;return N.content+N.status+(((T=N.renderBlocks)==null?void 0:T.length)||0)}).join("|"),()=>{Ye.value||(j.value=pe.value.length?pe.value.length-1:0,oe())}),(N,T)=>{const me=o.resolveComponent("ChatDotRound"),ne=o.resolveComponent("el-icon"),Ce=o.resolveComponent("el-tag"),_e=o.resolveComponent("el-button"),ve=o.resolveComponent("el-tooltip"),at=o.resolveComponent("SemiSelect"),ct=o.resolveComponent("el-alert");return o.openBlock(),o.createElementBlock("div",_u,[e.showFab?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"fabRef",ref:H,class:o.normalizeClass(["ai-fab",{"ai-fab--active":o.unref(h),"ai-fab--dragged":X.value}]),style:o.normalizeStyle(te.value),onPointerdown:Oe,onClick:Nt},[o.createElementVNode("span",ku,o.toDisplayString(o.unref(h)?"收起":"AI 助手"),1)],38)):o.createCommentVNode("",!0),o.createVNode(o.Transition,{name:"panel"},{default:o.withCtx(()=>{var ze;return[o.withDirectives(o.createElementVNode("div",{ref_key:"panelRef",ref:q,class:o.normalizeClass(["chat-panel",{"chat-panel--fullscreen":k.value}]),style:o.normalizeStyle(Te.value)},[o.createElementVNode("div",{class:"chat-panel__header",onPointerdown:Pt},[o.createElementVNode("div",yu,[o.createVNode(ne,{class:"title-icon"},{default:o.withCtx(()=>[o.createVNode(me)]),_:1}),T[9]||(T[9]=o.createElementVNode("span",null,"AI 智能助手",-1)),o.unref(f)?(o.openBlock(),o.createBlock(Ce,{key:0,size:"small",type:"success",effect:"plain"},{default:o.withCtx(()=>[...T[7]||(T[7]=[o.createTextVNode("已配置",-1)])]),_:1})):(o.openBlock(),o.createBlock(Ce,{key:1,size:"small",type:"warning",effect:"plain"},{default:o.withCtx(()=>[...T[8]||(T[8]=[o.createTextVNode("未配置",-1)])]),_:1}))]),o.createElementVNode("div",Eu,[o.createVNode(ve,{content:"新对话",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{type:"success",text:"",circle:"",onClick:K},{default:o.withCtx(()=>[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(jr))]),_:1})]),_:1})]),_:1}),o.createVNode(ve,{content:"历史对话",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{type:"primary",text:"",circle:"",onClick:T[0]||(T[0]=ue=>_.value=!0)},{default:o.withCtx(()=>[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ms))]),_:1})]),_:1})]),_:1}),o.createVNode(ve,{content:"清空对话",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{type:"danger",text:"",circle:"",disabled:!o.unref(l).length,onClick:Ge},{default:o.withCtx(()=>[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Pr))]),_:1})]),_:1},8,["disabled"])]),_:1}),o.createVNode(ve,{content:"设置",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{text:"",circle:"",onClick:T[1]||(T[1]=ue=>b.value=!0)},{default:o.withCtx(()=>[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(To))]),_:1})]),_:1})]),_:1}),o.createVNode(ve,{content:k.value?"退出全屏":"全屏",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{text:"",circle:"",onClick:bt},{default:o.withCtx(()=>[k.value?(o.openBlock(),o.createBlock(ne,{key:1},{default:o.withCtx(()=>[o.createVNode(at)]),_:1})):(o.openBlock(),o.createBlock(ne,{key:0},{default:o.withCtx(()=>[o.createVNode(o.unref(Ls))]),_:1}))]),_:1})]),_:1},8,["content"]),o.createVNode(ve,{content:"关闭",placement:"bottom"},{default:o.withCtx(()=>[o.createVNode(_e,{text:"",circle:"",onClick:zt},{default:o.withCtx(()=>[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ks))]),_:1})]),_:1})]),_:1})])],32),o.createElementVNode("div",Iu,[o.createElementVNode("div",{ref_key:"scrollRef",ref:M,class:"chat-panel__body"},[o.unref(l).length?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:1},o.renderList(o.unref(l),ue=>(o.openBlock(),o.createBlock(Mi,{key:ue.id,message:ue,"tool-packages":o.unref(p),"md-table-click":o.unref(a).mdTableClick,"md-list-click":o.unref(a).mdListClick,"data-msg-id":ue.id,onExecute:Me},null,8,["message","tool-packages","md-table-click","md-list-click","data-msg-id"]))),128)):(o.openBlock(),o.createElementBlock("div",bu,[o.createElementVNode("div",Du,[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(me)]),_:1})]),T[11]||(T[11]=o.createElementVNode("h3",null,"你好,我是系统 AI 助手",-1)),T[12]||(T[12]=o.createElementVNode("p",{class:"chat-empty__desc"},[o.createTextVNode(" 我可以帮你"),o.createElementVNode("span",{class:"hl"},"查询数据"),o.createTextVNode("、"),o.createElementVNode("span",{class:"hl"},"执行操作"),o.createTextVNode("。试试输入指令: ")],-1)),(ze=o.unref(y))!=null&&ze.length?(o.openBlock(),o.createElementBlock("div",wu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(y),ue=>(o.openBlock(),o.createBlock(_e,{key:ue.text,size:"small",type:"primary",round:"",plain:"",onClick:et=>Me(ue.text)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(ue.label),1)]),_:2},1032,["onClick"]))),128))])):o.createCommentVNode("",!0),o.unref(f)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(_e,{key:1,type:"primary",icon:o.unref(To),onClick:T[2]||(T[2]=ue=>b.value=!0)},{default:o.withCtx(()=>[...T[10]||(T[10]=[o.createTextVNode(" 先配置 API Key ",-1)])]),_:1},8,["icon"]))]))],512),o.createVNode(o.Transition,{name:"fade"},{default:o.withCtx(()=>[pe.value.length?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["chat-panel__nav",{"is-suppressed-scroll":Ye.value}])},[o.createElementVNode("div",Bu,o.toDisplayString(j.value+1)+"/"+o.toDisplayString(pe.value.length),1),o.createVNode(ve,{content:"上一个用户消息",placement:"left","show-after":300},{default:o.withCtx(()=>[o.createElementVNode("button",{class:"chat-panel__nav-btn",disabled:j.value<=0,type:"button",onClick:T[3]||(T[3]=ue=>qe(-1))},[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(rl))]),_:1})],8,vu)]),_:1}),o.createVNode(ve,{content:"下一个用户消息",placement:"left","show-after":300},{default:o.withCtx(()=>[o.createElementVNode("button",{class:"chat-panel__nav-btn",disabled:j.value>=pe.value.length-1,type:"button",onClick:T[4]||(T[4]=ue=>qe(1))},[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(Bs))]),_:1})],8,Fu)]),_:1}),o.createVNode(ve,{content:"最新消息",placement:"left","show-after":300},{default:o.withCtx(()=>[o.createElementVNode("button",{class:"chat-panel__nav-btn",type:"button",onClick:dt},[o.createVNode(ne,null,{default:o.withCtx(()=>[o.createVNode(o.unref(el))]),_:1})])]),_:1})],2)):o.createCommentVNode("",!0)]),_:1})]),o.createVNode(o.Transition,{name:"fade"},{default:o.withCtx(()=>[be.value?(o.openBlock(),o.createElementBlock("div",xu,[o.createVNode(ct,{title:be.value,type:"error","show-icon":"",closable:!1},null,8,["title"])])):o.createCommentVNode("",!0)]),_:1}),o.createElementVNode("div",Su,[o.unref(c)?(o.openBlock(),o.createElementBlock("div",Nu,[o.createVNode(_e,{size:"small",icon:o.unref(al),onClick:o.unref(d)},{default:o.withCtx(()=>[...T[13]||(T[13]=[o.createTextVNode("停止生成",-1)])]),_:1},8,["icon","onClick"])])):o.createCommentVNode("",!0),o.createVNode(Qi,{loading:o.unref(c),placeholder:o.unref(f)?"输入指令...":"请先配置 API Key",onSend:Me},null,8,["loading","placeholder"])]),o.createVNode(Ki,{modelValue:b.value,"onUpdate:modelValue":T[5]||(T[5]=ue=>b.value=ue),settings:o.unref(a),"device-id":o.unref(E),onSave:Ze},null,8,["modelValue","settings","device-id"]),o.createVNode(gu,{modelValue:_.value,"onUpdate:modelValue":T[6]||(T[6]=ue=>_.value=ue),sessions:v.value,"current-id":Q.value,loading:P.value,onCreate:K,onSelect:se,onRemove:S},null,8,["modelValue","sessions","current-id","loading"]),o.createVNode(Gi,{ref_key:"selectionSendRef",ref:W,container:M.value,disabled:o.unref(c),onSend:Me},null,8,["container","disabled"])],6),[[o.vShow,o.unref(h)]])]}),_:1})])}}}),Tu=It(Ru,[["__scopeId","data-v-597f8f19"]]);function Mu(e){if(typeof e!="string")return e;try{const t=JSON.parse(e);return t!==null&&(typeof t=="object"||Array.isArray(t))?t:e}catch{return e}}const Qu=Object.freeze(Object.defineProperty({__proto__:null,parseStringToObject:Mu},Symbol.toStringTag,{value:"Module"}));exports.Agent=yr;exports.BUILTIN_TOOL_PACKAGE=sn;exports.ChatInput=Qi;exports.ChatMessageComp=Mi;exports.ChatPanel=Tu;exports.ChatSettingsComp=Ki;exports.DEFAULT_PROVIDER_ID=Lt;exports.DEFAULT_PROVIDER_SETTINGS=je;exports.DEFAULT_SETTINGS=nn;exports.EventBus=uo;exports.MODEL_OPTIONS=Xi;exports.PROVIDER_PRESETS=ao;exports.ParseUtils=Qu;exports.RenderBlockComp=$r;exports.SelectionSend=Gi;exports.SuggestedNext=qr;exports.ToolRegistry=Er;exports.blobFromAttachment=Ti;exports.buildSystemPrompt=Qr;exports.clampText=kr;exports.createAgentBridge=Or;exports.createDeepSeekProvider=bs;exports.createEventBus=ms;exports.createLocalSessionStore=Hr;exports.createOpenAICompatibleProvider=pn;exports.createOpenAIProvider=Ds;exports.createProvider=Rr;exports.createProviderSettings=Ft;exports.createProxyProvider=Sr;exports.createProxySessionStore=Lr;exports.deriveSessionTitle=ho;exports.getDefaultBridge=Yr;exports.getDefaultEventBus=Rn;exports.getProviderPreset=it;exports.isTifFile=Ri;exports.listProviderPresets=co;exports.mergeSettings=eo;exports.normalizeSettings=St;exports.registerProvider=es;exports.registerProviderPreset=Ir;exports.resolveRenderBlock=Gr;exports.runBuiltinToolHandler=Kr;exports.setBridgeBus=Ur;exports.syncLegacySettings=vr;exports.useAgentChat=Zr;exports.usePageAgentBridge=gs;