@farris/x-ui 0.4.5 → 0.4.6
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/farris.x-ui.esm.js +225 -223
- package/farris.x-ui.umd.cjs +10 -10
- package/package.json +1 -1
package/farris.x-ui.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(le,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(le=typeof globalThis<"u"?globalThis:le||self,d(le.FarrisX={},le.vue))})(this,function(le,d){"use strict";var Cw=Object.defineProperty;var om=le=>{throw TypeError(le)};var Sw=(le,d,Wt)=>d in le?Cw(le,d,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):le[d]=Wt;var Bt=(le,d,Wt)=>Sw(le,typeof d!="symbol"?d+"":d,Wt),B1=(le,d,Wt)=>d.has(le)||om("Cannot "+Wt);var V=(le,d,Wt)=>(B1(le,d,"read from private field"),Wt?Wt.call(le):d.get(le)),ct=(le,d,Wt)=>d.has(le)?om("Cannot add the same private member more than once"):d instanceof WeakSet?d.add(le):d.set(le,Wt),Xe=(le,d,Wt,Cr)=>(B1(le,d,"write to private field"),Cr?Cr.call(le,Wt):d.set(le,Wt),Wt),je=(le,d,Wt)=>(B1(le,d,"access private method"),Wt);var Ms=(le,d,Wt,Cr)=>({set _(Cu){Xe(le,d,Cu,Wt)},get _(){return V(le,d,Cr)}});var $h,an,ti,Uh,Wh,vr,ur,Nr,wa,_r,ri,ni,zr,f0,Ir,i0,_t,tt,q0,or,T0,A0,Or,D0,Lr,Rr,sr,lr,Pr,Xn,j0,ai,Oe,M1,xa,An,mu,cr,lm,Aa,ii,pu,ia,ua,N1,Ns,_s,Ot,_1,ku,oa,z1,ui;const Wt={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},Cr=d.defineComponent({name:"AppPreviewMessage",props:Wt,setup(e){const t=d.ref(!1);function r(){var w;const s=(w=e.content)==null?void 0:w.appConfig;if(!s)return"";const c=s.ws??"",f=s.appPath??"",p=s.appObjectId??"";return`${s.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${f}&boId=${p}&ws=${c}&version=2.0#/home`}function n(){var c,f;const s=(c=e.content)==null?void 0:c.previewConfig;s&&e.onOpen&&e.onOpen({...s,title:s.title??((f=e.content)==null?void 0:f.appName)})}function i(s){const c=s.target;c!=null&&c.closest(".f-chat-app-preview-open-btn")||s.preventDefault()}function a(s){s.stopPropagation();const c=r();c&&window.open(c,"_blank")}return()=>{const s=e.content;if(!s)return null;const{message:c,appName:f,createdDatetime:p}=s;return d.createVNode("div",{class:"f-chat-message-app-preview"},[d.createVNode("div",{class:"f-chat-app-preview-message"},[c]),d.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:i,onClick:n,role:"button",tabindex:0,onKeydown:g=>g.key==="Enter"&&n()},[d.createVNode("div",{class:"f-chat-app-preview-card-left"},[d.createVNode("span",{class:"f-chat-app-preview-icon"},[d.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),d.createVNode("div",{class:"f-chat-app-preview-card-middle"},[d.createVNode("div",{class:"f-chat-app-preview-app-name"},[f]),d.createVNode("div",{class:"f-chat-app-preview-datetime"},[p])]),d.createVNode("div",{class:"f-chat-app-preview-card-right"},[d.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&d.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:a,title:"在新页签中打开","aria-label":"在新页签中打开"},[d.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});Cr.install=e=>{e.component(Cr.name,Cr)};const Cu={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0},role:{type:String,default:"assistant"}},zs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},cm="/api/runtime/attachment";function dm(){try{const e=zs==null?void 0:zs.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function fm(e){var r;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((r=window.location)!=null&&r.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function hm(e){return`${cm}/${encodeURIComponent(e)}/download`}function Is(e){const t=String(e??"").trim();if(!t)return"";const r=hm(t),n=dm();return n?`${n}${r}`:r}function I1(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function O1(e){return String(e??"").replace(/[/\\]/g,"_").trim()||"download"}function mm(e){if(!e)return null;const t=/filename\*=UTF-8''([^;]+)|filename="([^"]+)"|filename=([^;]+)/i.exec(e),r=(t==null?void 0:t[1])??(t==null?void 0:t[2])??(t==null?void 0:t[3]);if(!r)return null;try{return decodeURIComponent(r.trim())}catch{return r.trim()}}function L1(e){const t=fm(e);if(typeof window>"u")return t;try{const r=new URL(t);if(r.origin!==window.location.origin&&r.pathname.startsWith("/api/"))return`${r.pathname}${r.search}${r.hash}`}catch{}return t}function pm(e,t){const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=O1(t),n.rel="noopener noreferrer",n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(r)}function gm(e){const t=document.createElement("a");t.href=L1(e),t.rel="noopener noreferrer",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()}function Ea(e){const t=String(e.fileId??"").trim();if(t)return Is(t);const r=String(e.url??"").trim();if(!r)return;const n=I1(r);if(n)return Is(n);if(r.startsWith("http://")||r.startsWith("https://")||r.startsWith("/"))return r}async function Su(e,t){const r=O1(t),n=L1(e);try{const i=await fetch(n,{credentials:"include",mode:"cors"});if(!i.ok)throw new Error(`download_http_${i.status}`);const a=await i.blob(),s=mm(i.headers.get("Content-Disposition"))??r;pm(a,s)}catch{gm(e)}}function Kt(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(n=>{e[n]=!0}):Array.isArray(t)?t.forEach(r=>{r&&(e[r]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([r,n])=>{r&&n&&(e[r]=!0)})),e}function c0(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(n=>{var a,s;const i=n.split(":");if(i.length>=2&&((a=i[0])!=null&&a.trim())&&((s=i[1])!=null&&s.trim())){const c=i[0].trim(),f=i.slice(1).join(":").trim();e[c]=f}}):typeof t=="object"&&Object.entries(t).forEach(([r,n])=>{r&&n!==void 0&&n!==null&&(e[r]=n)})),e}function pi(e){return e||null}function R1(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Eu(e){return e?typeof e!="string"?e:R1(e)?d.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const r=t.target;r.style.display="none",r.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?d.h("i",{class:e}):e:null}function P1(e,t,r,n={}){const{charInterval:i=30}=n,a=d.ref({});let s=[],c=new Set;const f=()=>typeof t=="function"?t():t.value,p=()=>typeof r=="function"?r():r.value,g=()=>{s.forEach(C=>clearInterval(C)),s=[]},m=()=>{g(),a.value={},c.clear()},w=()=>{g(),a.value={},c.clear()},k=()=>{const C=e();if(!C||Object.keys(C).length===0){a.value={};return}if(!p()){a.value={...C},c=new Set(Object.keys(C));return}const B=Object.keys(C);B.forEach(F=>{a.value.hasOwnProperty(F)||(a.value[F]="")});const _=B.filter(F=>!c.has(F));if(_.length===0)return;let T=0;const S=()=>{var Y;if(T>=_.length)return;const F=_[T],z=C[F];if(!z){c.add(F),T++,S();return}let R=((Y=a.value[F])==null?void 0:Y.length)||0;const $=setInterval(()=>{R<z.length?(a.value={...a.value,[F]:z.slice(0,R+1)},R++):(clearInterval($),s=s.filter(q=>q!==$),c.add(F),T++,S())},i);s.push($)};S()};return d.watch(()=>e(),()=>{f()&&k()},{immediate:!0}),d.watch(r,()=>{w(),f()&&k()}),d.watch(t,C=>{C?k():m()}),d.onMounted(()=>{f()&&k()}),{displayContent:a}}function Fu(){const e=d.reactive({}),t=[],r=d.ref(null);let n=null;const i=30,a=C=>{const B=e[C];return!B||B.displayedLength>=B.rawValue.length},s=d.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(C=>a(C))),c=()=>{for(const C of t)if(!a(C))return C;return null},f=()=>{if(!r.value&&(r.value=c(),!r.value)){p();return}const C=e[r.value];C&&(C.displayedLength<C.rawValue.length?(C.displayedLength++,C.displayedValue=C.rawValue.slice(0,C.displayedLength),C.isStreaming=!0):(C.isStreaming=!1,C.displayedValue=C.rawValue,r.value=c(),r.value||p()))},p=()=>{n&&(clearInterval(n),n=null)},g=()=>{n||(n=setInterval(f,i))},m=()=>{p(),Object.keys(e).forEach(C=>{delete e[C]}),t.length=0,r.value=null},w=(C,B)=>{if(e[C]){k(C,B);return}t.push(C),e[C]={rawValue:B??"",displayedLength:0,isStreaming:!1,displayedValue:""},n||(!r.value||r.value===C)&&g()},k=(C,B)=>{const _=e[C];if(!_){w(C,B);return}_.rawValue=B??"",!n&&!a(C)&&(!r.value||r.value===C)&&g()};return d.onUnmounted(()=>{p()}),{propertyStates:e,currentProperty:r,get isAnyStreaming(){return Object.values(e).some(C=>C.isStreaming)},isAllDone:s,startStreaming:g,reset:m,registerProperty:w,updatePropertyValue:k}}function Os(){const e=d.ref(null),t=d.ref(0),r=d.ref(!1);let n=null;const i=()=>{e.value=Date.now(),r.value=!0,n=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},a=()=>{n&&(clearInterval(n),n=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:r,start:i,stop:a,reset:()=>{a(),e.value=null,t.value=0,r.value=!1}}}const bm={read_file:"tool_file",write_file:"tool_file",edit_file:"tool_file",glob:"tool_file",grep:"tool_file",bash:"tool_command",web_fetch:"tool_internet",web_search:"tool_internet",todo_create:"tool_task",todo_list:"tool_task",todo_get:"tool_task",todo_update:"tool_task",ask_user:"tool_interaction",core_memory:"tool_memory",add_daily_note:"tool_memory",lint_json:"dateselect",lint_markdown:"dateselect",output_validation:"dateselect",load_skill_through_path:"tool_mcp"};function ym(e){return e?e.startsWith("mcp:")?"tool_mcp":bm[e]??"thinking_tool":"thinking_tool"}function Ls(){return{getToolIconClass:ym}}function vm(e){return e.scrollWidth>e.clientWidth}function V1(){vm(this)?this.title=this.textContent??"":this.removeAttribute("title")}function H1(){this.removeAttribute("title")}const q1={mounted(e){e.addEventListener("mouseenter",V1),e.addEventListener("mouseleave",H1)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",V1),e.removeEventListener("mouseleave",H1)}};function wm(e,t){const r=d.computed(()=>{var i;return c0({},(i=e.styles)==null?void 0:i.header)});function n(){return t.slots.header&&d.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:r.value},[t.slots.header()])}return{renderHeader:n}}function xm(e,t){var a;const r=d.ref(((a=e.content)==null?void 0:a.sender)??"发送人"),n=d.computed(()=>{var s;return c0({},(s=e.styles)==null?void 0:s.header)});function i(){return d.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[r.value])}return{renderHeader:i}}const j1={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},Am={role:{type:String,default:"assistant"},attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function $1(){return{getFileIcon:(i,a="file-type-",s="")=>{var p;const c={pdf:"pdf",doc:"doc",docx:"doc",xls:"xls",xlsx:"xls",csv:"xls",ppt:"ppt",pptx:"ppt",txt:"txt",zip:"zip",rar:"zip",image:"img",img:"img",md:"md",audio:"any",form:"form",report:"report",board:"board",html:"html",json:"json"};let f=i?c[i.toLowerCase()]:"";if(!f&&s){const g=((p=s.split(".").pop())==null?void 0:p.toLowerCase())||"";f=g?c[g]:""}return`${a}${f||"any"}`},formatFileName:i=>(i==null?void 0:i.replace(/\.[^.]+$/,""))??"",formatFileSize:i=>i?i<1024?i+" B":i<1048576?(i/1024).toFixed(1)+" KB":(i/1048576).toFixed(1)+" MB":"",formatFileTime:i=>{if(!i)return"";const a=new Date(i),s=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),f=String(a.getDate()).padStart(2,"0");return`${s}-${c}-${f}`}}}function sa({status:e,variant:t=""}){let r="";return t?r=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()} variant--${t.toLowerCase()} `:r=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`,d.createVNode("span",{class:r,"aria-hidden":!0},null)}const U1=d.defineComponent({name:"FXBubbleAttachment",props:Am,emits:["preview","batchPreview"],setup(e,t){const r=d.computed(()=>e.attachments??[]),n=d.computed(()=>{var T;return((T=r.value)==null?void 0:T.length)>0}),{formatFileName:i,formatFileSize:a,formatFileTime:s,getFileIcon:c}=$1(),f=d.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),p=d.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth}));function g(T,S){S.pending||t.emit("preview",S)}async function m(T,S){T.stopPropagation(),T.preventDefault();const F=Ea(S);F&&await Su(F,S.name)}function w(T){T.stopPropagation(),T.preventDefault(),t.emit("batchPreview",r.value)}function k(T){switch(T.toLowerCase()){case"doc":case"docx":return"Word";case"xlsx":case"xls":return"Excel";case"ppt":case"pptx":return"PPT";case"txt":return"txt";case"png":case"jpg":case"jpeg":return"Image";case"pdf":return"PDF";case"md":return"Markdown";default:return""}}function C(T){if(!T)return null;const S=k(T.type);return d.createVNode("div",{class:"file-info f-utils-fill"},[d.createVNode("span",{class:"file-name",title:T.name},[T.name]),d.createVNode("div",{class:"file-info-footer"},[d.createVNode("span",{class:`file-icon ${c(T.type,"file-type-",T.name)}`},null),S&&d.createVNode(d.Fragment,null,[d.createVNode("span",{class:"file-type"},[k(T.type)])]),T.size&&d.createVNode(d.Fragment,null,[d.createVNode("div",{class:"file-info-divider"},null),d.createTextVNode(" "),d.createVNode("span",{class:"file-size"},[a(T.size)])])])])}function B(T,S){const F=Ea(T);return d.createVNode("div",{class:"f-chat-bubble-attachment-item "+c(T.type,"attachment-type-",T.name)+(T.pending?" status-working":""),key:S,onClick:z=>g(z,T)},[d.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation"},[d.createVNode("div",{class:f.value},[d.createVNode("span",{class:"f-chat-bubble-attachment-icon file-icon "+c(T.type,"file-type-",T.name)},null),d.createVNode("span",{class:p.value,title:T.name},[i(T.name)]),T.pending===!0&&d.createVNode("div",{class:"f-chat-bubble-attachment-status status-working"},[d.createVNode(sa,{status:"Working",variant:"attachment"},null),d.createTextVNode(" 生成中")]),T.timestamp?d.createVNode("span",{class:"f-chat-bubble-attachment-text"},[d.createTextVNode("创建时间:"),s(T.timestamp)]):T.size?d.createVNode("span",{class:"f-chat-bubble-attachment-size"},[d.createTextVNode("文件大小:"),a(T.size)]):null])]),e.showDownloadButton!==!1&&F?d.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:z=>m(z,T)},[d.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}function _(T,S){return d.createVNode("div",{class:"f-chat-bubble-attachment-toast",key:S},[C(T)])}return()=>n.value?d.createVNode("div",{class:{"f-chat-bubble-attachments":!0,"attachments-toast":e.role==="user"}},[r.value.map((T,S)=>e.role==="user"?_(T,S):B(T,S)),e.enableBatchPreview&&d.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:w},[d.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[d.createTextVNode("查看全部文件")]),d.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),W1=d.defineComponent({name:"FXBubbleFileContentFooter",props:j1,setup(e,t){const r=d.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return c0({},e.customStyle),()=>d.createVNode(U1,{attachments:r.value,onPreview:n=>{var i;return(i=e.onPreviewFile)==null?void 0:i.call(e,n)},onBatchPreview:n=>{var i;return(i=e.onBatchPreviewFile)==null?void 0:i.call(e,n)}},null)}}),Dm={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},km=d.defineComponent({name:"FXBubblePageContentFooter",props:Dm,setup(e,t){const r=d.ref(),n=d.computed(()=>{var s,c;const a={width:"100%",height:"100%",border:"none"};return(s=e.customStyle)!=null&&s.width&&(a.width=e.customStyle.width),(c=e.customStyle)!=null&&c.height&&(a.height=`${e.customStyle.height}px`),a}),i=a=>{var s,c;((s=a.data)==null?void 0:s.type)==="navigation"&&((c=a.data)!=null&&c.url)&&e.onNavigate&&e.onNavigate(a.data.url)};return d.onMounted(()=>{window.addEventListener("message",i)}),d.onUnmounted(()=>{window.removeEventListener("message",i)}),()=>d.createVNode("iframe",{ref:r,src:e.pageUrl,style:n.value,scrolling:"auto"},null)}});function G1(){function e(i,a){const{fileContent:s,height:c,width:f}=i;return{file:s,customStyle:{width:f||"100%",height:c||"100%"},onPreviewFile:a==null?void 0:a.onPreviewFile,onBatchPreviewFile:a==null?void 0:a.onBatchPreviewFile}}function t(i,a){const{pageUrl:s,height:c,width:f}=i;return{pageUrl:s,customStyle:{width:f||"100%",height:c||"100%"},onNavigate:a==null?void 0:a.onNavigate}}function r(i,a){const s=e(i,a);return d.h(W1,s)}function n(i,a){const s=t(i,a);return d.h(km,s)}return{renderFileEmbeddedContent:r,renderPageEmbeddedContent:n}}const Cm={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}},Rs="assistant-widget",Sr="```";function gi(e,t){let r=t;for(;r<e.length&&/\s/.test(e[r]);)r+=1;return r}function X1(e,t){let r=t;for(;r<e.length&&/[a-zA-Z0-9-]/.test(e[r]);)r+=1;return{lang:e.slice(t,r),next:r}}function Y1(e){const t=e.toLowerCase();return t.length===0||t.length>Rs.length?!1:Rs.startsWith(t)}function Sm(e){return e.toLowerCase()===Rs}function Em(e,t){let r=0;for(;r<t;){const n=e.indexOf(Sr,r);if(n===-1||n>=t)break;let i=n+Sr.length;i=gi(e,i);const{lang:a}=X1(e,i);if(a.length>0)return!0;r=n+Sr.length}return!1}function Z1(e,t){if(!e.startsWith(Sr,t))return null;let r=t+Sr.length;r=gi(e,r);const{lang:n,next:i}=X1(e,r);return n.length===0?e.slice(i).trim().length===0?Em(e,t)?null:{fenceStart:t,bodyStart:i,langComplete:!1}:null:Y1(n)?(r=gi(e,i),{fenceStart:t,bodyStart:r,langComplete:Sm(n)}):null}function Ps(e,t=0){const r=gi(e,t);return Z1(e,r)}function Fm(e,t,r){if(t<r)return!1;const n=e.slice(t+Sr.length);return n.length===0?!0:n.startsWith("`")?!1:(/^\s*[\r\n]/.test(n)||/^\s*$/.test(n),!0)}function Tu(e,t){let r=t;for(;r<=e.length;){const n=e.indexOf(Sr,r);if(n===-1)return-1;if(Fm(e,n,t))return n;r=n+1}return-1}function Tm(e){const t=Ps(e,0);if(!(t!=null&&t.langComplete))return null;const r=Tu(e,t.bodyStart);return r===-1?null:e.slice(t.bodyStart,r).trim()}function K1(e){return e.replace(/```\s*assistant-widget\s*/gi,"``` assistant-widget\n")}function Bm(e){const t=e.match(/^\s*```\s*([a-zA-Z0-9-]*)$/);return t?Y1(t[1]??""):!1}function Mm(e,t){let r=t;for(;r<e.length;){const n=e.indexOf(Sr,r);if(n===-1)return null;const i=Z1(e,n);if(i)return{fenceIdx:n,open:i};r=n+Sr.length}return null}function Q1(e){if(!e)return!1;const t=Ps(e,0);if(!(t!=null&&t.langComplete))return!1;const r=Tu(e,t.bodyStart);return r===-1?!1:gi(e,r+Sr.length)>=e.length}function Nm(e){if(!e)return!1;if(Q1(e)||Bm(e))return!0;const t=Ps(e,0);return t?t.langComplete?Tu(e,t.bodyStart)===-1:!0:!1}function _m(e){if(!e)return[];const t=[];let r=0;for(;r<e.length;){const n=Mm(e,r);if(!n){const f=e.slice(r);f&&t.push(f);break}const{fenceIdx:i,open:a}=n;if(i>r&&t.push(e.slice(r,i)),!a.langComplete){t.push(e.slice(i));break}const s=Tu(e,a.bodyStart);if(s===-1){t.push(e.slice(i));break}const c=s+Sr.length;t.push(K1(e.slice(i,c))),r=c}return t.filter(n=>n.trim().length>0)}function J1(e){const t=Tm(K1(e.trim()));if(t==null||t==="")return null;try{return JSON.parse(t)}catch(r){return console.error("Failed to parse JSON:",r),null}}function zm(e){var r;const t=J1(e);return((r=t==null?void 0:t.renderer)==null?void 0:r.widgetImplOptions)||{}}const Im=/^```\s*dynamic-component\b[\s\S]*?```$/,Om=/^```\s*dynamic-component\b/,Lm=/^```\s*dynamic-component\b\s*/,Rm=/\s*```\s*$/;function Pm(e){return e.replace(/```\s*dynamic-component\b/g,"``` dynamic-component")}function ed(e){return e.replace(Lm,"").replace(Rm,"").trim()}function Vm(e,t){let r=t;for(;r<e.length;){const n=e.indexOf("```",r);if(n<0)return null;const a=e.slice(n+3).match(/^\s*dynamic-component\b/);if(a)return{fenceStart:n,contentStart:n+3+a[0].length};r=n+3}return null}function Hm(e){return e?Im.test(e)||Om.test(e):!1}function qm(e){const t=ed(e);if(!t)return null;let r;try{r=JSON.parse(t)}catch{return null}if(!r||typeof r!="object"||Array.isArray(r))return null;const n=r;return typeof n.instanceId!="string"?null:{...n,instanceId:n.instanceId,name:typeof n.name=="string"?n.name:void 0,componentId:typeof n.componentId=="string"?n.componentId:void 0,jsUrl:typeof n.jsUrl=="string"?n.jsUrl:"",url:typeof n.url=="string"?n.url:"",title:typeof n.title=="string"?n.title:"预览",position:n.position==="inline"?"inline":"right",width:typeof n.width=="string"?n.width:void 0,isFullscreen:typeof n.isFullscreen=="boolean"?n.isFullscreen:!1,autoOpen:typeof n.autoOpen=="boolean"?n.autoOpen:!1,fileRe:typeof n.fileRe=="string"?n.fileRe:void 0,target:n.target==="preview"||n.target==="previewExtra"?n.target:n.renderArea==="previewExtra"?"previewExtra":n.renderArea==="preview"?"preview":void 0}}function jm(e){const t=ed(e);if(!t)return null;const r=t.match(/"position"\s*:\s*"(inline|right)"/);return r?{position:r[1]}:null}function $m(e){if(!e)return[];const t=[];let r=0;for(;r<e.length;){const n=Vm(e,r);if(!n){const f=e.slice(r);f&&t.push(f);break}const i=e.slice(r,n.fenceStart);i&&t.push(i);const a=e.indexOf("```",n.contentStart);if(a===-1){t.push(e.slice(n.fenceStart));break}const s=a+3,c=e.slice(n.fenceStart,s);t.push(Pm(c)),r=s}return t.filter(n=>n.length>0)}var S0=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(S0||{});function Um(e){var i;if(!e)return[];const t=[],r=new Set,n=_m(e);for(const a of n)if(Nm(a))if(Q1(a)){const s=J1(a);t.push({type:S0.AssistantWidgetComplete,raw:a,widgetData:s,widgetUrl:(i=s==null?void 0:s.renderer)==null?void 0:i.url,widgetImplOptions:zm(a)})}else t.push({type:S0.AssistantWidgetPending,raw:a});else{const s=$m(a);for(const c of s)if(Hm(c))if(c.endsWith("```")){const f=qm(c);if(f!=null&&f.instanceId){if(r.has(f.instanceId))continue;r.add(f.instanceId),t.push({type:S0.DynamicComponentComplete,raw:c,config:f})}}else{const f=jm(c);t.push({type:S0.DynamicComponentPending,raw:c,position:(f==null?void 0:f.position)??null})}else c.trim()&&t.push({type:S0.Text,raw:c})}return t}/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:td,setPrototypeOf:rd,isFrozen:Wm,getPrototypeOf:Gm,getOwnPropertyDescriptor:Xm}=Object;let{freeze:_0,seal:pr,create:Bu}=Object,{apply:Vs,construct:Hs}=typeof Reflect<"u"&&Reflect;_0||(_0=function(t){return t}),pr||(pr=function(t){return t}),Vs||(Vs=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return t.apply(r,i)}),Hs||(Hs=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});const Mu=I0(Array.prototype.forEach),Ym=I0(Array.prototype.lastIndexOf),nd=I0(Array.prototype.pop),bi=I0(Array.prototype.push),Zm=I0(Array.prototype.splice),Nu=I0(String.prototype.toLowerCase),qs=I0(String.prototype.toString),js=I0(String.prototype.match),yi=I0(String.prototype.replace),Km=I0(String.prototype.indexOf),Qm=I0(String.prototype.trim),J0=I0(Object.prototype.hasOwnProperty),z0=I0(RegExp.prototype.test),vi=Jm(TypeError);function I0(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Vs(e,t,n)}}function Jm(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hs(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Nu;rd&&rd(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(Wm(t)||(t[n]=a),i=a)}e[i]=!0}return e}function e6(e){for(let t=0;t<e.length;t++)J0(e,t)||(e[t]=null);return e}function $r(e){const t=Bu(null);for(const[r,n]of td(e))J0(e,r)&&(Array.isArray(n)?t[r]=e6(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=$r(n):t[r]=n);return t}function wi(e,t){for(;e!==null;){const n=Xm(e,t);if(n){if(n.get)return I0(n.get);if(typeof n.value=="function")return I0(n.value)}e=Gm(e)}function r(){return null}return r}const ad=_0(["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"]),$s=_0(["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"]),Us=_0(["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"]),t6=_0(["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"]),Ws=_0(["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"]),r6=_0(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),id=_0(["#text"]),ud=_0(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Gs=_0(["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","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-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"]),od=_0(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),_u=_0(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),n6=pr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),a6=pr(/<%[\w\W]*|[\w\W]*%>/gm),i6=pr(/\$\{[\w\W]*/gm),u6=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),o6=pr(/^aria-[\-\w]+$/),sd=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s6=pr(/^(?:\w+script|data):/i),l6=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ld=pr(/^html$/i),c6=pr(/^[a-z][.\w]*(-[.\w]+)+$/i);var cd=Object.freeze({__proto__:null,ARIA_ATTR:o6,ATTR_WHITESPACE:l6,CUSTOM_ELEMENT:c6,DATA_ATTR:u6,DOCTYPE_NAME:ld,ERB_EXPR:a6,IS_ALLOWED_URI:sd,IS_SCRIPT_OR_DATA:s6,MUSTACHE_EXPR:n6,TMPLIT_EXPR:i6});const xi={element:1,text:3,progressingInstruction:7,comment:8,document:9},d6=function(){return typeof window>"u"?null:window},f6=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},dd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function fd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d6();const t=Ue=>fd(Ue);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==xi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:c,Element:f,NodeFilter:p,NamedNodeMap:g=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:w,trustedTypes:k}=e,C=f.prototype,B=wi(C,"cloneNode"),_=wi(C,"remove"),T=wi(C,"nextSibling"),S=wi(C,"childNodes"),F=wi(C,"parentNode");if(typeof s=="function"){const Ue=r.createElement("template");Ue.content&&Ue.content.ownerDocument&&(r=Ue.content.ownerDocument)}let z,R="";const{implementation:$,createNodeIterator:Y,createDocumentFragment:q,getElementsByTagName:pe}=r,{importNode:he}=n;let ce=dd();t.isSupported=typeof td=="function"&&typeof F=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:be,ERB_EXPR:ae,TMPLIT_EXPR:xe,DATA_ATTR:Se,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:Ne}=cd;let{IS_ALLOWED_URI:We}=cd,X=null;const Z=lt({},[...ad,...$s,...Us,...Ws,...id]);let Q=null;const ue=lt({},[...ud,...Gs,...od,..._u]);let fe=Object.seal(Bu(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}})),ke=null,ie=null;const me=Object.seal(Bu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ge=!0,Le=!0,Ye=!1,Ke=!0,ut=!1,ot=!0,st=!1,Xt=!1,$0=!1,Jt=!1,ft=!1,Ce=!1,dr=!0,Da=!1;const Yn="user-content-";let Zn=!0,Vr=!1,U0={},C0=null;const un=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dn=null;const B0=lt({},["audio","video","img","source","image","track"]);let fr=null;const Hr=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kn="http://www.w3.org/1998/Math/MathML",oi="http://www.w3.org/2000/svg",qr="http://www.w3.org/1999/xhtml";let Qn=qr,K0=!1,Jn=null;const us=lt({},[Kn,oi,qr],qs);let si=lt({},["mi","mo","mn","ms","mtext"]),ea=lt({},["annotation-xml"]);const gu=lt({},["title","style","font","a","script"]);let ka=null;const Kc=["application/xhtml+xml","text/html"],Qc="text/html";let Vt=null,kt=null;const y=r.createElement("form"),x=function(K){return K instanceof RegExp||K instanceof Function},we=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===K)){if((!K||typeof K!="object")&&(K={}),K=$r(K),ka=Kc.indexOf(K.PARSER_MEDIA_TYPE)===-1?Qc:K.PARSER_MEDIA_TYPE,Vt=ka==="application/xhtml+xml"?qs:Nu,X=J0(K,"ALLOWED_TAGS")?lt({},K.ALLOWED_TAGS,Vt):Z,Q=J0(K,"ALLOWED_ATTR")?lt({},K.ALLOWED_ATTR,Vt):ue,Jn=J0(K,"ALLOWED_NAMESPACES")?lt({},K.ALLOWED_NAMESPACES,qs):us,fr=J0(K,"ADD_URI_SAFE_ATTR")?lt($r(Hr),K.ADD_URI_SAFE_ATTR,Vt):Hr,Dn=J0(K,"ADD_DATA_URI_TAGS")?lt($r(B0),K.ADD_DATA_URI_TAGS,Vt):B0,C0=J0(K,"FORBID_CONTENTS")?lt({},K.FORBID_CONTENTS,Vt):un,ke=J0(K,"FORBID_TAGS")?lt({},K.FORBID_TAGS,Vt):$r({}),ie=J0(K,"FORBID_ATTR")?lt({},K.FORBID_ATTR,Vt):$r({}),U0=J0(K,"USE_PROFILES")?K.USE_PROFILES:!1,ge=K.ALLOW_ARIA_ATTR!==!1,Le=K.ALLOW_DATA_ATTR!==!1,Ye=K.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ut=K.SAFE_FOR_TEMPLATES||!1,ot=K.SAFE_FOR_XML!==!1,st=K.WHOLE_DOCUMENT||!1,Jt=K.RETURN_DOM||!1,ft=K.RETURN_DOM_FRAGMENT||!1,Ce=K.RETURN_TRUSTED_TYPE||!1,$0=K.FORCE_BODY||!1,dr=K.SANITIZE_DOM!==!1,Da=K.SANITIZE_NAMED_PROPS||!1,Zn=K.KEEP_CONTENT!==!1,Vr=K.IN_PLACE||!1,We=K.ALLOWED_URI_REGEXP||sd,Qn=K.NAMESPACE||qr,si=K.MATHML_TEXT_INTEGRATION_POINTS||si,ea=K.HTML_INTEGRATION_POINTS||ea,fe=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&&x(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(fe.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&x(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(fe.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ut&&(Le=!1),ft&&(Jt=!0),U0&&(X=lt({},id),Q=Bu(null),U0.html===!0&&(lt(X,ad),lt(Q,ud)),U0.svg===!0&&(lt(X,$s),lt(Q,Gs),lt(Q,_u)),U0.svgFilters===!0&&(lt(X,Us),lt(Q,Gs),lt(Q,_u)),U0.mathMl===!0&&(lt(X,Ws),lt(Q,od),lt(Q,_u))),J0(K,"ADD_TAGS")||(me.tagCheck=null),J0(K,"ADD_ATTR")||(me.attributeCheck=null),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?me.tagCheck=K.ADD_TAGS:(X===Z&&(X=$r(X)),lt(X,K.ADD_TAGS,Vt))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?me.attributeCheck=K.ADD_ATTR:(Q===ue&&(Q=$r(Q)),lt(Q,K.ADD_ATTR,Vt))),K.ADD_URI_SAFE_ATTR&<(fr,K.ADD_URI_SAFE_ATTR,Vt),K.FORBID_CONTENTS&&(C0===un&&(C0=$r(C0)),lt(C0,K.FORBID_CONTENTS,Vt)),K.ADD_FORBID_CONTENTS&&(C0===un&&(C0=$r(C0)),lt(C0,K.ADD_FORBID_CONTENTS,Vt)),Zn&&(X["#text"]=!0),st&<(X,["html","head","body"]),X.table&&(lt(X,["tbody"]),delete ke.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');z=K.TRUSTED_TYPES_POLICY,R=z.createHTML("")}else z===void 0&&(z=f6(k,i)),z!==null&&typeof R=="string"&&(R=z.createHTML(""));_0&&_0(K),kt=K}},M=lt({},[...$s,...Us,...t6]),H=lt({},[...Ws,...r6]),Tt=function(K){let de=F(K);(!de||!de.tagName)&&(de={namespaceURI:Qn,tagName:"template"});const qe=Nu(K.tagName),Dt=Nu(de.tagName);return Jn[K.namespaceURI]?K.namespaceURI===oi?de.namespaceURI===qr?qe==="svg":de.namespaceURI===Kn?qe==="svg"&&(Dt==="annotation-xml"||si[Dt]):!!M[qe]:K.namespaceURI===Kn?de.namespaceURI===qr?qe==="math":de.namespaceURI===oi?qe==="math"&&ea[Dt]:!!H[qe]:K.namespaceURI===qr?de.namespaceURI===oi&&!ea[Dt]||de.namespaceURI===Kn&&!si[Dt]?!1:!H[qe]&&(gu[qe]||!M[qe]):!!(ka==="application/xhtml+xml"&&Jn[K.namespaceURI]):!1},ze=function(K){bi(t.removed,{element:K});try{F(K).removeChild(K)}catch{_(K)}},$t=function(K,de){try{bi(t.removed,{attribute:de.getAttributeNode(K),from:de})}catch{bi(t.removed,{attribute:null,from:de})}if(de.removeAttribute(K),K==="is")if(Jt||ft)try{ze(de)}catch{}else try{de.setAttribute(K,"")}catch{}},kn=function(K){let de=null,qe=null;if($0)K="<remove></remove>"+K;else{const Yt=js(K,/^[\r\n\t ]+/);qe=Yt&&Yt[0]}ka==="application/xhtml+xml"&&Qn===qr&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const Dt=z?z.createHTML(K):K;if(Qn===qr)try{de=new w().parseFromString(Dt,ka)}catch{}if(!de||!de.documentElement){de=$.createDocument(Qn,"template",null);try{de.documentElement.innerHTML=K0?R:Dt}catch{}}const h0=de.body||de.documentElement;return K&&qe&&h0.insertBefore(r.createTextNode(qe),h0.childNodes[0]||null),Qn===qr?pe.call(de,st?"html":"body")[0]:st?de.documentElement:h0},Ge=function(K){return Y.call(K.ownerDocument||K,K,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Ht=function(K){return K instanceof m&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof g)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},M0=function(K){return typeof c=="function"&&K instanceof c};function W0(Ue,K,de){Mu(Ue,qe=>{qe.call(t,K,de,kt)})}const U=function(K){let de=null;if(W0(ce.beforeSanitizeElements,K,null),Ht(K))return ze(K),!0;const qe=Vt(K.nodeName);if(W0(ce.uponSanitizeElement,K,{tagName:qe,allowedTags:X}),ot&&K.hasChildNodes()&&!M0(K.firstElementChild)&&z0(/<[/\w!]/g,K.innerHTML)&&z0(/<[/\w!]/g,K.textContent)||K.nodeType===xi.progressingInstruction||ot&&K.nodeType===xi.comment&&z0(/<[/\w]/g,K.data))return ze(K),!0;if(!(me.tagCheck instanceof Function&&me.tagCheck(qe))&&(!X[qe]||ke[qe])){if(!ke[qe]&&J(qe)&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,qe)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(qe)))return!1;if(Zn&&!C0[qe]){const Dt=F(K)||K.parentNode,h0=S(K)||K.childNodes;if(h0&&Dt){const Yt=h0.length;for(let m0=Yt-1;m0>=0;--m0){const zt=B(h0[m0],!0);zt.__removalCount=(K.__removalCount||0)+1,Dt.insertBefore(zt,T(K))}}}return ze(K),!0}return K instanceof f&&!Tt(K)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&z0(/<\/no(script|embed|frames)/i,K.innerHTML)?(ze(K),!0):(ut&&K.nodeType===xi.text&&(de=K.textContent,Mu([be,ae,xe],Dt=>{de=yi(de,Dt," ")}),K.textContent!==de&&(bi(t.removed,{element:K.cloneNode()}),K.textContent=de)),W0(ce.afterSanitizeElements,K,null),!1)},wr=function(K,de,qe){if(ie[de]||dr&&(de==="id"||de==="name")&&(qe in r||qe in y))return!1;if(!(Le&&!ie[de]&&z0(Se,de))){if(!(ge&&z0(te,de))){if(!(me.attributeCheck instanceof Function&&me.attributeCheck(de,K))){if(!Q[de]||ie[de]){if(!(J(K)&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,K)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(K))&&(fe.attributeNameCheck instanceof RegExp&&z0(fe.attributeNameCheck,de)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(de,K))||de==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,qe)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(qe))))return!1}else if(!fr[de]){if(!z0(We,yi(qe,ne,""))){if(!((de==="src"||de==="xlink:href"||de==="href")&&K!=="script"&&Km(qe,"data:")===0&&Dn[K])){if(!(Ye&&!z0(ye,yi(qe,ne,"")))){if(qe)return!1}}}}}}}return!0},J=function(K){return K!=="annotation-xml"&&js(K,Ne)},bu=function(K){W0(ce.beforeSanitizeAttributes,K,null);const{attributes:de}=K;if(!de||Ht(K))return;const qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let Dt=de.length;for(;Dt--;){const h0=de[Dt],{name:Yt,namespaceURI:m0,value:zt}=h0,on=Vt(Yt),yu=zt;let Zt=Yt==="value"?yu:Qm(yu);if(qe.attrName=on,qe.attrValue=Zt,qe.keepAttr=!0,qe.forceKeepAttr=void 0,W0(ce.uponSanitizeAttribute,K,qe),Zt=qe.attrValue,Da&&(on==="id"||on==="name")&&($t(Yt,K),Zt=Yn+Zt),ot&&z0(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){$t(Yt,K);continue}if(on==="attributename"&&js(Zt,"href")){$t(Yt,K);continue}if(qe.forceKeepAttr)continue;if(!qe.keepAttr){$t(Yt,K);continue}if(!Ke&&z0(/\/>/i,Zt)){$t(Yt,K);continue}ut&&Mu([be,ae,xe],vu=>{Zt=yi(Zt,vu," ")});const ss=Vt(K.nodeName);if(!wr(ss,on,Zt)){$t(Yt,K);continue}if(z&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!m0)switch(k.getAttributeType(ss,on)){case"TrustedHTML":{Zt=z.createHTML(Zt);break}case"TrustedScriptURL":{Zt=z.createScriptURL(Zt);break}}if(Zt!==yu)try{m0?K.setAttributeNS(m0,Yt,Zt):K.setAttribute(Yt,Zt),Ht(K)?ze(K):nd(t.removed)}catch{$t(Yt,K)}}W0(ce.afterSanitizeAttributes,K,null)},os=function Ue(K){let de=null;const qe=Ge(K);for(W0(ce.beforeSanitizeShadowDOM,K,null);de=qe.nextNode();)W0(ce.uponSanitizeShadowNode,de,null),U(de),bu(de),de.content instanceof a&&Ue(de.content);W0(ce.afterSanitizeShadowDOM,K,null)};return t.sanitize=function(Ue){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=null,qe=null,Dt=null,h0=null;if(K0=!Ue,K0&&(Ue="<!-->"),typeof Ue!="string"&&!M0(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw vi("dirty is not a string, aborting")}else throw vi("toString is not a function");if(!t.isSupported)return Ue;if(Xt||we(K),t.removed=[],typeof Ue=="string"&&(Vr=!1),Vr){if(Ue.nodeName){const zt=Vt(Ue.nodeName);if(!X[zt]||ke[zt])throw vi("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof c)de=kn("<!---->"),qe=de.ownerDocument.importNode(Ue,!0),qe.nodeType===xi.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?de=qe:de.appendChild(qe);else{if(!Jt&&!ut&&!st&&Ue.indexOf("<")===-1)return z&&Ce?z.createHTML(Ue):Ue;if(de=kn(Ue),!de)return Jt?null:Ce?R:""}de&&$0&&ze(de.firstChild);const Yt=Ge(Vr?Ue:de);for(;Dt=Yt.nextNode();)U(Dt),bu(Dt),Dt.content instanceof a&&os(Dt.content);if(Vr)return Ue;if(Jt){if(ft)for(h0=q.call(de.ownerDocument);de.firstChild;)h0.appendChild(de.firstChild);else h0=de;return(Q.shadowroot||Q.shadowrootmode)&&(h0=he.call(n,h0,!0)),h0}let m0=st?de.outerHTML:de.innerHTML;return st&&X["!doctype"]&&de.ownerDocument&&de.ownerDocument.doctype&&de.ownerDocument.doctype.name&&z0(ld,de.ownerDocument.doctype.name)&&(m0="<!DOCTYPE "+de.ownerDocument.doctype.name+`>
|
|
1
|
+
(function(le,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(le=typeof globalThis<"u"?globalThis:le||self,d(le.FarrisX={},le.vue))})(this,function(le,d){"use strict";var Cw=Object.defineProperty;var om=le=>{throw TypeError(le)};var Sw=(le,d,Wt)=>d in le?Cw(le,d,{enumerable:!0,configurable:!0,writable:!0,value:Wt}):le[d]=Wt;var Bt=(le,d,Wt)=>Sw(le,typeof d!="symbol"?d+"":d,Wt),B1=(le,d,Wt)=>d.has(le)||om("Cannot "+Wt);var V=(le,d,Wt)=>(B1(le,d,"read from private field"),Wt?Wt.call(le):d.get(le)),ct=(le,d,Wt)=>d.has(le)?om("Cannot add the same private member more than once"):d instanceof WeakSet?d.add(le):d.set(le,Wt),Xe=(le,d,Wt,Cr)=>(B1(le,d,"write to private field"),Cr?Cr.call(le,Wt):d.set(le,Wt),Wt),je=(le,d,Wt)=>(B1(le,d,"access private method"),Wt);var Ms=(le,d,Wt,Cr)=>({set _(Cu){Xe(le,d,Cu,Wt)},get _(){return V(le,d,Cr)}});var $h,an,ti,Uh,Wh,vr,ur,Nr,wa,_r,ri,ni,zr,f0,Ir,i0,_t,tt,q0,or,T0,A0,Or,D0,Lr,Rr,sr,lr,Pr,Xn,j0,ai,Oe,M1,xa,An,mu,cr,lm,Aa,ii,pu,ia,ua,N1,Ns,_s,Ot,_1,ku,oa,z1,ui;const Wt={content:{type:Object,required:!0},onOpen:{type:Function,default:void 0}},Cr=d.defineComponent({name:"AppPreviewMessage",props:Wt,setup(e){const t=d.ref(!1);function r(){var w;const s=(w=e.content)==null?void 0:w.appConfig;if(!s)return"";const c=s.ws??"",f=s.appPath??"",p=s.appObjectId??"";return`${s.appBuilderUri??"/apps/platform/development-platform/ide/app-builder/index.html"}?path=${f}&boId=${p}&ws=${c}&version=2.0#/home`}function n(){var c,f;const s=(c=e.content)==null?void 0:c.previewConfig;s&&e.onOpen&&e.onOpen({...s,title:s.title??((f=e.content)==null?void 0:f.appName)})}function i(s){const c=s.target;c!=null&&c.closest(".f-chat-app-preview-open-btn")||s.preventDefault()}function a(s){s.stopPropagation();const c=r();c&&window.open(c,"_blank")}return()=>{const s=e.content;if(!s)return null;const{message:c,appName:f,createdDatetime:p}=s;return d.createVNode("div",{class:"f-chat-message-app-preview"},[d.createVNode("div",{class:"f-chat-app-preview-message"},[c]),d.createVNode("div",{class:"f-chat-app-preview-card",onMouseenter:()=>t.value=!0,onMouseleave:()=>t.value=!1,onMousedown:i,onClick:n,role:"button",tabindex:0,onKeydown:g=>g.key==="Enter"&&n()},[d.createVNode("div",{class:"f-chat-app-preview-card-left"},[d.createVNode("span",{class:"f-chat-app-preview-icon"},[d.createVNode("i",{class:"fx-icon fx-icon-bubble_star"},null)])]),d.createVNode("div",{class:"f-chat-app-preview-card-middle"},[d.createVNode("div",{class:"f-chat-app-preview-app-name"},[f]),d.createVNode("div",{class:"f-chat-app-preview-datetime"},[p])]),d.createVNode("div",{class:"f-chat-app-preview-card-right"},[d.createVNode("div",{class:"f-chat-app-preview-action-area"},null),t.value&&d.createVNode("button",{type:"button",class:"f-chat-app-preview-open-btn",onClick:a,title:"在新页签中打开","aria-label":"在新页签中打开"},[d.createVNode("i",{class:"fx-icon fx-icon-folder-open"},null)])])])])}}});Cr.install=e=>{e.component(Cr.name,Cr)};const Cu={content:{type:Object,required:!0},outputMode:{type:String,default:"streaming"},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},header:{type:String,default:"sender"},placement:{type:String,default:"start"},showAvatar:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},attachments:{type:Array,default:()=>[]},onPreview:{type:Function,default:void 0},onUserAuthConfirm:{type:Function,default:void 0},compositeTailRender:{type:Function,default:void 0},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0},attachmentRowClickOpensPreview:{type:Boolean,default:!0},attachmentShowDownload:{type:Boolean,default:!0},role:{type:String,default:"assistant"}},zs={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},cm="/api/runtime/attachment";function dm(){try{const e=zs==null?void 0:zs.VITE_ATTACHMENT_API_BASE;if(typeof e=="string"&&e.trim()!=="")return e.replace(/\/+$/,"")}catch{}return""}function fm(e){var r;const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:typeof window<"u"&&((r=window.location)!=null&&r.origin)&&t.startsWith("/")?`${window.location.origin}${t}`:t}function hm(e){return`${cm}/${encodeURIComponent(e)}/download`}function Is(e){const t=String(e??"").trim();if(!t)return"";const r=hm(t),n=dm();return n?`${n}${r}`:r}function I1(e){const t=e.trim().match(/\/api\/runtime\/attachment\/([^/]+)\/download(?:\?|#|$)/i);if(!(t!=null&&t[1]))return"";try{return decodeURIComponent(t[1]).trim()}catch{return t[1].trim()}}function O1(e){return String(e??"").replace(/[/\\]/g,"_").trim()||"download"}function mm(e){if(!e)return null;const t=/filename\*=UTF-8''([^;]+)|filename="([^"]+)"|filename=([^;]+)/i.exec(e),r=(t==null?void 0:t[1])??(t==null?void 0:t[2])??(t==null?void 0:t[3]);if(!r)return null;try{return decodeURIComponent(r.trim())}catch{return r.trim()}}function L1(e){const t=fm(e);if(typeof window>"u")return t;try{const r=new URL(t);if(r.origin!==window.location.origin&&r.pathname.startsWith("/api/"))return`${r.pathname}${r.search}${r.hash}`}catch{}return t}function pm(e,t){const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=O1(t),n.rel="noopener noreferrer",n.style.display="none",document.body.appendChild(n),n.click(),n.remove(),URL.revokeObjectURL(r)}function gm(e){const t=document.createElement("a");t.href=L1(e),t.rel="noopener noreferrer",t.style.display="none",document.body.appendChild(t),t.click(),t.remove()}function Ea(e){const t=String(e.fileId??"").trim();if(t)return Is(t);const r=String(e.url??"").trim();if(!r)return;const n=I1(r);if(n)return Is(n);if(r.startsWith("http://")||r.startsWith("https://")||r.startsWith("/"))return r}async function Su(e,t){const r=O1(t),n=L1(e);try{const i=await fetch(n,{credentials:"include",mode:"cors"});if(!i.ok)throw new Error(`download_http_${i.status}`);const a=await i.blob(),s=mm(i.headers.get("Content-Disposition"))??r;pm(a,s)}catch{gm(e)}}function Kt(e,t){return t&&(typeof t=="string"?t.split(" ").filter(Boolean).forEach(n=>{e[n]=!0}):Array.isArray(t)?t.forEach(r=>{r&&(e[r]=!0)}):typeof t=="object"&&Object.entries(t).forEach(([r,n])=>{r&&n&&(e[r]=!0)})),e}function c0(e,t){return t&&(typeof t=="string"?t.split(";").filter(Boolean).forEach(n=>{var a,s;const i=n.split(":");if(i.length>=2&&((a=i[0])!=null&&a.trim())&&((s=i[1])!=null&&s.trim())){const c=i[0].trim(),f=i.slice(1).join(":").trim();e[c]=f}}):typeof t=="object"&&Object.entries(t).forEach(([r,n])=>{r&&n!==void 0&&n!==null&&(e[r]=n)})),e}function pi(e){return e||null}function R1(e){return e?/\.(jpg|jpeg|png|gif|svg|webp|bmp|ico)$/i.test(e)||e.startsWith("http")||e.startsWith("data:image"):!1}function Eu(e){return e?typeof e!="string"?e:R1(e)?d.h("img",{src:e,alt:"icon",class:"fx-prompt--item-icon-image",onError:t=>{const r=t.target;r.style.display="none",r.parentElement.innerHTML='<i class="fx-icon fx-icon-warning"></i>'}}):e.includes("fx-icon")||e.includes("icon-")?d.h("i",{class:e}):e:null}function P1(e,t,r,n={}){const{charInterval:i=30}=n,a=d.ref({});let s=[],c=new Set;const f=()=>typeof t=="function"?t():t.value,p=()=>typeof r=="function"?r():r.value,g=()=>{s.forEach(C=>clearInterval(C)),s=[]},m=()=>{g(),a.value={},c.clear()},w=()=>{g(),a.value={},c.clear()},k=()=>{const C=e();if(!C||Object.keys(C).length===0){a.value={};return}if(!p()){a.value={...C},c=new Set(Object.keys(C));return}const B=Object.keys(C);B.forEach(F=>{a.value.hasOwnProperty(F)||(a.value[F]="")});const _=B.filter(F=>!c.has(F));if(_.length===0)return;let T=0;const S=()=>{var Y;if(T>=_.length)return;const F=_[T],z=C[F];if(!z){c.add(F),T++,S();return}let R=((Y=a.value[F])==null?void 0:Y.length)||0;const $=setInterval(()=>{R<z.length?(a.value={...a.value,[F]:z.slice(0,R+1)},R++):(clearInterval($),s=s.filter(q=>q!==$),c.add(F),T++,S())},i);s.push($)};S()};return d.watch(()=>e(),()=>{f()&&k()},{immediate:!0}),d.watch(r,()=>{w(),f()&&k()}),d.watch(t,C=>{C?k():m()}),d.onMounted(()=>{f()&&k()}),{displayContent:a}}function Fu(){const e=d.reactive({}),t=[],r=d.ref(null);let n=null;const i=30,a=C=>{const B=e[C];return!B||B.displayedLength>=B.rawValue.length},s=d.computed(()=>Object.keys(e).length===0?!1:Object.keys(e).every(C=>a(C))),c=()=>{for(const C of t)if(!a(C))return C;return null},f=()=>{if(!r.value&&(r.value=c(),!r.value)){p();return}const C=e[r.value];C&&(C.displayedLength<C.rawValue.length?(C.displayedLength++,C.displayedValue=C.rawValue.slice(0,C.displayedLength),C.isStreaming=!0):(C.isStreaming=!1,C.displayedValue=C.rawValue,r.value=c(),r.value||p()))},p=()=>{n&&(clearInterval(n),n=null)},g=()=>{n||(n=setInterval(f,i))},m=()=>{p(),Object.keys(e).forEach(C=>{delete e[C]}),t.length=0,r.value=null},w=(C,B)=>{if(e[C]){k(C,B);return}t.push(C),e[C]={rawValue:B??"",displayedLength:0,isStreaming:!1,displayedValue:""},n||(!r.value||r.value===C)&&g()},k=(C,B)=>{const _=e[C];if(!_){w(C,B);return}_.rawValue=B??"",!n&&!a(C)&&(!r.value||r.value===C)&&g()};return d.onUnmounted(()=>{p()}),{propertyStates:e,currentProperty:r,get isAnyStreaming(){return Object.values(e).some(C=>C.isStreaming)},isAllDone:s,startStreaming:g,reset:m,registerProperty:w,updatePropertyValue:k}}function Os(){const e=d.ref(null),t=d.ref(0),r=d.ref(!1);let n=null;const i=()=>{e.value=Date.now(),r.value=!0,n=setInterval(()=>{e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))},1e3)},a=()=>{n&&(clearInterval(n),n=null),e.value&&(t.value=Math.floor((Date.now()-e.value)/1e3))};return{elapsedSeconds:t,hasEverStarted:r,start:i,stop:a,reset:()=>{a(),e.value=null,t.value=0,r.value=!1}}}const bm={read_file:"tool_file",write_file:"tool_file",edit_file:"tool_file",glob:"tool_file",grep:"tool_file",bash:"tool_command",web_fetch:"tool_internet",web_search:"tool_internet",todo_create:"tool_task",todo_list:"tool_task",todo_get:"tool_task",todo_update:"tool_task",ask_user:"tool_interaction",core_memory:"tool_memory",add_daily_note:"tool_memory",lint_json:"dateselect",lint_markdown:"dateselect",output_validation:"dateselect",load_skill_through_path:"tool_mcp"};function ym(e){return e?e.startsWith("mcp:")?"tool_mcp":bm[e]??"thinking_tool":"thinking_tool"}function Ls(){return{getToolIconClass:ym}}function vm(e){return e.scrollWidth>e.clientWidth}function V1(){vm(this)?this.title=this.textContent??"":this.removeAttribute("title")}function H1(){this.removeAttribute("title")}const q1={mounted(e){e.addEventListener("mouseenter",V1),e.addEventListener("mouseleave",H1)},updated(e){e.removeAttribute("title")},unmounted(e){e.removeEventListener("mouseenter",V1),e.removeEventListener("mouseleave",H1)}};function wm(e,t){const r=d.computed(()=>{var i;return c0({},(i=e.styles)==null?void 0:i.header)});function n(){return t.slots.header&&d.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:r.value},[t.slots.header()])}return{renderHeader:n}}function xm(e,t){var a;const r=d.ref(((a=e.content)==null?void 0:a.sender)??"发送人"),n=d.computed(()=>{var s;return c0({},(s=e.styles)==null?void 0:s.header)});function i(){return d.createVNode("div",{class:`f-chat-bubble-header ${e.placement}`,style:n.value},[r.value])}return{renderHeader:i}}const j1={file:{type:Object,required:!0},customStyle:{type:Object,default:()=>({})},onPreviewFile:{type:Function,default:void 0},onBatchPreviewFile:{type:Function,default:void 0}},Am={role:{type:String,default:"assistant"},attachments:{type:Array,default:()=>[]},enableBatchPreview:{type:Boolean,default:!1},enableFixedWidth:{type:Boolean,default:!1},showDownloadButton:{type:Boolean,default:!0},onPreview:{type:Function,default:void 0},onBatchPreview:{type:Function,default:void 0}};function $1(){return{getFileIcon:(i,a="file-type-",s="")=>{var p;const c={pdf:"pdf",doc:"doc",docx:"doc",xls:"xls",xlsx:"xls",csv:"xls",ppt:"ppt",pptx:"ppt",txt:"txt",zip:"zip",rar:"zip",image:"img",img:"img",md:"md",audio:"any",form:"form",report:"report",board:"board",html:"html",json:"json"};let f=i?c[i.toLowerCase()]:"";if(!f&&s){const g=((p=s.split(".").pop())==null?void 0:p.toLowerCase())||"";f=g?c[g]:""}return`${a}${f||"any"}`},formatFileName:i=>(i==null?void 0:i.replace(/\.[^.]+$/,""))??"",formatFileSize:i=>i?i<1024?i+" B":i<1048576?(i/1024).toFixed(1)+" KB":(i/1048576).toFixed(1)+" MB":"",formatFileTime:i=>{if(!i)return"";const a=new Date(i),s=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),f=String(a.getDate()).padStart(2,"0");return`${s}-${c}-${f}`}}}function sa({status:e,variant:t=""}){let r="";return t?r=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()} variant--${t.toLowerCase()} `:r=`f-chat-todo-status-icon f-chat-todo-status-${e.toLowerCase()}`,d.createVNode("span",{class:r,"aria-hidden":!0},null)}const U1=d.defineComponent({name:"FXBubbleAttachment",props:Am,emits:["preview","batchPreview"],setup(e,t){const r=d.computed(()=>e.attachments??[]),n=d.computed(()=>{var T;return((T=r.value)==null?void 0:T.length)>0}),{formatFileName:i,formatFileSize:a,formatFileTime:s,getFileIcon:c}=$1(),f=d.computed(()=>({"f-chat-bubble-attachment-info":!0,"f-utils-fill":e.enableFixedWidth})),p=d.computed(()=>({"f-chat-bubble-attachment-name":!0,"name-tip":e.enableFixedWidth}));function g(T,S){S.pending||t.emit("preview",S)}async function m(T,S){T.stopPropagation(),T.preventDefault();const F=Ea(S);F&&await Su(F,S.name)}function w(T){T.stopPropagation(),T.preventDefault(),t.emit("batchPreview",r.value)}function k(T){switch(T.toLowerCase()){case"doc":case"docx":return"Word";case"xlsx":case"xls":return"Excel";case"ppt":case"pptx":return"PPT";case"txt":return"txt";case"png":case"jpg":case"jpeg":return"Image";case"pdf":return"PDF";case"md":return"Markdown";default:return""}}function C(T){if(!T)return null;const S=k(T.type);return d.createVNode("div",{class:"file-info f-utils-fill"},[d.createVNode("span",{class:"file-name",title:T.name},[T.name]),d.createVNode("div",{class:"file-info-footer"},[d.createVNode("span",{class:`file-icon ${c(T.type,"file-type-",T.name)}`},null),S&&d.createVNode(d.Fragment,null,[d.createVNode("span",{class:"file-type"},[k(T.type)])]),T.size&&d.createVNode(d.Fragment,null,[d.createVNode("div",{class:"file-info-divider"},null),d.createTextVNode(" "),d.createVNode("span",{class:"file-size"},[a(T.size)])])])])}function B(T,S){const F=Ea(T);return d.createVNode("div",{class:"f-chat-bubble-attachment-item "+c(T.type,"attachment-type-",T.name)+(T.pending?" status-working":""),key:S,onClick:z=>g(z,T)},[d.createVNode("div",{class:"f-chat-bubble-attachment-main",role:"presentation"},[d.createVNode("div",{class:f.value},[d.createVNode("span",{class:"f-chat-bubble-attachment-icon file-icon "+c(T.type,"file-type-",T.name)},null),d.createVNode("span",{class:p.value,title:T.name},[i(T.name)]),T.pending===!0&&d.createVNode("div",{class:"f-chat-bubble-attachment-status status-working"},[d.createVNode(sa,{status:"Working",variant:"attachment"},null),d.createTextVNode(" 生成中")]),T.timestamp?d.createVNode("span",{class:"f-chat-bubble-attachment-text"},[d.createTextVNode("创建时间:"),s(T.timestamp)]):T.size?d.createVNode("span",{class:"f-chat-bubble-attachment-size"},[d.createTextVNode("文件大小:"),a(T.size)]):null])]),e.showDownloadButton!==!1&&F?d.createVNode("button",{type:"button",class:"f-chat-bubble-attachment-download-btn","aria-label":"下载附件",title:"下载",onClick:z=>m(z,T)},[d.createVNode("i",{class:"fx-icon fx-icon-sidewindow_download","aria-hidden":"true"},null)]):null])}function _(T,S){return d.createVNode("div",{class:"f-chat-bubble-attachment-toast",key:S},[C(T)])}return()=>n.value?d.createVNode("div",{class:{"f-chat-bubble-attachments":!0,"attachments-toast":e.role==="user"}},[r.value.map((T,S)=>e.role==="user"?_(T,S):B(T,S)),e.enableBatchPreview&&d.createVNode("div",{class:"f-chat-bubble-attachment-preview-btn",onClick:w},[d.createVNode("span",{class:"f-chat-bubble-attachment-preview-btn-text"},[d.createTextVNode("查看全部文件")]),d.createVNode("i",{class:"fx-icon fx-icon-sort-asc-sm",style:{transform:"rotate(90deg)"}},null)])]):null}}),W1=d.defineComponent({name:"FXBubbleFileContentFooter",props:j1,setup(e,t){const r=d.computed(()=>e.file?Array.isArray(e.file)?[...e.file]:[e.file]:[]);return c0({},e.customStyle),()=>d.createVNode(U1,{attachments:r.value,onPreview:n=>{var i;return(i=e.onPreviewFile)==null?void 0:i.call(e,n)},onBatchPreview:n=>{var i;return(i=e.onBatchPreviewFile)==null?void 0:i.call(e,n)}},null)}}),Dm={pageUrl:{type:String,required:!0},customStyle:{type:Object,default:()=>({})},onNavigate:{type:Function,default:void 0}},km=d.defineComponent({name:"FXBubblePageContentFooter",props:Dm,setup(e,t){const r=d.ref(),n=d.computed(()=>{var s,c;const a={width:"100%",height:"100%",border:"none"};return(s=e.customStyle)!=null&&s.width&&(a.width=e.customStyle.width),(c=e.customStyle)!=null&&c.height&&(a.height=`${e.customStyle.height}px`),a}),i=a=>{var s,c;((s=a.data)==null?void 0:s.type)==="navigation"&&((c=a.data)!=null&&c.url)&&e.onNavigate&&e.onNavigate(a.data.url)};return d.onMounted(()=>{window.addEventListener("message",i)}),d.onUnmounted(()=>{window.removeEventListener("message",i)}),()=>d.createVNode("iframe",{ref:r,src:e.pageUrl,style:n.value,scrolling:"auto"},null)}});function G1(){function e(i,a){const{fileContent:s,height:c,width:f}=i;return{file:s,customStyle:{width:f||"100%",height:c||"100%"},onPreviewFile:a==null?void 0:a.onPreviewFile,onBatchPreviewFile:a==null?void 0:a.onBatchPreviewFile}}function t(i,a){const{pageUrl:s,height:c,width:f}=i;return{pageUrl:s,customStyle:{width:f||"100%",height:c||"100%"},onNavigate:a==null?void 0:a.onNavigate}}function r(i,a){const s=e(i,a);return d.h(W1,s)}function n(i,a){const s=t(i,a);return d.h(km,s)}return{renderFileEmbeddedContent:r,renderPageEmbeddedContent:n}}const Cm={title:{type:String,default:""},subtitle:{type:String,default:""},text:{type:String,default:""},textFormat:{type:String,default:"plain"},placement:{type:String,default:"start"},onDynamicComponentsDetected:{type:Function,default:void 0},onShowDynamicComponent:{type:Function,default:void 0}},Rs="assistant-widget",Sr="```";function gi(e,t){let r=t;for(;r<e.length&&/\s/.test(e[r]);)r+=1;return r}function X1(e,t){let r=t;for(;r<e.length&&/[a-zA-Z0-9-]/.test(e[r]);)r+=1;return{lang:e.slice(t,r),next:r}}function Y1(e){const t=e.toLowerCase();return t.length===0||t.length>Rs.length?!1:Rs.startsWith(t)}function Sm(e){return e.toLowerCase()===Rs}function Em(e,t){let r=0;for(;r<t;){const n=e.indexOf(Sr,r);if(n===-1||n>=t)break;let i=n+Sr.length;i=gi(e,i);const{lang:a}=X1(e,i);if(a.length>0)return!0;r=n+Sr.length}return!1}function Z1(e,t){if(!e.startsWith(Sr,t))return null;let r=t+Sr.length;r=gi(e,r);const{lang:n,next:i}=X1(e,r);return n.length===0?e.slice(i).trim().length===0?Em(e,t)?null:{fenceStart:t,bodyStart:i,langComplete:!1}:null:Y1(n)?(r=gi(e,i),{fenceStart:t,bodyStart:r,langComplete:Sm(n)}):null}function Ps(e,t=0){const r=gi(e,t);return Z1(e,r)}function Fm(e,t,r){if(t<r)return!1;const n=e.slice(t+Sr.length);return n.length===0?!0:n.startsWith("`")?!1:(/^\s*[\r\n]/.test(n)||/^\s*$/.test(n),!0)}function Tu(e,t){let r=t;for(;r<=e.length;){const n=e.indexOf(Sr,r);if(n===-1)return-1;if(Fm(e,n,t))return n;r=n+1}return-1}function Tm(e){const t=Ps(e,0);if(!(t!=null&&t.langComplete))return null;const r=Tu(e,t.bodyStart);return r===-1?null:e.slice(t.bodyStart,r).trim()}function K1(e){return e.replace(/```\s*assistant-widget\s*/gi,"``` assistant-widget\n")}function Bm(e){const t=e.match(/^\s*```\s*([a-zA-Z0-9-]*)$/);return t?Y1(t[1]??""):!1}function Mm(e,t){let r=t;for(;r<e.length;){const n=e.indexOf(Sr,r);if(n===-1)return null;const i=Z1(e,n);if(i)return{fenceIdx:n,open:i};r=n+Sr.length}return null}function Q1(e){if(!e)return!1;const t=Ps(e,0);if(!(t!=null&&t.langComplete))return!1;const r=Tu(e,t.bodyStart);return r===-1?!1:gi(e,r+Sr.length)>=e.length}function Nm(e){if(!e)return!1;if(Q1(e)||Bm(e))return!0;const t=Ps(e,0);return t?t.langComplete?Tu(e,t.bodyStart)===-1:!0:!1}function _m(e){if(!e)return[];const t=[];let r=0;for(;r<e.length;){const n=Mm(e,r);if(!n){const f=e.slice(r);f&&t.push(f);break}const{fenceIdx:i,open:a}=n;if(i>r&&t.push(e.slice(r,i)),!a.langComplete){t.push(e.slice(i));break}const s=Tu(e,a.bodyStart);if(s===-1){t.push(e.slice(i));break}const c=s+Sr.length;t.push(K1(e.slice(i,c))),r=c}return t.filter(n=>n.trim().length>0)}function J1(e){const t=Tm(K1(e.trim()));if(t==null||t==="")return null;try{return JSON.parse(t)}catch(r){return console.error("Failed to parse JSON:",r),null}}function zm(e){var r;const t=J1(e);return((r=t==null?void 0:t.renderer)==null?void 0:r.widgetImplOptions)||{}}const Im=/^```\s*dynamic-component\b[\s\S]*?```$/,Om=/^```\s*dynamic-component\b/,Lm=/^```\s*dynamic-component\b\s*/,Rm=/\s*```\s*$/;function Pm(e){return e.replace(/```\s*dynamic-component\b/g,"``` dynamic-component")}function ed(e){return e.replace(Lm,"").replace(Rm,"").trim()}function Vm(e,t){let r=t;for(;r<e.length;){const n=e.indexOf("```",r);if(n<0)return null;const a=e.slice(n+3).match(/^\s*dynamic-component\b/);if(a)return{fenceStart:n,contentStart:n+3+a[0].length};r=n+3}return null}function Hm(e){return e?Im.test(e)||Om.test(e):!1}function qm(e){const t=ed(e);if(!t)return null;let r;try{r=JSON.parse(t)}catch{return null}if(!r||typeof r!="object"||Array.isArray(r))return null;const n=r;return typeof n.instanceId!="string"?null:{...n,instanceId:n.instanceId,name:typeof n.name=="string"?n.name:void 0,componentId:typeof n.componentId=="string"?n.componentId:void 0,jsUrl:typeof n.jsUrl=="string"?n.jsUrl:"",url:typeof n.url=="string"?n.url:"",title:typeof n.title=="string"?n.title:"预览",position:n.position==="inline"?"inline":"right",width:typeof n.width=="string"?n.width:void 0,isFullscreen:typeof n.isFullscreen=="boolean"?n.isFullscreen:!1,autoOpen:typeof n.autoOpen=="boolean"?n.autoOpen:!1,fileRe:typeof n.fileRe=="string"?n.fileRe:void 0,target:n.target==="preview"||n.target==="previewExtra"?n.target:n.renderArea==="previewExtra"?"previewExtra":n.renderArea==="preview"?"preview":void 0}}function jm(e){const t=ed(e);if(!t)return null;const r=t.match(/"position"\s*:\s*"(inline|right)"/);return r?{position:r[1]}:null}function $m(e){if(!e)return[];const t=[];let r=0;for(;r<e.length;){const n=Vm(e,r);if(!n){const f=e.slice(r);f&&t.push(f);break}const i=e.slice(r,n.fenceStart);i&&t.push(i);const a=e.indexOf("```",n.contentStart);if(a===-1){t.push(e.slice(n.fenceStart));break}const s=a+3,c=e.slice(n.fenceStart,s);t.push(Pm(c)),r=s}return t.filter(n=>n.length>0)}var S0=(e=>(e.Text="text",e.FlowUIComplete="flowui-complete",e.AssistantWidgetComplete="assistant-widget-complete",e.AssistantWidgetPending="assistant-widget-pending",e.DynamicComponentComplete="dynamic-component-complete",e.DynamicComponentPending="dynamic-component-pending",e))(S0||{});function Um(e){var i;if(!e)return[];const t=[],r=new Set,n=_m(e);for(const a of n)if(Nm(a))if(Q1(a)){const s=J1(a);t.push({type:S0.AssistantWidgetComplete,raw:a,widgetData:s,widgetUrl:(i=s==null?void 0:s.renderer)==null?void 0:i.url,widgetImplOptions:zm(a)})}else t.push({type:S0.AssistantWidgetPending,raw:a});else{const s=$m(a);for(const c of s)if(Hm(c))if(c.endsWith("```")){const f=qm(c);if(f!=null&&f.instanceId){if(r.has(f.instanceId))continue;r.add(f.instanceId),t.push({type:S0.DynamicComponentComplete,raw:c,config:f})}}else{const f=jm(c);t.push({type:S0.DynamicComponentPending,raw:c,position:(f==null?void 0:f.position)??null})}else c.trim()&&t.push({type:S0.Text,raw:c})}return t}/*! @license DOMPurify 3.3.3 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.3/LICENSE */const{entries:td,setPrototypeOf:rd,isFrozen:Wm,getPrototypeOf:Gm,getOwnPropertyDescriptor:Xm}=Object;let{freeze:_0,seal:pr,create:Bu}=Object,{apply:Vs,construct:Hs}=typeof Reflect<"u"&&Reflect;_0||(_0=function(t){return t}),pr||(pr=function(t){return t}),Vs||(Vs=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return t.apply(r,i)}),Hs||(Hs=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});const Mu=I0(Array.prototype.forEach),Ym=I0(Array.prototype.lastIndexOf),nd=I0(Array.prototype.pop),bi=I0(Array.prototype.push),Zm=I0(Array.prototype.splice),Nu=I0(String.prototype.toLowerCase),qs=I0(String.prototype.toString),js=I0(String.prototype.match),yi=I0(String.prototype.replace),Km=I0(String.prototype.indexOf),Qm=I0(String.prototype.trim),J0=I0(Object.prototype.hasOwnProperty),z0=I0(RegExp.prototype.test),vi=Jm(TypeError);function I0(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Vs(e,t,n)}}function Jm(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Hs(e,r)}}function lt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Nu;rd&&rd(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const a=r(i);a!==i&&(Wm(t)||(t[n]=a),i=a)}e[i]=!0}return e}function e6(e){for(let t=0;t<e.length;t++)J0(e,t)||(e[t]=null);return e}function $r(e){const t=Bu(null);for(const[r,n]of td(e))J0(e,r)&&(Array.isArray(n)?t[r]=e6(n):n&&typeof n=="object"&&n.constructor===Object?t[r]=$r(n):t[r]=n);return t}function wi(e,t){for(;e!==null;){const n=Xm(e,t);if(n){if(n.get)return I0(n.get);if(typeof n.value=="function")return I0(n.value)}e=Gm(e)}function r(){return null}return r}const ad=_0(["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"]),$s=_0(["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"]),Us=_0(["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"]),t6=_0(["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"]),Ws=_0(["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"]),r6=_0(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),id=_0(["#text"]),ud=_0(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","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","slot"]),Gs=_0(["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","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-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"]),od=_0(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),_u=_0(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),n6=pr(/\{\{[\w\W]*|[\w\W]*\}\}/gm),a6=pr(/<%[\w\W]*|[\w\W]*%>/gm),i6=pr(/\$\{[\w\W]*/gm),u6=pr(/^data-[\-\w.\u00B7-\uFFFF]+$/),o6=pr(/^aria-[\-\w]+$/),sd=pr(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),s6=pr(/^(?:\w+script|data):/i),l6=pr(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ld=pr(/^html$/i),c6=pr(/^[a-z][.\w]*(-[.\w]+)+$/i);var cd=Object.freeze({__proto__:null,ARIA_ATTR:o6,ATTR_WHITESPACE:l6,CUSTOM_ELEMENT:c6,DATA_ATTR:u6,DOCTYPE_NAME:ld,ERB_EXPR:a6,IS_ALLOWED_URI:sd,IS_SCRIPT_OR_DATA:s6,MUSTACHE_EXPR:n6,TMPLIT_EXPR:i6});const xi={element:1,text:3,progressingInstruction:7,comment:8,document:9},d6=function(){return typeof window>"u"?null:window},f6=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},dd=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function fd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:d6();const t=Ue=>fd(Ue);if(t.version="3.3.3",t.removed=[],!e||!e.document||e.document.nodeType!==xi.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:c,Element:f,NodeFilter:p,NamedNodeMap:g=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:m,DOMParser:w,trustedTypes:k}=e,C=f.prototype,B=wi(C,"cloneNode"),_=wi(C,"remove"),T=wi(C,"nextSibling"),S=wi(C,"childNodes"),F=wi(C,"parentNode");if(typeof s=="function"){const Ue=r.createElement("template");Ue.content&&Ue.content.ownerDocument&&(r=Ue.content.ownerDocument)}let z,R="";const{implementation:$,createNodeIterator:Y,createDocumentFragment:q,getElementsByTagName:pe}=r,{importNode:he}=n;let ce=dd();t.isSupported=typeof td=="function"&&typeof F=="function"&&$&&$.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:be,ERB_EXPR:ae,TMPLIT_EXPR:xe,DATA_ATTR:Se,ARIA_ATTR:te,IS_SCRIPT_OR_DATA:ye,ATTR_WHITESPACE:ne,CUSTOM_ELEMENT:Ne}=cd;let{IS_ALLOWED_URI:We}=cd,X=null;const Z=lt({},[...ad,...$s,...Us,...Ws,...id]);let Q=null;const ie=lt({},[...ud,...Gs,...od,..._u]);let fe=Object.seal(Bu(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}})),ke=null,ue=null;const me=Object.seal(Bu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ge=!0,Le=!0,Ye=!1,Ke=!0,ut=!1,ot=!0,st=!1,Xt=!1,$0=!1,Jt=!1,ft=!1,Ce=!1,dr=!0,Da=!1;const Yn="user-content-";let Zn=!0,Vr=!1,U0={},C0=null;const un=lt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Dn=null;const B0=lt({},["audio","video","img","source","image","track"]);let fr=null;const Hr=lt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kn="http://www.w3.org/1998/Math/MathML",oi="http://www.w3.org/2000/svg",qr="http://www.w3.org/1999/xhtml";let Qn=qr,K0=!1,Jn=null;const us=lt({},[Kn,oi,qr],qs);let si=lt({},["mi","mo","mn","ms","mtext"]),ea=lt({},["annotation-xml"]);const gu=lt({},["title","style","font","a","script"]);let ka=null;const Kc=["application/xhtml+xml","text/html"],Qc="text/html";let Vt=null,kt=null;const y=r.createElement("form"),x=function(K){return K instanceof RegExp||K instanceof Function},we=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(kt&&kt===K)){if((!K||typeof K!="object")&&(K={}),K=$r(K),ka=Kc.indexOf(K.PARSER_MEDIA_TYPE)===-1?Qc:K.PARSER_MEDIA_TYPE,Vt=ka==="application/xhtml+xml"?qs:Nu,X=J0(K,"ALLOWED_TAGS")?lt({},K.ALLOWED_TAGS,Vt):Z,Q=J0(K,"ALLOWED_ATTR")?lt({},K.ALLOWED_ATTR,Vt):ie,Jn=J0(K,"ALLOWED_NAMESPACES")?lt({},K.ALLOWED_NAMESPACES,qs):us,fr=J0(K,"ADD_URI_SAFE_ATTR")?lt($r(Hr),K.ADD_URI_SAFE_ATTR,Vt):Hr,Dn=J0(K,"ADD_DATA_URI_TAGS")?lt($r(B0),K.ADD_DATA_URI_TAGS,Vt):B0,C0=J0(K,"FORBID_CONTENTS")?lt({},K.FORBID_CONTENTS,Vt):un,ke=J0(K,"FORBID_TAGS")?lt({},K.FORBID_TAGS,Vt):$r({}),ue=J0(K,"FORBID_ATTR")?lt({},K.FORBID_ATTR,Vt):$r({}),U0=J0(K,"USE_PROFILES")?K.USE_PROFILES:!1,ge=K.ALLOW_ARIA_ATTR!==!1,Le=K.ALLOW_DATA_ATTR!==!1,Ye=K.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ut=K.SAFE_FOR_TEMPLATES||!1,ot=K.SAFE_FOR_XML!==!1,st=K.WHOLE_DOCUMENT||!1,Jt=K.RETURN_DOM||!1,ft=K.RETURN_DOM_FRAGMENT||!1,Ce=K.RETURN_TRUSTED_TYPE||!1,$0=K.FORCE_BODY||!1,dr=K.SANITIZE_DOM!==!1,Da=K.SANITIZE_NAMED_PROPS||!1,Zn=K.KEEP_CONTENT!==!1,Vr=K.IN_PLACE||!1,We=K.ALLOWED_URI_REGEXP||sd,Qn=K.NAMESPACE||qr,si=K.MATHML_TEXT_INTEGRATION_POINTS||si,ea=K.HTML_INTEGRATION_POINTS||ea,fe=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&&x(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(fe.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&x(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(fe.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ut&&(Le=!1),ft&&(Jt=!0),U0&&(X=lt({},id),Q=Bu(null),U0.html===!0&&(lt(X,ad),lt(Q,ud)),U0.svg===!0&&(lt(X,$s),lt(Q,Gs),lt(Q,_u)),U0.svgFilters===!0&&(lt(X,Us),lt(Q,Gs),lt(Q,_u)),U0.mathMl===!0&&(lt(X,Ws),lt(Q,od),lt(Q,_u))),J0(K,"ADD_TAGS")||(me.tagCheck=null),J0(K,"ADD_ATTR")||(me.attributeCheck=null),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?me.tagCheck=K.ADD_TAGS:(X===Z&&(X=$r(X)),lt(X,K.ADD_TAGS,Vt))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?me.attributeCheck=K.ADD_ATTR:(Q===ie&&(Q=$r(Q)),lt(Q,K.ADD_ATTR,Vt))),K.ADD_URI_SAFE_ATTR&<(fr,K.ADD_URI_SAFE_ATTR,Vt),K.FORBID_CONTENTS&&(C0===un&&(C0=$r(C0)),lt(C0,K.FORBID_CONTENTS,Vt)),K.ADD_FORBID_CONTENTS&&(C0===un&&(C0=$r(C0)),lt(C0,K.ADD_FORBID_CONTENTS,Vt)),Zn&&(X["#text"]=!0),st&<(X,["html","head","body"]),X.table&&(lt(X,["tbody"]),delete ke.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw vi('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');z=K.TRUSTED_TYPES_POLICY,R=z.createHTML("")}else z===void 0&&(z=f6(k,i)),z!==null&&typeof R=="string"&&(R=z.createHTML(""));_0&&_0(K),kt=K}},M=lt({},[...$s,...Us,...t6]),H=lt({},[...Ws,...r6]),Tt=function(K){let de=F(K);(!de||!de.tagName)&&(de={namespaceURI:Qn,tagName:"template"});const qe=Nu(K.tagName),Dt=Nu(de.tagName);return Jn[K.namespaceURI]?K.namespaceURI===oi?de.namespaceURI===qr?qe==="svg":de.namespaceURI===Kn?qe==="svg"&&(Dt==="annotation-xml"||si[Dt]):!!M[qe]:K.namespaceURI===Kn?de.namespaceURI===qr?qe==="math":de.namespaceURI===oi?qe==="math"&&ea[Dt]:!!H[qe]:K.namespaceURI===qr?de.namespaceURI===oi&&!ea[Dt]||de.namespaceURI===Kn&&!si[Dt]?!1:!H[qe]&&(gu[qe]||!M[qe]):!!(ka==="application/xhtml+xml"&&Jn[K.namespaceURI]):!1},ze=function(K){bi(t.removed,{element:K});try{F(K).removeChild(K)}catch{_(K)}},$t=function(K,de){try{bi(t.removed,{attribute:de.getAttributeNode(K),from:de})}catch{bi(t.removed,{attribute:null,from:de})}if(de.removeAttribute(K),K==="is")if(Jt||ft)try{ze(de)}catch{}else try{de.setAttribute(K,"")}catch{}},kn=function(K){let de=null,qe=null;if($0)K="<remove></remove>"+K;else{const Yt=js(K,/^[\r\n\t ]+/);qe=Yt&&Yt[0]}ka==="application/xhtml+xml"&&Qn===qr&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const Dt=z?z.createHTML(K):K;if(Qn===qr)try{de=new w().parseFromString(Dt,ka)}catch{}if(!de||!de.documentElement){de=$.createDocument(Qn,"template",null);try{de.documentElement.innerHTML=K0?R:Dt}catch{}}const h0=de.body||de.documentElement;return K&&qe&&h0.insertBefore(r.createTextNode(qe),h0.childNodes[0]||null),Qn===qr?pe.call(de,st?"html":"body")[0]:st?de.documentElement:h0},Ge=function(K){return Y.call(K.ownerDocument||K,K,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},Ht=function(K){return K instanceof m&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof g)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},M0=function(K){return typeof c=="function"&&K instanceof c};function W0(Ue,K,de){Mu(Ue,qe=>{qe.call(t,K,de,kt)})}const U=function(K){let de=null;if(W0(ce.beforeSanitizeElements,K,null),Ht(K))return ze(K),!0;const qe=Vt(K.nodeName);if(W0(ce.uponSanitizeElement,K,{tagName:qe,allowedTags:X}),ot&&K.hasChildNodes()&&!M0(K.firstElementChild)&&z0(/<[/\w!]/g,K.innerHTML)&&z0(/<[/\w!]/g,K.textContent)||K.nodeType===xi.progressingInstruction||ot&&K.nodeType===xi.comment&&z0(/<[/\w]/g,K.data))return ze(K),!0;if(!(me.tagCheck instanceof Function&&me.tagCheck(qe))&&(!X[qe]||ke[qe])){if(!ke[qe]&&J(qe)&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,qe)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(qe)))return!1;if(Zn&&!C0[qe]){const Dt=F(K)||K.parentNode,h0=S(K)||K.childNodes;if(h0&&Dt){const Yt=h0.length;for(let m0=Yt-1;m0>=0;--m0){const zt=B(h0[m0],!0);zt.__removalCount=(K.__removalCount||0)+1,Dt.insertBefore(zt,T(K))}}}return ze(K),!0}return K instanceof f&&!Tt(K)||(qe==="noscript"||qe==="noembed"||qe==="noframes")&&z0(/<\/no(script|embed|frames)/i,K.innerHTML)?(ze(K),!0):(ut&&K.nodeType===xi.text&&(de=K.textContent,Mu([be,ae,xe],Dt=>{de=yi(de,Dt," ")}),K.textContent!==de&&(bi(t.removed,{element:K.cloneNode()}),K.textContent=de)),W0(ce.afterSanitizeElements,K,null),!1)},wr=function(K,de,qe){if(ue[de]||dr&&(de==="id"||de==="name")&&(qe in r||qe in y))return!1;if(!(Le&&!ue[de]&&z0(Se,de))){if(!(ge&&z0(te,de))){if(!(me.attributeCheck instanceof Function&&me.attributeCheck(de,K))){if(!Q[de]||ue[de]){if(!(J(K)&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,K)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(K))&&(fe.attributeNameCheck instanceof RegExp&&z0(fe.attributeNameCheck,de)||fe.attributeNameCheck instanceof Function&&fe.attributeNameCheck(de,K))||de==="is"&&fe.allowCustomizedBuiltInElements&&(fe.tagNameCheck instanceof RegExp&&z0(fe.tagNameCheck,qe)||fe.tagNameCheck instanceof Function&&fe.tagNameCheck(qe))))return!1}else if(!fr[de]){if(!z0(We,yi(qe,ne,""))){if(!((de==="src"||de==="xlink:href"||de==="href")&&K!=="script"&&Km(qe,"data:")===0&&Dn[K])){if(!(Ye&&!z0(ye,yi(qe,ne,"")))){if(qe)return!1}}}}}}}return!0},J=function(K){return K!=="annotation-xml"&&js(K,Ne)},bu=function(K){W0(ce.beforeSanitizeAttributes,K,null);const{attributes:de}=K;if(!de||Ht(K))return;const qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Q,forceKeepAttr:void 0};let Dt=de.length;for(;Dt--;){const h0=de[Dt],{name:Yt,namespaceURI:m0,value:zt}=h0,on=Vt(Yt),yu=zt;let Zt=Yt==="value"?yu:Qm(yu);if(qe.attrName=on,qe.attrValue=Zt,qe.keepAttr=!0,qe.forceKeepAttr=void 0,W0(ce.uponSanitizeAttribute,K,qe),Zt=qe.attrValue,Da&&(on==="id"||on==="name")&&($t(Yt,K),Zt=Yn+Zt),ot&&z0(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Zt)){$t(Yt,K);continue}if(on==="attributename"&&js(Zt,"href")){$t(Yt,K);continue}if(qe.forceKeepAttr)continue;if(!qe.keepAttr){$t(Yt,K);continue}if(!Ke&&z0(/\/>/i,Zt)){$t(Yt,K);continue}ut&&Mu([be,ae,xe],vu=>{Zt=yi(Zt,vu," ")});const ss=Vt(K.nodeName);if(!wr(ss,on,Zt)){$t(Yt,K);continue}if(z&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!m0)switch(k.getAttributeType(ss,on)){case"TrustedHTML":{Zt=z.createHTML(Zt);break}case"TrustedScriptURL":{Zt=z.createScriptURL(Zt);break}}if(Zt!==yu)try{m0?K.setAttributeNS(m0,Yt,Zt):K.setAttribute(Yt,Zt),Ht(K)?ze(K):nd(t.removed)}catch{$t(Yt,K)}}W0(ce.afterSanitizeAttributes,K,null)},os=function Ue(K){let de=null;const qe=Ge(K);for(W0(ce.beforeSanitizeShadowDOM,K,null);de=qe.nextNode();)W0(ce.uponSanitizeShadowNode,de,null),U(de),bu(de),de.content instanceof a&&Ue(de.content);W0(ce.afterSanitizeShadowDOM,K,null)};return t.sanitize=function(Ue){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},de=null,qe=null,Dt=null,h0=null;if(K0=!Ue,K0&&(Ue="<!-->"),typeof Ue!="string"&&!M0(Ue))if(typeof Ue.toString=="function"){if(Ue=Ue.toString(),typeof Ue!="string")throw vi("dirty is not a string, aborting")}else throw vi("toString is not a function");if(!t.isSupported)return Ue;if(Xt||we(K),t.removed=[],typeof Ue=="string"&&(Vr=!1),Vr){if(Ue.nodeName){const zt=Vt(Ue.nodeName);if(!X[zt]||ke[zt])throw vi("root node is forbidden and cannot be sanitized in-place")}}else if(Ue instanceof c)de=kn("<!---->"),qe=de.ownerDocument.importNode(Ue,!0),qe.nodeType===xi.element&&qe.nodeName==="BODY"||qe.nodeName==="HTML"?de=qe:de.appendChild(qe);else{if(!Jt&&!ut&&!st&&Ue.indexOf("<")===-1)return z&&Ce?z.createHTML(Ue):Ue;if(de=kn(Ue),!de)return Jt?null:Ce?R:""}de&&$0&&ze(de.firstChild);const Yt=Ge(Vr?Ue:de);for(;Dt=Yt.nextNode();)U(Dt),bu(Dt),Dt.content instanceof a&&os(Dt.content);if(Vr)return Ue;if(Jt){if(ft)for(h0=q.call(de.ownerDocument);de.firstChild;)h0.appendChild(de.firstChild);else h0=de;return(Q.shadowroot||Q.shadowrootmode)&&(h0=he.call(n,h0,!0)),h0}let m0=st?de.outerHTML:de.innerHTML;return st&&X["!doctype"]&&de.ownerDocument&&de.ownerDocument.doctype&&de.ownerDocument.doctype.name&&z0(ld,de.ownerDocument.doctype.name)&&(m0="<!DOCTYPE "+de.ownerDocument.doctype.name+`>
|
|
2
2
|
`+m0),ut&&Mu([be,ae,xe],zt=>{m0=yi(m0,zt," ")}),z&&Ce?z.createHTML(m0):m0},t.setConfig=function(){let Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};we(Ue),Xt=!0},t.clearConfig=function(){kt=null,Xt=!1},t.isValidAttribute=function(Ue,K,de){kt||we({});const qe=Vt(Ue),Dt=Vt(K);return wr(qe,Dt,de)},t.addHook=function(Ue,K){typeof K=="function"&&bi(ce[Ue],K)},t.removeHook=function(Ue,K){if(K!==void 0){const de=Ym(ce[Ue],K);return de===-1?void 0:Zm(ce[Ue],de,1)[0]}return nd(ce[Ue])},t.removeHooks=function(Ue){ce[Ue]=[]},t.removeAllHooks=function(){ce=dd()},t}var h6=fd();class Te extends Error{constructor(t,r){var n="KaTeX parse error: "+t,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var c=s.lexer.input;i=s.start,a=s.end,i===c.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var f=c.slice(i,a).replace(/[^]/g,"$&̲"),p;i>15?p="…"+c.slice(i-15,i):p=c.slice(0,i);var g;a+15<c.length?g=c.slice(a,a+15)+"…":g=c.slice(a),n+=p+f+g}super(n),this.name="ParseError",Object.setPrototypeOf(this,Te.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}}var m6=/([A-Z])/g,Xs=e=>e.replace(m6,"-$1").toLowerCase(),p6={"&":"&",">":">","<":"<",'"':""","'":"'"},g6=/[&><"']/g,E0=e=>String(e).replace(g6,t=>p6[t]),zu=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?zu(e.body[0]):e:e.type==="font"?zu(e.body):e,b6=new Set(["mathord","textord","atom"]),dn=e=>b6.has(zu(e).type),y6=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},Ys={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand <n>",cliProcessor:e=>e==="Infinity"?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function v6(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class Zs{constructor(t){t===void 0&&(t={}),t=t||{};for(var r of Object.keys(Ys)){var n=Ys[r],i=t[r];this[r]=i!==void 0?n.processor?n.processor(i):i:v6(n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Te("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=y6(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}}class Tn{constructor(t,r,n){this.id=t,this.size=r,this.cramped=n}sup(){return Ur[w6[this.id]]}sub(){return Ur[x6[this.id]]}fracNum(){return Ur[A6[this.id]]}fracDen(){return Ur[D6[this.id]]}cramp(){return Ur[k6[this.id]]}text(){return Ur[C6[this.id]]}isTight(){return this.size>=2}}var Ks=0,Iu=1,Fa=2,fn=3,Ai=4,gr=5,Ta=6,O0=7,Ur=[new Tn(Ks,0,!1),new Tn(Iu,0,!0),new Tn(Fa,1,!1),new Tn(fn,1,!0),new Tn(Ai,2,!1),new Tn(gr,2,!0),new Tn(Ta,3,!1),new Tn(O0,3,!0)],w6=[Ai,gr,Ai,gr,Ta,O0,Ta,O0],x6=[gr,gr,gr,gr,O0,O0,O0,O0],A6=[Fa,fn,Ai,gr,Ta,O0,Ta,O0],D6=[fn,fn,gr,gr,O0,O0,O0,O0],k6=[Iu,Iu,fn,fn,gr,gr,O0,O0],C6=[Ks,Iu,Fa,fn,Fa,fn,Fa,fn],et={DISPLAY:Ur[Ks],TEXT:Ur[Fa],SCRIPT:Ur[Ai],SCRIPTSCRIPT:Ur[Ta]},Qs=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function S6(e){for(var t=0;t<Qs.length;t++)for(var r=Qs[t],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(e>=i[0]&&e<=i[1])return r.name}return null}var Ou=[];Qs.forEach(e=>e.blocks.forEach(t=>Ou.push(...t)));function hd(e){for(var t=0;t<Ou.length;t+=2)if(e>=Ou[t]&&e<=Ou[t+1])return!0;return!1}var Ba=80,E6=function(t,r){return"M95,"+(622+t+r)+`
|
|
3
3
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
4
4
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
@@ -258,7 +258,7 @@ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
|
|
|
258
258
|
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
|
|
259
259
|
l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
260
260
|
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Ma{constructor(t){this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t}toMarkup(){for(var t="",r=0;r<this.children.length;r++)t+=this.children[r].toMarkup();return t}toText(){var t=r=>r.toText();return this.children.map(t).join("")}}var Js={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},L6={ex:!0,em:!0,mu:!0},pd=function(t){return typeof t!="string"&&(t=t.unit),t in Js||t in L6||t==="ex"},qt=function(t,r){var n;if(t.unit in Js)n=Js[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new Te("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},_e=function(t){return+t.toFixed(4)+"em"},Bn=function(t){return t.filter(r=>r).join(" ")},gd=function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},bd=function(t){var r=document.createElement(t);r.className=Bn(this.classes);for(var n of Object.keys(this.style))r.style[n]=this.style[n];for(var i of Object.keys(this.attributes))r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},R6=/[\s"'>/=\x00-\x1f]/,yd=function(t){var r="<"+t;this.classes.length&&(r+=' class="'+E0(Bn(this.classes))+'"');var n="";for(var i of Object.keys(this.style))n+=Xs(i)+":"+this.style[i]+";";n&&(r+=' style="'+E0(n)+'"');for(var a of Object.keys(this.attributes)){if(R6.test(a))throw new Te("Invalid attribute name '"+a+"'");r+=" "+a+'="'+E0(this.attributes[a])+'"'}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+t+">",r};class Na{constructor(t,r,n,i){gd.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return bd.call(this,"span")}toMarkup(){return yd.call(this,"span")}}class Lu{constructor(t,r,n,i){gd.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return bd.call(this,"a")}toMarkup(){return yd.call(this,"a")}}class P6{constructor(t,r,n){this.alt=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");t.src=this.src,t.alt=this.alt,t.className="mord";for(var r of Object.keys(this.style))t.style[r]=this.style[r];return t}toMarkup(){var t='<img src="'+E0(this.src)+'"'+(' alt="'+E0(this.alt)+'"'),r="";for(var n of Object.keys(this.style))r+=Xs(n)+":"+this.style[n]+";";return r&&(t+=' style="'+E0(r)+'"'),t+="'/>",t}}var V6={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class er{constructor(t,r,n,i,a,s,c,f){this.text=t,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=s||0,this.classes=c||[],this.style=f||{},this.maxFontSize=0;var p=S6(this.text.charCodeAt(0));p&&this.classes.push(p+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=V6[this.text])}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=_e(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Bn(this.classes));for(var n of Object.keys(this.style))r=r||document.createElement("span"),r.style[n]=this.style[n];return r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="<span";this.classes.length&&(t=!0,r+=' class="',r+=E0(Bn(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+_e(this.italic)+";");for(var i of Object.keys(this.style))n+=Xs(i)+":"+this.style[i]+";";n&&(t=!0,r+=' style="'+E0(n)+'"');var a=E0(this.text);return t?(r+=">",r+=a,r+="</span>",r):a}}class hn{constructor(t,r){this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var t='<svg xmlns="http://www.w3.org/2000/svg"';for(var r of Object.keys(this.attributes))t+=" "+r+'="'+E0(this.attributes[r])+'"';t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</svg>",t}}class Mn{constructor(t,r){this.pathName=t,this.alternate=r}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",md[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+E0(this.alternate)+'"/>':'<path d="'+E0(md[this.pathName])+'"/>'}}class el{constructor(t){this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="<line";for(var r of Object.keys(this.attributes))t+=" "+r+'="'+E0(this.attributes[r])+'"';return t+="/>",t}}function H6(e){if(e instanceof er)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function q6(e){if(e instanceof Na)return e;throw new Error("Expected span<HtmlDomNode> but got "+String(e)+".")}var j6=e=>e instanceof Na||e instanceof Lu||e instanceof Ma,Wr={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Ru={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},vd={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function $6(e,t){Wr[e]=t}function tl(e,t,r){if(!Wr[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=Wr[t][n];if(!i&&e[0]in vd&&(n=vd[e[0]].charCodeAt(0),i=Wr[t][n]),!i&&r==="text"&&hd(n)&&(i=Wr[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var rl={};function U6(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!rl[t]){var r=rl[t]={cssEmPerMu:Ru.quad[t]/18};for(var n in Ru)Ru.hasOwnProperty(n)&&(r[n]=Ru[n][t])}return rl[t]}var W6={bin:1,close:1,inner:1,open:1,punct:1,rel:1},G6={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Lt={math:{},text:{}};function v(e,t,r,n,i,a){Lt[e][i]={font:t,group:r,replace:n},a&&n&&(Lt[e][n]=Lt[e][i])}var A="math",De="text",N="main",j="ams",Rt="accent-token",He="bin",L0="close",_a="inner",Ze="mathord",t0="op-token",tr="open",Di="punct",W="rel",mn="spacing",ee="textord";v(A,N,W,"≡","\\equiv",!0),v(A,N,W,"≺","\\prec",!0),v(A,N,W,"≻","\\succ",!0),v(A,N,W,"∼","\\sim",!0),v(A,N,W,"⊥","\\perp"),v(A,N,W,"⪯","\\preceq",!0),v(A,N,W,"⪰","\\succeq",!0),v(A,N,W,"≃","\\simeq",!0),v(A,N,W,"∣","\\mid",!0),v(A,N,W,"≪","\\ll",!0),v(A,N,W,"≫","\\gg",!0),v(A,N,W,"≍","\\asymp",!0),v(A,N,W,"∥","\\parallel"),v(A,N,W,"⋈","\\bowtie",!0),v(A,N,W,"⌣","\\smile",!0),v(A,N,W,"⊑","\\sqsubseteq",!0),v(A,N,W,"⊒","\\sqsupseteq",!0),v(A,N,W,"≐","\\doteq",!0),v(A,N,W,"⌢","\\frown",!0),v(A,N,W,"∋","\\ni",!0),v(A,N,W,"∝","\\propto",!0),v(A,N,W,"⊢","\\vdash",!0),v(A,N,W,"⊣","\\dashv",!0),v(A,N,W,"∋","\\owns"),v(A,N,Di,".","\\ldotp"),v(A,N,Di,"⋅","\\cdotp"),v(A,N,Di,"⋅","·"),v(De,N,ee,"⋅","·"),v(A,N,ee,"#","\\#"),v(De,N,ee,"#","\\#"),v(A,N,ee,"&","\\&"),v(De,N,ee,"&","\\&"),v(A,N,ee,"ℵ","\\aleph",!0),v(A,N,ee,"∀","\\forall",!0),v(A,N,ee,"ℏ","\\hbar",!0),v(A,N,ee,"∃","\\exists",!0),v(A,N,ee,"∇","\\nabla",!0),v(A,N,ee,"♭","\\flat",!0),v(A,N,ee,"ℓ","\\ell",!0),v(A,N,ee,"♮","\\natural",!0),v(A,N,ee,"♣","\\clubsuit",!0),v(A,N,ee,"℘","\\wp",!0),v(A,N,ee,"♯","\\sharp",!0),v(A,N,ee,"♢","\\diamondsuit",!0),v(A,N,ee,"ℜ","\\Re",!0),v(A,N,ee,"♡","\\heartsuit",!0),v(A,N,ee,"ℑ","\\Im",!0),v(A,N,ee,"♠","\\spadesuit",!0),v(A,N,ee,"§","\\S",!0),v(De,N,ee,"§","\\S"),v(A,N,ee,"¶","\\P",!0),v(De,N,ee,"¶","\\P"),v(A,N,ee,"†","\\dag"),v(De,N,ee,"†","\\dag"),v(De,N,ee,"†","\\textdagger"),v(A,N,ee,"‡","\\ddag"),v(De,N,ee,"‡","\\ddag"),v(De,N,ee,"‡","\\textdaggerdbl"),v(A,N,L0,"⎱","\\rmoustache",!0),v(A,N,tr,"⎰","\\lmoustache",!0),v(A,N,L0,"⟯","\\rgroup",!0),v(A,N,tr,"⟮","\\lgroup",!0),v(A,N,He,"∓","\\mp",!0),v(A,N,He,"⊖","\\ominus",!0),v(A,N,He,"⊎","\\uplus",!0),v(A,N,He,"⊓","\\sqcap",!0),v(A,N,He,"∗","\\ast"),v(A,N,He,"⊔","\\sqcup",!0),v(A,N,He,"◯","\\bigcirc",!0),v(A,N,He,"∙","\\bullet",!0),v(A,N,He,"‡","\\ddagger"),v(A,N,He,"≀","\\wr",!0),v(A,N,He,"⨿","\\amalg"),v(A,N,He,"&","\\And"),v(A,N,W,"⟵","\\longleftarrow",!0),v(A,N,W,"⇐","\\Leftarrow",!0),v(A,N,W,"⟸","\\Longleftarrow",!0),v(A,N,W,"⟶","\\longrightarrow",!0),v(A,N,W,"⇒","\\Rightarrow",!0),v(A,N,W,"⟹","\\Longrightarrow",!0),v(A,N,W,"↔","\\leftrightarrow",!0),v(A,N,W,"⟷","\\longleftrightarrow",!0),v(A,N,W,"⇔","\\Leftrightarrow",!0),v(A,N,W,"⟺","\\Longleftrightarrow",!0),v(A,N,W,"↦","\\mapsto",!0),v(A,N,W,"⟼","\\longmapsto",!0),v(A,N,W,"↗","\\nearrow",!0),v(A,N,W,"↩","\\hookleftarrow",!0),v(A,N,W,"↪","\\hookrightarrow",!0),v(A,N,W,"↘","\\searrow",!0),v(A,N,W,"↼","\\leftharpoonup",!0),v(A,N,W,"⇀","\\rightharpoonup",!0),v(A,N,W,"↙","\\swarrow",!0),v(A,N,W,"↽","\\leftharpoondown",!0),v(A,N,W,"⇁","\\rightharpoondown",!0),v(A,N,W,"↖","\\nwarrow",!0),v(A,N,W,"⇌","\\rightleftharpoons",!0),v(A,j,W,"≮","\\nless",!0),v(A,j,W,"","\\@nleqslant"),v(A,j,W,"","\\@nleqq"),v(A,j,W,"⪇","\\lneq",!0),v(A,j,W,"≨","\\lneqq",!0),v(A,j,W,"","\\@lvertneqq"),v(A,j,W,"⋦","\\lnsim",!0),v(A,j,W,"⪉","\\lnapprox",!0),v(A,j,W,"⊀","\\nprec",!0),v(A,j,W,"⋠","\\npreceq",!0),v(A,j,W,"⋨","\\precnsim",!0),v(A,j,W,"⪹","\\precnapprox",!0),v(A,j,W,"≁","\\nsim",!0),v(A,j,W,"","\\@nshortmid"),v(A,j,W,"∤","\\nmid",!0),v(A,j,W,"⊬","\\nvdash",!0),v(A,j,W,"⊭","\\nvDash",!0),v(A,j,W,"⋪","\\ntriangleleft"),v(A,j,W,"⋬","\\ntrianglelefteq",!0),v(A,j,W,"⊊","\\subsetneq",!0),v(A,j,W,"","\\@varsubsetneq"),v(A,j,W,"⫋","\\subsetneqq",!0),v(A,j,W,"","\\@varsubsetneqq"),v(A,j,W,"≯","\\ngtr",!0),v(A,j,W,"","\\@ngeqslant"),v(A,j,W,"","\\@ngeqq"),v(A,j,W,"⪈","\\gneq",!0),v(A,j,W,"≩","\\gneqq",!0),v(A,j,W,"","\\@gvertneqq"),v(A,j,W,"⋧","\\gnsim",!0),v(A,j,W,"⪊","\\gnapprox",!0),v(A,j,W,"⊁","\\nsucc",!0),v(A,j,W,"⋡","\\nsucceq",!0),v(A,j,W,"⋩","\\succnsim",!0),v(A,j,W,"⪺","\\succnapprox",!0),v(A,j,W,"≆","\\ncong",!0),v(A,j,W,"","\\@nshortparallel"),v(A,j,W,"∦","\\nparallel",!0),v(A,j,W,"⊯","\\nVDash",!0),v(A,j,W,"⋫","\\ntriangleright"),v(A,j,W,"⋭","\\ntrianglerighteq",!0),v(A,j,W,"","\\@nsupseteqq"),v(A,j,W,"⊋","\\supsetneq",!0),v(A,j,W,"","\\@varsupsetneq"),v(A,j,W,"⫌","\\supsetneqq",!0),v(A,j,W,"","\\@varsupsetneqq"),v(A,j,W,"⊮","\\nVdash",!0),v(A,j,W,"⪵","\\precneqq",!0),v(A,j,W,"⪶","\\succneqq",!0),v(A,j,W,"","\\@nsubseteqq"),v(A,j,He,"⊴","\\unlhd"),v(A,j,He,"⊵","\\unrhd"),v(A,j,W,"↚","\\nleftarrow",!0),v(A,j,W,"↛","\\nrightarrow",!0),v(A,j,W,"⇍","\\nLeftarrow",!0),v(A,j,W,"⇏","\\nRightarrow",!0),v(A,j,W,"↮","\\nleftrightarrow",!0),v(A,j,W,"⇎","\\nLeftrightarrow",!0),v(A,j,W,"△","\\vartriangle"),v(A,j,ee,"ℏ","\\hslash"),v(A,j,ee,"▽","\\triangledown"),v(A,j,ee,"◊","\\lozenge"),v(A,j,ee,"Ⓢ","\\circledS"),v(A,j,ee,"®","\\circledR"),v(De,j,ee,"®","\\circledR"),v(A,j,ee,"∡","\\measuredangle",!0),v(A,j,ee,"∄","\\nexists"),v(A,j,ee,"℧","\\mho"),v(A,j,ee,"Ⅎ","\\Finv",!0),v(A,j,ee,"⅁","\\Game",!0),v(A,j,ee,"‵","\\backprime"),v(A,j,ee,"▲","\\blacktriangle"),v(A,j,ee,"▼","\\blacktriangledown"),v(A,j,ee,"■","\\blacksquare"),v(A,j,ee,"⧫","\\blacklozenge"),v(A,j,ee,"★","\\bigstar"),v(A,j,ee,"∢","\\sphericalangle",!0),v(A,j,ee,"∁","\\complement",!0),v(A,j,ee,"ð","\\eth",!0),v(De,N,ee,"ð","ð"),v(A,j,ee,"╱","\\diagup"),v(A,j,ee,"╲","\\diagdown"),v(A,j,ee,"□","\\square"),v(A,j,ee,"□","\\Box"),v(A,j,ee,"◊","\\Diamond"),v(A,j,ee,"¥","\\yen",!0),v(De,j,ee,"¥","\\yen",!0),v(A,j,ee,"✓","\\checkmark",!0),v(De,j,ee,"✓","\\checkmark"),v(A,j,ee,"ℶ","\\beth",!0),v(A,j,ee,"ℸ","\\daleth",!0),v(A,j,ee,"ℷ","\\gimel",!0),v(A,j,ee,"ϝ","\\digamma",!0),v(A,j,ee,"ϰ","\\varkappa"),v(A,j,tr,"┌","\\@ulcorner",!0),v(A,j,L0,"┐","\\@urcorner",!0),v(A,j,tr,"└","\\@llcorner",!0),v(A,j,L0,"┘","\\@lrcorner",!0),v(A,j,W,"≦","\\leqq",!0),v(A,j,W,"⩽","\\leqslant",!0),v(A,j,W,"⪕","\\eqslantless",!0),v(A,j,W,"≲","\\lesssim",!0),v(A,j,W,"⪅","\\lessapprox",!0),v(A,j,W,"≊","\\approxeq",!0),v(A,j,He,"⋖","\\lessdot"),v(A,j,W,"⋘","\\lll",!0),v(A,j,W,"≶","\\lessgtr",!0),v(A,j,W,"⋚","\\lesseqgtr",!0),v(A,j,W,"⪋","\\lesseqqgtr",!0),v(A,j,W,"≑","\\doteqdot"),v(A,j,W,"≓","\\risingdotseq",!0),v(A,j,W,"≒","\\fallingdotseq",!0),v(A,j,W,"∽","\\backsim",!0),v(A,j,W,"⋍","\\backsimeq",!0),v(A,j,W,"⫅","\\subseteqq",!0),v(A,j,W,"⋐","\\Subset",!0),v(A,j,W,"⊏","\\sqsubset",!0),v(A,j,W,"≼","\\preccurlyeq",!0),v(A,j,W,"⋞","\\curlyeqprec",!0),v(A,j,W,"≾","\\precsim",!0),v(A,j,W,"⪷","\\precapprox",!0),v(A,j,W,"⊲","\\vartriangleleft"),v(A,j,W,"⊴","\\trianglelefteq"),v(A,j,W,"⊨","\\vDash",!0),v(A,j,W,"⊪","\\Vvdash",!0),v(A,j,W,"⌣","\\smallsmile"),v(A,j,W,"⌢","\\smallfrown"),v(A,j,W,"≏","\\bumpeq",!0),v(A,j,W,"≎","\\Bumpeq",!0),v(A,j,W,"≧","\\geqq",!0),v(A,j,W,"⩾","\\geqslant",!0),v(A,j,W,"⪖","\\eqslantgtr",!0),v(A,j,W,"≳","\\gtrsim",!0),v(A,j,W,"⪆","\\gtrapprox",!0),v(A,j,He,"⋗","\\gtrdot"),v(A,j,W,"⋙","\\ggg",!0),v(A,j,W,"≷","\\gtrless",!0),v(A,j,W,"⋛","\\gtreqless",!0),v(A,j,W,"⪌","\\gtreqqless",!0),v(A,j,W,"≖","\\eqcirc",!0),v(A,j,W,"≗","\\circeq",!0),v(A,j,W,"≜","\\triangleq",!0),v(A,j,W,"∼","\\thicksim"),v(A,j,W,"≈","\\thickapprox"),v(A,j,W,"⫆","\\supseteqq",!0),v(A,j,W,"⋑","\\Supset",!0),v(A,j,W,"⊐","\\sqsupset",!0),v(A,j,W,"≽","\\succcurlyeq",!0),v(A,j,W,"⋟","\\curlyeqsucc",!0),v(A,j,W,"≿","\\succsim",!0),v(A,j,W,"⪸","\\succapprox",!0),v(A,j,W,"⊳","\\vartriangleright"),v(A,j,W,"⊵","\\trianglerighteq"),v(A,j,W,"⊩","\\Vdash",!0),v(A,j,W,"∣","\\shortmid"),v(A,j,W,"∥","\\shortparallel"),v(A,j,W,"≬","\\between",!0),v(A,j,W,"⋔","\\pitchfork",!0),v(A,j,W,"∝","\\varpropto"),v(A,j,W,"◀","\\blacktriangleleft"),v(A,j,W,"∴","\\therefore",!0),v(A,j,W,"∍","\\backepsilon"),v(A,j,W,"▶","\\blacktriangleright"),v(A,j,W,"∵","\\because",!0),v(A,j,W,"⋘","\\llless"),v(A,j,W,"⋙","\\gggtr"),v(A,j,He,"⊲","\\lhd"),v(A,j,He,"⊳","\\rhd"),v(A,j,W,"≂","\\eqsim",!0),v(A,N,W,"⋈","\\Join"),v(A,j,W,"≑","\\Doteq",!0),v(A,j,He,"∔","\\dotplus",!0),v(A,j,He,"∖","\\smallsetminus"),v(A,j,He,"⋒","\\Cap",!0),v(A,j,He,"⋓","\\Cup",!0),v(A,j,He,"⩞","\\doublebarwedge",!0),v(A,j,He,"⊟","\\boxminus",!0),v(A,j,He,"⊞","\\boxplus",!0),v(A,j,He,"⋇","\\divideontimes",!0),v(A,j,He,"⋉","\\ltimes",!0),v(A,j,He,"⋊","\\rtimes",!0),v(A,j,He,"⋋","\\leftthreetimes",!0),v(A,j,He,"⋌","\\rightthreetimes",!0),v(A,j,He,"⋏","\\curlywedge",!0),v(A,j,He,"⋎","\\curlyvee",!0),v(A,j,He,"⊝","\\circleddash",!0),v(A,j,He,"⊛","\\circledast",!0),v(A,j,He,"⋅","\\centerdot"),v(A,j,He,"⊺","\\intercal",!0),v(A,j,He,"⋒","\\doublecap"),v(A,j,He,"⋓","\\doublecup"),v(A,j,He,"⊠","\\boxtimes",!0),v(A,j,W,"⇢","\\dashrightarrow",!0),v(A,j,W,"⇠","\\dashleftarrow",!0),v(A,j,W,"⇇","\\leftleftarrows",!0),v(A,j,W,"⇆","\\leftrightarrows",!0),v(A,j,W,"⇚","\\Lleftarrow",!0),v(A,j,W,"↞","\\twoheadleftarrow",!0),v(A,j,W,"↢","\\leftarrowtail",!0),v(A,j,W,"↫","\\looparrowleft",!0),v(A,j,W,"⇋","\\leftrightharpoons",!0),v(A,j,W,"↶","\\curvearrowleft",!0),v(A,j,W,"↺","\\circlearrowleft",!0),v(A,j,W,"↰","\\Lsh",!0),v(A,j,W,"⇈","\\upuparrows",!0),v(A,j,W,"↿","\\upharpoonleft",!0),v(A,j,W,"⇃","\\downharpoonleft",!0),v(A,N,W,"⊶","\\origof",!0),v(A,N,W,"⊷","\\imageof",!0),v(A,j,W,"⊸","\\multimap",!0),v(A,j,W,"↭","\\leftrightsquigarrow",!0),v(A,j,W,"⇉","\\rightrightarrows",!0),v(A,j,W,"⇄","\\rightleftarrows",!0),v(A,j,W,"↠","\\twoheadrightarrow",!0),v(A,j,W,"↣","\\rightarrowtail",!0),v(A,j,W,"↬","\\looparrowright",!0),v(A,j,W,"↷","\\curvearrowright",!0),v(A,j,W,"↻","\\circlearrowright",!0),v(A,j,W,"↱","\\Rsh",!0),v(A,j,W,"⇊","\\downdownarrows",!0),v(A,j,W,"↾","\\upharpoonright",!0),v(A,j,W,"⇂","\\downharpoonright",!0),v(A,j,W,"⇝","\\rightsquigarrow",!0),v(A,j,W,"⇝","\\leadsto"),v(A,j,W,"⇛","\\Rrightarrow",!0),v(A,j,W,"↾","\\restriction"),v(A,N,ee,"‘","`"),v(A,N,ee,"$","\\$"),v(De,N,ee,"$","\\$"),v(De,N,ee,"$","\\textdollar"),v(A,N,ee,"%","\\%"),v(De,N,ee,"%","\\%"),v(A,N,ee,"_","\\_"),v(De,N,ee,"_","\\_"),v(De,N,ee,"_","\\textunderscore"),v(A,N,ee,"∠","\\angle",!0),v(A,N,ee,"∞","\\infty",!0),v(A,N,ee,"′","\\prime"),v(A,N,ee,"△","\\triangle"),v(A,N,ee,"Γ","\\Gamma",!0),v(A,N,ee,"Δ","\\Delta",!0),v(A,N,ee,"Θ","\\Theta",!0),v(A,N,ee,"Λ","\\Lambda",!0),v(A,N,ee,"Ξ","\\Xi",!0),v(A,N,ee,"Π","\\Pi",!0),v(A,N,ee,"Σ","\\Sigma",!0),v(A,N,ee,"Υ","\\Upsilon",!0),v(A,N,ee,"Φ","\\Phi",!0),v(A,N,ee,"Ψ","\\Psi",!0),v(A,N,ee,"Ω","\\Omega",!0),v(A,N,ee,"A","Α"),v(A,N,ee,"B","Β"),v(A,N,ee,"E","Ε"),v(A,N,ee,"Z","Ζ"),v(A,N,ee,"H","Η"),v(A,N,ee,"I","Ι"),v(A,N,ee,"K","Κ"),v(A,N,ee,"M","Μ"),v(A,N,ee,"N","Ν"),v(A,N,ee,"O","Ο"),v(A,N,ee,"P","Ρ"),v(A,N,ee,"T","Τ"),v(A,N,ee,"X","Χ"),v(A,N,ee,"¬","\\neg",!0),v(A,N,ee,"¬","\\lnot"),v(A,N,ee,"⊤","\\top"),v(A,N,ee,"⊥","\\bot"),v(A,N,ee,"∅","\\emptyset"),v(A,j,ee,"∅","\\varnothing"),v(A,N,Ze,"α","\\alpha",!0),v(A,N,Ze,"β","\\beta",!0),v(A,N,Ze,"γ","\\gamma",!0),v(A,N,Ze,"δ","\\delta",!0),v(A,N,Ze,"ϵ","\\epsilon",!0),v(A,N,Ze,"ζ","\\zeta",!0),v(A,N,Ze,"η","\\eta",!0),v(A,N,Ze,"θ","\\theta",!0),v(A,N,Ze,"ι","\\iota",!0),v(A,N,Ze,"κ","\\kappa",!0),v(A,N,Ze,"λ","\\lambda",!0),v(A,N,Ze,"μ","\\mu",!0),v(A,N,Ze,"ν","\\nu",!0),v(A,N,Ze,"ξ","\\xi",!0),v(A,N,Ze,"ο","\\omicron",!0),v(A,N,Ze,"π","\\pi",!0),v(A,N,Ze,"ρ","\\rho",!0),v(A,N,Ze,"σ","\\sigma",!0),v(A,N,Ze,"τ","\\tau",!0),v(A,N,Ze,"υ","\\upsilon",!0),v(A,N,Ze,"ϕ","\\phi",!0),v(A,N,Ze,"χ","\\chi",!0),v(A,N,Ze,"ψ","\\psi",!0),v(A,N,Ze,"ω","\\omega",!0),v(A,N,Ze,"ε","\\varepsilon",!0),v(A,N,Ze,"ϑ","\\vartheta",!0),v(A,N,Ze,"ϖ","\\varpi",!0),v(A,N,Ze,"ϱ","\\varrho",!0),v(A,N,Ze,"ς","\\varsigma",!0),v(A,N,Ze,"φ","\\varphi",!0),v(A,N,He,"∗","*",!0),v(A,N,He,"+","+"),v(A,N,He,"−","-",!0),v(A,N,He,"⋅","\\cdot",!0),v(A,N,He,"∘","\\circ",!0),v(A,N,He,"÷","\\div",!0),v(A,N,He,"±","\\pm",!0),v(A,N,He,"×","\\times",!0),v(A,N,He,"∩","\\cap",!0),v(A,N,He,"∪","\\cup",!0),v(A,N,He,"∖","\\setminus",!0),v(A,N,He,"∧","\\land"),v(A,N,He,"∨","\\lor"),v(A,N,He,"∧","\\wedge",!0),v(A,N,He,"∨","\\vee",!0),v(A,N,ee,"√","\\surd"),v(A,N,tr,"⟨","\\langle",!0),v(A,N,tr,"∣","\\lvert"),v(A,N,tr,"∥","\\lVert"),v(A,N,L0,"?","?"),v(A,N,L0,"!","!"),v(A,N,L0,"⟩","\\rangle",!0),v(A,N,L0,"∣","\\rvert"),v(A,N,L0,"∥","\\rVert"),v(A,N,W,"=","="),v(A,N,W,":",":"),v(A,N,W,"≈","\\approx",!0),v(A,N,W,"≅","\\cong",!0),v(A,N,W,"≥","\\ge"),v(A,N,W,"≥","\\geq",!0),v(A,N,W,"←","\\gets"),v(A,N,W,">","\\gt",!0),v(A,N,W,"∈","\\in",!0),v(A,N,W,"","\\@not"),v(A,N,W,"⊂","\\subset",!0),v(A,N,W,"⊃","\\supset",!0),v(A,N,W,"⊆","\\subseteq",!0),v(A,N,W,"⊇","\\supseteq",!0),v(A,j,W,"⊈","\\nsubseteq",!0),v(A,j,W,"⊉","\\nsupseteq",!0),v(A,N,W,"⊨","\\models"),v(A,N,W,"←","\\leftarrow",!0),v(A,N,W,"≤","\\le"),v(A,N,W,"≤","\\leq",!0),v(A,N,W,"<","\\lt",!0),v(A,N,W,"→","\\rightarrow",!0),v(A,N,W,"→","\\to"),v(A,j,W,"≱","\\ngeq",!0),v(A,j,W,"≰","\\nleq",!0),v(A,N,mn," ","\\ "),v(A,N,mn," ","\\space"),v(A,N,mn," ","\\nobreakspace"),v(De,N,mn," ","\\ "),v(De,N,mn," "," "),v(De,N,mn," ","\\space"),v(De,N,mn," ","\\nobreakspace"),v(A,N,mn,null,"\\nobreak"),v(A,N,mn,null,"\\allowbreak"),v(A,N,Di,",",","),v(A,N,Di,";",";"),v(A,j,He,"⊼","\\barwedge",!0),v(A,j,He,"⊻","\\veebar",!0),v(A,N,He,"⊙","\\odot",!0),v(A,N,He,"⊕","\\oplus",!0),v(A,N,He,"⊗","\\otimes",!0),v(A,N,ee,"∂","\\partial",!0),v(A,N,He,"⊘","\\oslash",!0),v(A,j,He,"⊚","\\circledcirc",!0),v(A,j,He,"⊡","\\boxdot",!0),v(A,N,He,"△","\\bigtriangleup"),v(A,N,He,"▽","\\bigtriangledown"),v(A,N,He,"†","\\dagger"),v(A,N,He,"⋄","\\diamond"),v(A,N,He,"⋆","\\star"),v(A,N,He,"◃","\\triangleleft"),v(A,N,He,"▹","\\triangleright"),v(A,N,tr,"{","\\{"),v(De,N,ee,"{","\\{"),v(De,N,ee,"{","\\textbraceleft"),v(A,N,L0,"}","\\}"),v(De,N,ee,"}","\\}"),v(De,N,ee,"}","\\textbraceright"),v(A,N,tr,"{","\\lbrace"),v(A,N,L0,"}","\\rbrace"),v(A,N,tr,"[","\\lbrack",!0),v(De,N,ee,"[","\\lbrack",!0),v(A,N,L0,"]","\\rbrack",!0),v(De,N,ee,"]","\\rbrack",!0),v(A,N,tr,"(","\\lparen",!0),v(A,N,L0,")","\\rparen",!0),v(De,N,ee,"<","\\textless",!0),v(De,N,ee,">","\\textgreater",!0),v(A,N,tr,"⌊","\\lfloor",!0),v(A,N,L0,"⌋","\\rfloor",!0),v(A,N,tr,"⌈","\\lceil",!0),v(A,N,L0,"⌉","\\rceil",!0),v(A,N,ee,"\\","\\backslash"),v(A,N,ee,"∣","|"),v(A,N,ee,"∣","\\vert"),v(De,N,ee,"|","\\textbar",!0),v(A,N,ee,"∥","\\|"),v(A,N,ee,"∥","\\Vert"),v(De,N,ee,"∥","\\textbardbl"),v(De,N,ee,"~","\\textasciitilde"),v(De,N,ee,"\\","\\textbackslash"),v(De,N,ee,"^","\\textasciicircum"),v(A,N,W,"↑","\\uparrow",!0),v(A,N,W,"⇑","\\Uparrow",!0),v(A,N,W,"↓","\\downarrow",!0),v(A,N,W,"⇓","\\Downarrow",!0),v(A,N,W,"↕","\\updownarrow",!0),v(A,N,W,"⇕","\\Updownarrow",!0),v(A,N,t0,"∐","\\coprod"),v(A,N,t0,"⋁","\\bigvee"),v(A,N,t0,"⋀","\\bigwedge"),v(A,N,t0,"⨄","\\biguplus"),v(A,N,t0,"⋂","\\bigcap"),v(A,N,t0,"⋃","\\bigcup"),v(A,N,t0,"∫","\\int"),v(A,N,t0,"∫","\\intop"),v(A,N,t0,"∬","\\iint"),v(A,N,t0,"∭","\\iiint"),v(A,N,t0,"∏","\\prod"),v(A,N,t0,"∑","\\sum"),v(A,N,t0,"⨂","\\bigotimes"),v(A,N,t0,"⨁","\\bigoplus"),v(A,N,t0,"⨀","\\bigodot"),v(A,N,t0,"∮","\\oint"),v(A,N,t0,"∯","\\oiint"),v(A,N,t0,"∰","\\oiiint"),v(A,N,t0,"⨆","\\bigsqcup"),v(A,N,t0,"∫","\\smallint"),v(De,N,_a,"…","\\textellipsis"),v(A,N,_a,"…","\\mathellipsis"),v(De,N,_a,"…","\\ldots",!0),v(A,N,_a,"…","\\ldots",!0),v(A,N,_a,"⋯","\\@cdots",!0),v(A,N,_a,"⋱","\\ddots",!0),v(A,N,ee,"⋮","\\varvdots"),v(De,N,ee,"⋮","\\varvdots"),v(A,N,Rt,"ˊ","\\acute"),v(A,N,Rt,"ˋ","\\grave"),v(A,N,Rt,"¨","\\ddot"),v(A,N,Rt,"~","\\tilde"),v(A,N,Rt,"ˉ","\\bar"),v(A,N,Rt,"˘","\\breve"),v(A,N,Rt,"ˇ","\\check"),v(A,N,Rt,"^","\\hat"),v(A,N,Rt,"⃗","\\vec"),v(A,N,Rt,"˙","\\dot"),v(A,N,Rt,"˚","\\mathring"),v(A,N,Ze,"","\\@imath"),v(A,N,Ze,"","\\@jmath"),v(A,N,ee,"ı","ı"),v(A,N,ee,"ȷ","ȷ"),v(De,N,ee,"ı","\\i",!0),v(De,N,ee,"ȷ","\\j",!0),v(De,N,ee,"ß","\\ss",!0),v(De,N,ee,"æ","\\ae",!0),v(De,N,ee,"œ","\\oe",!0),v(De,N,ee,"ø","\\o",!0),v(De,N,ee,"Æ","\\AE",!0),v(De,N,ee,"Œ","\\OE",!0),v(De,N,ee,"Ø","\\O",!0),v(De,N,Rt,"ˊ","\\'"),v(De,N,Rt,"ˋ","\\`"),v(De,N,Rt,"ˆ","\\^"),v(De,N,Rt,"˜","\\~"),v(De,N,Rt,"ˉ","\\="),v(De,N,Rt,"˘","\\u"),v(De,N,Rt,"˙","\\."),v(De,N,Rt,"¸","\\c"),v(De,N,Rt,"˚","\\r"),v(De,N,Rt,"ˇ","\\v"),v(De,N,Rt,"¨",'\\"'),v(De,N,Rt,"˝","\\H"),v(De,N,Rt,"◯","\\textcircled");var wd={"--":!0,"---":!0,"``":!0,"''":!0};v(De,N,ee,"–","--",!0),v(De,N,ee,"–","\\textendash"),v(De,N,ee,"—","---",!0),v(De,N,ee,"—","\\textemdash"),v(De,N,ee,"‘","`",!0),v(De,N,ee,"‘","\\textquoteleft"),v(De,N,ee,"’","'",!0),v(De,N,ee,"’","\\textquoteright"),v(De,N,ee,"“","``",!0),v(De,N,ee,"“","\\textquotedblleft"),v(De,N,ee,"”","''",!0),v(De,N,ee,"”","\\textquotedblright"),v(A,N,ee,"°","\\degree",!0),v(De,N,ee,"°","\\degree"),v(De,N,ee,"°","\\textdegree",!0),v(A,N,ee,"£","\\pounds"),v(A,N,ee,"£","\\mathsterling",!0),v(De,N,ee,"£","\\pounds"),v(De,N,ee,"£","\\textsterling",!0),v(A,j,ee,"✠","\\maltese"),v(De,j,ee,"✠","\\maltese");for(var xd='0123456789/@."',nl=0;nl<xd.length;nl++){var Ad=xd.charAt(nl);v(A,N,ee,Ad,Ad)}for(var Dd='0123456789!@*()-=+";:?/.,',al=0;al<Dd.length;al++){var kd=Dd.charAt(al);v(De,N,ee,kd,kd)}for(var Pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",il=0;il<Pu.length;il++){var Vu=Pu.charAt(il);v(A,N,Ze,Vu,Vu),v(De,N,ee,Vu,Vu)}v(A,j,ee,"C","ℂ"),v(De,j,ee,"C","ℂ"),v(A,j,ee,"H","ℍ"),v(De,j,ee,"H","ℍ"),v(A,j,ee,"N","ℕ"),v(De,j,ee,"N","ℕ"),v(A,j,ee,"P","ℙ"),v(De,j,ee,"P","ℙ"),v(A,j,ee,"Q","ℚ"),v(De,j,ee,"Q","ℚ"),v(A,j,ee,"R","ℝ"),v(De,j,ee,"R","ℝ"),v(A,j,ee,"Z","ℤ"),v(De,j,ee,"Z","ℤ"),v(A,N,Ze,"h","ℎ"),v(De,N,Ze,"h","ℎ");for(var Qe="",R0=0;R0<Pu.length;R0++){var Gt=Pu.charAt(R0);Qe=String.fromCharCode(55349,56320+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56372+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56424+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56580+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56684+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56736+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56788+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56840+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56944+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),R0<26&&(Qe=String.fromCharCode(55349,56632+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe),Qe=String.fromCharCode(55349,56476+R0),v(A,N,Ze,Gt,Qe),v(De,N,ee,Gt,Qe))}Qe="𝕜",v(A,N,Ze,"k",Qe),v(De,N,ee,"k",Qe);for(var la=0;la<10;la++){var Nn=la.toString();Qe=String.fromCharCode(55349,57294+la),v(A,N,Ze,Nn,Qe),v(De,N,ee,Nn,Qe),Qe=String.fromCharCode(55349,57314+la),v(A,N,Ze,Nn,Qe),v(De,N,ee,Nn,Qe),Qe=String.fromCharCode(55349,57324+la),v(A,N,Ze,Nn,Qe),v(De,N,ee,Nn,Qe),Qe=String.fromCharCode(55349,57334+la),v(A,N,Ze,Nn,Qe),v(De,N,ee,Nn,Qe)}for(var ul="ÐÞþ",ol=0;ol<ul.length;ol++){var Hu=ul.charAt(ol);v(A,N,Ze,Hu,Hu),v(De,N,ee,Hu,Hu)}var qu=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Cd=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],X6=(e,t)=>{var r=e.charCodeAt(0),n=e.charCodeAt(1),i=(r-55296)*1024+(n-56320)+65536,a=t==="math"?0:1;if(119808<=i&&i<120484){var s=Math.floor((i-119808)/26);return[qu[s][2],qu[s][a]]}else if(120782<=i&&i<=120831){var c=Math.floor((i-120782)/10);return[Cd[c][2],Cd[c][a]]}else{if(i===120485||i===120486)return[qu[0][2],qu[0][a]];if(120486<i&&i<120782)return["",""];throw new Te("Unsupported character: "+e)}},ju=function(t,r,n){if(Lt[n][t]){var i=Lt[n][t].replace;i&&(t=i)}return{value:t,metrics:tl(t,r,n)}},P0=function(t,r,n,i,a){var s=ju(t,r,n),c=s.metrics;t=s.value;var f;if(c){var p=c.italic;(n==="text"||i&&i.font==="mathit")&&(p=0),f=new er(t,c.height,c.depth,p,c.skew,c.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+t+"' in style '"+r+"' and mode '"+n+"'")),f=new er(t,0,0,0,0,0,a);if(i){f.maxFontSize=i.sizeMultiplier,i.style.isTight()&&f.classes.push("mtight");var g=i.getColor();g&&(f.style.color=g)}return f},sl=function(t,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&ju(t,"Main-Bold",r).metrics?P0(t,"Main-Bold",r,n,i.concat(["mathbf"])):t==="\\"||Lt[r][t].font==="main"?P0(t,"Main-Regular",r,n,i):P0(t,"AMS-Regular",r,n,i.concat(["amsrm"]))},Y6=function(t,r,n,i,a){return a!=="textord"&&ju(t,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},$u=function(t,r,n){var i=t.mode,a=t.text,s=["mord"],c=i==="math"||i==="text"&&r.font,f=c?r.font:r.fontFamily,p="",g="";if(a.charCodeAt(0)===55349&&([p,g]=X6(a,i)),p.length>0)return P0(a,p,i,r,s.concat(g));if(f){var m,w;if(f==="boldsymbol"){var k=Y6(a,i,r,s,n);m=k.fontName,w=[k.fontClass]}else c?(m=cl[f].fontName,w=[f]):(m=Uu(f,r.fontWeight,r.fontShape),w=[f,r.fontWeight,r.fontShape]);if(ju(a,m,i).metrics)return P0(a,m,i,r,s.concat(w));if(wd.hasOwnProperty(a)&&m.slice(0,10)==="Typewriter"){for(var C=[],B=0;B<a.length;B++)C.push(P0(a[B],m,i,r,s.concat(w)));return pn(C)}}if(n==="mathord")return P0(a,"Math-Italic",i,r,s.concat(["mathnormal"]));if(n==="textord"){var _=Lt[i][a]&&Lt[i][a].font;if(_==="ams"){var T=Uu("amsrm",r.fontWeight,r.fontShape);return P0(a,T,i,r,s.concat("amsrm",r.fontWeight,r.fontShape))}else if(_==="main"||!_){var S=Uu("textrm",r.fontWeight,r.fontShape);return P0(a,S,i,r,s.concat(r.fontWeight,r.fontShape))}else{var F=Uu(_,r.fontWeight,r.fontShape);return P0(a,F,i,r,s.concat(F,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},Z6=(e,t)=>{if(Bn(e.classes)!==Bn(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Sd=e=>{for(var t=0;t<e.length-1;t++){var r=e[t],n=e[t+1];r instanceof er&&n instanceof er&&Z6(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,e.splice(t+1,1),t--)}return e},ll=function(t){for(var r=0,n=0,i=0,a=0;a<t.children.length;a++){var s=t.children[a];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},Ee=function(t,r,n,i){var a=new Na(t,r,n,i);return ll(a),a},_n=(e,t,r,n)=>new Na(e,t,r,n),za=function(t,r,n){var i=Ee([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=_e(i.height),i.maxFontSize=1,i},K6=function(t,r,n,i){var a=new Lu(t,r,n,i);return ll(a),a},pn=function(t){var r=new Ma(t);return ll(r),r},Ia=function(t,r){return t instanceof Ma?Ee([],[t],r):t},Q6=function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s<r.length;s++){var c=-r[s].shift-a-r[s].elem.depth,f=c-(r[s-1].elem.height+r[s-1].elem.depth);a=a+c,n.push({type:"kern",size:f}),n.push(r[s])}return{children:n,depth:i}}var p;if(t.positionType==="top"){for(var g=t.positionData,m=0;m<t.children.length;m++){var w=t.children[m];g-=w.type==="kern"?w.size:w.elem.height+w.elem.depth}p=g}else if(t.positionType==="bottom")p=-t.positionData;else{var k=t.children[0];if(k.type!=="elem")throw new Error('First child must have type "elem".');if(t.positionType==="shift")p=-k.elem.depth-t.positionData;else if(t.positionType==="firstBaseline")p=-k.elem.depth;else throw new Error("Invalid positionType "+t.positionType+".")}return{children:t.children,depth:p}},pt=function(t,r){for(var{children:n,depth:i}=Q6(t),a=0,s=0;s<n.length;s++){var c=n[s];if(c.type==="elem"){var f=c.elem;a=Math.max(a,f.maxFontSize,f.height)}}a+=2;var p=Ee(["pstrut"],[]);p.style.height=_e(a);for(var g=[],m=i,w=i,k=i,C=0;C<n.length;C++){var B=n[C];if(B.type==="kern")k+=B.size;else{var _=B.elem,T=B.wrapperClasses||[],S=B.wrapperStyle||{},F=Ee(T,[p,_],void 0,S);F.style.top=_e(-a-k-_.depth),B.marginLeft&&(F.style.marginLeft=B.marginLeft),B.marginRight&&(F.style.marginRight=B.marginRight),g.push(F),k+=_.height+_.depth}m=Math.min(m,k),w=Math.max(w,k)}var z=Ee(["vlist"],g);z.style.height=_e(w);var R;if(m<0){var $=Ee([],[]),Y=Ee(["vlist"],[$]);Y.style.height=_e(-m);var q=Ee(["vlist-s"],[new er("")]);R=[Ee(["vlist-r"],[z,q]),Ee(["vlist-r"],[Y])]}else R=[Ee(["vlist-r"],[z])];var pe=Ee(["vlist-t"],R);return R.length===2&&pe.classes.push("vlist-t2"),pe.height=w,pe.depth=-m,pe},Ed=(e,t)=>{var r=Ee(["mspace"],[],t),n=qt(e,t);return r.style.marginRight=_e(n),r},Uu=function(t,r,n){var i="";switch(t){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=t}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},cl={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Fd={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Td=function(t,r){var[n,i,a]=Fd[t],s=new Mn(n),c=new hn([s],{width:_e(i),height:_e(a),style:"width:"+_e(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),f=_n(["overlay"],[c],r);return f.height=a,f.style.height=_e(a),f.style.width=_e(i),f},jt={number:3,unit:"mu"},ca={number:4,unit:"mu"},gn={number:5,unit:"mu"},J6={mord:{mop:jt,mbin:ca,mrel:gn,minner:jt},mop:{mord:jt,mop:jt,mrel:gn,minner:jt},mbin:{mord:ca,mop:ca,mopen:ca,minner:ca},mrel:{mord:gn,mop:gn,mopen:gn,minner:gn},mopen:{},mclose:{mop:jt,mbin:ca,mrel:gn,minner:jt},mpunct:{mord:jt,mop:jt,mrel:gn,mopen:jt,mclose:jt,mpunct:jt,minner:jt},minner:{mord:jt,mop:jt,mbin:ca,mrel:gn,mopen:jt,mpunct:jt,minner:jt}},e5={mord:{mop:jt},mop:{mord:jt,mop:jt},mbin:{},mrel:{},mopen:{},mclose:{mop:jt},mpunct:{},minner:{mop:jt}},Bd={},Wu={},Gu={};function Pe(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,c={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},f=0;f<r.length;++f)Bd[r[f]]=c;t&&(a&&(Wu[t]=a),s&&(Gu[t]=s))}function da(e){var{type:t,htmlBuilder:r,mathmlBuilder:n}=e;Pe({type:t,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var Xu=function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},r0=function(t){return t.type==="ordgroup"?t.body:[t]},t5=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),r5=new Set(["rightmost","mrel","mclose","mpunct"]),n5={display:et.DISPLAY,text:et.TEXT,script:et.SCRIPT,scriptscript:et.SCRIPTSCRIPT},a5={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},d0=function(t,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s<t.length;s++){var c=gt(t[s],r);if(c instanceof Ma){var f=c.children;a.push(...f)}else a.push(c)}if(Sd(a),!n)return a;var p=r;if(t.length===1){var g=t[0];g.type==="sizing"?p=r.havingSize(g.size):g.type==="styling"&&(p=r.havingStyle(n5[g.style]))}var m=Ee([i[0]||"leftmost"],[],r),w=Ee([i[1]||"rightmost"],[],r),k=n==="root";return dl(a,(C,B)=>{var _=B.classes[0],T=C.classes[0];_==="mbin"&&r5.has(T)?B.classes[0]="mord":T==="mbin"&&t5.has(_)&&(C.classes[0]="mord")},{node:m},w,k),dl(a,(C,B)=>{var _,T,S=hl(B),F=hl(C),z=S&&F?C.hasClass("mtight")?(_=e5[S])==null?void 0:_[F]:(T=J6[S])==null?void 0:T[F]:null;if(z)return Ed(z,p)},{node:m},w,k),a},dl=function(t,r,n,i,a){i&&t.push(i);for(var s=0;s<t.length;s++){var c=t[s],f=Md(c);if(f){dl(f.children,r,n,null,a);continue}var p=!c.hasClass("mspace");if(p){var g=r(c,n.node);g&&(n.insertAfter?n.insertAfter(g):(t.unshift(g),s++))}p?n.node=c:a&&c.hasClass("newline")&&(n.node=Ee(["leftmost"])),n.insertAfter=(m=>w=>{t.splice(m+1,0,w),s++})(s)}i&&t.pop()},Md=function(t){return t instanceof Ma||t instanceof Lu||t instanceof Na&&t.hasClass("enclosing")?t:null},fl=function(t,r){var n=Md(t);if(n){var i=n.children;if(i.length){if(r==="right")return fl(i[i.length-1],"right");if(r==="left")return fl(i[0],"left")}}return t},hl=function(t,r){if(!t)return null;r&&(t=fl(t,r));var n=t.classes[0];return a5[n]||null},ki=function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Ee(r.concat(n))},gt=function(t,r,n){if(!t)return Ee();if(Wu[t.type]){var i=Wu[t.type](t,r);if(n&&r.size!==n.size){i=Ee(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Te("Got group of unknown type: '"+t.type+"'")};function Yu(e,t){var r=Ee(["base"],e,t),n=Ee(["strut"]);return n.style.height=_e(r.height+r.depth),r.depth&&(n.style.verticalAlign=_e(-r.depth)),r.children.unshift(n),r}function ml(e,t){var r=null;e.length===1&&e[0].type==="tag"&&(r=e[0].tag,e=e[0].body);var n=d0(e,t,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],s=[],c=0;c<n.length;c++)if(s.push(n[c]),n[c].hasClass("mbin")||n[c].hasClass("mrel")||n[c].hasClass("allowbreak")){for(var f=!1;c<n.length-1&&n[c+1].hasClass("mspace")&&!n[c+1].hasClass("newline");)c++,s.push(n[c]),n[c].hasClass("nobreak")&&(f=!0);f||(a.push(Yu(s,t)),s=[])}else n[c].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(Yu(s,t)),s=[]),a.push(n[c]));s.length>0&&a.push(Yu(s,t));var p;r?(p=Yu(d0(r,t,!0),t),p.classes=["tag"],a.push(p)):i&&a.push(i);var g=Ee(["katex-html"],a);if(g.setAttribute("aria-hidden","true"),p){var m=p.children[0];m.style.height=_e(g.height+g.depth),g.depth&&(m.style.verticalAlign=_e(-g.depth))}return g}function Nd(e){return new Ma(e)}class Be{constructor(t,r,n){this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Bn(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof n0&&this.children[n+1]instanceof n0){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof n0;)i+=this.children[++n].toText();t.appendChild(new n0(i).toNode())}else t.appendChild(this.children[n].toNode());return t}toMarkup(){var t="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(t+=" "+r+'="',t+=E0(this.attributes[r]),t+='"');this.classes.length>0&&(t+=' class ="'+E0(Bn(this.classes))+'"'),t+=">";for(var n=0;n<this.children.length;n++)t+=this.children[n].toMarkup();return t+="</"+this.type+">",t}toText(){return this.children.map(t=>t.toText()).join("")}}class n0{constructor(t){this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return E0(this.toText())}toText(){return this.text}}class _d{constructor(t){this.width=t,t>=.05555&&t<=.05556?this.character=" ":t>=.1666&&t<=.1667?this.character=" ":t>=.2222&&t<=.2223?this.character=" ":t>=.2777&&t<=.2778?this.character=" ":t>=-.05556&&t<=-.05555?this.character=" ":t>=-.1667&&t<=-.1666?this.character=" ":t>=-.2223&&t<=-.2222?this.character=" ":t>=-.2778&&t<=-.2777?this.character=" ":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",_e(this.width)),t}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+_e(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var i5=new Set(["\\imath","\\jmath"]),u5=new Set(["mrow","mtable"]),br=function(t,r,n){return Lt[r][t]&&Lt[r][t].replace&&t.charCodeAt(0)!==55349&&!(wd.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=Lt[r][t].replace),new n0(t)},pl=function(t){return t.length===1?t[0]:new Be("mrow",t)},gl=function(t,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=t.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return t.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=t.text;if(i5.has(a))return null;if(Lt[i][a]){var s=Lt[i][a].replace;s&&(a=s)}var c=cl[n].fontName;return tl(a,c,i)?cl[n].variant:null};function bl(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof n0&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof n0&&r.text===","}else return!1}var rr=function(t,r,n){if(t.length===1){var i=Ct(t[0],r);return n&&i instanceof Be&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,c=0;c<t.length;c++){var f=Ct(t[c],r);if(f instanceof Be&&s instanceof Be){if(f.type==="mtext"&&s.type==="mtext"&&f.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...f.children);continue}else if(f.type==="mn"&&s.type==="mn"){s.children.push(...f.children);continue}else if(bl(f)&&s.type==="mn"){s.children.push(...f.children);continue}else if(f.type==="mn"&&bl(s))f.children=[...s.children,...f.children],a.pop();else if((f.type==="msup"||f.type==="msub")&&f.children.length>=1&&(s.type==="mn"||bl(s))){var p=f.children[0];p instanceof Be&&p.type==="mn"&&(p.children=[...s.children,...p.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var g=s.children[0];if(g instanceof n0&&g.text==="̸"&&(f.type==="mo"||f.type==="mi"||f.type==="mn")){var m=f.children[0];m instanceof n0&&m.text.length>0&&(m.text=m.text.slice(0,1)+"̸"+m.text.slice(1),a.pop())}}}a.push(f),s=f}return a},zn=function(t,r,n){return pl(rr(t,r,n))},Ct=function(t,r){if(!t)return new Be("mrow");if(Gu[t.type]){var n=Gu[t.type](t,r);return n}else throw new Te("Got group of unknown type: '"+t.type+"'")};function zd(e,t,r,n,i){var a=rr(e,r),s;a.length===1&&a[0]instanceof Be&&u5.has(a[0].type)?s=a[0]:s=new Be("mrow",a);var c=new Be("annotation",[new n0(t)]);c.setAttribute("encoding","application/x-tex");var f=new Be("semantics",[s,c]),p=new Be("math",[f]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&p.setAttribute("display","block");var g=i?"katex":"katex-mathml";return Ee([g],[p])}var o5=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Id=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Od=function(t,r){return r.size<2?t:o5[t-1][r.size-1]};class bn{constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||bn.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Id[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(r,t),new bn(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Od(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Id[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=Od(bn.BASESIZE,t);return this.size===r&&this.textSize===bn.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==bn.BASESIZE?["sizing","reset-size"+this.size,"size"+bn.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=U6(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}bn.BASESIZE=6;var Ld=function(t){return new bn({style:t.displayMode?et.DISPLAY:et.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},Rd=function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=Ee(n,[t])}return t},s5=function(t,r,n){var i=Ld(n),a;if(n.output==="mathml")return zd(t,r,i,n.displayMode,!0);if(n.output==="html"){var s=ml(t,i);a=Ee(["katex"],[s])}else{var c=zd(t,r,i,n.displayMode,!1),f=ml(t,i);a=Ee(["katex"],[c,f])}return Rd(a,n)},l5=function(t,r,n){var i=Ld(n),a=ml(t,i),s=Ee(["katex"],[a]);return Rd(s,n)},c5={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",underbracket:"⎵",overbracket:"⎴",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},Zu=function(t){var r=new Be("mo",[new n0(c5[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},d5={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},f5=new Set(["widehat","widecheck","widetilde","utilde"]),Ku=function(t,r){function n(){var c=4e5,f=t.label.slice(1);if(f5.has(f)){var p=t,g=p.base.type==="ordgroup"?p.base.body.length:1,m,w,k;if(g>5)f==="widehat"||f==="widecheck"?(m=420,c=2364,k=.42,w=f+"4"):(m=312,c=2340,k=.34,w="tilde4");else{var C=[1,1,2,2,3,3][g];f==="widehat"||f==="widecheck"?(c=[0,1062,2364,2364,2364][C],m=[0,239,300,360,420][C],k=[0,.24,.3,.3,.36,.42][C],w=f+C):(c=[0,600,1033,2339,2340][C],m=[0,260,286,306,312][C],k=[0,.26,.286,.3,.306,.34][C],w="tilde"+C)}var B=new Mn(w),_=new hn([B],{width:"100%",height:_e(k),viewBox:"0 0 "+c+" "+m,preserveAspectRatio:"none"});return{span:_n([],[_],r),minWidth:0,height:k}}else{var T=[],S=d5[f],[F,z,R]=S,$=R/1e3,Y=F.length,q,pe;if(Y===1){var he=S[3];q=["hide-tail"],pe=[he]}else if(Y===2)q=["halfarrow-left","halfarrow-right"],pe=["xMinYMin","xMaxYMin"];else if(Y===3)q=["brace-left","brace-center","brace-right"],pe=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
261
|
-
`+Y+" children.");for(var ce=0;ce<Y;ce++){var be=new Mn(F[ce]),ae=new hn([be],{width:"400em",height:_e($),viewBox:"0 0 "+c+" "+R,preserveAspectRatio:pe[ce]+" slice"}),xe=_n([q[ce]],[ae],r);if(Y===1)return{span:xe,minWidth:z,height:$};xe.style.height=_e($),T.push(xe)}return{span:Ee(["stretchy"],T,r),minWidth:z,height:$}}}var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=_e(s),a>0&&(i.style.minWidth=_e(a)),i},h5=function(t,r,n,i,a){var s,c=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=Ee(["stretchy",r],[],a),r==="fbox"){var f=a.color&&a.getColor();f&&(s.style.borderColor=f)}}else{var p=[];/^[bx]cancel$/.test(r)&&p.push(new el({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&p.push(new el({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new hn(p,{width:"100%",height:_e(c)});s=_n([],[g],a)}return s.height=c,s.style.height=_e(c),s};function nt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Qu(e){var t=Ju(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ju(e){return e&&(e.type==="atom"||G6.hasOwnProperty(e.type))?e:null}var Pd=e=>{if(e instanceof er)return e;if(j6(e)&&e.children.length===1)return Pd(e.children[0])},yl=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=nt(e.base,"accent"),r=n.base,e.base=r,i=q6(gt(e,t)),e.base=n):(n=nt(e,"accent"),r=n.base);var a=gt(r,t.havingCrampedStyle()),s=n.isShifty&&dn(r),c=0;if(s){var f,p;c=(f=(p=Pd(a))==null?void 0:p.skew)!=null?f:0}var g=n.label==="\\c",m=g?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),w;if(n.isStretchy)w=Ku(n,t),w=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+_e(2*c)+")",marginLeft:_e(2*c)}:void 0}]});else{var k,C;n.label==="\\vec"?(k=Td("vec",t),C=Fd.vec[1]):(k=$u({mode:n.mode,text:n.label},t,"textord"),k=H6(k),k.italic=0,C=k.width,g&&(m+=k.depth)),w=Ee(["accent-body"],[k]);var B=n.label==="\\textcircled";B&&(w.classes.push("accent-full"),m=a.height);var _=c;B||(_-=C/2),w.style.left=_e(_),n.label==="\\textcircled"&&(w.style.top=".2em"),w=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-m},{type:"elem",elem:w}]})}var T=Ee(["mord","accent"],[w],t);return i?(i.children[0]=T,i.height=Math.max(T.height,i.height),i.classes[0]="mord",i):T},Vd=(e,t)=>{var r=e.isStretchy?Zu(e.label):new Be("mo",[br(e.label,e.mode)]),n=new Be("mover",[Ct(e.base,t),r]);return n.setAttribute("accent","true"),n},m5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Pe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Xu(t[0]),n=!m5.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:yl,mathmlBuilder:Vd}),Pe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:yl,mathmlBuilder:Vd}),Pe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=gt(e.base,t),n=Ku(e,t),i=e.label==="\\utilde"?.12:0,a=pt({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return Ee(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=Zu(e.label),n=new Be("munder",[Ct(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var eo=e=>{var t=new Be("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Pe({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=Ia(gt(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(n=t.havingStyle(r.sub()),s=Ia(gt(e.below,n,t),t),s.classes.push(a+"-arrow-pad"));var c=Ku(e,t),f=-t.fontMetrics().axisHeight+.5*c.height,p=-t.fontMetrics().axisHeight-.5*c.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(p-=i.depth);var g;if(s){var m=-t.fontMetrics().axisHeight+s.height+.5*c.height+.111;g=pt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p},{type:"elem",elem:c,shift:f},{type:"elem",elem:s,shift:m}]})}else g=pt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p},{type:"elem",elem:c,shift:f}]});return g.children[0].children[0].children[1].classes.push("svg-align"),Ee(["mrel","x-arrow"],[g],t)},mathmlBuilder(e,t){var r=Zu(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=eo(Ct(e.body,t));if(e.below){var a=eo(Ct(e.below,t));n=new Be("munderover",[r,a,i])}else n=new Be("mover",[r,i])}else if(e.below){var s=eo(Ct(e.below,t));n=new Be("munder",[r,s])}else n=eo(),n=new Be("mover",[r,n]);return n}});function Hd(e,t){var r=d0(e.body,t,!0);return Ee([e.mclass],r,t)}function qd(e,t){var r,n=rr(e.body,t);return e.mclass==="minner"?r=new Be("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Be("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Be("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Pe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:r0(i),isCharacterBox:dn(i)}},htmlBuilder:Hd,mathmlBuilder:qd});var to=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Pe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:to(t[0]),body:r0(t[1]),isCharacterBox:dn(t[1])}}}),Pe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],s;n!=="\\stackrel"?s=to(i):s="mrel";var c={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:r0(i)},f={type:"supsub",mode:a.mode,base:c,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[f],isCharacterBox:dn(f)}},htmlBuilder:Hd,mathmlBuilder:qd}),Pe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:to(t[0]),body:r0(t[0])}},htmlBuilder(e,t){var r=d0(e.body,t,!0),n=Ee([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=rr(e.body,t),n=new Be("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var p5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jd=()=>({type:"styling",body:[],mode:"math",style:"display"}),$d=e=>e.type==="textord"&&e.text==="@",g5=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function b5(e,t,r){var n=p5[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),c=r.callFunction("\\\\cdright",[t[1]],[]),f={type:"ordgroup",mode:"math",body:[i,s,c]};return r.callFunction("\\\\cdparent",[f],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function y5(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Te("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;a<t.length;a++){for(var s=t[a],c=jd(),f=0;f<s.length;f++)if(!$d(s[f]))c.body.push(s[f]);else{n.push(c),f+=1;var p=Qu(s[f]).text,g=new Array(2);if(g[0]={type:"ordgroup",mode:"math",body:[]},g[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(p))if("<>AV".includes(p))for(var m=0;m<2;m++){for(var w=!0,k=f+1;k<s.length;k++){if(g5(s[k],p)){w=!1,f=k;break}if($d(s[k]))throw new Te("Missing a "+p+" character to complete a CD arrow.",s[k]);g[m].body.push(s[k])}if(w)throw new Te("Missing a "+p+" character to complete a CD arrow.",s[f])}else throw new Te('Expected one of "<>AV=|." after @',s[f]);var C=b5(p,g,e),B={type:"styling",body:[C],mode:"math",style:"display"};n.push(B),c=jd()}a%2===0?n.push(c):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var _=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:_,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Pe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Ia(gt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=_e(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Be("mrow",[Ct(e.label,t)]);return r=new Be("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Be("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Pe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ia(gt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Be("mrow",[Ct(e.fragment,t)])}}),Pe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=nt(t[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var c=nt(i[s],"textord");a+=c.text}var f=parseInt(a),p;if(isNaN(f))throw new Te("\\@char has non-numeric argument "+a);if(f<0||f>=1114111)throw new Te("\\@char with invalid code point "+a);return f<=65535?p=String.fromCharCode(f):(f-=65536,p=String.fromCharCode((f>>10)+55296,(f&1023)+56320)),{type:"textord",mode:r.mode,text:p}}});var Ud=(e,t)=>{var r=d0(e.body,t.withColor(e.color),!1);return pn(r)},Wd=(e,t)=>{var r=rr(e.body,t.withColor(e.color)),n=new Be("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Pe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=nt(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:r0(i)}},htmlBuilder:Ud,mathmlBuilder:Wd}),Pe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=nt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Ud,mathmlBuilder:Wd}),Pe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&nt(i,"size").value}},htmlBuilder(e,t){var r=Ee(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=_e(qt(e.size,t)))),r},mathmlBuilder(e,t){var r=new Be("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",_e(qt(e.size,t)))),r}});var vl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gd=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Te("Expected a control sequence",e);return t},v5=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Xd=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};Pe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(vl[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=vl[n.text]),nt(t.parseFunction(),"internal");throw new Te("Invalid token after macro prefix",n)}}),Pe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Te("Expected a control sequence",n);for(var a=0,s,c=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),c[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Te('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Te('Argument number "'+n.text+'" out of order');a++,c.push([])}else{if(n.text==="EOF")throw new Te("Expected a macro definition");c[a].push(n.text)}var{tokens:f}=t.gullet.consumeArg();return s&&f.unshift(s),(r==="\\edef"||r==="\\xdef")&&(f=t.gullet.expandTokens(f),f.reverse()),t.gullet.macros.set(i,{tokens:f,numArgs:a,delimiters:c},r===vl[r]),{type:"internal",mode:t.mode}}}),Pe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Gd(t.gullet.popToken());t.gullet.consumeSpaces();var i=v5(t);return Xd(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}}),Pe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Gd(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Xd(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Ci=function(t,r,n){var i=Lt.math[t]&&Lt.math[t].replace,a=tl(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},wl=function(t,r,n,i){var a=n.havingBaseStyle(r),s=Ee(i.concat(a.sizingClasses(n)),[t],n),c=a.sizeMultiplier/n.sizeMultiplier;return s.height*=c,s.depth*=c,s.maxFontSize=a.sizeMultiplier,s},Yd=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=_e(a),t.height-=a,t.depth+=a},w5=function(t,r,n,i,a,s){var c=P0(t,"Main-Regular",a,i),f=wl(c,r,i,s);return Yd(f,i,r),f},x5=function(t,r,n,i){return P0(t,"Size"+r+"-Regular",n,i)},Zd=function(t,r,n,i,a,s){var c=x5(t,r,a,i),f=wl(Ee(["delimsizing","size"+r],[c],i),et.TEXT,i,s);return n&&Yd(f,i,et.TEXT),f},xl=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Ee(["delimsizinginner",i],[Ee([],[P0(t,r,n)])]);return{type:"elem",elem:a}},Al=function(t,r,n){var i=Wr["Size4-Regular"][t.charCodeAt(0)]?Wr["Size4-Regular"][t.charCodeAt(0)][4]:Wr["Size1-Regular"][t.charCodeAt(0)][4],a=new Mn("inner",I6(t,Math.round(1e3*r))),s=new hn([a],{width:_e(i),height:_e(r),style:"width:"+_e(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),c=_n([],[s],n);return c.height=r,c.style.height=_e(r),c.style.width=_e(i),{type:"elem",elem:c}},Dl=.008,ro={type:"kern",size:-1*Dl},A5=new Set(["|","\\lvert","\\rvert","\\vert"]),D5=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Kd=function(t,r,n,i,a,s){var c,f,p,g,m="",w=0;c=p=g=t,f=null;var k="Size1-Regular";t==="\\uparrow"?p=g="⏐":t==="\\Uparrow"?p=g="‖":t==="\\downarrow"?c=p="⏐":t==="\\Downarrow"?c=p="‖":t==="\\updownarrow"?(c="\\uparrow",p="⏐",g="\\downarrow"):t==="\\Updownarrow"?(c="\\Uparrow",p="‖",g="\\Downarrow"):A5.has(t)?(p="∣",m="vert",w=333):D5.has(t)?(p="∥",m="doublevert",w=556):t==="["||t==="\\lbrack"?(c="⎡",p="⎢",g="⎣",k="Size4-Regular",m="lbrack",w=667):t==="]"||t==="\\rbrack"?(c="⎤",p="⎥",g="⎦",k="Size4-Regular",m="rbrack",w=667):t==="\\lfloor"||t==="⌊"?(p=c="⎢",g="⎣",k="Size4-Regular",m="lfloor",w=667):t==="\\lceil"||t==="⌈"?(c="⎡",p=g="⎢",k="Size4-Regular",m="lceil",w=667):t==="\\rfloor"||t==="⌋"?(p=c="⎥",g="⎦",k="Size4-Regular",m="rfloor",w=667):t==="\\rceil"||t==="⌉"?(c="⎤",p=g="⎥",k="Size4-Regular",m="rceil",w=667):t==="("||t==="\\lparen"?(c="⎛",p="⎜",g="⎝",k="Size4-Regular",m="lparen",w=875):t===")"||t==="\\rparen"?(c="⎞",p="⎟",g="⎠",k="Size4-Regular",m="rparen",w=875):t==="\\{"||t==="\\lbrace"?(c="⎧",f="⎨",g="⎩",p="⎪",k="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(c="⎫",f="⎬",g="⎭",p="⎪",k="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(c="⎧",g="⎩",p="⎪",k="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(c="⎫",g="⎭",p="⎪",k="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(c="⎧",g="⎭",p="⎪",k="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(c="⎫",g="⎩",p="⎪",k="Size4-Regular");var C=Ci(c,k,a),B=C.height+C.depth,_=Ci(p,k,a),T=_.height+_.depth,S=Ci(g,k,a),F=S.height+S.depth,z=0,R=1;if(f!==null){var $=Ci(f,k,a);z=$.height+$.depth,R=2}var Y=B+F+z,q=Math.max(0,Math.ceil((r-Y)/(R*T))),pe=Y+q*R*T,he=i.fontMetrics().axisHeight;n&&(he*=i.sizeMultiplier);var ce=pe/2-he,be=[];if(m.length>0){var ae=pe-B-F,xe=Math.round(pe*1e3),Se=O6(m,Math.round(ae*1e3)),te=new Mn(m,Se),ye=_e(w/1e3),ne=_e(xe/1e3),Ne=new hn([te],{width:ye,height:ne,viewBox:"0 0 "+w+" "+xe}),We=_n([],[Ne],i);We.height=xe/1e3,We.style.width=ye,We.style.height=ne,be.push({type:"elem",elem:We})}else{if(be.push(xl(g,k,a)),be.push(ro),f===null){var X=pe-B-F+2*Dl;be.push(Al(p,X,i))}else{var Z=(pe-B-F-z)/2+2*Dl;be.push(Al(p,Z,i)),be.push(ro),be.push(xl(f,k,a)),be.push(ro),be.push(Al(p,Z,i))}be.push(ro),be.push(xl(c,k,a))}var Q=i.havingBaseStyle(et.TEXT),ue=pt({positionType:"bottom",positionData:ce,children:be});return wl(Ee(["delimsizing","mult"],[ue],Q),et.TEXT,i,s)},kl=80,Cl=.08,Sl=function(t,r,n,i,a){var s=z6(t,i,n),c=new Mn(t,s),f=new hn([c],{width:"400em",height:_e(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return _n(["hide-tail"],[f],a)},k5=function(t,r){var n=r.havingBaseSizing(),i=r2("\\surd",t*n.sizeMultiplier,t2,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),c,f=0,p=0,g=0,m;return i.type==="small"?(g=1e3+1e3*s+kl,t<1?a=1:t<1.4&&(a=.7),f=(1+s+Cl)/a,p=(1+s)/a,c=Sl("sqrtMain",f,g,s,r),c.style.minWidth="0.853em",m=.833/a):i.type==="large"?(g=(1e3+kl)*Si[i.size],p=(Si[i.size]+s)/a,f=(Si[i.size]+s+Cl)/a,c=Sl("sqrtSize"+i.size,f,g,s,r),c.style.minWidth="1.02em",m=1/a):(f=t+s+Cl,p=t+s,g=Math.floor(1e3*t+s)+kl,c=Sl("sqrtTall",f,g,s,r),c.style.minWidth="0.742em",m=1.056),c.height=p,c.style.height=_e(f),{span:c,advanceWidth:m,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},Qd=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),C5=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Jd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Si=[0,1.2,1.8,2.4,3],e2=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Qd.has(t)||Jd.has(t))return Zd(t,r,!1,n,i,a);if(C5.has(t))return Kd(t,Si[r],!1,n,i,a);throw new Te("Illegal delimiter: '"+t+"'")},S5=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],E5=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"stack"}],t2=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],F5=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},r2=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length;s++){var c=n[s];if(c.type==="stack")break;var f=Ci(t,F5(c),"math"),p=f.height+f.depth;if(c.type==="small"){var g=i.havingBaseStyle(c.style);p*=g.sizeMultiplier}if(p>r)return c}return n[n.length-1]},El=function(t,r,n,i,a,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var c;Jd.has(t)?c=S5:Qd.has(t)?c=t2:c=E5;var f=r2(t,r,c,i);return f.type==="small"?w5(t,f.style,n,i,a,s):f.type==="large"?Zd(t,f.size,n,i,a,s):Kd(t,r,n,i,a,s)},Fl=function(t,r,n,i,a,s){var c=i.fontMetrics().axisHeight*i.sizeMultiplier,f=901,p=5/i.fontMetrics().ptPerEm,g=Math.max(r-c,n+c),m=Math.max(g/500*f,2*g-p);return El(t,m,!0,i,a,s)},n2={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},T5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function no(e,t){var r=Ju(e);if(r&&T5.has(r.text))return r;throw r?new Te("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new Te("Invalid delimiter type '"+e.type+"'",e)}Pe({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=no(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:n2[e.funcName].size,mclass:n2[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?Ee([e.mclass]):e2(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(br(e.delim,e.mode));var r=new Be("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=_e(Si[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function a2(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Pe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:no(t[0],e).text,color:r}}}),Pe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=no(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=nt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{a2(e);for(var r=d0(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=t.sizeMultiplier,i*=t.sizeMultiplier;var c;if(e.left==="."?c=ki(t,["mopen"]):c=Fl(e.left,n,i,t,e.mode,["mopen"]),r.unshift(c),a)for(var f=1;f<r.length;f++){var p=r[f],g=p.isMiddle;g&&(r[f]=Fl(g.delim,n,i,g.options,e.mode,[]))}var m;if(e.right===".")m=ki(t,["mclose"]);else{var w=e.rightColor?t.withColor(e.rightColor):t;m=Fl(e.right,n,i,w,e.mode,["mclose"])}return r.push(m),Ee(["minner"],r,t)},mathmlBuilder:(e,t)=>{a2(e);var r=rr(e.body,t);if(e.left!=="."){var n=new Be("mo",[br(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new Be("mo",[br(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return pl(r)}}),Pe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=no(t[0],e);if(!e.parser.leftrightDepth)throw new Te("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=ki(t,[]);else{r=e2(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?br("|","text"):br(e.delim,e.mode),n=new Be("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var ao=(e,t)=>{var r=Ia(gt(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,s=0,c=dn(e.body);if(n==="sout")a=Ee(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var f=qt({number:.6,unit:"pt"},t),p=qt({number:.35,unit:"ex"},t),g=t.havingBaseSizing();i=i/g.sizeMultiplier;var m=r.height+r.depth+f+p;r.style.paddingLeft=_e(m/2+f);var w=Math.floor(1e3*m*i),k=N6(w),C=new hn([new Mn("phase",k)],{width:"400em",height:_e(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});a=_n(["hide-tail"],[C],t),a.style.height=_e(m),s=r.depth+f+p}else{/cancel/.test(n)?c||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var B=0,_=0,T=0;/box/.test(n)?(T=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),B=t.fontMetrics().fboxsep+(n==="colorbox"?0:T),_=B):n==="angl"?(T=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),B=4*T,_=Math.max(0,.25-r.depth)):(B=c?.2:0,_=B),a=h5(r,n,B,_,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=_e(T)):n==="angl"&&T!==.049&&(a.style.borderTopWidth=_e(T),a.style.borderRightWidth=_e(T)),s=r.depth+_,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var S;if(e.backgroundColor)S=pt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var F=/cancel|phase/.test(n)?["svg-align"]:[];S=pt({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:F}]})}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!c?Ee(["mord","cancel-lap"],[S],t):Ee(["mord"],[S],t)},io=(e,t)=>{var r=0,n=new Be(e.label.includes("colorbox")?"mpadded":"menclose",[Ct(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+_e(i)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Pe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=nt(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=nt(t[0],"color-token").color,s=nt(t[1],"color-token").color,c=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:c}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),Pe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var i2={};function Gr(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,c={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},f=0;f<r.length;++f)i2[r[f]]=c;a&&(Wu[t]=a),s&&(Gu[t]=s)}var u2={};function O(e,t){u2[e]=t}class X0{constructor(t,r,n){this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new X0(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}let Er=class sm{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new sm(r,X0.range(this,t))}};function o2(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var uo=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Te("{"+e.envName+"} can be used only in display mode.")},B5=new Set(["gather","gather*"]);function Tl(e){if(!e.includes("ed"))return!e.includes("*")}function In(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:c,autoTag:f,singleRow:p,emptySingleRow:g,maxNumCols:m,leqno:w}=t;if(e.gullet.beginGroup(),p||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var k=e.gullet.expandMacroAsText("\\arraystretch");if(k==null)s=1;else if(s=parseFloat(k),!s||s<0)throw new Te("Invalid \\arraystretch: "+k)}e.gullet.beginGroup();var C=[],B=[C],_=[],T=[],S=f!=null?[]:void 0;function F(){f&&e.gullet.macros.set("\\@eqnsw","1",!0)}function z(){S&&(e.gullet.macros.get("\\df@tag")?(S.push(e.subparse([new Er("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!f&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),T.push(o2(e));;){var R=e.parseExpression(!1,p?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var $={type:"ordgroup",mode:e.mode,body:R};r&&($={type:"styling",mode:e.mode,style:r,body:[$]}),C.push($);var Y=e.fetch().text;if(Y==="&"){if(m&&C.length===m){if(p||c)throw new Te("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(Y==="\\end"){z(),C.length===1&&$.type==="styling"&&$.body.length===1&&$.body[0].type==="ordgroup"&&$.body[0].body.length===0&&(B.length>1||!g)&&B.pop(),T.length<B.length+1&&T.push([]);break}else if(Y==="\\\\"){e.consume();var q=void 0;e.gullet.future().text!==" "&&(q=e.parseSizeGroup(!0)),_.push(q?q.value:null),z(),T.push(o2(e)),C=[],B.push(C),F()}else throw new Te("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:B,cols:a,rowGaps:_,hskipBeforeAndAfter:n,hLinesBeforeRow:T,colSeparationType:c,tags:S,leqno:w}}function Bl(e){return e.slice(0,1)==="d"?"display":"text"}var Xr=function(t,r){var n,i,a=t.body.length,s=t.hLinesBeforeRow,c=0,f=new Array(a),p=[],g=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),m=1/r.fontMetrics().ptPerEm,w=5*m;if(t.colSeparationType&&t.colSeparationType==="small"){var k=r.havingStyle(et.SCRIPT).sizeMultiplier;w=.2778*(k/r.sizeMultiplier)}var C=t.colSeparationType==="CD"?qt({number:3,unit:"ex"},r):12*m,B=3*m,_=t.arraystretch*C,T=.7*_,S=.3*_,F=0;function z(un){for(var Dn=0;Dn<un.length;++Dn)Dn>0&&(F+=.25),p.push({pos:F,isDashed:un[Dn]})}for(z(s[0]),n=0;n<t.body.length;++n){var R=t.body[n],$=T,Y=S;c<R.length&&(c=R.length);var q=new Array(R.length);for(i=0;i<R.length;++i){var pe=gt(R[i],r);Y<pe.depth&&(Y=pe.depth),$<pe.height&&($=pe.height),q[i]=pe}var he=t.rowGaps[n],ce=0;he&&(ce=qt(he,r),ce>0&&(ce+=S,Y<ce&&(Y=ce),ce=0)),t.addJot&&n<t.body.length-1&&(Y+=B),q.height=$,q.depth=Y,F+=$,q.pos=F,F+=Y+ce,f[n]=q,z(s[n+1])}var be=F/2+r.fontMetrics().axisHeight,ae=t.cols||[],xe=[],Se,te,ye=[];if(t.tags&&t.tags.some(un=>un))for(n=0;n<a;++n){var ne=f[n],Ne=ne.pos-be,We=t.tags[n],X=void 0;We===!0?X=Ee(["eqn-num"],[],r):We===!1?X=Ee([],[],r):X=Ee([],d0(We,r,!0),r),X.depth=ne.depth,X.height=ne.height,ye.push({type:"elem",elem:X,shift:Ne})}for(i=0,te=0;i<c||te<ae.length;++i,++te){for(var Z,Q=ae[te],ue=!0;((fe=Q)==null?void 0:fe.type)==="separator";){var fe;if(ue||(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(r.fontMetrics().doubleRuleSep),xe.push(Se)),Q.separator==="|"||Q.separator===":"){var ke=Q.separator==="|"?"solid":"dashed",ie=Ee(["vertical-separator"],[],r);ie.style.height=_e(F),ie.style.borderRightWidth=_e(g),ie.style.borderRightStyle=ke,ie.style.margin="0 "+_e(-g/2);var me=F-be;me&&(ie.style.verticalAlign=_e(-me)),xe.push(ie)}else throw new Te("Invalid separator type: "+Q.separator);te++,Q=ae[te],ue=!1}if(!(i>=c)){var ge=void 0;if(i>0||t.hskipBeforeAndAfter){var Le,Ye;ge=(Le=(Ye=Q)==null?void 0:Ye.pregap)!=null?Le:w,ge!==0&&(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(ge),xe.push(Se))}var Ke=[];for(n=0;n<a;++n){var ut=f[n],ot=ut[i];if(ot){var st=ut.pos-be;ot.depth=ut.depth,ot.height=ut.height,Ke.push({type:"elem",elem:ot,shift:st})}}var Xt=pt({positionType:"individualShift",children:Ke}),$0=Ee(["col-align-"+(((Z=Q)==null?void 0:Z.align)||"c")],[Xt]);if(xe.push($0),i<c-1||t.hskipBeforeAndAfter){var Jt,ft;ge=(Jt=(ft=Q)==null?void 0:ft.postgap)!=null?Jt:w,ge!==0&&(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(ge),xe.push(Se))}}}var Ce=Ee(["mtable"],xe);if(p.length>0){for(var dr=za("hline",r,g),Da=za("hdashline",r,g),Yn=[{type:"elem",elem:Ce,shift:0}];p.length>0;){var Zn=p.pop(),Vr=Zn.pos-be;Zn.isDashed?Yn.push({type:"elem",elem:Da,shift:Vr}):Yn.push({type:"elem",elem:dr,shift:Vr})}Ce=pt({positionType:"individualShift",children:Yn})}if(ye.length===0)return Ee(["mord"],[Ce],r);var U0=pt({positionType:"individualShift",children:ye}),C0=Ee(["tag"],[U0],r);return pn([Ce,C0])},M5={c:"center ",l:"left ",r:"right "},Yr=function(t,r){for(var n=[],i=new Be("mtd",[],["mtr-glue"]),a=new Be("mtd",[],["mml-eqn-num"]),s=0;s<t.body.length;s++){for(var c=t.body[s],f=[],p=0;p<c.length;p++)f.push(new Be("mtd",[Ct(c[p],r)]));t.tags&&t.tags[s]&&(f.unshift(i),f.push(i),t.leqno?f.unshift(a):f.push(a)),n.push(new Be("mtr",f))}var g=new Be("mtable",n),m=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);g.setAttribute("rowspacing",_e(m));var w="",k="";if(t.cols&&t.cols.length>0){var C=t.cols,B="",_=!1,T=0,S=C.length;C[0].type==="separator"&&(w+="top ",T=1),C[C.length-1].type==="separator"&&(w+="bottom ",S-=1);for(var F=T;F<S;F++){var z=C[F];z.type==="align"?(k+=M5[z.align],_&&(B+="none "),_=!0):z.type==="separator"&&_&&(B+=z.separator==="|"?"solid ":"dashed ",_=!1)}g.setAttribute("columnalign",k.trim()),/[sd]/.test(B)&&g.setAttribute("columnlines",B.trim())}if(t.colSeparationType==="align"){for(var R=t.cols||[],$="",Y=1;Y<R.length;Y++)$+=Y%2?"0em ":"1em ";g.setAttribute("columnspacing",$.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?g.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?g.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?g.setAttribute("columnspacing","0.5em"):g.setAttribute("columnspacing","1em");var q="",pe=t.hLinesBeforeRow;w+=pe[0].length>0?"left ":"",w+=pe[pe.length-1].length>0?"right ":"";for(var he=1;he<pe.length-1;he++)q+=pe[he].length===0?"none ":pe[he][0]?"dashed ":"solid ";return/[sd]/.test(q)&&g.setAttribute("rowlines",q.trim()),w!==""&&(g=new Be("menclose",[g]),g.setAttribute("notation",w.trim())),t.arraystretch&&t.arraystretch<1&&(g=new Be("mstyle",[g]),g.setAttribute("scriptlevel","1")),g},s2=function(t,r){t.envName.includes("ed")||uo(t);var n=[],i=t.envName.includes("at")?"alignat":"align",a=t.envName==="split",s=In(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:Tl(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),c=0,f=0,p={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var g="",m=0;m<r[0].body.length;m++){var w=nt(r[0].body[m],"textord");g+=w.text}c=Number(g),f=c*2}var k=!f;s.body.forEach(function(T){for(var S=1;S<T.length;S+=2){var F=nt(T[S],"styling"),z=nt(F.body[0],"ordgroup");z.body.unshift(p)}if(k)f<T.length&&(f=T.length);else{var R=T.length/2;if(c<R)throw new Te("Too many math in a row: "+("expected "+c+", but got "+R),T[0])}});for(var C=0;C<f;++C){var B="r",_=0;C%2===1?B="l":C>0&&k&&(_=1),n[C]={type:"align",align:B,pregap:_,postgap:0}}return s.colSeparationType=k?"align":"alignat",s};Gr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=Ju(t[0]),n=r?[t[0]]:nt(t[0],"ordgroup").body,i=n.map(function(s){var c=Qu(s),f=c.text;if("lcr".includes(f))return{type:"align",align:f};if(f==="|")return{type:"separator",separator:"|"};if(f===":")return{type:"separator",separator:":"};throw new Te("Unknown column alignment: "+f,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return In(e.parser,a,Bl(e.envName))},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new Te("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=In(e.parser,n,Bl(e.envName)),s=Math.max(0,...a.body.map(c=>c.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=In(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=Ju(t[0]),n=r?[t[0]]:nt(t[0],"ordgroup").body,i=n.map(function(c){var f=Qu(c),p=f.text;if("lc".includes(p))return{type:"align",align:p};throw new Te("Unknown column alignment: "+p,c)});if(i.length>1)throw new Te("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},s=In(e.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new Te("{subarray} can contain only one column");return s},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=In(e.parser,t,Bl(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:s2,htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){B5.has(e.envName)&&uo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return In(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:s2,htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){uo(e);var t={autoTag:Tl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return In(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["CD"],props:{numArgs:0},handler(e){return uo(e),y5(e.parser)},htmlBuilder:Xr,mathmlBuilder:Yr}),O("\\nonumber","\\gdef\\@eqnsw{0}"),O("\\notag","\\nonumber"),Pe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Te(e.funcName+" valid only within array environment")}});var l2=i2;Pe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new Te("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=nt(i.body[s],"textord").text;if(n==="\\begin"){if(!l2.hasOwnProperty(a))throw new Te("No such environment: "+a,i);var c=l2[a],{args:f,optArgs:p}=r.parseArguments("\\begin{"+a+"}",c),g={mode:r.mode,envName:a,parser:r},m=c.handler(g,f,p);r.expect("\\end",!1);var w=r.nextToken,k=nt(r.parseFunction(),"environment");if(k.name!==a)throw new Te("Mismatch: \\begin{"+a+"} matched by \\end{"+k.name+"}",w);return m}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});var c2=(e,t)=>{var r=e.font,n=t.withFont(r);return gt(e.body,n)},d2=(e,t)=>{var r=e.font,n=t.withFont(r);return Ct(e.body,n)},f2={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Pe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=Xu(t[0]),a=n;return a in f2&&(a=f2[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:c2,mathmlBuilder:d2}),Pe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:to(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:dn(n)}}}),Pe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,s=r.parseExpression(!0,i),c="math"+n.slice(1);return{type:"font",mode:a,font:c,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:c2,mathmlBuilder:d2});var N5=(e,t)=>{var r=t.style,n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var s=gt(e.numer,a,t);if(e.continued){var c=8.5/t.fontMetrics().ptPerEm,f=3.5/t.fontMetrics().ptPerEm;s.height=s.height<c?c:s.height,s.depth=s.depth<f?f:s.depth}a=t.havingStyle(i);var p=gt(e.denom,a,t),g,m,w;e.hasBarLine?(e.barSize?(m=qt(e.barSize,t),g=za("frac-line",t,m)):g=za("frac-line",t),m=g.height,w=g.height):(g=null,m=0,w=t.fontMetrics().defaultRuleThickness);var k,C,B;r.size===et.DISPLAY.size?(k=t.fontMetrics().num1,m>0?C=3*w:C=7*w,B=t.fontMetrics().denom1):(m>0?(k=t.fontMetrics().num2,C=w):(k=t.fontMetrics().num3,C=3*w),B=t.fontMetrics().denom2);var _;if(g){var S=t.fontMetrics().axisHeight;k-s.depth-(S+.5*m)<C&&(k+=C-(k-s.depth-(S+.5*m))),S-.5*m-(p.height-B)<C&&(B+=C-(S-.5*m-(p.height-B)));var F=-(S-.5*m);_=pt({positionType:"individualShift",children:[{type:"elem",elem:p,shift:B},{type:"elem",elem:g,shift:F},{type:"elem",elem:s,shift:-k}]})}else{var T=k-s.depth-(p.height-B);T<C&&(k+=.5*(C-T),B+=.5*(C-T)),_=pt({positionType:"individualShift",children:[{type:"elem",elem:p,shift:B},{type:"elem",elem:s,shift:-k}]})}a=t.havingStyle(r),_.height*=a.sizeMultiplier/t.sizeMultiplier,_.depth*=a.sizeMultiplier/t.sizeMultiplier;var z;r.size===et.DISPLAY.size?z=t.fontMetrics().delim1:r.size===et.SCRIPTSCRIPT.size?z=t.havingStyle(et.SCRIPT).fontMetrics().delim2:z=t.fontMetrics().delim2;var R,$;return e.leftDelim==null?R=ki(t,["mopen"]):R=El(e.leftDelim,z,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?$=Ee([]):e.rightDelim==null?$=ki(t,["mclose"]):$=El(e.rightDelim,z,!0,t.havingStyle(r),e.mode,["mclose"]),Ee(["mord"].concat(a.sizingClasses(t)),[R,Ee(["mfrac"],[_]),$],t)},_5=(e,t)=>{var r=new Be("mfrac",[Ct(e.numer,t),Ct(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=qt(e.barSize,t);r.setAttribute("linethickness",_e(n))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Be("mo",[new n0(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),e.rightDelim!=null){var s=new Be("mo",[new n0(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return pl(i)}return r},h2=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};Pe({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],s,c=null,f=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,c="(",f=")";break;case"\\\\bracefrac":s=!1,c="\\{",f="\\}";break;case"\\\\brackfrac":s=!1,c="[",f="]";break;default:throw new Error("Unrecognized genfrac command")}var p=n==="\\cfrac",g=null;return p||n.startsWith("\\d")?g="display":n.startsWith("\\t")&&(g="text"),h2({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:p,hasBarLine:s,leftDelim:c,rightDelim:f,barSize:null},g)},htmlBuilder:N5,mathmlBuilder:_5}),Pe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var m2=["display","text","script","scriptscript"],p2=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};Pe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=Xu(t[0]),s=a.type==="atom"&&a.family==="open"?p2(a.text):null,c=Xu(t[1]),f=c.type==="atom"&&c.family==="close"?p2(c.text):null,p=nt(t[2],"size"),g,m=null;p.isBlank?g=!0:(m=p.value,g=m.number>0);var w=null,k=t[3];if(k.type==="ordgroup"){if(k.body.length>0){var C=nt(k.body[0],"textord");w=m2[Number(C.text)]}}else k=nt(k,"textord"),w=m2[Number(k.text)];return h2({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:g,barSize:m,leftDelim:s,rightDelim:f},w)}}),Pe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:nt(t[0],"size").value,token:i}}}),Pe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=nt(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=t[2],c=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:c,barSize:a,leftDelim:null,rightDelim:null}}});var g2=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?gt(e.sup,t.havingStyle(r.sup()),t):gt(e.sub,t.havingStyle(r.sub()),t),i=nt(e.base,"horizBrace")):i=nt(e,"horizBrace");var a=gt(i.base,t.havingBaseStyle(et.DISPLAY)),s=Ku(i,t),c;if(i.isOver?(c=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]}),c.children[0].children[0].children[1].classes.push("svg-align")):(c=pt({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]}),c.children[0].children[0].children[0].classes.push("svg-align")),n){var f=Ee(["minner",i.isOver?"mover":"munder"],[c],t);i.isOver?c=pt({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:.2},{type:"elem",elem:n}]}):c=pt({positionType:"bottom",positionData:f.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:f}]})}return Ee(["minner",i.isOver?"mover":"munder"],[c],t)},z5=(e,t)=>{var r=Zu(e.label);return new Be(e.isOver?"mover":"munder",[Ct(e.base,t),r])};Pe({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:g2,mathmlBuilder:z5}),Pe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=nt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:r0(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=d0(e.body,t,!1);return K6(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=zn(e.body,t);return r instanceof Be||(r=new Be("mrow",[r])),r.setAttribute("href",e.href),r}}),Pe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=nt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var c={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:r0(c)}}}),Pe({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:r0(t[0])}},htmlBuilder(e,t){var r=d0(e.body,t,!1);return pn(r)},mathmlBuilder(e,t){return new Be("mrow",rr(e.body,t))}}),Pe({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:i}=e,a=nt(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,f={};switch(n){case"\\htmlClass":f.class=a,c={command:"\\htmlClass",class:a};break;case"\\htmlId":f.id=a,c={command:"\\htmlId",id:a};break;case"\\htmlStyle":f.style=a,c={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var p=a.split(","),g=0;g<p.length;g++){var m=p[g],w=m.indexOf("=");if(w<0)throw new Te("\\htmlData key/value '"+m+"' missing equals sign");var k=m.slice(0,w),C=m.slice(w+1);f["data-"+k.trim()]=C}c={command:"\\htmlData",attributes:f};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(c)?{type:"html",mode:r.mode,attributes:f,body:r0(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=d0(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=Ee(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>zn(e.body,t)}),Pe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:r0(t[0]),mathml:r0(t[1])}},htmlBuilder:(e,t)=>{var r=d0(e.html,t,!1);return pn(r)},mathmlBuilder:(e,t)=>zn(e.mathml,t)});var Ml=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new Te("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!pd(n))throw new Te("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Pe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},c="";if(r[0])for(var f=nt(r[0],"raw").string,p=f.split(","),g=0;g<p.length;g++){var m=p[g].split("=");if(m.length===2){var w=m[1].trim();switch(m[0].trim()){case"alt":c=w;break;case"width":i=Ml(w);break;case"height":a=Ml(w);break;case"totalheight":s=Ml(w);break;default:throw new Te("Invalid key: '"+m[0]+"' in \\includegraphics.")}}}var k=nt(t[0],"url").url;return c===""&&(c=k,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:k})?{type:"includegraphics",mode:n.mode,alt:c,width:i,height:a,totalheight:s,src:k}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=qt(e.height,t),n=0;e.totalheight.number>0&&(n=qt(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=qt(e.width,t));var a={height:_e(r+n)};i>0&&(a.width=_e(i)),n>0&&(a.verticalAlign=_e(-n));var s=new P6(e.src,e.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(e,t)=>{var r=new Be("mglyph",[]);r.setAttribute("alt",e.alt);var n=qt(e.height,t),i=0;if(e.totalheight.number>0&&(i=qt(e.totalheight,t)-n,r.setAttribute("valign",_e(-i))),r.setAttribute("height",_e(n+i)),e.width.number>0){var a=qt(e.width,t);r.setAttribute("width",_e(a))}return r.setAttribute("src",e.src),r}}),Pe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=nt(t[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return Ed(e.dimension,t)},mathmlBuilder(e,t){var r=qt(e.dimension,t);return new _d(r)}}),Pe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=Ee([],[gt(e.body,t)]),r=Ee(["inner"],[r],t)):r=Ee(["inner"],[gt(e.body,t)]);var n=Ee(["fix"],[]),i=Ee([e.alignment],[r,n],t),a=Ee(["strut"]);return a.style.height=_e(i.height+i.depth),i.depth&&(a.style.verticalAlign=_e(-i.depth)),i.children.unshift(a),i=Ee(["thinbox"],[i],t),Ee(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Be("mpadded",[Ct(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),Pe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}}),Pe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Te("Mismatched "+e.funcName)}});var b2=(e,t)=>{switch(t.style.size){case et.DISPLAY.size:return e.display;case et.TEXT.size:return e.text;case et.SCRIPT.size:return e.script;case et.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Pe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:r0(t[0]),text:r0(t[1]),script:r0(t[2]),scriptscript:r0(t[3])}},htmlBuilder:(e,t)=>{var r=b2(e,t),n=d0(r,t,!1);return pn(n)},mathmlBuilder:(e,t)=>{var r=b2(e,t);return zn(r,t)}});var y2=(e,t,r,n,i,a,s)=>{e=Ee([],[e]);var c=r&&dn(r),f,p;if(t){var g=gt(t,n.havingStyle(i.sup()),n);p={elem:g,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-g.depth)}}if(r){var m=gt(r,n.havingStyle(i.sub()),n);f={elem:m,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-m.height)}}var w;if(p&&f){var k=n.fontMetrics().bigOpSpacing5+f.elem.height+f.elem.depth+f.kern+e.depth+s;w=pt({positionType:"bottom",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:_e(-a)},{type:"kern",size:f.kern},{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:_e(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(f){var C=e.height-s;w=pt({positionType:"top",positionData:C,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:_e(-a)},{type:"kern",size:f.kern},{type:"elem",elem:e}]})}else if(p){var B=e.depth+s;w=pt({positionType:"bottom",positionData:B,children:[{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:_e(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var _=[w];if(f&&a!==0&&!c){var T=Ee(["mspace"],[],n);T.style.marginRight=_e(a),_.unshift(T)}return Ee(["mop","op-limits"],_,n)},v2=new Set(["\\smallint"]),Oa=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=nt(e.base,"op"),i=!0):a=nt(e,"op");var s=t.style,c=!1;s.size===et.DISPLAY.size&&a.symbol&&!v2.has(a.name)&&(c=!0);var f;if(a.symbol){var p=c?"Size2-Regular":"Size1-Regular",g="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(g=a.name.slice(1),a.name=g==="oiint"?"\\iint":"\\iiint"),f=P0(a.name,p,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),g.length>0){var m=f.italic,w=Td(g+"Size"+(c?"2":"1"),t);f=pt({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:w,shift:c?.08:0}]}),a.name="\\"+g,f.classes.unshift("mop"),f.italic=m}}else if(a.body){var k=d0(a.body,t,!0);k.length===1&&k[0]instanceof er?(f=k[0],f.classes[0]="mop"):f=Ee(["mop"],k,t)}else{for(var C=[],B=1;B<a.name.length;B++)C.push(sl(a.name[B],a.mode,t));f=Ee(["mop"],C,t)}var _=0,T=0;return(f instanceof er||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(_=(f.height-f.depth)/2-t.fontMetrics().axisHeight,T=f.italic||0),i?y2(f,r,n,t,s,T,_):(_&&(f.style.position="relative",f.style.top=_e(_)),f)},Ei=(e,t)=>{var r;if(e.symbol)r=new Be("mo",[br(e.name,e.mode)]),v2.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Be("mo",rr(e.body,t));else{r=new Be("mi",[new n0(e.name.slice(1))]);var n=new Be("mo",[br("","text")]);e.parentIsSupSub?r=new Be("mrow",[r,n]):r=Nd([r,n])}return r},I5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Pe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=I5[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:r0(n)}},htmlBuilder:Oa,mathmlBuilder:Ei});var O5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Pe({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=O5[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Oa,mathmlBuilder:Ei});var w2=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=nt(e.base,"operatorname"),i=!0):a=nt(e,"operatorname");var s;if(a.body.length>0){for(var c=a.body.map(m=>{var w="text"in m?m.text:void 0;return typeof w=="string"?{type:"textord",mode:m.mode,text:w}:m}),f=d0(c,t.withFont("mathrm"),!0),p=0;p<f.length;p++){var g=f[p];g instanceof er&&(g.text=g.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Ee(["mop"],f,t)}else s=Ee(["mop"],[],t);return i?y2(s,r,n,t,t.style,0,0):s},L5=(e,t)=>{for(var r=rr(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof _d))if(a instanceof Be)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof n0?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var c=r.map(g=>g.toText()).join("");r=[new n0(c)]}var f=new Be("mi",r);f.setAttribute("mathvariant","normal");var p=new Be("mo",[br("","text")]);return e.parentIsSupSub?new Be("mrow",[f,p]):Nd([f,p])};Pe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:r0(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:w2,mathmlBuilder:L5}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),da({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?pn(d0(e.body,t,!1)):Ee(["mord"],d0(e.body,t,!0),t)},mathmlBuilder(e,t){return zn(e.body,t,!0)}}),Pe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=gt(e.body,t.havingCrampedStyle()),n=za("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return Ee(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new Be("mo",[new n0("‾")]);r.setAttribute("stretchy","true");var n=new Be("mover",[Ct(e.body,t),r]);return n.setAttribute("accent","true"),n}}),Pe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:r0(n)}},htmlBuilder:(e,t)=>{var r=d0(e.body,t.withPhantom(),!1);return pn(r)},mathmlBuilder:(e,t)=>{var r=rr(e.body,t);return new Be("mphantom",r)}}),O("\\hphantom","\\smash{\\phantom{#1}}"),Pe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Ee(["inner"],[gt(e.body,t.withPhantom())]),n=Ee(["fix"],[]);return Ee(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=rr(r0(e.body),t),n=new Be("mphantom",r),i=new Be("mpadded",[n]);return i.setAttribute("width","0px"),i}}),Pe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=nt(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=gt(e.body,t),n=qt(e.dy,t);return pt({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Be("mpadded",[Ct(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),Pe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Pe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=nt(t[0],"size"),s=nt(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&nt(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=Ee(["mord","rule"],[],t),n=qt(e.width,t),i=qt(e.height,t),a=e.shift?qt(e.shift,t):0;return r.style.borderRightWidth=_e(n),r.style.borderTopWidth=_e(i),r.style.bottom=_e(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=qt(e.width,t),n=qt(e.height,t),i=e.shift?qt(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new Be("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",_e(r)),s.setAttribute("height",_e(n));var c=new Be("mpadded",[s]);return i>=0?c.setAttribute("height",_e(i)):(c.setAttribute("height",_e(i)),c.setAttribute("depth",_e(-i))),c.setAttribute("voffset",_e(i)),c}});function x2(e,t,r){for(var n=d0(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+t.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return pn(n)}var A2=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],R5=(e,t)=>{var r=t.havingSize(e.size);return x2(e.body,r,t)};Pe({type:"sizing",names:A2,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:A2.indexOf(n)+1,body:a}},htmlBuilder:R5,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=rr(e.body,r),i=new Be("mstyle",n);return i.setAttribute("mathsize",_e(r.sizeMultiplier)),i}}),Pe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,s=r[0]&&nt(r[0],"ordgroup");if(s)for(var c="",f=0;f<s.body.length;++f){var p=s.body[f];if(c=Qu(p).text,c==="t")i=!0;else if(c==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var g=t[0];return{type:"smash",mode:n.mode,body:g,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var r=Ee([],[gt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return Ee(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var i=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return Ee(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Be("mpadded",[Ct(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Pe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=gt(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Ia(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.id<et.TEXT.id&&(a=t.fontMetrics().xHeight);var s=i+a/4,c=r.height+r.depth+s+i,{span:f,ruleWidth:p,advanceWidth:g}=k5(c,t),m=f.height-p;m>r.height+r.depth+s&&(s=(s+m-r.height-r.depth)/2);var w=f.height-r.height-s-p;r.style.paddingLeft=_e(g);var k=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+w)},{type:"elem",elem:f},{type:"kern",size:p}]});if(e.index){var C=t.havingStyle(et.SCRIPTSCRIPT),B=gt(e.index,C,t),_=.6*(k.height-k.depth),T=pt({positionType:"shift",positionData:-_,children:[{type:"elem",elem:B}]}),S=Ee(["root"],[T]);return Ee(["mord","sqrt"],[S,k],t)}else return Ee(["mord","sqrt"],[k],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Be("mroot",[Ct(r,t),Ct(n,t)]):new Be("msqrt",[Ct(r,t)])}});var D2={display:et.DISPLAY,text:et.TEXT,script:et.SCRIPT,scriptscript:et.SCRIPTSCRIPT};Pe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var r=D2[e.style],n=t.havingStyle(r).withFont("");return x2(e.body,n,t)},mathmlBuilder(e,t){var r=D2[e.style],n=t.havingStyle(r),i=rr(e.body,n),a=new Be("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=s[e.style];return a.setAttribute("scriptlevel",c[0]),a.setAttribute("displaystyle",c[1]),a}});var P5=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===et.DISPLAY.size||n.alwaysHandleSupSub);return i?Oa:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===et.DISPLAY.size||n.limits);return a?w2:null}else{if(n.type==="accent")return dn(n.base)?yl:null;if(n.type==="horizBrace"){var s=!t.sub;return s===n.isOver?g2:null}else return null}else return null};da({type:"supsub",htmlBuilder(e,t){var r=P5(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,s=gt(n,t),c,f,p=t.fontMetrics(),g=0,m=0,w=n&&dn(n);if(i){var k=t.havingStyle(t.style.sup());c=gt(i,k,t),w||(g=s.height-k.fontMetrics().supDrop*k.sizeMultiplier/t.sizeMultiplier)}if(a){var C=t.havingStyle(t.style.sub());f=gt(a,C,t),w||(m=s.depth+C.fontMetrics().subDrop*C.sizeMultiplier/t.sizeMultiplier)}var B;t.style===et.DISPLAY?B=p.sup1:t.style.cramped?B=p.sup3:B=p.sup2;var _=t.sizeMultiplier,T=_e(.5/p.ptPerEm/_),S=null;if(f){var F=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof er||F)&&(S=_e(-s.italic))}var z;if(c&&f){g=Math.max(g,B,c.depth+.25*p.xHeight),m=Math.max(m,p.sub2);var R=p.defaultRuleThickness,$=4*R;if(g-c.depth-(f.height-m)<$){m=$-(g-c.depth)+f.height;var Y=.8*p.xHeight-(g-c.depth);Y>0&&(g+=Y,m-=Y)}var q=[{type:"elem",elem:f,shift:m,marginRight:T,marginLeft:S},{type:"elem",elem:c,shift:-g,marginRight:T}];z=pt({positionType:"individualShift",children:q})}else if(f){m=Math.max(m,p.sub1,f.height-.8*p.xHeight);var pe=[{type:"elem",elem:f,marginLeft:S,marginRight:T}];z=pt({positionType:"shift",positionData:m,children:pe})}else if(c)g=Math.max(g,B,c.depth+.25*p.xHeight),z=pt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:c,marginRight:T}]});else throw new Error("supsub must have either sup or sub.");var he=hl(s,"right")||"mord";return Ee([he],[s,Ee(["msupsub"],[z])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Ct(e.base,t)];e.sub&&a.push(Ct(e.sub,t)),e.sup&&a.push(Ct(e.sup,t));var s;if(r)s=n?"mover":"munder";else if(e.sub)if(e.sup){var p=e.base;p&&p.type==="op"&&p.limits&&t.style===et.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(t.style===et.DISPLAY||p.limits)?s="munderover":s="msubsup"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===et.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===et.DISPLAY)?s="munder":s="msub"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(t.style===et.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||t.style===et.DISPLAY)?s="mover":s="msup"}return new Be(s,a)}}),da({type:"atom",htmlBuilder(e,t){return sl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Be("mo",[br(e.text,e.mode)]);if(e.family==="bin"){var n=gl(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var k2={mi:"italic",mn:"normal",mtext:"normal"};da({type:"mathord",htmlBuilder(e,t){return $u(e,t,"mathord")},mathmlBuilder(e,t){var r=new Be("mi",[br(e.text,e.mode,t)]),n=gl(e,t)||"italic";return n!==k2[r.type]&&r.setAttribute("mathvariant",n),r}}),da({type:"textord",htmlBuilder(e,t){return $u(e,t,"textord")},mathmlBuilder(e,t){var r=br(e.text,e.mode,t),n=gl(e,t)||"normal",i;return e.mode==="text"?i=new Be("mtext",[r]):/[0-9]/.test(e.text)?i=new Be("mn",[r]):e.text==="\\prime"?i=new Be("mo",[r]):i=new Be("mi",[r]),n!==k2[i.type]&&i.setAttribute("mathvariant",n),i}});var Nl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},_l={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};da({type:"spacing",htmlBuilder(e,t){if(_l.hasOwnProperty(e.text)){var r=_l[e.text].className||"";if(e.mode==="text"){var n=$u(e,t,"textord");return n.classes.push(r),n}else return Ee(["mspace",r],[sl(e.text,e.mode,t)],t)}else{if(Nl.hasOwnProperty(e.text))return Ee(["mspace",Nl[e.text]],[],t);throw new Te('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(_l.hasOwnProperty(e.text))r=new Be("mtext",[new n0(" ")]);else{if(Nl.hasOwnProperty(e.text))return new Be("mspace");throw new Te('Unknown type of space "'+e.text+'"')}return r}});var C2=()=>{var e=new Be("mtd",[]);return e.setAttribute("width","50%"),e};da({type:"tag",mathmlBuilder(e,t){var r=new Be("mtable",[new Be("mtr",[C2(),new Be("mtd",[zn(e.body,t)]),C2(),new Be("mtd",[zn(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var S2={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},E2={"\\textbf":"textbf","\\textmd":"textmd"},V5={"\\textit":"textit","\\textup":"textup"},F2=(e,t)=>{var r=e.font;if(r){if(S2[r])return t.withTextFontFamily(S2[r]);if(E2[r])return t.withTextFontWeight(E2[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(V5[r])};Pe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:r0(i),font:n}},htmlBuilder(e,t){var r=F2(e,t),n=d0(e.body,r,!0);return Ee(["mord","text"],n,r)},mathmlBuilder(e,t){var r=F2(e,t);return zn(e.body,r)}}),Pe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=gt(e.body,t),n=za("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=pt({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return Ee(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new Be("mo",[new n0("‾")]);r.setAttribute("stretchy","true");var n=new Be("munder",[Ct(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),Pe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=gt(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return pt({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){return new Be("mpadded",[Ct(e.body,t)],["vcenter"])}}),Pe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=T2(e),n=[],i=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(P0(s,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Ee(["mord","text"].concat(i.sizingClasses(t)),Sd(n),i)},mathmlBuilder(e,t){var r=new n0(T2(e)),n=new Be("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var T2=e=>e.body.replace(/ /g,e.star?"␣":" "),On=Bd,B2=`[ \r
|
|
261
|
+
`+Y+" children.");for(var ce=0;ce<Y;ce++){var be=new Mn(F[ce]),ae=new hn([be],{width:"400em",height:_e($),viewBox:"0 0 "+c+" "+R,preserveAspectRatio:pe[ce]+" slice"}),xe=_n([q[ce]],[ae],r);if(Y===1)return{span:xe,minWidth:z,height:$};xe.style.height=_e($),T.push(xe)}return{span:Ee(["stretchy"],T,r),minWidth:z,height:$}}}var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=_e(s),a>0&&(i.style.minWidth=_e(a)),i},h5=function(t,r,n,i,a){var s,c=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=Ee(["stretchy",r],[],a),r==="fbox"){var f=a.color&&a.getColor();f&&(s.style.borderColor=f)}}else{var p=[];/^[bx]cancel$/.test(r)&&p.push(new el({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&p.push(new el({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new hn(p,{width:"100%",height:_e(c)});s=_n([],[g],a)}return s.height=c,s.style.height=_e(c),s};function nt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Qu(e){var t=Ju(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function Ju(e){return e&&(e.type==="atom"||G6.hasOwnProperty(e.type))?e:null}var Pd=e=>{if(e instanceof er)return e;if(j6(e)&&e.children.length===1)return Pd(e.children[0])},yl=(e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=nt(e.base,"accent"),r=n.base,e.base=r,i=q6(gt(e,t)),e.base=n):(n=nt(e,"accent"),r=n.base);var a=gt(r,t.havingCrampedStyle()),s=n.isShifty&&dn(r),c=0;if(s){var f,p;c=(f=(p=Pd(a))==null?void 0:p.skew)!=null?f:0}var g=n.label==="\\c",m=g?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),w;if(n.isStretchy)w=Ku(n,t),w=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:w,wrapperClasses:["svg-align"],wrapperStyle:c>0?{width:"calc(100% - "+_e(2*c)+")",marginLeft:_e(2*c)}:void 0}]});else{var k,C;n.label==="\\vec"?(k=Td("vec",t),C=Fd.vec[1]):(k=$u({mode:n.mode,text:n.label},t,"textord"),k=H6(k),k.italic=0,C=k.width,g&&(m+=k.depth)),w=Ee(["accent-body"],[k]);var B=n.label==="\\textcircled";B&&(w.classes.push("accent-full"),m=a.height);var _=c;B||(_-=C/2),w.style.left=_e(_),n.label==="\\textcircled"&&(w.style.top=".2em"),w=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-m},{type:"elem",elem:w}]})}var T=Ee(["mord","accent"],[w],t);return i?(i.children[0]=T,i.height=Math.max(T.height,i.height),i.classes[0]="mord",i):T},Vd=(e,t)=>{var r=e.isStretchy?Zu(e.label):new Be("mo",[br(e.label,e.mode)]),n=new Be("mover",[Ct(e.base,t),r]);return n.setAttribute("accent","true"),n},m5=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Pe({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=Xu(t[0]),n=!m5.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:yl,mathmlBuilder:Vd}),Pe({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:yl,mathmlBuilder:Vd}),Pe({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(e,t)=>{var r=gt(e.base,t),n=Ku(e,t),i=e.label==="\\utilde"?.12:0,a=pt({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return Ee(["mord","accentunder"],[a],t)},mathmlBuilder:(e,t)=>{var r=Zu(e.label),n=new Be("munder",[Ct(e.base,t),r]);return n.setAttribute("accentunder","true"),n}});var eo=e=>{var t=new Be("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};Pe({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=Ia(gt(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;e.below&&(n=t.havingStyle(r.sub()),s=Ia(gt(e.below,n,t),t),s.classes.push(a+"-arrow-pad"));var c=Ku(e,t),f=-t.fontMetrics().axisHeight+.5*c.height,p=-t.fontMetrics().axisHeight-.5*c.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(p-=i.depth);var g;if(s){var m=-t.fontMetrics().axisHeight+s.height+.5*c.height+.111;g=pt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p},{type:"elem",elem:c,shift:f},{type:"elem",elem:s,shift:m}]})}else g=pt({positionType:"individualShift",children:[{type:"elem",elem:i,shift:p},{type:"elem",elem:c,shift:f}]});return g.children[0].children[0].children[1].classes.push("svg-align"),Ee(["mrel","x-arrow"],[g],t)},mathmlBuilder(e,t){var r=Zu(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=eo(Ct(e.body,t));if(e.below){var a=eo(Ct(e.below,t));n=new Be("munderover",[r,a,i])}else n=new Be("mover",[r,i])}else if(e.below){var s=eo(Ct(e.below,t));n=new Be("munder",[r,s])}else n=eo(),n=new Be("mover",[r,n]);return n}});function Hd(e,t){var r=d0(e.body,t,!0);return Ee([e.mclass],r,t)}function qd(e,t){var r,n=rr(e.body,t);return e.mclass==="minner"?r=new Be("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Be("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Be("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Pe({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:r0(i),isCharacterBox:dn(i)}},htmlBuilder:Hd,mathmlBuilder:qd});var to=e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"};Pe({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:to(t[0]),body:r0(t[1]),isCharacterBox:dn(t[1])}}}),Pe({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],s;n!=="\\stackrel"?s=to(i):s="mrel";var c={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:r0(i)},f={type:"supsub",mode:a.mode,base:c,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[f],isCharacterBox:dn(f)}},htmlBuilder:Hd,mathmlBuilder:qd}),Pe({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:to(t[0]),body:r0(t[0])}},htmlBuilder(e,t){var r=d0(e.body,t,!0),n=Ee([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=rr(e.body,t),n=new Be("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var p5={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jd=()=>({type:"styling",body:[],mode:"math",style:"display"}),$d=e=>e.type==="textord"&&e.text==="@",g5=(e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t;function b5(e,t,r){var n=p5[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),c=r.callFunction("\\\\cdright",[t[1]],[]),f={type:"ordgroup",mode:"math",body:[i,s,c]};return r.callFunction("\\\\cdparent",[f],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function y5(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Te("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;a<t.length;a++){for(var s=t[a],c=jd(),f=0;f<s.length;f++)if(!$d(s[f]))c.body.push(s[f]);else{n.push(c),f+=1;var p=Qu(s[f]).text,g=new Array(2);if(g[0]={type:"ordgroup",mode:"math",body:[]},g[1]={type:"ordgroup",mode:"math",body:[]},!"=|.".includes(p))if("<>AV".includes(p))for(var m=0;m<2;m++){for(var w=!0,k=f+1;k<s.length;k++){if(g5(s[k],p)){w=!1,f=k;break}if($d(s[k]))throw new Te("Missing a "+p+" character to complete a CD arrow.",s[k]);g[m].body.push(s[k])}if(w)throw new Te("Missing a "+p+" character to complete a CD arrow.",s[f])}else throw new Te('Expected one of "<>AV=|." after @',s[f]);var C=b5(p,g,e),B={type:"styling",body:[C],mode:"math",style:"display"};n.push(B),c=jd()}a%2===0?n.push(c):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var _=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:_,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Pe({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=Ia(gt(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=_e(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Be("mrow",[Ct(e.label,t)]);return r=new Be("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Be("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),Pe({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ia(gt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Be("mrow",[Ct(e.fragment,t)])}}),Pe({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=nt(t[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var c=nt(i[s],"textord");a+=c.text}var f=parseInt(a),p;if(isNaN(f))throw new Te("\\@char has non-numeric argument "+a);if(f<0||f>=1114111)throw new Te("\\@char with invalid code point "+a);return f<=65535?p=String.fromCharCode(f):(f-=65536,p=String.fromCharCode((f>>10)+55296,(f&1023)+56320)),{type:"textord",mode:r.mode,text:p}}});var Ud=(e,t)=>{var r=d0(e.body,t.withColor(e.color),!1);return pn(r)},Wd=(e,t)=>{var r=rr(e.body,t.withColor(e.color)),n=new Be("mstyle",r);return n.setAttribute("mathcolor",e.color),n};Pe({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=nt(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:r0(i)}},htmlBuilder:Ud,mathmlBuilder:Wd}),Pe({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=nt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Ud,mathmlBuilder:Wd}),Pe({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&nt(i,"size").value}},htmlBuilder(e,t){var r=Ee(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=_e(qt(e.size,t)))),r},mathmlBuilder(e,t){var r=new Be("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",_e(qt(e.size,t)))),r}});var vl={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Gd=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Te("Expected a control sequence",e);return t},v5=e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},Xd=(e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)};Pe({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(vl[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=vl[n.text]),nt(t.parseFunction(),"internal");throw new Te("Invalid token after macro prefix",n)}}),Pe({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Te("Expected a control sequence",n);for(var a=0,s,c=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),c[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Te('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Te('Argument number "'+n.text+'" out of order');a++,c.push([])}else{if(n.text==="EOF")throw new Te("Expected a macro definition");c[a].push(n.text)}var{tokens:f}=t.gullet.consumeArg();return s&&f.unshift(s),(r==="\\edef"||r==="\\xdef")&&(f=t.gullet.expandTokens(f),f.reverse()),t.gullet.macros.set(i,{tokens:f,numArgs:a,delimiters:c},r===vl[r]),{type:"internal",mode:t.mode}}}),Pe({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Gd(t.gullet.popToken());t.gullet.consumeSpaces();var i=v5(t);return Xd(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}}),Pe({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=Gd(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return Xd(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});var Ci=function(t,r,n){var i=Lt.math[t]&&Lt.math[t].replace,a=tl(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},wl=function(t,r,n,i){var a=n.havingBaseStyle(r),s=Ee(i.concat(a.sizingClasses(n)),[t],n),c=a.sizeMultiplier/n.sizeMultiplier;return s.height*=c,s.depth*=c,s.maxFontSize=a.sizeMultiplier,s},Yd=function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=_e(a),t.height-=a,t.depth+=a},w5=function(t,r,n,i,a,s){var c=P0(t,"Main-Regular",a,i),f=wl(c,r,i,s);return Yd(f,i,r),f},x5=function(t,r,n,i){return P0(t,"Size"+r+"-Regular",n,i)},Zd=function(t,r,n,i,a,s){var c=x5(t,r,a,i),f=wl(Ee(["delimsizing","size"+r],[c],i),et.TEXT,i,s);return n&&Yd(f,i,et.TEXT),f},xl=function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Ee(["delimsizinginner",i],[Ee([],[P0(t,r,n)])]);return{type:"elem",elem:a}},Al=function(t,r,n){var i=Wr["Size4-Regular"][t.charCodeAt(0)]?Wr["Size4-Regular"][t.charCodeAt(0)][4]:Wr["Size1-Regular"][t.charCodeAt(0)][4],a=new Mn("inner",I6(t,Math.round(1e3*r))),s=new hn([a],{width:_e(i),height:_e(r),style:"width:"+_e(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),c=_n([],[s],n);return c.height=r,c.style.height=_e(r),c.style.width=_e(i),{type:"elem",elem:c}},Dl=.008,ro={type:"kern",size:-1*Dl},A5=new Set(["|","\\lvert","\\rvert","\\vert"]),D5=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Kd=function(t,r,n,i,a,s){var c,f,p,g,m="",w=0;c=p=g=t,f=null;var k="Size1-Regular";t==="\\uparrow"?p=g="⏐":t==="\\Uparrow"?p=g="‖":t==="\\downarrow"?c=p="⏐":t==="\\Downarrow"?c=p="‖":t==="\\updownarrow"?(c="\\uparrow",p="⏐",g="\\downarrow"):t==="\\Updownarrow"?(c="\\Uparrow",p="‖",g="\\Downarrow"):A5.has(t)?(p="∣",m="vert",w=333):D5.has(t)?(p="∥",m="doublevert",w=556):t==="["||t==="\\lbrack"?(c="⎡",p="⎢",g="⎣",k="Size4-Regular",m="lbrack",w=667):t==="]"||t==="\\rbrack"?(c="⎤",p="⎥",g="⎦",k="Size4-Regular",m="rbrack",w=667):t==="\\lfloor"||t==="⌊"?(p=c="⎢",g="⎣",k="Size4-Regular",m="lfloor",w=667):t==="\\lceil"||t==="⌈"?(c="⎡",p=g="⎢",k="Size4-Regular",m="lceil",w=667):t==="\\rfloor"||t==="⌋"?(p=c="⎥",g="⎦",k="Size4-Regular",m="rfloor",w=667):t==="\\rceil"||t==="⌉"?(c="⎤",p=g="⎥",k="Size4-Regular",m="rceil",w=667):t==="("||t==="\\lparen"?(c="⎛",p="⎜",g="⎝",k="Size4-Regular",m="lparen",w=875):t===")"||t==="\\rparen"?(c="⎞",p="⎟",g="⎠",k="Size4-Regular",m="rparen",w=875):t==="\\{"||t==="\\lbrace"?(c="⎧",f="⎨",g="⎩",p="⎪",k="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(c="⎫",f="⎬",g="⎭",p="⎪",k="Size4-Regular"):t==="\\lgroup"||t==="⟮"?(c="⎧",g="⎩",p="⎪",k="Size4-Regular"):t==="\\rgroup"||t==="⟯"?(c="⎫",g="⎭",p="⎪",k="Size4-Regular"):t==="\\lmoustache"||t==="⎰"?(c="⎧",g="⎭",p="⎪",k="Size4-Regular"):(t==="\\rmoustache"||t==="⎱")&&(c="⎫",g="⎩",p="⎪",k="Size4-Regular");var C=Ci(c,k,a),B=C.height+C.depth,_=Ci(p,k,a),T=_.height+_.depth,S=Ci(g,k,a),F=S.height+S.depth,z=0,R=1;if(f!==null){var $=Ci(f,k,a);z=$.height+$.depth,R=2}var Y=B+F+z,q=Math.max(0,Math.ceil((r-Y)/(R*T))),pe=Y+q*R*T,he=i.fontMetrics().axisHeight;n&&(he*=i.sizeMultiplier);var ce=pe/2-he,be=[];if(m.length>0){var ae=pe-B-F,xe=Math.round(pe*1e3),Se=O6(m,Math.round(ae*1e3)),te=new Mn(m,Se),ye=_e(w/1e3),ne=_e(xe/1e3),Ne=new hn([te],{width:ye,height:ne,viewBox:"0 0 "+w+" "+xe}),We=_n([],[Ne],i);We.height=xe/1e3,We.style.width=ye,We.style.height=ne,be.push({type:"elem",elem:We})}else{if(be.push(xl(g,k,a)),be.push(ro),f===null){var X=pe-B-F+2*Dl;be.push(Al(p,X,i))}else{var Z=(pe-B-F-z)/2+2*Dl;be.push(Al(p,Z,i)),be.push(ro),be.push(xl(f,k,a)),be.push(ro),be.push(Al(p,Z,i))}be.push(ro),be.push(xl(c,k,a))}var Q=i.havingBaseStyle(et.TEXT),ie=pt({positionType:"bottom",positionData:ce,children:be});return wl(Ee(["delimsizing","mult"],[ie],Q),et.TEXT,i,s)},kl=80,Cl=.08,Sl=function(t,r,n,i,a){var s=z6(t,i,n),c=new Mn(t,s),f=new hn([c],{width:"400em",height:_e(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return _n(["hide-tail"],[f],a)},k5=function(t,r){var n=r.havingBaseSizing(),i=r2("\\surd",t*n.sizeMultiplier,t2,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),c,f=0,p=0,g=0,m;return i.type==="small"?(g=1e3+1e3*s+kl,t<1?a=1:t<1.4&&(a=.7),f=(1+s+Cl)/a,p=(1+s)/a,c=Sl("sqrtMain",f,g,s,r),c.style.minWidth="0.853em",m=.833/a):i.type==="large"?(g=(1e3+kl)*Si[i.size],p=(Si[i.size]+s)/a,f=(Si[i.size]+s+Cl)/a,c=Sl("sqrtSize"+i.size,f,g,s,r),c.style.minWidth="1.02em",m=1/a):(f=t+s+Cl,p=t+s,g=Math.floor(1e3*t+s)+kl,c=Sl("sqrtTall",f,g,s,r),c.style.minWidth="0.742em",m=1.056),c.height=p,c.style.height=_e(f),{span:c,advanceWidth:m,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},Qd=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),C5=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),Jd=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Si=[0,1.2,1.8,2.4,3],e2=function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle"),Qd.has(t)||Jd.has(t))return Zd(t,r,!1,n,i,a);if(C5.has(t))return Kd(t,Si[r],!1,n,i,a);throw new Te("Illegal delimiter: '"+t+"'")},S5=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],E5=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"stack"}],t2=[{type:"small",style:et.SCRIPTSCRIPT},{type:"small",style:et.SCRIPT},{type:"small",style:et.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],F5=function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},r2=function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length;s++){var c=n[s];if(c.type==="stack")break;var f=Ci(t,F5(c),"math"),p=f.height+f.depth;if(c.type==="small"){var g=i.havingBaseStyle(c.style);p*=g.sizeMultiplier}if(p>r)return c}return n[n.length-1]},El=function(t,r,n,i,a,s){t==="<"||t==="\\lt"||t==="⟨"?t="\\langle":(t===">"||t==="\\gt"||t==="⟩")&&(t="\\rangle");var c;Jd.has(t)?c=S5:Qd.has(t)?c=t2:c=E5;var f=r2(t,r,c,i);return f.type==="small"?w5(t,f.style,n,i,a,s):f.type==="large"?Zd(t,f.size,n,i,a,s):Kd(t,r,n,i,a,s)},Fl=function(t,r,n,i,a,s){var c=i.fontMetrics().axisHeight*i.sizeMultiplier,f=901,p=5/i.fontMetrics().ptPerEm,g=Math.max(r-c,n+c),m=Math.max(g/500*f,2*g-p);return El(t,m,!0,i,a,s)},n2={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},T5=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function no(e,t){var r=Ju(e);if(r&&T5.has(r.text))return r;throw r?new Te("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new Te("Invalid delimiter type '"+e.type+"'",e)}Pe({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=no(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:n2[e.funcName].size,mclass:n2[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>e.delim==="."?Ee([e.mclass]):e2(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!=="."&&t.push(br(e.delim,e.mode));var r=new Be("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=_e(Si[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function a2(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Pe({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:no(t[0],e).text,color:r}}}),Pe({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=no(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=nt(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{a2(e);for(var r=d0(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=t.sizeMultiplier,i*=t.sizeMultiplier;var c;if(e.left==="."?c=ki(t,["mopen"]):c=Fl(e.left,n,i,t,e.mode,["mopen"]),r.unshift(c),a)for(var f=1;f<r.length;f++){var p=r[f],g=p.isMiddle;g&&(r[f]=Fl(g.delim,n,i,g.options,e.mode,[]))}var m;if(e.right===".")m=ki(t,["mclose"]);else{var w=e.rightColor?t.withColor(e.rightColor):t;m=Fl(e.right,n,i,w,e.mode,["mclose"])}return r.push(m),Ee(["minner"],r,t)},mathmlBuilder:(e,t)=>{a2(e);var r=rr(e.body,t);if(e.left!=="."){var n=new Be("mo",[br(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new Be("mo",[br(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return pl(r)}}),Pe({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=no(t[0],e);if(!e.parser.leftrightDepth)throw new Te("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if(e.delim===".")r=ki(t,[]);else{r=e2(e.delim,1,t,e.mode,[]);var n={delim:e.delim,options:t};r.isMiddle=n}return r},mathmlBuilder:(e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?br("|","text"):br(e.delim,e.mode),n=new Be("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var ao=(e,t)=>{var r=Ia(gt(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,s=0,c=dn(e.body);if(n==="sout")a=Ee(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,s=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var f=qt({number:.6,unit:"pt"},t),p=qt({number:.35,unit:"ex"},t),g=t.havingBaseSizing();i=i/g.sizeMultiplier;var m=r.height+r.depth+f+p;r.style.paddingLeft=_e(m/2+f);var w=Math.floor(1e3*m*i),k=N6(w),C=new hn([new Mn("phase",k)],{width:"400em",height:_e(w/1e3),viewBox:"0 0 400000 "+w,preserveAspectRatio:"xMinYMin slice"});a=_n(["hide-tail"],[C],t),a.style.height=_e(m),s=r.depth+f+p}else{/cancel/.test(n)?c||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var B=0,_=0,T=0;/box/.test(n)?(T=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),B=t.fontMetrics().fboxsep+(n==="colorbox"?0:T),_=B):n==="angl"?(T=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),B=4*T,_=Math.max(0,.25-r.depth)):(B=c?.2:0,_=B),a=h5(r,n,B,_,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=_e(T)):n==="angl"&&T!==.049&&(a.style.borderTopWidth=_e(T),a.style.borderRightWidth=_e(T)),s=r.depth+_,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var S;if(e.backgroundColor)S=pt({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var F=/cancel|phase/.test(n)?["svg-align"]:[];S=pt({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:F}]})}return/cancel/.test(n)&&(S.height=r.height,S.depth=r.depth),/cancel/.test(n)&&!c?Ee(["mord","cancel-lap"],[S],t):Ee(["mord"],[S],t)},io=(e,t)=>{var r=0,n=new Be(e.label.includes("colorbox")?"mpadded":"menclose",[Ct(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+_e(i)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};Pe({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=nt(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=nt(t[0],"color-token").color,s=nt(t[1],"color-token").color,c=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:c}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),Pe({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:ao,mathmlBuilder:io}),Pe({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var i2={};function Gr(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=e,c={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},f=0;f<r.length;++f)i2[r[f]]=c;a&&(Wu[t]=a),s&&(Gu[t]=s)}var u2={};function O(e,t){u2[e]=t}class X0{constructor(t,r,n){this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new X0(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}}let Er=class sm{constructor(t,r){this.text=t,this.loc=r}range(t,r){return new sm(r,X0.range(this,t))}};function o2(e){var t=[];e.consumeSpaces();var r=e.fetch().text;for(r==="\\relax"&&(e.consume(),e.consumeSpaces(),r=e.fetch().text);r==="\\hline"||r==="\\hdashline";)e.consume(),t.push(r==="\\hdashline"),e.consumeSpaces(),r=e.fetch().text;return t}var uo=e=>{var t=e.parser.settings;if(!t.displayMode)throw new Te("{"+e.envName+"} can be used only in display mode.")},B5=new Set(["gather","gather*"]);function Tl(e){if(!e.includes("ed"))return!e.includes("*")}function In(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:c,autoTag:f,singleRow:p,emptySingleRow:g,maxNumCols:m,leqno:w}=t;if(e.gullet.beginGroup(),p||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var k=e.gullet.expandMacroAsText("\\arraystretch");if(k==null)s=1;else if(s=parseFloat(k),!s||s<0)throw new Te("Invalid \\arraystretch: "+k)}e.gullet.beginGroup();var C=[],B=[C],_=[],T=[],S=f!=null?[]:void 0;function F(){f&&e.gullet.macros.set("\\@eqnsw","1",!0)}function z(){S&&(e.gullet.macros.get("\\df@tag")?(S.push(e.subparse([new Er("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):S.push(!!f&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),T.push(o2(e));;){var R=e.parseExpression(!1,p?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var $={type:"ordgroup",mode:e.mode,body:R};r&&($={type:"styling",mode:e.mode,style:r,body:[$]}),C.push($);var Y=e.fetch().text;if(Y==="&"){if(m&&C.length===m){if(p||c)throw new Te("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else if(Y==="\\end"){z(),C.length===1&&$.type==="styling"&&$.body.length===1&&$.body[0].type==="ordgroup"&&$.body[0].body.length===0&&(B.length>1||!g)&&B.pop(),T.length<B.length+1&&T.push([]);break}else if(Y==="\\\\"){e.consume();var q=void 0;e.gullet.future().text!==" "&&(q=e.parseSizeGroup(!0)),_.push(q?q.value:null),z(),T.push(o2(e)),C=[],B.push(C),F()}else throw new Te("Expected & or \\\\ or \\cr or \\end",e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:"array",mode:e.mode,addJot:i,arraystretch:s,body:B,cols:a,rowGaps:_,hskipBeforeAndAfter:n,hLinesBeforeRow:T,colSeparationType:c,tags:S,leqno:w}}function Bl(e){return e.slice(0,1)==="d"?"display":"text"}var Xr=function(t,r){var n,i,a=t.body.length,s=t.hLinesBeforeRow,c=0,f=new Array(a),p=[],g=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),m=1/r.fontMetrics().ptPerEm,w=5*m;if(t.colSeparationType&&t.colSeparationType==="small"){var k=r.havingStyle(et.SCRIPT).sizeMultiplier;w=.2778*(k/r.sizeMultiplier)}var C=t.colSeparationType==="CD"?qt({number:3,unit:"ex"},r):12*m,B=3*m,_=t.arraystretch*C,T=.7*_,S=.3*_,F=0;function z(un){for(var Dn=0;Dn<un.length;++Dn)Dn>0&&(F+=.25),p.push({pos:F,isDashed:un[Dn]})}for(z(s[0]),n=0;n<t.body.length;++n){var R=t.body[n],$=T,Y=S;c<R.length&&(c=R.length);var q=new Array(R.length);for(i=0;i<R.length;++i){var pe=gt(R[i],r);Y<pe.depth&&(Y=pe.depth),$<pe.height&&($=pe.height),q[i]=pe}var he=t.rowGaps[n],ce=0;he&&(ce=qt(he,r),ce>0&&(ce+=S,Y<ce&&(Y=ce),ce=0)),t.addJot&&n<t.body.length-1&&(Y+=B),q.height=$,q.depth=Y,F+=$,q.pos=F,F+=Y+ce,f[n]=q,z(s[n+1])}var be=F/2+r.fontMetrics().axisHeight,ae=t.cols||[],xe=[],Se,te,ye=[];if(t.tags&&t.tags.some(un=>un))for(n=0;n<a;++n){var ne=f[n],Ne=ne.pos-be,We=t.tags[n],X=void 0;We===!0?X=Ee(["eqn-num"],[],r):We===!1?X=Ee([],[],r):X=Ee([],d0(We,r,!0),r),X.depth=ne.depth,X.height=ne.height,ye.push({type:"elem",elem:X,shift:Ne})}for(i=0,te=0;i<c||te<ae.length;++i,++te){for(var Z,Q=ae[te],ie=!0;((fe=Q)==null?void 0:fe.type)==="separator";){var fe;if(ie||(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(r.fontMetrics().doubleRuleSep),xe.push(Se)),Q.separator==="|"||Q.separator===":"){var ke=Q.separator==="|"?"solid":"dashed",ue=Ee(["vertical-separator"],[],r);ue.style.height=_e(F),ue.style.borderRightWidth=_e(g),ue.style.borderRightStyle=ke,ue.style.margin="0 "+_e(-g/2);var me=F-be;me&&(ue.style.verticalAlign=_e(-me)),xe.push(ue)}else throw new Te("Invalid separator type: "+Q.separator);te++,Q=ae[te],ie=!1}if(!(i>=c)){var ge=void 0;if(i>0||t.hskipBeforeAndAfter){var Le,Ye;ge=(Le=(Ye=Q)==null?void 0:Ye.pregap)!=null?Le:w,ge!==0&&(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(ge),xe.push(Se))}var Ke=[];for(n=0;n<a;++n){var ut=f[n],ot=ut[i];if(ot){var st=ut.pos-be;ot.depth=ut.depth,ot.height=ut.height,Ke.push({type:"elem",elem:ot,shift:st})}}var Xt=pt({positionType:"individualShift",children:Ke}),$0=Ee(["col-align-"+(((Z=Q)==null?void 0:Z.align)||"c")],[Xt]);if(xe.push($0),i<c-1||t.hskipBeforeAndAfter){var Jt,ft;ge=(Jt=(ft=Q)==null?void 0:ft.postgap)!=null?Jt:w,ge!==0&&(Se=Ee(["arraycolsep"],[]),Se.style.width=_e(ge),xe.push(Se))}}}var Ce=Ee(["mtable"],xe);if(p.length>0){for(var dr=za("hline",r,g),Da=za("hdashline",r,g),Yn=[{type:"elem",elem:Ce,shift:0}];p.length>0;){var Zn=p.pop(),Vr=Zn.pos-be;Zn.isDashed?Yn.push({type:"elem",elem:Da,shift:Vr}):Yn.push({type:"elem",elem:dr,shift:Vr})}Ce=pt({positionType:"individualShift",children:Yn})}if(ye.length===0)return Ee(["mord"],[Ce],r);var U0=pt({positionType:"individualShift",children:ye}),C0=Ee(["tag"],[U0],r);return pn([Ce,C0])},M5={c:"center ",l:"left ",r:"right "},Yr=function(t,r){for(var n=[],i=new Be("mtd",[],["mtr-glue"]),a=new Be("mtd",[],["mml-eqn-num"]),s=0;s<t.body.length;s++){for(var c=t.body[s],f=[],p=0;p<c.length;p++)f.push(new Be("mtd",[Ct(c[p],r)]));t.tags&&t.tags[s]&&(f.unshift(i),f.push(i),t.leqno?f.unshift(a):f.push(a)),n.push(new Be("mtr",f))}var g=new Be("mtable",n),m=t.arraystretch===.5?.1:.16+t.arraystretch-1+(t.addJot?.09:0);g.setAttribute("rowspacing",_e(m));var w="",k="";if(t.cols&&t.cols.length>0){var C=t.cols,B="",_=!1,T=0,S=C.length;C[0].type==="separator"&&(w+="top ",T=1),C[C.length-1].type==="separator"&&(w+="bottom ",S-=1);for(var F=T;F<S;F++){var z=C[F];z.type==="align"?(k+=M5[z.align],_&&(B+="none "),_=!0):z.type==="separator"&&_&&(B+=z.separator==="|"?"solid ":"dashed ",_=!1)}g.setAttribute("columnalign",k.trim()),/[sd]/.test(B)&&g.setAttribute("columnlines",B.trim())}if(t.colSeparationType==="align"){for(var R=t.cols||[],$="",Y=1;Y<R.length;Y++)$+=Y%2?"0em ":"1em ";g.setAttribute("columnspacing",$.trim())}else t.colSeparationType==="alignat"||t.colSeparationType==="gather"?g.setAttribute("columnspacing","0em"):t.colSeparationType==="small"?g.setAttribute("columnspacing","0.2778em"):t.colSeparationType==="CD"?g.setAttribute("columnspacing","0.5em"):g.setAttribute("columnspacing","1em");var q="",pe=t.hLinesBeforeRow;w+=pe[0].length>0?"left ":"",w+=pe[pe.length-1].length>0?"right ":"";for(var he=1;he<pe.length-1;he++)q+=pe[he].length===0?"none ":pe[he][0]?"dashed ":"solid ";return/[sd]/.test(q)&&g.setAttribute("rowlines",q.trim()),w!==""&&(g=new Be("menclose",[g]),g.setAttribute("notation",w.trim())),t.arraystretch&&t.arraystretch<1&&(g=new Be("mstyle",[g]),g.setAttribute("scriptlevel","1")),g},s2=function(t,r){t.envName.includes("ed")||uo(t);var n=[],i=t.envName.includes("at")?"alignat":"align",a=t.envName==="split",s=In(t.parser,{cols:n,addJot:!0,autoTag:a?void 0:Tl(t.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:t.parser.settings.leqno},"display"),c=0,f=0,p={type:"ordgroup",mode:t.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var g="",m=0;m<r[0].body.length;m++){var w=nt(r[0].body[m],"textord");g+=w.text}c=Number(g),f=c*2}var k=!f;s.body.forEach(function(T){for(var S=1;S<T.length;S+=2){var F=nt(T[S],"styling"),z=nt(F.body[0],"ordgroup");z.body.unshift(p)}if(k)f<T.length&&(f=T.length);else{var R=T.length/2;if(c<R)throw new Te("Too many math in a row: "+("expected "+c+", but got "+R),T[0])}});for(var C=0;C<f;++C){var B="r",_=0;C%2===1?B="l":C>0&&k&&(_=1),n[C]={type:"align",align:B,pregap:_,postgap:0}}return s.colSeparationType=k?"align":"alignat",s};Gr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=Ju(t[0]),n=r?[t[0]]:nt(t[0],"ordgroup").body,i=n.map(function(s){var c=Qu(s),f=c.text;if("lcr".includes(f))return{type:"align",align:f};if(f==="|")return{type:"separator",separator:"|"};if(f===":")return{type:"separator",separator:":"};throw new Te("Unknown column alignment: "+f,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return In(e.parser,a,Bl(e.envName))},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new Te("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=In(e.parser,n,Bl(e.envName)),s=Math.max(0,...a.body.map(c=>c.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=In(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=Ju(t[0]),n=r?[t[0]]:nt(t[0],"ordgroup").body,i=n.map(function(c){var f=Qu(c),p=f.text;if("lc".includes(p))return{type:"align",align:p};throw new Te("Unknown column alignment: "+p,c)});if(i.length>1)throw new Te("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},s=In(e.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new Te("{subarray} can contain only one column");return s},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=In(e.parser,t,Bl(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:s2,htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){B5.has(e.envName)&&uo(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:Tl(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return In(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:s2,htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){uo(e);var t={autoTag:Tl(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return In(e.parser,t,"display")},htmlBuilder:Xr,mathmlBuilder:Yr}),Gr({type:"array",names:["CD"],props:{numArgs:0},handler(e){return uo(e),y5(e.parser)},htmlBuilder:Xr,mathmlBuilder:Yr}),O("\\nonumber","\\gdef\\@eqnsw{0}"),O("\\notag","\\nonumber"),Pe({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Te(e.funcName+" valid only within array environment")}});var l2=i2;Pe({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new Te("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=nt(i.body[s],"textord").text;if(n==="\\begin"){if(!l2.hasOwnProperty(a))throw new Te("No such environment: "+a,i);var c=l2[a],{args:f,optArgs:p}=r.parseArguments("\\begin{"+a+"}",c),g={mode:r.mode,envName:a,parser:r},m=c.handler(g,f,p);r.expect("\\end",!1);var w=r.nextToken,k=nt(r.parseFunction(),"environment");if(k.name!==a)throw new Te("Mismatch: \\begin{"+a+"} matched by \\end{"+k.name+"}",w);return m}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});var c2=(e,t)=>{var r=e.font,n=t.withFont(r);return gt(e.body,n)},d2=(e,t)=>{var r=e.font,n=t.withFont(r);return Ct(e.body,n)},f2={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Pe({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=Xu(t[0]),a=n;return a in f2&&(a=f2[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:c2,mathmlBuilder:d2}),Pe({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:to(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:dn(n)}}}),Pe({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,s=r.parseExpression(!0,i),c="math"+n.slice(1);return{type:"font",mode:a,font:c,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:c2,mathmlBuilder:d2});var N5=(e,t)=>{var r=t.style,n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var s=gt(e.numer,a,t);if(e.continued){var c=8.5/t.fontMetrics().ptPerEm,f=3.5/t.fontMetrics().ptPerEm;s.height=s.height<c?c:s.height,s.depth=s.depth<f?f:s.depth}a=t.havingStyle(i);var p=gt(e.denom,a,t),g,m,w;e.hasBarLine?(e.barSize?(m=qt(e.barSize,t),g=za("frac-line",t,m)):g=za("frac-line",t),m=g.height,w=g.height):(g=null,m=0,w=t.fontMetrics().defaultRuleThickness);var k,C,B;r.size===et.DISPLAY.size?(k=t.fontMetrics().num1,m>0?C=3*w:C=7*w,B=t.fontMetrics().denom1):(m>0?(k=t.fontMetrics().num2,C=w):(k=t.fontMetrics().num3,C=3*w),B=t.fontMetrics().denom2);var _;if(g){var S=t.fontMetrics().axisHeight;k-s.depth-(S+.5*m)<C&&(k+=C-(k-s.depth-(S+.5*m))),S-.5*m-(p.height-B)<C&&(B+=C-(S-.5*m-(p.height-B)));var F=-(S-.5*m);_=pt({positionType:"individualShift",children:[{type:"elem",elem:p,shift:B},{type:"elem",elem:g,shift:F},{type:"elem",elem:s,shift:-k}]})}else{var T=k-s.depth-(p.height-B);T<C&&(k+=.5*(C-T),B+=.5*(C-T)),_=pt({positionType:"individualShift",children:[{type:"elem",elem:p,shift:B},{type:"elem",elem:s,shift:-k}]})}a=t.havingStyle(r),_.height*=a.sizeMultiplier/t.sizeMultiplier,_.depth*=a.sizeMultiplier/t.sizeMultiplier;var z;r.size===et.DISPLAY.size?z=t.fontMetrics().delim1:r.size===et.SCRIPTSCRIPT.size?z=t.havingStyle(et.SCRIPT).fontMetrics().delim2:z=t.fontMetrics().delim2;var R,$;return e.leftDelim==null?R=ki(t,["mopen"]):R=El(e.leftDelim,z,!0,t.havingStyle(r),e.mode,["mopen"]),e.continued?$=Ee([]):e.rightDelim==null?$=ki(t,["mclose"]):$=El(e.rightDelim,z,!0,t.havingStyle(r),e.mode,["mclose"]),Ee(["mord"].concat(a.sizingClasses(t)),[R,Ee(["mfrac"],[_]),$],t)},_5=(e,t)=>{var r=new Be("mfrac",[Ct(e.numer,t),Ct(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=qt(e.barSize,t);r.setAttribute("linethickness",_e(n))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Be("mo",[new n0(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),e.rightDelim!=null){var s=new Be("mo",[new n0(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),i.push(s)}return pl(i)}return r},h2=(e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r};Pe({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],s,c=null,f=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,c="(",f=")";break;case"\\\\bracefrac":s=!1,c="\\{",f="\\}";break;case"\\\\brackfrac":s=!1,c="[",f="]";break;default:throw new Error("Unrecognized genfrac command")}var p=n==="\\cfrac",g=null;return p||n.startsWith("\\d")?g="display":n.startsWith("\\t")&&(g="text"),h2({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:p,hasBarLine:s,leftDelim:c,rightDelim:f,barSize:null},g)},htmlBuilder:N5,mathmlBuilder:_5}),Pe({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});var m2=["display","text","script","scriptscript"],p2=function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r};Pe({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=Xu(t[0]),s=a.type==="atom"&&a.family==="open"?p2(a.text):null,c=Xu(t[1]),f=c.type==="atom"&&c.family==="close"?p2(c.text):null,p=nt(t[2],"size"),g,m=null;p.isBlank?g=!0:(m=p.value,g=m.number>0);var w=null,k=t[3];if(k.type==="ordgroup"){if(k.body.length>0){var C=nt(k.body[0],"textord");w=m2[Number(C.text)]}}else k=nt(k,"textord"),w=m2[Number(k.text)];return h2({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:g,barSize:m,leftDelim:s,rightDelim:f},w)}}),Pe({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:nt(t[0],"size").value,token:i}}}),Pe({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=nt(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=t[2],c=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:c,barSize:a,leftDelim:null,rightDelim:null}}});var g2=(e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?gt(e.sup,t.havingStyle(r.sup()),t):gt(e.sub,t.havingStyle(r.sub()),t),i=nt(e.base,"horizBrace")):i=nt(e,"horizBrace");var a=gt(i.base,t.havingBaseStyle(et.DISPLAY)),s=Ku(i,t),c;if(i.isOver?(c=pt({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]}),c.children[0].children[0].children[1].classes.push("svg-align")):(c=pt({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]}),c.children[0].children[0].children[0].classes.push("svg-align")),n){var f=Ee(["minner",i.isOver?"mover":"munder"],[c],t);i.isOver?c=pt({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:.2},{type:"elem",elem:n}]}):c=pt({positionType:"bottom",positionData:f.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:f}]})}return Ee(["minner",i.isOver?"mover":"munder"],[c],t)},z5=(e,t)=>{var r=Zu(e.label);return new Be(e.isOver?"mover":"munder",[Ct(e.base,t),r])};Pe({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:g2,mathmlBuilder:z5}),Pe({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[1],i=nt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:r0(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=d0(e.body,t,!1);return K6(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=zn(e.body,t);return r instanceof Be||(r=new Be("mrow",[r])),r.setAttribute("href",e.href),r}}),Pe({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=nt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var c={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:r0(c)}}}),Pe({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(e,t){var{parser:r}=e;return{type:"hbox",mode:r.mode,body:r0(t[0])}},htmlBuilder(e,t){var r=d0(e.body,t,!1);return pn(r)},mathmlBuilder(e,t){return new Be("mrow",rr(e.body,t))}}),Pe({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n,token:i}=e,a=nt(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var c,f={};switch(n){case"\\htmlClass":f.class=a,c={command:"\\htmlClass",class:a};break;case"\\htmlId":f.id=a,c={command:"\\htmlId",id:a};break;case"\\htmlStyle":f.style=a,c={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var p=a.split(","),g=0;g<p.length;g++){var m=p[g],w=m.indexOf("=");if(w<0)throw new Te("\\htmlData key/value '"+m+"' missing equals sign");var k=m.slice(0,w),C=m.slice(w+1);f["data-"+k.trim()]=C}c={command:"\\htmlData",attributes:f};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(c)?{type:"html",mode:r.mode,attributes:f,body:r0(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(e,t)=>{var r=d0(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=Ee(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>zn(e.body,t)}),Pe({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:r0(t[0]),mathml:r0(t[1])}},htmlBuilder:(e,t)=>{var r=d0(e.html,t,!1);return pn(r)},mathmlBuilder:(e,t)=>zn(e.mathml,t)});var Ml=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new Te("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!pd(n))throw new Te("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Pe({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},c="";if(r[0])for(var f=nt(r[0],"raw").string,p=f.split(","),g=0;g<p.length;g++){var m=p[g].split("=");if(m.length===2){var w=m[1].trim();switch(m[0].trim()){case"alt":c=w;break;case"width":i=Ml(w);break;case"height":a=Ml(w);break;case"totalheight":s=Ml(w);break;default:throw new Te("Invalid key: '"+m[0]+"' in \\includegraphics.")}}}var k=nt(t[0],"url").url;return c===""&&(c=k,c=c.replace(/^.*[\\/]/,""),c=c.substring(0,c.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:k})?{type:"includegraphics",mode:n.mode,alt:c,width:i,height:a,totalheight:s,src:k}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(e,t)=>{var r=qt(e.height,t),n=0;e.totalheight.number>0&&(n=qt(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=qt(e.width,t));var a={height:_e(r+n)};i>0&&(a.width=_e(i)),n>0&&(a.verticalAlign=_e(-n));var s=new P6(e.src,e.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(e,t)=>{var r=new Be("mglyph",[]);r.setAttribute("alt",e.alt);var n=qt(e.height,t),i=0;if(e.totalheight.number>0&&(i=qt(e.totalheight,t)-n,r.setAttribute("valign",_e(-i))),r.setAttribute("height",_e(n+i)),e.width.number>0){var a=qt(e.width,t);r.setAttribute("width",_e(a))}return r.setAttribute("src",e.src),r}}),Pe({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=nt(t[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return Ed(e.dimension,t)},mathmlBuilder(e,t){var r=qt(e.dimension,t);return new _d(r)}}),Pe({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(e,t)=>{var r;e.alignment==="clap"?(r=Ee([],[gt(e.body,t)]),r=Ee(["inner"],[r],t)):r=Ee(["inner"],[gt(e.body,t)]);var n=Ee(["fix"],[]),i=Ee([e.alignment],[r,n],t),a=Ee(["strut"]);return a.style.height=_e(i.height+i.depth),i.depth&&(a.style.verticalAlign=_e(-i.depth)),i.children.unshift(a),i=Ee(["thinbox"],[i],t),Ee(["mord","vbox"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Be("mpadded",[Ct(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}}),Pe({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}}),Pe({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Te("Mismatched "+e.funcName)}});var b2=(e,t)=>{switch(t.style.size){case et.DISPLAY.size:return e.display;case et.TEXT.size:return e.text;case et.SCRIPT.size:return e.script;case et.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};Pe({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:r0(t[0]),text:r0(t[1]),script:r0(t[2]),scriptscript:r0(t[3])}},htmlBuilder:(e,t)=>{var r=b2(e,t),n=d0(r,t,!1);return pn(n)},mathmlBuilder:(e,t)=>{var r=b2(e,t);return zn(r,t)}});var y2=(e,t,r,n,i,a,s)=>{e=Ee([],[e]);var c=r&&dn(r),f,p;if(t){var g=gt(t,n.havingStyle(i.sup()),n);p={elem:g,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-g.depth)}}if(r){var m=gt(r,n.havingStyle(i.sub()),n);f={elem:m,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-m.height)}}var w;if(p&&f){var k=n.fontMetrics().bigOpSpacing5+f.elem.height+f.elem.depth+f.kern+e.depth+s;w=pt({positionType:"bottom",positionData:k,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:_e(-a)},{type:"kern",size:f.kern},{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:_e(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(f){var C=e.height-s;w=pt({positionType:"top",positionData:C,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:f.elem,marginLeft:_e(-a)},{type:"kern",size:f.kern},{type:"elem",elem:e}]})}else if(p){var B=e.depth+s;w=pt({positionType:"bottom",positionData:B,children:[{type:"elem",elem:e},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:_e(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var _=[w];if(f&&a!==0&&!c){var T=Ee(["mspace"],[],n);T.style.marginRight=_e(a),_.unshift(T)}return Ee(["mop","op-limits"],_,n)},v2=new Set(["\\smallint"]),Oa=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=nt(e.base,"op"),i=!0):a=nt(e,"op");var s=t.style,c=!1;s.size===et.DISPLAY.size&&a.symbol&&!v2.has(a.name)&&(c=!0);var f;if(a.symbol){var p=c?"Size2-Regular":"Size1-Regular",g="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(g=a.name.slice(1),a.name=g==="oiint"?"\\iint":"\\iiint"),f=P0(a.name,p,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),g.length>0){var m=f.italic,w=Td(g+"Size"+(c?"2":"1"),t);f=pt({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:w,shift:c?.08:0}]}),a.name="\\"+g,f.classes.unshift("mop"),f.italic=m}}else if(a.body){var k=d0(a.body,t,!0);k.length===1&&k[0]instanceof er?(f=k[0],f.classes[0]="mop"):f=Ee(["mop"],k,t)}else{for(var C=[],B=1;B<a.name.length;B++)C.push(sl(a.name[B],a.mode,t));f=Ee(["mop"],C,t)}var _=0,T=0;return(f instanceof er||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(_=(f.height-f.depth)/2-t.fontMetrics().axisHeight,T=f.italic||0),i?y2(f,r,n,t,s,T,_):(_&&(f.style.position="relative",f.style.top=_e(_)),f)},Ei=(e,t)=>{var r;if(e.symbol)r=new Be("mo",[br(e.name,e.mode)]),v2.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Be("mo",rr(e.body,t));else{r=new Be("mi",[new n0(e.name.slice(1))]);var n=new Be("mo",[br("","text")]);e.parentIsSupSub?r=new Be("mrow",[r,n]):r=Nd([r,n])}return r},I5={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Pe({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=I5[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:r0(n)}},htmlBuilder:Oa,mathmlBuilder:Ei});var O5={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Pe({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Oa,mathmlBuilder:Ei}),Pe({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=O5[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Oa,mathmlBuilder:Ei});var w2=(e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=nt(e.base,"operatorname"),i=!0):a=nt(e,"operatorname");var s;if(a.body.length>0){for(var c=a.body.map(m=>{var w="text"in m?m.text:void 0;return typeof w=="string"?{type:"textord",mode:m.mode,text:w}:m}),f=d0(c,t.withFont("mathrm"),!0),p=0;p<f.length;p++){var g=f[p];g instanceof er&&(g.text=g.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=Ee(["mop"],f,t)}else s=Ee(["mop"],[],t);return i?y2(s,r,n,t,t.style,0,0):s},L5=(e,t)=>{for(var r=rr(e.body,t.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof _d))if(a instanceof Be)switch(a.type){case"mi":case"mn":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof n0?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var c=r.map(g=>g.toText()).join("");r=[new n0(c)]}var f=new Be("mi",r);f.setAttribute("mathvariant","normal");var p=new Be("mo",[br("","text")]);return e.parentIsSupSub?new Be("mrow",[f,p]):Nd([f,p])};Pe({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:r0(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:w2,mathmlBuilder:L5}),O("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),da({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?pn(d0(e.body,t,!1)):Ee(["mord"],d0(e.body,t,!0),t)},mathmlBuilder(e,t){return zn(e.body,t,!0)}}),Pe({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=gt(e.body,t.havingCrampedStyle()),n=za("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return Ee(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new Be("mo",[new n0("‾")]);r.setAttribute("stretchy","true");var n=new Be("mover",[Ct(e.body,t),r]);return n.setAttribute("accent","true"),n}}),Pe({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:r0(n)}},htmlBuilder:(e,t)=>{var r=d0(e.body,t.withPhantom(),!1);return pn(r)},mathmlBuilder:(e,t)=>{var r=rr(e.body,t);return new Be("mphantom",r)}}),O("\\hphantom","\\smash{\\phantom{#1}}"),Pe({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(e,t)=>{var r=Ee(["inner"],[gt(e.body,t.withPhantom())]),n=Ee(["fix"],[]);return Ee(["mord","rlap"],[r,n],t)},mathmlBuilder:(e,t)=>{var r=rr(r0(e.body),t),n=new Be("mphantom",r),i=new Be("mpadded",[n]);return i.setAttribute("width","0px"),i}}),Pe({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=nt(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=gt(e.body,t),n=qt(e.dy,t);return pt({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Be("mpadded",[Ct(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}}),Pe({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),Pe({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=nt(t[0],"size"),s=nt(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&nt(i,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=Ee(["mord","rule"],[],t),n=qt(e.width,t),i=qt(e.height,t),a=e.shift?qt(e.shift,t):0;return r.style.borderRightWidth=_e(n),r.style.borderTopWidth=_e(i),r.style.bottom=_e(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=qt(e.width,t),n=qt(e.height,t),i=e.shift?qt(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new Be("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",_e(r)),s.setAttribute("height",_e(n));var c=new Be("mpadded",[s]);return i>=0?c.setAttribute("height",_e(i)):(c.setAttribute("height",_e(i)),c.setAttribute("depth",_e(-i))),c.setAttribute("voffset",_e(i)),c}});function x2(e,t,r){for(var n=d0(e,t,!1),i=t.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,t.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+t.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return pn(n)}var A2=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],R5=(e,t)=>{var r=t.havingSize(e.size);return x2(e.body,r,t)};Pe({type:"sizing",names:A2,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:A2.indexOf(n)+1,body:a}},htmlBuilder:R5,mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),n=rr(e.body,r),i=new Be("mstyle",n);return i.setAttribute("mathsize",_e(r.sizeMultiplier)),i}}),Pe({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:n}=e,i=!1,a=!1,s=r[0]&&nt(r[0],"ordgroup");if(s)for(var c="",f=0;f<s.body.length;++f){var p=s.body[f];if(c=Qu(p).text,c==="t")i=!0;else if(c==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var g=t[0];return{type:"smash",mode:n.mode,body:g,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var r=Ee([],[gt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return Ee(["mord","smash"],[r],t);if(r.children)for(var n=0;n<r.children.length;n++)e.smashHeight&&(r.children[n].height=0),e.smashDepth&&(r.children[n].depth=0);var i=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r}]});return Ee(["mord"],[i],t)},mathmlBuilder:(e,t)=>{var r=new Be("mpadded",[Ct(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),Pe({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=gt(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=Ia(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.id<et.TEXT.id&&(a=t.fontMetrics().xHeight);var s=i+a/4,c=r.height+r.depth+s+i,{span:f,ruleWidth:p,advanceWidth:g}=k5(c,t),m=f.height-p;m>r.height+r.depth+s&&(s=(s+m-r.height-r.depth)/2);var w=f.height-r.height-s-p;r.style.paddingLeft=_e(g);var k=pt({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+w)},{type:"elem",elem:f},{type:"kern",size:p}]});if(e.index){var C=t.havingStyle(et.SCRIPTSCRIPT),B=gt(e.index,C,t),_=.6*(k.height-k.depth),T=pt({positionType:"shift",positionData:-_,children:[{type:"elem",elem:B}]}),S=Ee(["root"],[T]);return Ee(["mord","sqrt"],[S,k],t)}else return Ee(["mord","sqrt"],[k],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Be("mroot",[Ct(r,t),Ct(n,t)]):new Be("msqrt",[Ct(r,t)])}});var D2={display:et.DISPLAY,text:et.TEXT,script:et.SCRIPT,scriptscript:et.SCRIPTSCRIPT};Pe({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(e,t){var r=D2[e.style],n=t.havingStyle(r).withFont("");return x2(e.body,n,t)},mathmlBuilder(e,t){var r=D2[e.style],n=t.havingStyle(r),i=rr(e.body,n),a=new Be("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},c=s[e.style];return a.setAttribute("scriptlevel",c[0]),a.setAttribute("displaystyle",c[1]),a}});var P5=function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===et.DISPLAY.size||n.alwaysHandleSupSub);return i?Oa:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===et.DISPLAY.size||n.limits);return a?w2:null}else{if(n.type==="accent")return dn(n.base)?yl:null;if(n.type==="horizBrace"){var s=!t.sub;return s===n.isOver?g2:null}else return null}else return null};da({type:"supsub",htmlBuilder(e,t){var r=P5(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,s=gt(n,t),c,f,p=t.fontMetrics(),g=0,m=0,w=n&&dn(n);if(i){var k=t.havingStyle(t.style.sup());c=gt(i,k,t),w||(g=s.height-k.fontMetrics().supDrop*k.sizeMultiplier/t.sizeMultiplier)}if(a){var C=t.havingStyle(t.style.sub());f=gt(a,C,t),w||(m=s.depth+C.fontMetrics().subDrop*C.sizeMultiplier/t.sizeMultiplier)}var B;t.style===et.DISPLAY?B=p.sup1:t.style.cramped?B=p.sup3:B=p.sup2;var _=t.sizeMultiplier,T=_e(.5/p.ptPerEm/_),S=null;if(f){var F=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof er||F)&&(S=_e(-s.italic))}var z;if(c&&f){g=Math.max(g,B,c.depth+.25*p.xHeight),m=Math.max(m,p.sub2);var R=p.defaultRuleThickness,$=4*R;if(g-c.depth-(f.height-m)<$){m=$-(g-c.depth)+f.height;var Y=.8*p.xHeight-(g-c.depth);Y>0&&(g+=Y,m-=Y)}var q=[{type:"elem",elem:f,shift:m,marginRight:T,marginLeft:S},{type:"elem",elem:c,shift:-g,marginRight:T}];z=pt({positionType:"individualShift",children:q})}else if(f){m=Math.max(m,p.sub1,f.height-.8*p.xHeight);var pe=[{type:"elem",elem:f,marginLeft:S,marginRight:T}];z=pt({positionType:"shift",positionData:m,children:pe})}else if(c)g=Math.max(g,B,c.depth+.25*p.xHeight),z=pt({positionType:"shift",positionData:-g,children:[{type:"elem",elem:c,marginRight:T}]});else throw new Error("supsub must have either sup or sub.");var he=hl(s,"right")||"mord";return Ee([he],[s,Ee(["msupsub"],[z])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Ct(e.base,t)];e.sub&&a.push(Ct(e.sub,t)),e.sup&&a.push(Ct(e.sup,t));var s;if(r)s=n?"mover":"munder";else if(e.sub)if(e.sup){var p=e.base;p&&p.type==="op"&&p.limits&&t.style===et.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(t.style===et.DISPLAY||p.limits)?s="munderover":s="msubsup"}else{var f=e.base;f&&f.type==="op"&&f.limits&&(t.style===et.DISPLAY||f.alwaysHandleSupSub)||f&&f.type==="operatorname"&&f.alwaysHandleSupSub&&(f.limits||t.style===et.DISPLAY)?s="munder":s="msub"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(t.style===et.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||t.style===et.DISPLAY)?s="mover":s="msup"}return new Be(s,a)}}),da({type:"atom",htmlBuilder(e,t){return sl(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Be("mo",[br(e.text,e.mode)]);if(e.family==="bin"){var n=gl(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});var k2={mi:"italic",mn:"normal",mtext:"normal"};da({type:"mathord",htmlBuilder(e,t){return $u(e,t,"mathord")},mathmlBuilder(e,t){var r=new Be("mi",[br(e.text,e.mode,t)]),n=gl(e,t)||"italic";return n!==k2[r.type]&&r.setAttribute("mathvariant",n),r}}),da({type:"textord",htmlBuilder(e,t){return $u(e,t,"textord")},mathmlBuilder(e,t){var r=br(e.text,e.mode,t),n=gl(e,t)||"normal",i;return e.mode==="text"?i=new Be("mtext",[r]):/[0-9]/.test(e.text)?i=new Be("mn",[r]):e.text==="\\prime"?i=new Be("mo",[r]):i=new Be("mi",[r]),n!==k2[i.type]&&i.setAttribute("mathvariant",n),i}});var Nl={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},_l={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};da({type:"spacing",htmlBuilder(e,t){if(_l.hasOwnProperty(e.text)){var r=_l[e.text].className||"";if(e.mode==="text"){var n=$u(e,t,"textord");return n.classes.push(r),n}else return Ee(["mspace",r],[sl(e.text,e.mode,t)],t)}else{if(Nl.hasOwnProperty(e.text))return Ee(["mspace",Nl[e.text]],[],t);throw new Te('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(_l.hasOwnProperty(e.text))r=new Be("mtext",[new n0(" ")]);else{if(Nl.hasOwnProperty(e.text))return new Be("mspace");throw new Te('Unknown type of space "'+e.text+'"')}return r}});var C2=()=>{var e=new Be("mtd",[]);return e.setAttribute("width","50%"),e};da({type:"tag",mathmlBuilder(e,t){var r=new Be("mtable",[new Be("mtr",[C2(),new Be("mtd",[zn(e.body,t)]),C2(),new Be("mtd",[zn(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var S2={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},E2={"\\textbf":"textbf","\\textmd":"textmd"},V5={"\\textit":"textit","\\textup":"textup"},F2=(e,t)=>{var r=e.font;if(r){if(S2[r])return t.withTextFontFamily(S2[r]);if(E2[r])return t.withTextFontWeight(E2[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(V5[r])};Pe({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:r0(i),font:n}},htmlBuilder(e,t){var r=F2(e,t),n=d0(e.body,r,!0);return Ee(["mord","text"],n,r)},mathmlBuilder(e,t){var r=F2(e,t);return zn(e.body,r)}}),Pe({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=gt(e.body,t),n=za("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=pt({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return Ee(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new Be("mo",[new n0("‾")]);r.setAttribute("stretchy","true");var n=new Be("munder",[Ct(e.body,t),r]);return n.setAttribute("accentunder","true"),n}}),Pe({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=gt(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return pt({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){return new Be("mpadded",[Ct(e.body,t)],["vcenter"])}}),Pe({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=T2(e),n=[],i=t.havingStyle(t.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(P0(s,"Typewriter-Regular",e.mode,i,["mord","texttt"]))}return Ee(["mord","text"].concat(i.sizingClasses(t)),Sd(n),i)},mathmlBuilder(e,t){var r=new n0(T2(e)),n=new Be("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var T2=e=>e.body.replace(/ /g,e.star?"␣":" "),On=Bd,B2=`[ \r
|
|
262
262
|
]`,H5="\\\\[a-zA-Z@]+",q5="\\\\[^\uD800-\uDFFF]",j5="("+H5+")"+B2+"*",$5=`\\\\(
|
|
263
263
|
|[ \r ]+
|
|
264
264
|
?)[ \r ]*`,zl="[̀-ͯ]",U5=new RegExp(zl+"+$"),W5="("+B2+"+)|"+($5+"|")+"([!-\\[\\]-‧-豈-]"+(zl+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(zl+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+j5)+("|"+q5+")");class M2{constructor(t,r){this.input=t,this.settings=r,this.tokenRegex=new RegExp(W5,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new Er("EOF",new X0(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new Te("Unexpected character: '"+t[r]+"'",new Er(t[r],new X0(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(`
|
|
@@ -278,7 +278,7 @@ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
|
|
|
278
278
|
`:">",a},Pa.prototype.renderInline=function(e,t,r){let n="";const i=this.rules;for(let a=0,s=e.length;a<s;a++){const c=e[a].type;typeof i[c]<"u"?n+=i[c](e,a,t,r,this):n+=this.renderToken(e,a,t)}return n},Pa.prototype.renderInlineAsText=function(e,t,r){let n="";for(let i=0,a=e.length;i<a;i++)switch(e[i].type){case"text":n+=e[i].content;break;case"image":n+=this.renderInlineAsText(e[i].children,t,r);break;case"html_inline":case"html_block":n+=e[i].content;break;case"softbreak":case"hardbreak":n+=`
|
|
279
279
|
`;break}return n},Pa.prototype.render=function(e,t,r){let n="";const i=this.rules;for(let a=0,s=e.length;a<s;a++){const c=e[a].type;c==="inline"?n+=this.renderInline(e[a].children,t,r):typeof i[c]<"u"?n+=i[c](e,a,t,r,this):n+=this.renderToken(e,a,t,r)}return n};function Y0(){this.__rules__=[],this.__cache__=null}Y0.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1},Y0.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(r){r.enabled&&r.alt.forEach(function(n){t.indexOf(n)<0&&t.push(n)})}),e.__cache__={},t.forEach(function(r){e.__cache__[r]=[],e.__rules__.forEach(function(n){n.enabled&&(r&&n.alt.indexOf(r)<0||e.__cache__[r].push(n.fn))})})},Y0.prototype.at=function(e,t,r){const n=this.__find__(e),i=r||{};if(n===-1)throw new Error("Parser rule not found: "+e);this.__rules__[n].fn=t,this.__rules__[n].alt=i.alt||[],this.__cache__=null},Y0.prototype.before=function(e,t,r,n){const i=this.__find__(e),a=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:r,alt:a.alt||[]}),this.__cache__=null},Y0.prototype.after=function(e,t,r,n){const i=this.__find__(e),a=n||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:r,alt:a.alt||[]}),this.__cache__=null},Y0.prototype.push=function(e,t,r){const n=r||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:n.alt||[]}),this.__cache__=null},Y0.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!0,r.push(n)},this),this.__cache__=null,r},Y0.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(r){r.enabled=!1}),this.enable(e,t)},Y0.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const r=[];return e.forEach(function(n){const i=this.__find__(n);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+n)}this.__rules__[i].enabled=!1,r.push(n)},this),this.__cache__=null,r},Y0.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function Fr(e,t,r){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=r,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}Fr.prototype.attrIndex=function(t){if(!this.attrs)return-1;const r=this.attrs;for(let n=0,i=r.length;n<i;n++)if(r[n][0]===t)return n;return-1},Fr.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]},Fr.prototype.attrSet=function(t,r){const n=this.attrIndex(t),i=[t,r];n<0?this.attrPush(i):this.attrs[n]=i},Fr.prototype.attrGet=function(t){const r=this.attrIndex(t);let n=null;return r>=0&&(n=this.attrs[r][1]),n},Fr.prototype.attrJoin=function(t,r){const n=this.attrIndex(t);n<0?this.attrPush([t,r]):this.attrs[n][1]=this.attrs[n][1]+" "+r};function r4(e,t,r){this.src=e,this.env=r,this.tokens=[],this.inlineMode=!1,this.md=t}r4.prototype.Token=Fr;const G7=/\r\n?|\n/g,X7=/\0/g;function Y7(e){let t;t=e.src.replace(G7,`
|
|
280
280
|
`),t=t.replace(X7,"�"),e.src=t}function Z7(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 K7(e){const t=e.tokens;for(let r=0,n=t.length;r<n;r++){const i=t[r];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function Q7(e){return/^<a[>\s]/i.test(e)}function J7(e){return/^<\/a\s*>/i.test(e)}function e8(e){const t=e.tokens;if(e.md.options.linkify)for(let r=0,n=t.length;r<n;r++){if(t[r].type!=="inline"||!e.md.linkify.pretest(t[r].content))continue;let i=t[r].children,a=0;for(let s=i.length-1;s>=0;s--){const c=i[s];if(c.type==="link_close"){for(s--;i[s].level!==c.level&&i[s].type!=="link_open";)s--;continue}if(c.type==="html_inline"&&(Q7(c.content)&&a>0&&a--,J7(c.content)&&a++),!(a>0)&&c.type==="text"&&e.md.linkify.test(c.content)){const f=c.content;let p=e.md.linkify.match(f);const g=[];let m=c.level,w=0;p.length>0&&p[0].index===0&&s>0&&i[s-1].type==="text_special"&&(p=p.slice(1));for(let k=0;k<p.length;k++){const C=p[k].url,B=e.md.normalizeLink(C);if(!e.md.validateLink(B))continue;let _=p[k].text;p[k].schema?p[k].schema==="mailto:"&&!/^mailto:/i.test(_)?_=e.md.normalizeLinkText("mailto:"+_).replace(/^mailto:/,""):_=e.md.normalizeLinkText(_):_=e.md.normalizeLinkText("http://"+_).replace(/^http:\/\//,"");const T=p[k].index;if(T>w){const R=new e.Token("text","",0);R.content=f.slice(w,T),R.level=m,g.push(R)}const S=new e.Token("link_open","a",1);S.attrs=[["href",B]],S.level=m++,S.markup="linkify",S.info="auto",g.push(S);const F=new e.Token("text","",0);F.content=_,F.level=m,g.push(F);const z=new e.Token("link_close","a",-1);z.level=--m,z.markup="linkify",z.info="auto",g.push(z),w=p[k].lastIndex}if(w<f.length){const k=new e.Token("text","",0);k.content=f.slice(w),k.level=m,g.push(k)}t[r].children=i=e4(i,s,g)}}}}const n4=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,t8=/\((c|tm|r)\)/i,r8=/\((c|tm|r)\)/ig,n8={c:"©",r:"®",tm:"™"};function a8(e,t){return n8[t.toLowerCase()]}function i8(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&(n.content=n.content.replace(r8,a8)),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function u8(e){let t=0;for(let r=e.length-1;r>=0;r--){const n=e[r];n.type==="text"&&!t&&n4.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&t--,n.type==="link_close"&&n.info==="auto"&&t++}}function o8(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(t8.test(e.tokens[t].content)&&i8(e.tokens[t].children),n4.test(e.tokens[t].content)&&u8(e.tokens[t].children))}const s8=/['"]/,a4=/['"]/g,i4="’";function mo(e,t,r){return e.slice(0,t)+r+e.slice(t+1)}function l8(e,t){let r;const n=[];for(let i=0;i<e.length;i++){const a=e[i],s=e[i].level;for(r=n.length-1;r>=0&&!(n[r].level<=s);r--);if(n.length=r+1,a.type!=="text")continue;let c=a.content,f=0,p=c.length;e:for(;f<p;){a4.lastIndex=f;const g=a4.exec(c);if(!g)break;let m=!0,w=!0;f=g.index+1;const k=g[0]==="'";let C=32;if(g.index-1>=0)C=c.charCodeAt(g.index-1);else for(r=i-1;r>=0&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r--)if(e[r].content){C=e[r].content.charCodeAt(e[r].content.length-1);break}let B=32;if(f<p)B=c.charCodeAt(f);else for(r=i+1;r<e.length&&!(e[r].type==="softbreak"||e[r].type==="hardbreak");r++)if(e[r].content){B=e[r].content.charCodeAt(0);break}const _=Mi(C)||Bi(String.fromCharCode(C)),T=Mi(B)||Bi(String.fromCharCode(B)),S=Ti(C),F=Ti(B);if(F?m=!1:T&&(S||_||(m=!1)),S?w=!1:_&&(F||T||(w=!1)),B===34&&g[0]==='"'&&C>=48&&C<=57&&(w=m=!1),m&&w&&(m=_,w=T),!m&&!w){k&&(a.content=mo(a.content,g.index,i4));continue}if(w)for(r=n.length-1;r>=0;r--){let z=n[r];if(n[r].level<s)break;if(z.single===k&&n[r].level===s){z=n[r];let R,$;k?(R=t.md.options.quotes[2],$=t.md.options.quotes[3]):(R=t.md.options.quotes[0],$=t.md.options.quotes[1]),a.content=mo(a.content,g.index,$),e[z.token].content=mo(e[z.token].content,z.pos,R),f+=$.length-1,z.token===i&&(f+=R.length-1),c=a.content,p=c.length,n.length=r;continue e}}m?n.push({token:i,pos:g.index,single:k,level:s}):w&&k&&(a.content=mo(a.content,g.index,i4))}}}function c8(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!s8.test(e.tokens[t].content)||l8(e.tokens[t].children,e)}function d8(e){let t,r;const n=e.tokens,i=n.length;for(let a=0;a<i;a++){if(n[a].type!=="inline")continue;const s=n[a].children,c=s.length;for(t=0;t<c;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=r=0;t<c;t++)s[t].type==="text"&&t+1<c&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==r&&(s[r]=s[t]),r++);t!==r&&(s.length=r)}}const Gl=[["normalize",Y7],["block",Z7],["inline",K7],["linkify",e8],["replacements",o8],["smartquotes",c8],["text_join",d8]];function Xl(){this.ruler=new Y0;for(let e=0;e<Gl.length;e++)this.ruler.push(Gl[e][0],Gl[e][1])}Xl.prototype.process=function(e){const t=this.ruler.getRules("");for(let r=0,n=t.length;r<n;r++)t[r](e)},Xl.prototype.State=r4;function Kr(e,t,r,n){this.src=e,this.md=t,this.env=r,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let a=0,s=0,c=0,f=0,p=i.length,g=!1;s<p;s++){const m=i.charCodeAt(s);if(!g)if(Et(m)){c++,m===9?f+=4-f%4:f++;continue}else g=!0;(m===10||s===p-1)&&(m!==10&&s++,this.bMarks.push(a),this.eMarks.push(s),this.tShift.push(c),this.sCount.push(f),this.bsCount.push(0),g=!1,c=0,f=0,a=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}Kr.prototype.push=function(e,t,r){const n=new Fr(e,t,r);return n.block=!0,r<0&&this.level--,n.level=this.level,r>0&&this.level++,this.tokens.push(n),n},Kr.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]},Kr.prototype.skipEmptyLines=function(t){for(let r=this.lineMax;t<r&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t},Kr.prototype.skipSpaces=function(t){for(let r=this.src.length;t<r;t++){const n=this.src.charCodeAt(t);if(!Et(n))break}return t},Kr.prototype.skipSpacesBack=function(t,r){if(t<=r)return t;for(;t>r;)if(!Et(this.src.charCodeAt(--t)))return t+1;return t},Kr.prototype.skipChars=function(t,r){for(let n=this.src.length;t<n&&this.src.charCodeAt(t)===r;t++);return t},Kr.prototype.skipCharsBack=function(t,r,n){if(t<=n)return t;for(;t>n;)if(r!==this.src.charCodeAt(--t))return t+1;return t},Kr.prototype.getLines=function(t,r,n,i){if(t>=r)return"";const a=new Array(r-t);for(let s=0,c=t;c<r;c++,s++){let f=0;const p=this.bMarks[c];let g=p,m;for(c+1<r||i?m=this.eMarks[c]+1:m=this.eMarks[c];g<m&&f<n;){const w=this.src.charCodeAt(g);if(Et(w))w===9?f+=4-(f+this.bsCount[c])%4:f++;else if(g-p<this.tShift[c])f++;else break;g++}f>n?a[s]=new Array(f-n+1).join(" ")+this.src.slice(g,m):a[s]=this.src.slice(g,m)}return a.join("")},Kr.prototype.Token=Fr;const f8=65536;function Yl(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];return e.src.slice(r,n)}function u4(e){const t=[],r=e.length;let n=0,i=e.charCodeAt(n),a=!1,s=0,c="";for(;n<r;)i===124&&(a?(c+=e.substring(s,n-1),s=n):(t.push(c+e.substring(s,n)),c="",s=n+1)),a=i===92,n++,i=e.charCodeAt(n);return t.push(c+e.substring(s)),t}function h8(e,t,r,n){if(t+2>r)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let a=e.bMarks[i]+e.tShift[i];if(a>=e.eMarks[i])return!1;const s=e.src.charCodeAt(a++);if(s!==124&&s!==45&&s!==58||a>=e.eMarks[i])return!1;const c=e.src.charCodeAt(a++);if(c!==124&&c!==45&&c!==58&&!Et(c)||s===45&&Et(c))return!1;for(;a<e.eMarks[i];){const z=e.src.charCodeAt(a);if(z!==124&&z!==45&&z!==58&&!Et(z))return!1;a++}let f=Yl(e,t+1),p=f.split("|");const g=[];for(let z=0;z<p.length;z++){const R=p[z].trim();if(!R){if(z===0||z===p.length-1)continue;return!1}if(!/^:?-+:?$/.test(R))return!1;R.charCodeAt(R.length-1)===58?g.push(R.charCodeAt(0)===58?"center":"right"):R.charCodeAt(0)===58?g.push("left"):g.push("")}if(f=Yl(e,t).trim(),f.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;p=u4(f),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop();const m=p.length;if(m===0||m!==g.length)return!1;if(n)return!0;const w=e.parentType;e.parentType="table";const k=e.md.block.ruler.getRules("blockquote"),C=e.push("table_open","table",1),B=[t,0];C.map=B;const _=e.push("thead_open","thead",1);_.map=[t,t+1];const T=e.push("tr_open","tr",1);T.map=[t,t+1];for(let z=0;z<p.length;z++){const R=e.push("th_open","th",1);g[z]&&(R.attrs=[["style","text-align:"+g[z]]]);const $=e.push("inline","",0);$.content=p[z].trim(),$.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let S,F=0;for(i=t+2;i<r&&!(e.sCount[i]<e.blkIndent);i++){let z=!1;for(let $=0,Y=k.length;$<Y;$++)if(k[$](e,i,r,!0)){z=!0;break}if(z||(f=Yl(e,i).trim(),!f)||e.sCount[i]-e.blkIndent>=4||(p=u4(f),p.length&&p[0]===""&&p.shift(),p.length&&p[p.length-1]===""&&p.pop(),F+=m-p.length,F>f8))break;if(i===t+2){const $=e.push("tbody_open","tbody",1);$.map=S=[t+2,0]}const R=e.push("tr_open","tr",1);R.map=[i,i+1];for(let $=0;$<m;$++){const Y=e.push("td_open","td",1);g[$]&&(Y.attrs=[["style","text-align:"+g[$]]]);const q=e.push("inline","",0);q.content=p[$]?p[$].trim():"",q.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return S&&(e.push("tbody_close","tbody",-1),S[1]=i),e.push("table_close","table",-1),B[1]=i,e.parentType=w,e.line=i,!0}function m8(e,t,r){if(e.sCount[t]-e.blkIndent<4)return!1;let n=t+1,i=n;for(;n<r;){if(e.isEmpty(n)){n++;continue}if(e.sCount[n]-e.blkIndent>=4){n++,i=n;continue}break}e.line=i;const a=e.push("code_block","code",0);return a.content=e.getLines(t,i,4+e.blkIndent,!1)+`
|
|
281
|
-
`,a.map=[t,e.line],!0}function p8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;const s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let c=i;i=e.skipChars(i,s);let f=i-c;if(f<3)return!1;const p=e.src.slice(c,i),g=e.src.slice(i,a);if(s===96&&g.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let m=t,w=!1;for(;m++,!(m>=r||(i=c=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i<a&&e.sCount[m]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[m]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-c<f)&&(i=e.skipSpaces(i),!(i<a)))){w=!0;break}f=e.sCount[t],e.line=m+(w?1:0);const k=e.push("fence","code",0);return k.info=g,k.content=e.getLines(t+1,m,f,!0),k.markup=p,k.map=[t,e.line],!0}function g8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const c=[],f=[],p=[],g=[],m=e.md.block.ruler.getRules("blockquote"),w=e.parentType;e.parentType="blockquote";let k=!1,C;for(C=t;C<r;C++){const F=e.sCount[C]<e.blkIndent;if(i=e.bMarks[C]+e.tShift[C],a=e.eMarks[C],i>=a)break;if(e.src.charCodeAt(i++)===62&&!F){let R=e.sCount[C]+1,$,Y;e.src.charCodeAt(i)===32?(i++,R++,Y=!1,$=!0):e.src.charCodeAt(i)===9?($=!0,(e.bsCount[C]+R)%4===3?(i++,R++,Y=!1):Y=!0):$=!1;let q=R;for(c.push(e.bMarks[C]),e.bMarks[C]=i;i<a;){const pe=e.src.charCodeAt(i);if(Et(pe))pe===9?q+=4-(q+e.bsCount[C]+(Y?1:0))%4:q++;else break;i++}k=i>=a,f.push(e.bsCount[C]),e.bsCount[C]=e.sCount[C]+1+($?1:0),p.push(e.sCount[C]),e.sCount[C]=q-R,g.push(e.tShift[C]),e.tShift[C]=i-e.bMarks[C];continue}if(k)break;let z=!1;for(let R=0,$=m.length;R<$;R++)if(m[R](e,C,r,!0)){z=!0;break}if(z){e.lineMax=C,e.blkIndent!==0&&(c.push(e.bMarks[C]),f.push(e.bsCount[C]),g.push(e.tShift[C]),p.push(e.sCount[C]),e.sCount[C]-=e.blkIndent);break}c.push(e.bMarks[C]),f.push(e.bsCount[C]),g.push(e.tShift[C]),p.push(e.sCount[C]),e.sCount[C]=-1}const B=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const T=[t,0];_.map=T,e.md.block.tokenize(e,t,C);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=s,e.parentType=w,T[1]=e.line;for(let F=0;F<g.length;F++)e.bMarks[F+t]=c[F],e.tShift[F+t]=g[F],e.sCount[F+t]=p[F],e.bsCount[F+t]=f[F];return e.blkIndent=B,!0}function b8(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(a++);if(s!==42&&s!==45&&s!==95)return!1;let c=1;for(;a<i;){const p=e.src.charCodeAt(a++);if(p!==s&&!Et(p))return!1;p===s&&c++}if(c<3)return!1;if(n)return!0;e.line=t+1;const f=e.push("hr","hr",0);return f.map=[t,e.line],f.markup=Array(c+1).join(String.fromCharCode(s)),!0}function o4(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const a=e.src.charCodeAt(n);if(!Et(a))return-1}return n}function s4(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=n)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-r>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<n&&(a=e.src.charCodeAt(i),!Et(a))?-1:i}function y8(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function v8(e,t,r,n){let i,a,s,c,f=t,p=!0;if(e.sCount[f]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[f]-e.listIndent>=4&&e.sCount[f]<e.blkIndent)return!1;let g=!1;n&&e.parentType==="paragraph"&&e.sCount[f]>=e.blkIndent&&(g=!0);let m,w,k;if((k=s4(e,f))>=0){if(m=!0,s=e.bMarks[f]+e.tShift[f],w=Number(e.src.slice(s,k-1)),g&&w!==1)return!1}else if((k=o4(e,f))>=0)m=!1;else return!1;if(g&&e.skipSpaces(k)>=e.eMarks[f])return!1;if(n)return!0;const C=e.src.charCodeAt(k-1),B=e.tokens.length;m?(c=e.push("ordered_list_open","ol",1),w!==1&&(c.attrs=[["start",w]])):c=e.push("bullet_list_open","ul",1);const _=[f,0];c.map=_,c.markup=String.fromCharCode(C);let T=!1;const S=e.md.block.ruler.getRules("list"),F=e.parentType;for(e.parentType="list";f<r;){a=k,i=e.eMarks[f];const z=e.sCount[f]+k-(e.bMarks[f]+e.tShift[f]);let R=z;for(;a<i;){const Se=e.src.charCodeAt(a);if(Se===9)R+=4-(R+e.bsCount[f])%4;else if(Se===32)R++;else break;a++}const $=a;let Y;$>=i?Y=1:Y=R-z,Y>4&&(Y=1);const q=z+Y;c=e.push("list_item_open","li",1),c.markup=String.fromCharCode(C);const pe=[f,0];c.map=pe,m&&(c.info=e.src.slice(s,k-1));const he=e.tight,ce=e.tShift[f],be=e.sCount[f],ae=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=q,e.tight=!0,e.tShift[f]=$-e.bMarks[f],e.sCount[f]=R,$>=i&&e.isEmpty(f+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,f,r,!0),(!e.tight||T)&&(p=!1),T=e.line-f>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ae,e.tShift[f]=ce,e.sCount[f]=be,e.tight=he,c=e.push("list_item_close","li",-1),c.markup=String.fromCharCode(C),f=e.line,pe[1]=f,f>=r||e.sCount[f]<e.blkIndent||e.sCount[f]-e.blkIndent>=4)break;let xe=!1;for(let Se=0,te=S.length;Se<te;Se++)if(S[Se](e,f,r,!0)){xe=!0;break}if(xe)break;if(m){if(k=s4(e,f),k<0)break;s=e.bMarks[f]+e.tShift[f]}else if(k=o4(e,f),k<0)break;if(C!==e.src.charCodeAt(k-1))break}return m?c=e.push("ordered_list_close","ol",-1):c=e.push("bullet_list_close","ul",-1),c.markup=String.fromCharCode(C),_[1]=f,e.line=f,e.parentType=F,p&&y8(e,B),!0}function w8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function c(S){const F=e.lineMax;if(S>=F||e.isEmpty(S))return null;let z=!1;if(e.sCount[S]-e.blkIndent>3&&(z=!0),e.sCount[S]<0&&(z=!0),!z){const Y=e.md.block.ruler.getRules("reference"),q=e.parentType;e.parentType="reference";let pe=!1;for(let he=0,ce=Y.length;he<ce;he++)if(Y[he](e,S,F,!0)){pe=!0;break}if(e.parentType=q,pe)return null}const R=e.bMarks[S]+e.tShift[S],$=e.eMarks[S];return e.src.slice(R,$+1)}let f=e.src.slice(i,a+1);a=f.length;let p=-1;for(i=1;i<a;i++){const S=f.charCodeAt(i);if(S===91)return!1;if(S===93){p=i;break}else if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(S===92&&(i++,i<a&&f.charCodeAt(i)===10)){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}}if(p<0||f.charCodeAt(p+1)!==58)return!1;for(i=p+2;i<a;i++){const S=f.charCodeAt(i);if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(!Et(S))break}const g=e.md.helpers.parseLinkDestination(f,i,a);if(!g.ok)return!1;const m=e.md.normalizeLink(g.str);if(!e.md.validateLink(m))return!1;i=g.pos;const w=i,k=s,C=i;for(;i<a;i++){const S=f.charCodeAt(i);if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(!Et(S))break}let B=e.md.helpers.parseLinkTitle(f,i,a);for(;B.can_continue;){const S=c(s);if(S===null)break;f+=S,i=a,a=f.length,s++,B=e.md.helpers.parseLinkTitle(f,i,a,B)}let _;for(i<a&&C!==i&&B.ok?(_=B.str,i=B.pos):(_="",i=w,s=k);i<a;){const S=f.charCodeAt(i);if(!Et(S))break;i++}if(i<a&&f.charCodeAt(i)!==10&&_)for(_="",i=w,s=k;i<a;){const S=f.charCodeAt(i);if(!Et(S))break;i++}if(i<a&&f.charCodeAt(i)!==10)return!1;const T=ho(f.slice(1,p));return T?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[T]>"u"&&(e.env.references[T]={title:_,href:m}),e.line=s),!0):!1}const x8=["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"],A8="[a-zA-Z_:][a-zA-Z0-9:._-]*",D8="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",l4="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+A8+"(?:\\s*=\\s*"+D8+")?)")+"*\\s*\\/?>",c4="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",k8="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",C8="<[?][\\s\\S]*?[?]>",S8="<![A-Za-z][^>]*>",E8="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",F8=new RegExp("^(?:"+l4+"|"+c4+"|"+k8+"|"+C8+"|"+S8+"|"+E8+")"),T8=new RegExp("^(?:"+l4+"|"+c4+")"),Va=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+x8.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(T8.source+"\\s*$"),/^$/,!1]];function B8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let s=e.src.slice(i,a),c=0;for(;c<Va.length&&!Va[c][0].test(s);c++);if(c===Va.length)return!1;if(n)return Va[c][2];let f=t+1;if(!Va[c][1].test(s)){for(;f<r&&!(e.sCount[f]<e.blkIndent);f++)if(i=e.bMarks[f]+e.tShift[f],a=e.eMarks[f],s=e.src.slice(i,a),Va[c][1].test(s)){s.length!==0&&f++;break}}e.line=f;const p=e.push("html_block","",0);return p.map=[t,f],p.content=e.getLines(t,f,e.blkIndent,!0),!0}function M8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(s!==35||i>=a)return!1;let c=1;for(s=e.src.charCodeAt(++i);s===35&&i<a&&c<=6;)c++,s=e.src.charCodeAt(++i);if(c>6||i<a&&!Et(s))return!1;if(n)return!0;a=e.skipSpacesBack(a,i);const f=e.skipCharsBack(a,35,i);f>i&&Et(e.src.charCodeAt(f-1))&&(a=f),e.line=t+1;const p=e.push("heading_open","h"+String(c),1);p.markup="########".slice(0,c),p.map=[t,e.line];const g=e.push("inline","",0);g.content=e.src.slice(i,a).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close","h"+String(c),-1);return m.markup="########".slice(0,c),!0}function N8(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let a=0,s,c=t+1;for(;c<r&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3)continue;if(e.sCount[c]>=e.blkIndent){let k=e.bMarks[c]+e.tShift[c];const C=e.eMarks[c];if(k<C&&(s=e.src.charCodeAt(k),(s===45||s===61)&&(k=e.skipChars(k,s),k=e.skipSpaces(k),k>=C))){a=s===61?1:2;break}}if(e.sCount[c]<0)continue;let w=!1;for(let k=0,C=n.length;k<C;k++)if(n[k](e,c,r,!0)){w=!0;break}if(w)break}if(!a)return!1;const f=e.getLines(t,c,e.blkIndent,!1).trim();e.line=c+1;const p=e.push("heading_open","h"+String(a),1);p.markup=String.fromCharCode(s),p.map=[t,e.line];const g=e.push("inline","",0);g.content=f,g.map=[t,e.line-1],g.children=[];const m=e.push("heading_close","h"+String(a),-1);return m.markup=String.fromCharCode(s),e.parentType=i,!0}function _8(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let a=t+1;for(e.parentType="paragraph";a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let p=!1;for(let g=0,m=n.length;g<m;g++)if(n[g](e,a,r,!0)){p=!0;break}if(p)break}const s=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a;const c=e.push("paragraph_open","p",1);c.map=[t,e.line];const f=e.push("inline","",0);return f.content=s,f.map=[t,e.line],f.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const po=[["table",h8,["paragraph","reference"]],["code",m8],["fence",p8,["paragraph","reference","blockquote","list"]],["blockquote",g8,["paragraph","reference","blockquote","list"]],["hr",b8,["paragraph","reference","blockquote","list"]],["list",v8,["paragraph","reference","blockquote"]],["reference",w8],["html_block",B8,["paragraph","reference","blockquote"]],["heading",M8,["paragraph","reference","blockquote"]],["lheading",N8],["paragraph",_8]];function go(){this.ruler=new Y0;for(let e=0;e<po.length;e++)this.ruler.push(po[e][0],po[e][1],{alt:(po[e][2]||[]).slice()})}go.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,a=e.md.options.maxNesting;let s=t,c=!1;for(;s<r&&(e.line=s=e.skipEmptyLines(s),!(s>=r||e.sCount[s]<e.blkIndent));){if(e.level>=a){e.line=r;break}const f=e.line;let p=!1;for(let g=0;g<i;g++)if(p=n[g](e,s,r,!1),p){if(f>=e.line)throw new Error("block rule didn't increment state.line");break}if(!p)throw new Error("none of the block rules matched");e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),s=e.line,s<r&&e.isEmpty(s)&&(c=!0,s++,e.line=s)}},go.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)},go.prototype.State=Kr;function Ni(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ni.prototype.pushPending=function(){const e=new Fr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Ni.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new Fr(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},Ni.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let a=e;for(;a<r&&this.src.charCodeAt(a)===n;)a++;const s=a-e,c=a<r?this.src.charCodeAt(a):32,f=Mi(i)||Bi(String.fromCharCode(i)),p=Mi(c)||Bi(String.fromCharCode(c)),g=Ti(i),m=Ti(c),w=!m&&(!p||g||f),k=!g&&(!f||m||p);return{can_open:w&&(t||!k||f),can_close:k&&(t||!w||p),length:s}},Ni.prototype.Token=Fr;function z8(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 I8(e,t){let r=e.pos;for(;r<e.posMax&&!z8(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const O8=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function L8(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(O8);if(!i)return!1;const a=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-a.length));if(!s)return!1;let c=s.url;if(c.length<=a.length)return!1;let f=c.length;for(;f>0&&c.charCodeAt(f-1)===42;)f--;f!==c.length&&(c=c.slice(0,f));const p=e.md.normalizeLink(c);if(!e.md.validateLink(p))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);const g=e.push("link_open","a",1);g.attrs=[["href",p]],g.markup="linkify",g.info="auto";const m=e.push("text","",0);m.content=e.md.normalizeLinkText(c);const w=e.push("link_close","a",-1);w.markup="linkify",w.info="auto"}return e.pos+=c.length-a.length,!0}function R8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let a=n-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),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(r++;r<i&&Et(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const Zl=[];for(let e=0;e<256;e++)Zl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Zl[e.charCodeAt(0)]=1});function P8(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!Et(i));)r++;return e.pos=r,!0}let a=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const c=e.src.charCodeAt(r+1);c>=56320&&c<=57343&&(a+=e.src[r+1],r++)}const s="\\"+a;if(!t){const c=e.push("text_special","",0);i<256&&Zl[i]!==0?c.content=a:c.content=s,c.markup=s,c.info="escape"}return e.pos=r+1,!0}function V8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const a=e.posMax;for(;r<a&&e.src.charCodeAt(r)===96;)r++;const s=e.src.slice(i,r),c=s.length;if(e.backticksScanned&&(e.backticks[c]||0)<=i)return t||(e.pending+=s),e.pos+=c,!0;let f=r,p;for(;(p=e.src.indexOf("`",f))!==-1;){for(f=p+1;f<a&&e.src.charCodeAt(f)===96;)f++;const g=f-p;if(g===c){if(!t){const m=e.push("code_inline","code",0);m.markup=s,m.content=e.src.slice(r,p).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=f,!0}e.backticks[g]=p}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=c,!0}function H8(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let a=i.length;const s=String.fromCharCode(n);if(a<2)return!1;let c;a%2&&(c=e.push("text","",0),c.content=s,a--);for(let f=0;f<a;f+=2)c=e.push("text","",0),c.content=s+s,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function d4(e,t){let r;const n=[],i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.marker!==126||s.end===-1)continue;const c=t[s.end];r=e.tokens[s.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[c.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[c.token-1].type==="text"&&e.tokens[c.token-1].content==="~"&&n.push(c.token-1)}for(;n.length;){const a=n.pop();let s=a+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,a!==s&&(r=e.tokens[s],e.tokens[s]=e.tokens[a],e.tokens[a]=r)}}function q8(e){const t=e.tokens_meta,r=e.tokens_meta.length;d4(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&d4(e,t[n].delimiters)}const f4={tokenize:H8,postProcess:q8};function j8(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let a=0;a<i.length;a++){const s=e.push("text","",0);s.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function h4(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const a=t[i.end],s=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===a.token+1,c=String.fromCharCode(i.marker),f=e.tokens[i.token];f.type=s?"strong_open":"em_open",f.tag=s?"strong":"em",f.nesting=1,f.markup=s?c+c:c,f.content="";const p=e.tokens[a.token];p.type=s?"strong_close":"em_close",p.tag=s?"strong":"em",p.nesting=-1,p.markup=s?c+c:c,p.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function $8(e){const t=e.tokens_meta,r=e.tokens_meta.length;h4(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&h4(e,t[n].delimiters)}const m4={tokenize:j8,postProcess:$8};function U8(e,t){let r,n,i,a,s="",c="",f=e.pos,p=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const g=e.pos,m=e.posMax,w=e.pos+1,k=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(k<0)return!1;let C=k+1;if(C<m&&e.src.charCodeAt(C)===40){for(p=!1,C++;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);if(C>=m)return!1;if(f=C,i=e.md.helpers.parseLinkDestination(e.src,C,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?C=i.pos:s="",f=C;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);if(i=e.md.helpers.parseLinkTitle(e.src,C,e.posMax),C<m&&f!==C&&i.ok)for(c=i.str,C=i.pos;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);}(C>=m||e.src.charCodeAt(C)!==41)&&(p=!0),C++}if(p){if(typeof e.env.references>"u")return!1;if(C<m&&e.src.charCodeAt(C)===91?(f=C+1,C=e.md.helpers.parseLinkLabel(e,C),C>=0?n=e.src.slice(f,C++):C=k+1):C=k+1,n||(n=e.src.slice(w,k)),a=e.env.references[ho(n)],!a)return e.pos=g,!1;s=a.href,c=a.title}if(!t){e.pos=w,e.posMax=k;const B=e.push("link_open","a",1),_=[["href",s]];B.attrs=_,c&&_.push(["title",c]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=C,e.posMax=m,!0}function W8(e,t){let r,n,i,a,s,c,f,p,g="";const m=e.pos,w=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const k=e.pos+2,C=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(C<0)return!1;if(a=C+1,a<w&&e.src.charCodeAt(a)===40){for(a++;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);if(a>=w)return!1;for(p=a,c=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),c.ok&&(g=e.md.normalizeLink(c.str),e.md.validateLink(g)?a=c.pos:g=""),p=a;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);if(c=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<w&&p!==a&&c.ok)for(f=c.str,a=c.pos;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);else f="";if(a>=w||e.src.charCodeAt(a)!==41)return e.pos=m,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a<w&&e.src.charCodeAt(a)===91?(p=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(p,a++):a=C+1):a=C+1,i||(i=e.src.slice(k,C)),s=e.env.references[ho(i)],!s)return e.pos=m,!1;g=s.href,f=s.title}if(!t){n=e.src.slice(k,C);const B=[];e.md.inline.parse(n,e.md,e.env,B);const _=e.push("image","img",0),T=[["src",g],["alt",""]];_.attrs=T,_.children=B,_.content=n,f&&T.push(["title",f])}return e.pos=a,e.posMax=w,!0}const G8=/^([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])?)*)$/,X8=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Y8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const s=e.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}const a=e.src.slice(n+1,r);if(X8.test(a)){const s=e.md.normalizeLink(a);if(!e.md.validateLink(s))return!1;if(!t){const c=e.push("link_open","a",1);c.attrs=[["href",s]],c.markup="autolink",c.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const p=e.push("link_close","a",-1);p.markup="autolink",p.info="auto"}return e.pos+=a.length+2,!0}if(G8.test(a)){const s=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(s))return!1;if(!t){const c=e.push("link_open","a",1);c.attrs=[["href",s]],c.markup="autolink",c.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const p=e.push("link_close","a",-1);p.markup="autolink",p.info="auto"}return e.pos+=a.length+2,!0}return!1}function Z8(e){return/^<a[>\s]/i.test(e)}function K8(e){return/^<\/a\s*>/i.test(e)}function Q8(e){const t=e|32;return t>=97&&t<=122}function J8(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!Q8(i))return!1;const a=e.src.slice(n).match(F8);if(!a)return!1;if(!t){const s=e.push("html_inline","",0);s.content=a[0],Z8(s.content)&&e.linkLevel++,K8(s.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}const ep=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,tp=/^&([a-z][a-z0-9]{1,31});/i;function rp(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const a=e.src.slice(r).match(ep);if(a){if(!t){const s=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),c=e.push("text_special","",0);c.content=Wl(s)?fo(s):fo(65533),c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}else{const a=e.src.slice(r).match(tp);if(a){const s=J2(a[0]);if(s!==a[0]){if(!t){const c=e.push("text_special","",0);c.content=s,c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function p4(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const a=[];for(let s=0;s<r;s++){const c=e[s];if(a.push(0),(e[n].marker!==c.marker||i!==c.token-1)&&(n=s),i=c.token,c.length=c.length||0,!c.close)continue;t.hasOwnProperty(c.marker)||(t[c.marker]=[-1,-1,-1,-1,-1,-1]);const f=t[c.marker][(c.open?3:0)+c.length%3];let p=n-a[n]-1,g=p;for(;p>f;p-=a[p]+1){const m=e[p];if(m.marker===c.marker&&m.open&&m.end<0){let w=!1;if((m.close||c.open)&&(m.length+c.length)%3===0&&(m.length%3!==0||c.length%3!==0)&&(w=!0),!w){const k=p>0&&!e[p-1].open?a[p-1]+1:0;a[s]=s-p+k,a[p]=k,c.open=!1,m.end=s,m.close=!1,g=-1,i=-2;break}}}g!==-1&&(t[c.marker][(c.open?3:0)+(c.length||0)%3]=g)}}function np(e){const t=e.tokens_meta,r=e.tokens_meta.length;p4(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&p4(t[n].delimiters)}function ap(e){let t,r,n=0;const i=e.tokens,a=e.tokens.length;for(t=r=0;t<a;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<a&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const Kl=[["text",I8],["linkify",L8],["newline",R8],["escape",P8],["backticks",V8],["strikethrough",f4.tokenize],["emphasis",m4.tokenize],["link",U8],["image",W8],["autolink",Y8],["html_inline",J8],["entity",rp]],Ql=[["balance_pairs",np],["strikethrough",f4.postProcess],["emphasis",m4.postProcess],["fragments_join",ap]];function _i(){this.ruler=new Y0;for(let e=0;e<Kl.length;e++)this.ruler.push(Kl[e][0],Kl[e][1]);this.ruler2=new Y0;for(let e=0;e<Ql.length;e++)this.ruler2.push(Ql[e][0],Ql[e][1])}_i.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,a=e.cache;if(typeof a[t]<"u"){e.pos=a[t];return}let s=!1;if(e.level<i){for(let c=0;c<n;c++)if(e.level++,s=r[c](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,a[t]=e.pos},_i.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const a=e.pos;let s=!1;if(e.level<i){for(let c=0;c<r;c++)if(s=t[c](e,!1),s){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},_i.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const a=this.ruler2.getRules(""),s=a.length;for(let c=0;c<s;c++)a[c](i)},_i.prototype.State=Ni;function ip(e){const t={};e=e||{},t.src_Any=X2.source,t.src_Cc=Y2.source,t.src_Z=K2.source,t.src_P=ql.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Jl(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function bo(e){return Object.prototype.toString.call(e)}function up(e){return bo(e)==="[object String]"}function op(e){return bo(e)==="[object Object]"}function sp(e){return bo(e)==="[object RegExp]"}function g4(e){return bo(e)==="[object Function]"}function lp(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const b4={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function cp(e){return Object.keys(e||{}).reduce(function(t,r){return t||b4.hasOwnProperty(r)},!1)}const dp={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},fp="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]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",hp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function mp(e){e.__index__=-1,e.__text_cache__=""}function pp(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function y4(){return function(e,t){t.normalize(e)}}function yo(e){const t=e.re=ip(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(fp),r.push(t.src_xn),t.src_tlds=r.join("|");function n(c){return c.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function a(c,f){throw new Error('(LinkifyIt) Invalid schema "'+c+'": '+f)}Object.keys(e.__schemas__).forEach(function(c){const f=e.__schemas__[c];if(f===null)return;const p={validate:null,link:null};if(e.__compiled__[c]=p,op(f)){sp(f.validate)?p.validate=pp(f.validate):g4(f.validate)?p.validate=f.validate:a(c,f),g4(f.normalize)?p.normalize=f.normalize:f.normalize?a(c,f):p.normalize=y4();return}if(up(f)){i.push(c);return}a(c,f)}),i.forEach(function(c){e.__compiled__[e.__schemas__[c]]&&(e.__compiled__[c].validate=e.__compiled__[e.__schemas__[c]].validate,e.__compiled__[c].normalize=e.__compiled__[e.__schemas__[c]].normalize)}),e.__compiled__[""]={validate:null,normalize:y4()};const s=Object.keys(e.__compiled__).filter(function(c){return c.length>0&&e.__compiled__[c]}).map(lp).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),mp(e)}function gp(e,t){const r=e.__index__,n=e.__last_index__,i=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=i,this.text=i,this.url=i}function ec(e,t){const r=new gp(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function nr(e,t){if(!(this instanceof nr))return new nr(e,t);t||cp(e)&&(t=e,e={}),this.__opts__=Jl({},b4,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Jl({},dp,e),this.__compiled__={},this.__tlds__=hp,this.__tlds_replaced__=!1,this.re={},yo(this)}nr.prototype.add=function(t,r){return this.__schemas__[t]=r,yo(this),this},nr.prototype.set=function(t){return this.__opts__=Jl(this.__opts__,t),this},nr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let r,n,i,a,s,c,f,p,g;if(this.re.schema_test.test(t)){for(f=this.re.schema_search,f.lastIndex=0;(r=f.exec(t))!==null;)if(a=this.testSchemaAt(t,r[2],f.lastIndex),a){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(p=t.search(this.re.host_fuzzy_test),p>=0&&(this.__index__<0||p<this.__index__)&&(n=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(g=t.indexOf("@"),g>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,c=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&c>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=c))),this.__index__>=0},nr.prototype.pretest=function(t){return this.re.pretest.test(t)},nr.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0},nr.prototype.match=function(t){const r=[];let n=0;this.__index__>=0&&this.__text_cache__===t&&(r.push(ec(this,n)),n=this.__last_index__);let i=n?t.slice(n):t;for(;this.test(i);)r.push(ec(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},nr.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,ec(this,0)):null},nr.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,a){return n!==a[i-1]}).reverse(),yo(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,yo(this),this)},nr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},nr.prototype.onCompile=function(){};const Ha=2147483647,Qr=36,tc=1,zi=26,bp=38,yp=700,v4=72,w4=128,x4="-",vp=/^xn--/,wp=/[^\0-\x7F]/,xp=/[\x2E\u3002\uFF0E\uFF61]/g,Ap={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},rc=Qr-tc,Jr=Math.floor,nc=String.fromCharCode;function Vn(e){throw new RangeError(Ap[e])}function Dp(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function A4(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(xp,".");const i=e.split("."),a=Dp(i,t).join(".");return n+a}function D4(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const a=e.charCodeAt(r++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const kp=e=>String.fromCodePoint(...e),Cp=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Qr},k4=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},C4=function(e,t,r){let n=0;for(e=r?Jr(e/yp):e>>1,e+=Jr(e/t);e>rc*zi>>1;n+=Qr)e=Jr(e/rc);return Jr(n+(rc+1)*e/(e+bp))},S4=function(e){const t=[],r=e.length;let n=0,i=w4,a=v4,s=e.lastIndexOf(x4);s<0&&(s=0);for(let c=0;c<s;++c)e.charCodeAt(c)>=128&&Vn("not-basic"),t.push(e.charCodeAt(c));for(let c=s>0?s+1:0;c<r;){const f=n;for(let g=1,m=Qr;;m+=Qr){c>=r&&Vn("invalid-input");const w=Cp(e.charCodeAt(c++));w>=Qr&&Vn("invalid-input"),w>Jr((Ha-n)/g)&&Vn("overflow"),n+=w*g;const k=m<=a?tc:m>=a+zi?zi:m-a;if(w<k)break;const C=Qr-k;g>Jr(Ha/C)&&Vn("overflow"),g*=C}const p=t.length+1;a=C4(n-f,p,f==0),Jr(n/p)>Ha-i&&Vn("overflow"),i+=Jr(n/p),n%=p,t.splice(n++,0,i)}return String.fromCodePoint(...t)},E4=function(e){const t=[];e=D4(e);const r=e.length;let n=w4,i=0,a=v4;for(const f of e)f<128&&t.push(nc(f));const s=t.length;let c=s;for(s&&t.push(x4);c<r;){let f=Ha;for(const g of e)g>=n&&g<f&&(f=g);const p=c+1;f-n>Jr((Ha-i)/p)&&Vn("overflow"),i+=(f-n)*p,n=f;for(const g of e)if(g<n&&++i>Ha&&Vn("overflow"),g===n){let m=i;for(let w=Qr;;w+=Qr){const k=w<=a?tc:w>=a+zi?zi:w-a;if(m<k)break;const C=m-k,B=Qr-k;t.push(nc(k4(k+C%B,0))),m=Jr(C/B)}t.push(nc(k4(m,0))),a=C4(i,p,c===s),i=0,++c}++i,++n}return t.join("")},F4={version:"2.3.1",ucs2:{decode:D4,encode:kp},decode:S4,encode:E4,toASCII:function(e){return A4(e,function(t){return wp.test(t)?"xn--"+E4(t):t})},toUnicode:function(e){return A4(e,function(t){return vp.test(t)?S4(t.slice(4).toLowerCase()):t})}},Sp={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","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","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"]}}}},Ep=/^(vbscript|javascript|file|data):/,Fp=/^data:image\/(gif|png|jpeg|webp);/;function Tp(e){const t=e.trim().toLowerCase();return Ep.test(t)?Fp.test(t):!0}const T4=["http:","https:","mailto:"];function Bp(e){const t=Hl(e,!0);if(t.hostname&&(!t.protocol||T4.indexOf(t.protocol)>=0))try{t.hostname=F4.toASCII(t.hostname)}catch{}return Fi(Vl(t))}function Mp(e){const t=Hl(e,!0);if(t.hostname&&(!t.protocol||T4.indexOf(t.protocol)>=0))try{t.hostname=F4.toUnicode(t.hostname)}catch{}return La(Vl(t),La.defaultChars+"%")}function ar(e,t){if(!(this instanceof ar))return new ar(e,t);t||Ul(e)||(t=e||{},e="default"),this.inline=new _i,this.block=new go,this.core=new Xl,this.renderer=new Pa,this.linkify=new nr,this.validateLink=Tp,this.normalizeLink=Bp,this.normalizeLinkText=Mp,this.utils=q7,this.helpers=co({},W7),this.options={},this.configure(e),t&&this.set(t)}ar.prototype.set=function(e){return co(this.options,e),this},ar.prototype.configure=function(e){const t=this;if(Ul(e)){const r=e;if(e=Sp[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},ar.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},ar.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},ar.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},ar.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},ar.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},ar.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},ar.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var B4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N4={exports:{}},ac={exports:{}},_4;function Np(){return _4||(_4=1,function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:B4,function(){return function(){var r={};(function(){r.d=function(o,u){for(var l in u)r.o(u,l)&&!r.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:u[l]})}})(),function(){r.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)}}();var n={};r.d(n,{default:function(){return kw}});class i extends Error{constructor(u,l){let h="KaTeX parse error: "+u,b,D;const E=l&&l.loc;if(E&&E.start<=E.end){const I=E.lexer.input;b=E.start,D=E.end,b===I.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const P=I.slice(b,D).replace(/[^]/g,"$&̲");let G;b>15?G="…"+I.slice(b-15,b):G=I.slice(0,b);let re;D+15<I.length?re=I.slice(D,D+15)+"…":re=I.slice(D),h+=G+P+re}super(h),this.name="ParseError",Object.setPrototypeOf(this,i.prototype),this.position=b,b!=null&&D!=null&&(this.length=D-b),this.rawMessage=u}}var a=i;const s=/([A-Z])/g,c=o=>o.replace(s,"-$1").toLowerCase(),f={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g,g=o=>String(o).replace(p,u=>f[u]),m=o=>o.type==="ordgroup"||o.type==="color"?o.body.length===1?m(o.body[0]):o:o.type==="font"?m(o.body):o,w=new Set(["mathord","textord","atom"]),k=o=>w.has(m(o).type),C=o=>{const u=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(o);return u?u[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(u[1])?null:u[1].toLowerCase():"_relative"},B={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:o=>"#"+o},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(o,u)=>(u.push(o),u)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:o=>Math.max(0,o),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:o=>Math.max(0,o),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:o=>Math.max(0,o),cli:"-e, --max-expand <n>",cliProcessor:o=>o==="Infinity"?1/0:parseInt(o)},globalGroup:{type:"boolean",cli:!1}};function _(o){if("default"in o)return o.default;const u=o.type,l=Array.isArray(u)?u[0]:u;if(typeof l!="string")return l.enum[0];switch(l){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class T{constructor(u){u===void 0&&(u={}),u=u||{};for(const l of Object.keys(B)){const h=B[l],b=u[l];this[l]=b!==void 0?h.processor?h.processor(b):b:_(h)}}reportNonstrict(u,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(u,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+u+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+u+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+u+"]"))}}useStrictBehavior(u,l,h){let b=this.strict;if(typeof b=="function")try{b=b(u,l,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+u+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+u+"]")),!1)}isTrusted(u){if("url"in u&&u.url&&!u.protocol){const h=C(u.url);if(h==null)return!1;u.protocol=h}return!!(typeof this.trust=="function"?this.trust(u):this.trust)}}class S{constructor(u,l,h){this.id=u,this.size=l,this.cramped=h}sup(){return ce[be[this.id]]}sub(){return ce[ae[this.id]]}fracNum(){return ce[xe[this.id]]}fracDen(){return ce[Se[this.id]]}cramp(){return ce[te[this.id]]}text(){return ce[ye[this.id]]}isTight(){return this.size>=2}}const F=0,z=1,R=2,$=3,Y=4,q=5,pe=6,he=7,ce=[new S(F,0,!1),new S(z,0,!0),new S(R,1,!1),new S($,1,!0),new S(Y,2,!1),new S(q,2,!0),new S(pe,3,!1),new S(he,3,!0)],be=[Y,q,Y,q,pe,he,pe,he],ae=[q,q,q,q,he,he,he,he],xe=[R,$,Y,q,pe,he,pe,he],Se=[$,$,q,q,he,he,he,he],te=[z,z,$,$,q,q,he,he],ye=[F,z,R,$,R,$,R,$];var ne={DISPLAY:ce[F],TEXT:ce[R],SCRIPT:ce[Y],SCRIPTSCRIPT:ce[pe]};const Ne=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function We(o){for(let u=0;u<Ne.length;u++){const l=Ne[u];for(let h=0;h<l.blocks.length;h++){const b=l.blocks[h];if(o>=b[0]&&o<=b[1])return l.name}}return null}const X=[];Ne.forEach(o=>o.blocks.forEach(u=>X.push(...u)));function Z(o){for(let u=0;u<X.length;u+=2)if(o>=X[u]&&o<=X[u+1])return!0;return!1}const Q=80,ue=function(o,u){return"M95,"+(622+o+u)+`
|
|
281
|
+
`,a.map=[t,e.line],!0}function p8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>a)return!1;const s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let c=i;i=e.skipChars(i,s);let f=i-c;if(f<3)return!1;const p=e.src.slice(c,i),g=e.src.slice(i,a);if(s===96&&g.indexOf(String.fromCharCode(s))>=0)return!1;if(n)return!0;let m=t,w=!1;for(;m++,!(m>=r||(i=c=e.bMarks[m]+e.tShift[m],a=e.eMarks[m],i<a&&e.sCount[m]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[m]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-c<f)&&(i=e.skipSpaces(i),!(i<a)))){w=!0;break}f=e.sCount[t],e.line=m+(w?1:0);const k=e.push("fence","code",0);return k.info=g,k.content=e.getLines(t+1,m,f,!0),k.markup=p,k.map=[t,e.line],!0}function g8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(n)return!0;const c=[],f=[],p=[],g=[],m=e.md.block.ruler.getRules("blockquote"),w=e.parentType;e.parentType="blockquote";let k=!1,C;for(C=t;C<r;C++){const F=e.sCount[C]<e.blkIndent;if(i=e.bMarks[C]+e.tShift[C],a=e.eMarks[C],i>=a)break;if(e.src.charCodeAt(i++)===62&&!F){let R=e.sCount[C]+1,$,Y;e.src.charCodeAt(i)===32?(i++,R++,Y=!1,$=!0):e.src.charCodeAt(i)===9?($=!0,(e.bsCount[C]+R)%4===3?(i++,R++,Y=!1):Y=!0):$=!1;let q=R;for(c.push(e.bMarks[C]),e.bMarks[C]=i;i<a;){const pe=e.src.charCodeAt(i);if(Et(pe))pe===9?q+=4-(q+e.bsCount[C]+(Y?1:0))%4:q++;else break;i++}k=i>=a,f.push(e.bsCount[C]),e.bsCount[C]=e.sCount[C]+1+($?1:0),p.push(e.sCount[C]),e.sCount[C]=q-R,g.push(e.tShift[C]),e.tShift[C]=i-e.bMarks[C];continue}if(k)break;let z=!1;for(let R=0,$=m.length;R<$;R++)if(m[R](e,C,r,!0)){z=!0;break}if(z){e.lineMax=C,e.blkIndent!==0&&(c.push(e.bMarks[C]),f.push(e.bsCount[C]),g.push(e.tShift[C]),p.push(e.sCount[C]),e.sCount[C]-=e.blkIndent);break}c.push(e.bMarks[C]),f.push(e.bsCount[C]),g.push(e.tShift[C]),p.push(e.sCount[C]),e.sCount[C]=-1}const B=e.blkIndent;e.blkIndent=0;const _=e.push("blockquote_open","blockquote",1);_.markup=">";const T=[t,0];_.map=T,e.md.block.tokenize(e,t,C);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=s,e.parentType=w,T[1]=e.line;for(let F=0;F<g.length;F++)e.bMarks[F+t]=c[F],e.tShift[F+t]=g[F],e.sCount[F+t]=p[F],e.bsCount[F+t]=f[F];return e.blkIndent=B,!0}function b8(e,t,r,n){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let a=e.bMarks[t]+e.tShift[t];const s=e.src.charCodeAt(a++);if(s!==42&&s!==45&&s!==95)return!1;let c=1;for(;a<i;){const p=e.src.charCodeAt(a++);if(p!==s&&!Et(p))return!1;p===s&&c++}if(c<3)return!1;if(n)return!0;e.line=t+1;const f=e.push("hr","hr",0);return f.map=[t,e.line],f.markup=Array(c+1).join(String.fromCharCode(s)),!0}function o4(e,t){const r=e.eMarks[t];let n=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(n++);if(i!==42&&i!==45&&i!==43)return-1;if(n<r){const a=e.src.charCodeAt(n);if(!Et(a))return-1}return n}function s4(e,t){const r=e.bMarks[t]+e.tShift[t],n=e.eMarks[t];let i=r;if(i+1>=n)return-1;let a=e.src.charCodeAt(i++);if(a<48||a>57)return-1;for(;;){if(i>=n)return-1;if(a=e.src.charCodeAt(i++),a>=48&&a<=57){if(i-r>=10)return-1;continue}if(a===41||a===46)break;return-1}return i<n&&(a=e.src.charCodeAt(i),!Et(a))?-1:i}function y8(e,t){const r=e.level+2;for(let n=t+2,i=e.tokens.length-2;n<i;n++)e.tokens[n].level===r&&e.tokens[n].type==="paragraph_open"&&(e.tokens[n+2].hidden=!0,e.tokens[n].hidden=!0,n+=2)}function v8(e,t,r,n){let i,a,s,c,f=t,p=!0;if(e.sCount[f]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[f]-e.listIndent>=4&&e.sCount[f]<e.blkIndent)return!1;let g=!1;n&&e.parentType==="paragraph"&&e.sCount[f]>=e.blkIndent&&(g=!0);let m,w,k;if((k=s4(e,f))>=0){if(m=!0,s=e.bMarks[f]+e.tShift[f],w=Number(e.src.slice(s,k-1)),g&&w!==1)return!1}else if((k=o4(e,f))>=0)m=!1;else return!1;if(g&&e.skipSpaces(k)>=e.eMarks[f])return!1;if(n)return!0;const C=e.src.charCodeAt(k-1),B=e.tokens.length;m?(c=e.push("ordered_list_open","ol",1),w!==1&&(c.attrs=[["start",w]])):c=e.push("bullet_list_open","ul",1);const _=[f,0];c.map=_,c.markup=String.fromCharCode(C);let T=!1;const S=e.md.block.ruler.getRules("list"),F=e.parentType;for(e.parentType="list";f<r;){a=k,i=e.eMarks[f];const z=e.sCount[f]+k-(e.bMarks[f]+e.tShift[f]);let R=z;for(;a<i;){const Se=e.src.charCodeAt(a);if(Se===9)R+=4-(R+e.bsCount[f])%4;else if(Se===32)R++;else break;a++}const $=a;let Y;$>=i?Y=1:Y=R-z,Y>4&&(Y=1);const q=z+Y;c=e.push("list_item_open","li",1),c.markup=String.fromCharCode(C);const pe=[f,0];c.map=pe,m&&(c.info=e.src.slice(s,k-1));const he=e.tight,ce=e.tShift[f],be=e.sCount[f],ae=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=q,e.tight=!0,e.tShift[f]=$-e.bMarks[f],e.sCount[f]=R,$>=i&&e.isEmpty(f+1)?e.line=Math.min(e.line+2,r):e.md.block.tokenize(e,f,r,!0),(!e.tight||T)&&(p=!1),T=e.line-f>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ae,e.tShift[f]=ce,e.sCount[f]=be,e.tight=he,c=e.push("list_item_close","li",-1),c.markup=String.fromCharCode(C),f=e.line,pe[1]=f,f>=r||e.sCount[f]<e.blkIndent||e.sCount[f]-e.blkIndent>=4)break;let xe=!1;for(let Se=0,te=S.length;Se<te;Se++)if(S[Se](e,f,r,!0)){xe=!0;break}if(xe)break;if(m){if(k=s4(e,f),k<0)break;s=e.bMarks[f]+e.tShift[f]}else if(k=o4(e,f),k<0)break;if(C!==e.src.charCodeAt(k-1))break}return m?c=e.push("ordered_list_close","ol",-1):c=e.push("bullet_list_close","ul",-1),c.markup=String.fromCharCode(C),_[1]=f,e.line=f,e.parentType=F,p&&y8(e,B),!0}function w8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function c(S){const F=e.lineMax;if(S>=F||e.isEmpty(S))return null;let z=!1;if(e.sCount[S]-e.blkIndent>3&&(z=!0),e.sCount[S]<0&&(z=!0),!z){const Y=e.md.block.ruler.getRules("reference"),q=e.parentType;e.parentType="reference";let pe=!1;for(let he=0,ce=Y.length;he<ce;he++)if(Y[he](e,S,F,!0)){pe=!0;break}if(e.parentType=q,pe)return null}const R=e.bMarks[S]+e.tShift[S],$=e.eMarks[S];return e.src.slice(R,$+1)}let f=e.src.slice(i,a+1);a=f.length;let p=-1;for(i=1;i<a;i++){const S=f.charCodeAt(i);if(S===91)return!1;if(S===93){p=i;break}else if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(S===92&&(i++,i<a&&f.charCodeAt(i)===10)){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}}if(p<0||f.charCodeAt(p+1)!==58)return!1;for(i=p+2;i<a;i++){const S=f.charCodeAt(i);if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(!Et(S))break}const g=e.md.helpers.parseLinkDestination(f,i,a);if(!g.ok)return!1;const m=e.md.normalizeLink(g.str);if(!e.md.validateLink(m))return!1;i=g.pos;const w=i,k=s,C=i;for(;i<a;i++){const S=f.charCodeAt(i);if(S===10){const F=c(s);F!==null&&(f+=F,a=f.length,s++)}else if(!Et(S))break}let B=e.md.helpers.parseLinkTitle(f,i,a);for(;B.can_continue;){const S=c(s);if(S===null)break;f+=S,i=a,a=f.length,s++,B=e.md.helpers.parseLinkTitle(f,i,a,B)}let _;for(i<a&&C!==i&&B.ok?(_=B.str,i=B.pos):(_="",i=w,s=k);i<a;){const S=f.charCodeAt(i);if(!Et(S))break;i++}if(i<a&&f.charCodeAt(i)!==10&&_)for(_="",i=w,s=k;i<a;){const S=f.charCodeAt(i);if(!Et(S))break;i++}if(i<a&&f.charCodeAt(i)!==10)return!1;const T=ho(f.slice(1,p));return T?(n||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[T]>"u"&&(e.env.references[T]={title:_,href:m}),e.line=s),!0):!1}const x8=["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"],A8="[a-zA-Z_:][a-zA-Z0-9:._-]*",D8="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",l4="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+A8+"(?:\\s*=\\s*"+D8+")?)")+"*\\s*\\/?>",c4="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",k8="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",C8="<[?][\\s\\S]*?[?]>",S8="<![A-Za-z][^>]*>",E8="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",F8=new RegExp("^(?:"+l4+"|"+c4+"|"+k8+"|"+C8+"|"+S8+"|"+E8+")"),T8=new RegExp("^(?:"+l4+"|"+c4+")"),Va=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+x8.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(T8.source+"\\s*$"),/^$/,!1]];function B8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let s=e.src.slice(i,a),c=0;for(;c<Va.length&&!Va[c][0].test(s);c++);if(c===Va.length)return!1;if(n)return Va[c][2];let f=t+1;if(!Va[c][1].test(s)){for(;f<r&&!(e.sCount[f]<e.blkIndent);f++)if(i=e.bMarks[f]+e.tShift[f],a=e.eMarks[f],s=e.src.slice(i,a),Va[c][1].test(s)){s.length!==0&&f++;break}}e.line=f;const p=e.push("html_block","",0);return p.map=[t,f],p.content=e.getLines(t,f,e.blkIndent,!0),!0}function M8(e,t,r,n){let i=e.bMarks[t]+e.tShift[t],a=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(s!==35||i>=a)return!1;let c=1;for(s=e.src.charCodeAt(++i);s===35&&i<a&&c<=6;)c++,s=e.src.charCodeAt(++i);if(c>6||i<a&&!Et(s))return!1;if(n)return!0;a=e.skipSpacesBack(a,i);const f=e.skipCharsBack(a,35,i);f>i&&Et(e.src.charCodeAt(f-1))&&(a=f),e.line=t+1;const p=e.push("heading_open","h"+String(c),1);p.markup="########".slice(0,c),p.map=[t,e.line];const g=e.push("inline","",0);g.content=e.src.slice(i,a).trim(),g.map=[t,e.line],g.children=[];const m=e.push("heading_close","h"+String(c),-1);return m.markup="########".slice(0,c),!0}function N8(e,t,r){const n=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let a=0,s,c=t+1;for(;c<r&&!e.isEmpty(c);c++){if(e.sCount[c]-e.blkIndent>3)continue;if(e.sCount[c]>=e.blkIndent){let k=e.bMarks[c]+e.tShift[c];const C=e.eMarks[c];if(k<C&&(s=e.src.charCodeAt(k),(s===45||s===61)&&(k=e.skipChars(k,s),k=e.skipSpaces(k),k>=C))){a=s===61?1:2;break}}if(e.sCount[c]<0)continue;let w=!1;for(let k=0,C=n.length;k<C;k++)if(n[k](e,c,r,!0)){w=!0;break}if(w)break}if(!a)return!1;const f=e.getLines(t,c,e.blkIndent,!1).trim();e.line=c+1;const p=e.push("heading_open","h"+String(a),1);p.markup=String.fromCharCode(s),p.map=[t,e.line];const g=e.push("inline","",0);g.content=f,g.map=[t,e.line-1],g.children=[];const m=e.push("heading_close","h"+String(a),-1);return m.markup=String.fromCharCode(s),e.parentType=i,!0}function _8(e,t,r){const n=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let a=t+1;for(e.parentType="paragraph";a<r&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3||e.sCount[a]<0)continue;let p=!1;for(let g=0,m=n.length;g<m;g++)if(n[g](e,a,r,!0)){p=!0;break}if(p)break}const s=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a;const c=e.push("paragraph_open","p",1);c.map=[t,e.line];const f=e.push("inline","",0);return f.content=s,f.map=[t,e.line],f.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const po=[["table",h8,["paragraph","reference"]],["code",m8],["fence",p8,["paragraph","reference","blockquote","list"]],["blockquote",g8,["paragraph","reference","blockquote","list"]],["hr",b8,["paragraph","reference","blockquote","list"]],["list",v8,["paragraph","reference","blockquote"]],["reference",w8],["html_block",B8,["paragraph","reference","blockquote"]],["heading",M8,["paragraph","reference","blockquote"]],["lheading",N8],["paragraph",_8]];function go(){this.ruler=new Y0;for(let e=0;e<po.length;e++)this.ruler.push(po[e][0],po[e][1],{alt:(po[e][2]||[]).slice()})}go.prototype.tokenize=function(e,t,r){const n=this.ruler.getRules(""),i=n.length,a=e.md.options.maxNesting;let s=t,c=!1;for(;s<r&&(e.line=s=e.skipEmptyLines(s),!(s>=r||e.sCount[s]<e.blkIndent));){if(e.level>=a){e.line=r;break}const f=e.line;let p=!1;for(let g=0;g<i;g++)if(p=n[g](e,s,r,!1),p){if(f>=e.line)throw new Error("block rule didn't increment state.line");break}if(!p)throw new Error("none of the block rules matched");e.tight=!c,e.isEmpty(e.line-1)&&(c=!0),s=e.line,s<r&&e.isEmpty(s)&&(c=!0,s++,e.line=s)}},go.prototype.parse=function(e,t,r,n){if(!e)return;const i=new this.State(e,t,r,n);this.tokenize(i,i.line,i.lineMax)},go.prototype.State=Kr;function Ni(e,t,r,n){this.src=e,this.env=r,this.md=t,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}Ni.prototype.pushPending=function(){const e=new Fr("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e},Ni.prototype.push=function(e,t,r){this.pending&&this.pushPending();const n=new Fr(e,t,r);let i=null;return r<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,r>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(i),n},Ni.prototype.scanDelims=function(e,t){const r=this.posMax,n=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let a=e;for(;a<r&&this.src.charCodeAt(a)===n;)a++;const s=a-e,c=a<r?this.src.charCodeAt(a):32,f=Mi(i)||Bi(String.fromCharCode(i)),p=Mi(c)||Bi(String.fromCharCode(c)),g=Ti(i),m=Ti(c),w=!m&&(!p||g||f),k=!g&&(!f||m||p);return{can_open:w&&(t||!k||f),can_close:k&&(t||!w||p),length:s}},Ni.prototype.Token=Fr;function z8(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 I8(e,t){let r=e.pos;for(;r<e.posMax&&!z8(e.src.charCodeAt(r));)r++;return r===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,r)),e.pos=r,!0)}const O8=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function L8(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const r=e.pos,n=e.posMax;if(r+3>n||e.src.charCodeAt(r)!==58||e.src.charCodeAt(r+1)!==47||e.src.charCodeAt(r+2)!==47)return!1;const i=e.pending.match(O8);if(!i)return!1;const a=i[1],s=e.md.linkify.matchAtStart(e.src.slice(r-a.length));if(!s)return!1;let c=s.url;if(c.length<=a.length)return!1;let f=c.length;for(;f>0&&c.charCodeAt(f-1)===42;)f--;f!==c.length&&(c=c.slice(0,f));const p=e.md.normalizeLink(c);if(!e.md.validateLink(p))return!1;if(!t){e.pending=e.pending.slice(0,-a.length);const g=e.push("link_open","a",1);g.attrs=[["href",p]],g.markup="linkify",g.info="auto";const m=e.push("text","",0);m.content=e.md.normalizeLinkText(c);const w=e.push("link_close","a",-1);w.markup="linkify",w.info="auto"}return e.pos+=c.length-a.length,!0}function R8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==10)return!1;const n=e.pending.length-1,i=e.posMax;if(!t)if(n>=0&&e.pending.charCodeAt(n)===32)if(n>=1&&e.pending.charCodeAt(n-1)===32){let a=n-1;for(;a>=1&&e.pending.charCodeAt(a-1)===32;)a--;e.pending=e.pending.slice(0,a),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(r++;r<i&&Et(e.src.charCodeAt(r));)r++;return e.pos=r,!0}const Zl=[];for(let e=0;e<256;e++)Zl.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){Zl[e.charCodeAt(0)]=1});function P8(e,t){let r=e.pos;const n=e.posMax;if(e.src.charCodeAt(r)!==92||(r++,r>=n))return!1;let i=e.src.charCodeAt(r);if(i===10){for(t||e.push("hardbreak","br",0),r++;r<n&&(i=e.src.charCodeAt(r),!!Et(i));)r++;return e.pos=r,!0}let a=e.src[r];if(i>=55296&&i<=56319&&r+1<n){const c=e.src.charCodeAt(r+1);c>=56320&&c<=57343&&(a+=e.src[r+1],r++)}const s="\\"+a;if(!t){const c=e.push("text_special","",0);i<256&&Zl[i]!==0?c.content=a:c.content=s,c.markup=s,c.info="escape"}return e.pos=r+1,!0}function V8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==96)return!1;const i=r;r++;const a=e.posMax;for(;r<a&&e.src.charCodeAt(r)===96;)r++;const s=e.src.slice(i,r),c=s.length;if(e.backticksScanned&&(e.backticks[c]||0)<=i)return t||(e.pending+=s),e.pos+=c,!0;let f=r,p;for(;(p=e.src.indexOf("`",f))!==-1;){for(f=p+1;f<a&&e.src.charCodeAt(f)===96;)f++;const g=f-p;if(g===c){if(!t){const m=e.push("code_inline","code",0);m.markup=s,m.content=e.src.slice(r,p).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=f,!0}e.backticks[g]=p}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=c,!0}function H8(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==126)return!1;const i=e.scanDelims(e.pos,!0);let a=i.length;const s=String.fromCharCode(n);if(a<2)return!1;let c;a%2&&(c=e.push("text","",0),c.content=s,a--);for(let f=0;f<a;f+=2)c=e.push("text","",0),c.content=s+s,e.delimiters.push({marker:n,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function d4(e,t){let r;const n=[],i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.marker!==126||s.end===-1)continue;const c=t[s.end];r=e.tokens[s.token],r.type="s_open",r.tag="s",r.nesting=1,r.markup="~~",r.content="",r=e.tokens[c.token],r.type="s_close",r.tag="s",r.nesting=-1,r.markup="~~",r.content="",e.tokens[c.token-1].type==="text"&&e.tokens[c.token-1].content==="~"&&n.push(c.token-1)}for(;n.length;){const a=n.pop();let s=a+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,a!==s&&(r=e.tokens[s],e.tokens[s]=e.tokens[a],e.tokens[a]=r)}}function q8(e){const t=e.tokens_meta,r=e.tokens_meta.length;d4(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&d4(e,t[n].delimiters)}const f4={tokenize:H8,postProcess:q8};function j8(e,t){const r=e.pos,n=e.src.charCodeAt(r);if(t||n!==95&&n!==42)return!1;const i=e.scanDelims(e.pos,n===42);for(let a=0;a<i.length;a++){const s=e.push("text","",0);s.content=String.fromCharCode(n),e.delimiters.push({marker:n,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function h4(e,t){const r=t.length;for(let n=r-1;n>=0;n--){const i=t[n];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const a=t[i.end],s=n>0&&t[n-1].end===i.end+1&&t[n-1].marker===i.marker&&t[n-1].token===i.token-1&&t[i.end+1].token===a.token+1,c=String.fromCharCode(i.marker),f=e.tokens[i.token];f.type=s?"strong_open":"em_open",f.tag=s?"strong":"em",f.nesting=1,f.markup=s?c+c:c,f.content="";const p=e.tokens[a.token];p.type=s?"strong_close":"em_close",p.tag=s?"strong":"em",p.nesting=-1,p.markup=s?c+c:c,p.content="",s&&(e.tokens[t[n-1].token].content="",e.tokens[t[i.end+1].token].content="",n--)}}function $8(e){const t=e.tokens_meta,r=e.tokens_meta.length;h4(e,e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&h4(e,t[n].delimiters)}const m4={tokenize:j8,postProcess:$8};function U8(e,t){let r,n,i,a,s="",c="",f=e.pos,p=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const g=e.pos,m=e.posMax,w=e.pos+1,k=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(k<0)return!1;let C=k+1;if(C<m&&e.src.charCodeAt(C)===40){for(p=!1,C++;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);if(C>=m)return!1;if(f=C,i=e.md.helpers.parseLinkDestination(e.src,C,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?C=i.pos:s="",f=C;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);if(i=e.md.helpers.parseLinkTitle(e.src,C,e.posMax),C<m&&f!==C&&i.ok)for(c=i.str,C=i.pos;C<m&&(r=e.src.charCodeAt(C),!(!Et(r)&&r!==10));C++);}(C>=m||e.src.charCodeAt(C)!==41)&&(p=!0),C++}if(p){if(typeof e.env.references>"u")return!1;if(C<m&&e.src.charCodeAt(C)===91?(f=C+1,C=e.md.helpers.parseLinkLabel(e,C),C>=0?n=e.src.slice(f,C++):C=k+1):C=k+1,n||(n=e.src.slice(w,k)),a=e.env.references[ho(n)],!a)return e.pos=g,!1;s=a.href,c=a.title}if(!t){e.pos=w,e.posMax=k;const B=e.push("link_open","a",1),_=[["href",s]];B.attrs=_,c&&_.push(["title",c]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=C,e.posMax=m,!0}function W8(e,t){let r,n,i,a,s,c,f,p,g="";const m=e.pos,w=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const k=e.pos+2,C=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(C<0)return!1;if(a=C+1,a<w&&e.src.charCodeAt(a)===40){for(a++;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);if(a>=w)return!1;for(p=a,c=e.md.helpers.parseLinkDestination(e.src,a,e.posMax),c.ok&&(g=e.md.normalizeLink(c.str),e.md.validateLink(g)?a=c.pos:g=""),p=a;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);if(c=e.md.helpers.parseLinkTitle(e.src,a,e.posMax),a<w&&p!==a&&c.ok)for(f=c.str,a=c.pos;a<w&&(r=e.src.charCodeAt(a),!(!Et(r)&&r!==10));a++);else f="";if(a>=w||e.src.charCodeAt(a)!==41)return e.pos=m,!1;a++}else{if(typeof e.env.references>"u")return!1;if(a<w&&e.src.charCodeAt(a)===91?(p=a+1,a=e.md.helpers.parseLinkLabel(e,a),a>=0?i=e.src.slice(p,a++):a=C+1):a=C+1,i||(i=e.src.slice(k,C)),s=e.env.references[ho(i)],!s)return e.pos=m,!1;g=s.href,f=s.title}if(!t){n=e.src.slice(k,C);const B=[];e.md.inline.parse(n,e.md,e.env,B);const _=e.push("image","img",0),T=[["src",g],["alt",""]];_.attrs=T,_.children=B,_.content=n,f&&T.push(["title",f])}return e.pos=a,e.posMax=w,!0}const G8=/^([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])?)*)$/,X8=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Y8(e,t){let r=e.pos;if(e.src.charCodeAt(r)!==60)return!1;const n=e.pos,i=e.posMax;for(;;){if(++r>=i)return!1;const s=e.src.charCodeAt(r);if(s===60)return!1;if(s===62)break}const a=e.src.slice(n+1,r);if(X8.test(a)){const s=e.md.normalizeLink(a);if(!e.md.validateLink(s))return!1;if(!t){const c=e.push("link_open","a",1);c.attrs=[["href",s]],c.markup="autolink",c.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const p=e.push("link_close","a",-1);p.markup="autolink",p.info="auto"}return e.pos+=a.length+2,!0}if(G8.test(a)){const s=e.md.normalizeLink("mailto:"+a);if(!e.md.validateLink(s))return!1;if(!t){const c=e.push("link_open","a",1);c.attrs=[["href",s]],c.markup="autolink",c.info="auto";const f=e.push("text","",0);f.content=e.md.normalizeLinkText(a);const p=e.push("link_close","a",-1);p.markup="autolink",p.info="auto"}return e.pos+=a.length+2,!0}return!1}function Z8(e){return/^<a[>\s]/i.test(e)}function K8(e){return/^<\/a\s*>/i.test(e)}function Q8(e){const t=e|32;return t>=97&&t<=122}function J8(e,t){if(!e.md.options.html)return!1;const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==60||n+2>=r)return!1;const i=e.src.charCodeAt(n+1);if(i!==33&&i!==63&&i!==47&&!Q8(i))return!1;const a=e.src.slice(n).match(F8);if(!a)return!1;if(!t){const s=e.push("html_inline","",0);s.content=a[0],Z8(s.content)&&e.linkLevel++,K8(s.content)&&e.linkLevel--}return e.pos+=a[0].length,!0}const ep=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,tp=/^&([a-z][a-z0-9]{1,31});/i;function rp(e,t){const r=e.pos,n=e.posMax;if(e.src.charCodeAt(r)!==38||r+1>=n)return!1;if(e.src.charCodeAt(r+1)===35){const a=e.src.slice(r).match(ep);if(a){if(!t){const s=a[1][0].toLowerCase()==="x"?parseInt(a[1].slice(1),16):parseInt(a[1],10),c=e.push("text_special","",0);c.content=Wl(s)?fo(s):fo(65533),c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}else{const a=e.src.slice(r).match(tp);if(a){const s=J2(a[0]);if(s!==a[0]){if(!t){const c=e.push("text_special","",0);c.content=s,c.markup=a[0],c.info="entity"}return e.pos+=a[0].length,!0}}}return!1}function p4(e){const t={},r=e.length;if(!r)return;let n=0,i=-2;const a=[];for(let s=0;s<r;s++){const c=e[s];if(a.push(0),(e[n].marker!==c.marker||i!==c.token-1)&&(n=s),i=c.token,c.length=c.length||0,!c.close)continue;t.hasOwnProperty(c.marker)||(t[c.marker]=[-1,-1,-1,-1,-1,-1]);const f=t[c.marker][(c.open?3:0)+c.length%3];let p=n-a[n]-1,g=p;for(;p>f;p-=a[p]+1){const m=e[p];if(m.marker===c.marker&&m.open&&m.end<0){let w=!1;if((m.close||c.open)&&(m.length+c.length)%3===0&&(m.length%3!==0||c.length%3!==0)&&(w=!0),!w){const k=p>0&&!e[p-1].open?a[p-1]+1:0;a[s]=s-p+k,a[p]=k,c.open=!1,m.end=s,m.close=!1,g=-1,i=-2;break}}}g!==-1&&(t[c.marker][(c.open?3:0)+(c.length||0)%3]=g)}}function np(e){const t=e.tokens_meta,r=e.tokens_meta.length;p4(e.delimiters);for(let n=0;n<r;n++)t[n]&&t[n].delimiters&&p4(t[n].delimiters)}function ap(e){let t,r,n=0;const i=e.tokens,a=e.tokens.length;for(t=r=0;t<a;t++)i[t].nesting<0&&n--,i[t].level=n,i[t].nesting>0&&n++,i[t].type==="text"&&t+1<a&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==r&&(i[r]=i[t]),r++);t!==r&&(i.length=r)}const Kl=[["text",I8],["linkify",L8],["newline",R8],["escape",P8],["backticks",V8],["strikethrough",f4.tokenize],["emphasis",m4.tokenize],["link",U8],["image",W8],["autolink",Y8],["html_inline",J8],["entity",rp]],Ql=[["balance_pairs",np],["strikethrough",f4.postProcess],["emphasis",m4.postProcess],["fragments_join",ap]];function _i(){this.ruler=new Y0;for(let e=0;e<Kl.length;e++)this.ruler.push(Kl[e][0],Kl[e][1]);this.ruler2=new Y0;for(let e=0;e<Ql.length;e++)this.ruler2.push(Ql[e][0],Ql[e][1])}_i.prototype.skipToken=function(e){const t=e.pos,r=this.ruler.getRules(""),n=r.length,i=e.md.options.maxNesting,a=e.cache;if(typeof a[t]<"u"){e.pos=a[t];return}let s=!1;if(e.level<i){for(let c=0;c<n;c++)if(e.level++,s=r[c](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,a[t]=e.pos},_i.prototype.tokenize=function(e){const t=this.ruler.getRules(""),r=t.length,n=e.posMax,i=e.md.options.maxNesting;for(;e.pos<n;){const a=e.pos;let s=!1;if(e.level<i){for(let c=0;c<r;c++)if(s=t[c](e,!1),s){if(a>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=n)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},_i.prototype.parse=function(e,t,r,n){const i=new this.State(e,t,r,n);this.tokenize(i);const a=this.ruler2.getRules(""),s=a.length;for(let c=0;c<s;c++)a[c](i)},_i.prototype.State=Ni;function ip(e){const t={};e=e||{},t.src_Any=X2.source,t.src_Cc=Y2.source,t.src_Z=K2.source,t.src_P=ql.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const r="[><|]";return t.src_pseudo_letter="(?:(?!"+r+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+r+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+r+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+r+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function Jl(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){r&&Object.keys(r).forEach(function(n){e[n]=r[n]})}),e}function bo(e){return Object.prototype.toString.call(e)}function up(e){return bo(e)==="[object String]"}function op(e){return bo(e)==="[object Object]"}function sp(e){return bo(e)==="[object RegExp]"}function g4(e){return bo(e)==="[object Function]"}function lp(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const b4={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function cp(e){return Object.keys(e||{}).reduce(function(t,r){return t||b4.hasOwnProperty(r)},!1)}const dp={"http:":{validate:function(e,t,r){const n=e.slice(t);return r.re.http||(r.re.http=new RegExp("^\\/\\/"+r.re.src_auth+r.re.src_host_port_strict+r.re.src_path,"i")),r.re.http.test(n)?n.match(r.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,r){const n=e.slice(t);return r.re.no_http||(r.re.no_http=new RegExp("^"+r.re.src_auth+"(?:localhost|(?:(?:"+r.re.src_domain+")\\.)+"+r.re.src_domain_root+")"+r.re.src_port+r.re.src_host_terminator+r.re.src_path,"i")),r.re.no_http.test(n)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:n.match(r.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,r){const n=e.slice(t);return r.re.mailto||(r.re.mailto=new RegExp("^"+r.re.src_email_name+"@"+r.re.src_host_strict,"i")),r.re.mailto.test(n)?n.match(r.re.mailto)[0].length:0}}},fp="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]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",hp="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function mp(e){e.__index__=-1,e.__text_cache__=""}function pp(e){return function(t,r){const n=t.slice(r);return e.test(n)?n.match(e)[0].length:0}}function y4(){return function(e,t){t.normalize(e)}}function yo(e){const t=e.re=ip(e.__opts__),r=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||r.push(fp),r.push(t.src_xn),t.src_tlds=r.join("|");function n(c){return c.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(n(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(n(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(n(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(n(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function a(c,f){throw new Error('(LinkifyIt) Invalid schema "'+c+'": '+f)}Object.keys(e.__schemas__).forEach(function(c){const f=e.__schemas__[c];if(f===null)return;const p={validate:null,link:null};if(e.__compiled__[c]=p,op(f)){sp(f.validate)?p.validate=pp(f.validate):g4(f.validate)?p.validate=f.validate:a(c,f),g4(f.normalize)?p.normalize=f.normalize:f.normalize?a(c,f):p.normalize=y4();return}if(up(f)){i.push(c);return}a(c,f)}),i.forEach(function(c){e.__compiled__[e.__schemas__[c]]&&(e.__compiled__[c].validate=e.__compiled__[e.__schemas__[c]].validate,e.__compiled__[c].normalize=e.__compiled__[e.__schemas__[c]].normalize)}),e.__compiled__[""]={validate:null,normalize:y4()};const s=Object.keys(e.__compiled__).filter(function(c){return c.length>0&&e.__compiled__[c]}).map(lp).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),mp(e)}function gp(e,t){const r=e.__index__,n=e.__last_index__,i=e.__text_cache__.slice(r,n);this.schema=e.__schema__.toLowerCase(),this.index=r+t,this.lastIndex=n+t,this.raw=i,this.text=i,this.url=i}function ec(e,t){const r=new gp(e,t);return e.__compiled__[r.schema].normalize(r,e),r}function nr(e,t){if(!(this instanceof nr))return new nr(e,t);t||cp(e)&&(t=e,e={}),this.__opts__=Jl({},b4,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=Jl({},dp,e),this.__compiled__={},this.__tlds__=hp,this.__tlds_replaced__=!1,this.re={},yo(this)}nr.prototype.add=function(t,r){return this.__schemas__[t]=r,yo(this),this},nr.prototype.set=function(t){return this.__opts__=Jl(this.__opts__,t),this},nr.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let r,n,i,a,s,c,f,p,g;if(this.re.schema_test.test(t)){for(f=this.re.schema_search,f.lastIndex=0;(r=f.exec(t))!==null;)if(a=this.testSchemaAt(t,r[2],f.lastIndex),a){this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+a;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(p=t.search(this.re.host_fuzzy_test),p>=0&&(this.__index__<0||p<this.__index__)&&(n=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=n.index+n[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(g=t.indexOf("@"),g>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,c=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&c>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=c))),this.__index__>=0},nr.prototype.pretest=function(t){return this.re.pretest.test(t)},nr.prototype.testSchemaAt=function(t,r,n){return this.__compiled__[r.toLowerCase()]?this.__compiled__[r.toLowerCase()].validate(t,n,this):0},nr.prototype.match=function(t){const r=[];let n=0;this.__index__>=0&&this.__text_cache__===t&&(r.push(ec(this,n)),n=this.__last_index__);let i=n?t.slice(n):t;for(;this.test(i);)r.push(ec(this,n)),i=i.slice(this.__last_index__),n+=this.__last_index__;return r.length?r:null},nr.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const r=this.re.schema_at_start.exec(t);if(!r)return null;const n=this.testSchemaAt(t,r[2],r[0].length);return n?(this.__schema__=r[2],this.__index__=r.index+r[1].length,this.__last_index__=r.index+r[0].length+n,ec(this,0)):null},nr.prototype.tlds=function(t,r){return t=Array.isArray(t)?t:[t],r?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(n,i,a){return n!==a[i-1]}).reverse(),yo(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,yo(this),this)},nr.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)},nr.prototype.onCompile=function(){};const Ha=2147483647,Qr=36,tc=1,zi=26,bp=38,yp=700,v4=72,w4=128,x4="-",vp=/^xn--/,wp=/[^\0-\x7F]/,xp=/[\x2E\u3002\uFF0E\uFF61]/g,Ap={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},rc=Qr-tc,Jr=Math.floor,nc=String.fromCharCode;function Vn(e){throw new RangeError(Ap[e])}function Dp(e,t){const r=[];let n=e.length;for(;n--;)r[n]=t(e[n]);return r}function A4(e,t){const r=e.split("@");let n="";r.length>1&&(n=r[0]+"@",e=r[1]),e=e.replace(xp,".");const i=e.split("."),a=Dp(i,t).join(".");return n+a}function D4(e){const t=[];let r=0;const n=e.length;for(;r<n;){const i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){const a=e.charCodeAt(r++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),r--)}else t.push(i)}return t}const kp=e=>String.fromCodePoint(...e),Cp=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Qr},k4=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},C4=function(e,t,r){let n=0;for(e=r?Jr(e/yp):e>>1,e+=Jr(e/t);e>rc*zi>>1;n+=Qr)e=Jr(e/rc);return Jr(n+(rc+1)*e/(e+bp))},S4=function(e){const t=[],r=e.length;let n=0,i=w4,a=v4,s=e.lastIndexOf(x4);s<0&&(s=0);for(let c=0;c<s;++c)e.charCodeAt(c)>=128&&Vn("not-basic"),t.push(e.charCodeAt(c));for(let c=s>0?s+1:0;c<r;){const f=n;for(let g=1,m=Qr;;m+=Qr){c>=r&&Vn("invalid-input");const w=Cp(e.charCodeAt(c++));w>=Qr&&Vn("invalid-input"),w>Jr((Ha-n)/g)&&Vn("overflow"),n+=w*g;const k=m<=a?tc:m>=a+zi?zi:m-a;if(w<k)break;const C=Qr-k;g>Jr(Ha/C)&&Vn("overflow"),g*=C}const p=t.length+1;a=C4(n-f,p,f==0),Jr(n/p)>Ha-i&&Vn("overflow"),i+=Jr(n/p),n%=p,t.splice(n++,0,i)}return String.fromCodePoint(...t)},E4=function(e){const t=[];e=D4(e);const r=e.length;let n=w4,i=0,a=v4;for(const f of e)f<128&&t.push(nc(f));const s=t.length;let c=s;for(s&&t.push(x4);c<r;){let f=Ha;for(const g of e)g>=n&&g<f&&(f=g);const p=c+1;f-n>Jr((Ha-i)/p)&&Vn("overflow"),i+=(f-n)*p,n=f;for(const g of e)if(g<n&&++i>Ha&&Vn("overflow"),g===n){let m=i;for(let w=Qr;;w+=Qr){const k=w<=a?tc:w>=a+zi?zi:w-a;if(m<k)break;const C=m-k,B=Qr-k;t.push(nc(k4(k+C%B,0))),m=Jr(C/B)}t.push(nc(k4(m,0))),a=C4(i,p,c===s),i=0,++c}++i,++n}return t.join("")},F4={version:"2.3.1",ucs2:{decode:D4,encode:kp},decode:S4,encode:E4,toASCII:function(e){return A4(e,function(t){return wp.test(t)?"xn--"+E4(t):t})},toUnicode:function(e){return A4(e,function(t){return vp.test(t)?S4(t.slice(4).toLowerCase()):t})}},Sp={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","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","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"]}}}},Ep=/^(vbscript|javascript|file|data):/,Fp=/^data:image\/(gif|png|jpeg|webp);/;function Tp(e){const t=e.trim().toLowerCase();return Ep.test(t)?Fp.test(t):!0}const T4=["http:","https:","mailto:"];function Bp(e){const t=Hl(e,!0);if(t.hostname&&(!t.protocol||T4.indexOf(t.protocol)>=0))try{t.hostname=F4.toASCII(t.hostname)}catch{}return Fi(Vl(t))}function Mp(e){const t=Hl(e,!0);if(t.hostname&&(!t.protocol||T4.indexOf(t.protocol)>=0))try{t.hostname=F4.toUnicode(t.hostname)}catch{}return La(Vl(t),La.defaultChars+"%")}function ar(e,t){if(!(this instanceof ar))return new ar(e,t);t||Ul(e)||(t=e||{},e="default"),this.inline=new _i,this.block=new go,this.core=new Xl,this.renderer=new Pa,this.linkify=new nr,this.validateLink=Tp,this.normalizeLink=Bp,this.normalizeLinkText=Mp,this.utils=q7,this.helpers=co({},W7),this.options={},this.configure(e),t&&this.set(t)}ar.prototype.set=function(e){return co(this.options,e),this},ar.prototype.configure=function(e){const t=this;if(Ul(e)){const r=e;if(e=Sp[r],!e)throw new Error('Wrong `markdown-it` preset "'+r+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enableOnly(e.components[r].rules),e.components[r].rules2&&t[r].ruler2.enableOnly(e.components[r].rules2)}),this},ar.prototype.enable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.enable(e,!0))},this),r=r.concat(this.inline.ruler2.enable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},ar.prototype.disable=function(e,t){let r=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){r=r.concat(this[i].ruler.disable(e,!0))},this),r=r.concat(this.inline.ruler2.disable(e,!0));const n=e.filter(function(i){return r.indexOf(i)<0});if(n.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},ar.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this},ar.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const r=new this.core.State(e,this,t);return this.core.process(r),r.tokens},ar.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)},ar.prototype.parseInline=function(e,t){const r=new this.core.State(e,this,t);return r.inlineMode=!0,this.core.process(r),r.tokens},ar.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var B4=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function M4(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var N4={exports:{}},ac={exports:{}},_4;function Np(){return _4||(_4=1,function(e,t){(function(n,i){e.exports=i()})(typeof self<"u"?self:B4,function(){return function(){var r={};(function(){r.d=function(o,u){for(var l in u)r.o(u,l)&&!r.o(o,l)&&Object.defineProperty(o,l,{enumerable:!0,get:u[l]})}})(),function(){r.o=function(o,u){return Object.prototype.hasOwnProperty.call(o,u)}}();var n={};r.d(n,{default:function(){return kw}});class i extends Error{constructor(u,l){let h="KaTeX parse error: "+u,b,D;const E=l&&l.loc;if(E&&E.start<=E.end){const I=E.lexer.input;b=E.start,D=E.end,b===I.length?h+=" at end of input: ":h+=" at position "+(b+1)+": ";const P=I.slice(b,D).replace(/[^]/g,"$&̲");let G;b>15?G="…"+I.slice(b-15,b):G=I.slice(0,b);let re;D+15<I.length?re=I.slice(D,D+15)+"…":re=I.slice(D),h+=G+P+re}super(h),this.name="ParseError",Object.setPrototypeOf(this,i.prototype),this.position=b,b!=null&&D!=null&&(this.length=D-b),this.rawMessage=u}}var a=i;const s=/([A-Z])/g,c=o=>o.replace(s,"-$1").toLowerCase(),f={"&":"&",">":">","<":"<",'"':""","'":"'"},p=/[&><"']/g,g=o=>String(o).replace(p,u=>f[u]),m=o=>o.type==="ordgroup"||o.type==="color"?o.body.length===1?m(o.body[0]):o:o.type==="font"?m(o.body):o,w=new Set(["mathord","textord","atom"]),k=o=>w.has(m(o).type),C=o=>{const u=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(o);return u?u[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(u[1])?null:u[1].toLowerCase():"_relative"},B={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:o=>"#"+o},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(o,u)=>(u.push(o),u)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:o=>Math.max(0,o),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:o=>Math.max(0,o),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:o=>Math.max(0,o),cli:"-e, --max-expand <n>",cliProcessor:o=>o==="Infinity"?1/0:parseInt(o)},globalGroup:{type:"boolean",cli:!1}};function _(o){if("default"in o)return o.default;const u=o.type,l=Array.isArray(u)?u[0]:u;if(typeof l!="string")return l.enum[0];switch(l){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class T{constructor(u){u===void 0&&(u={}),u=u||{};for(const l of Object.keys(B)){const h=B[l],b=u[l];this[l]=b!==void 0?h.processor?h.processor(b):b:_(h)}}reportNonstrict(u,l,h){let b=this.strict;if(typeof b=="function"&&(b=b(u,l,h)),!(!b||b==="ignore")){if(b===!0||b==="error")throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+(l+" ["+u+"]"),h);b==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+u+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+u+"]"))}}useStrictBehavior(u,l,h){let b=this.strict;if(typeof b=="function")try{b=b(u,l,h)}catch{b="error"}return!b||b==="ignore"?!1:b===!0||b==="error"?!0:b==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(l+" ["+u+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+b+"': "+l+" ["+u+"]")),!1)}isTrusted(u){if("url"in u&&u.url&&!u.protocol){const h=C(u.url);if(h==null)return!1;u.protocol=h}return!!(typeof this.trust=="function"?this.trust(u):this.trust)}}class S{constructor(u,l,h){this.id=u,this.size=l,this.cramped=h}sup(){return ce[be[this.id]]}sub(){return ce[ae[this.id]]}fracNum(){return ce[xe[this.id]]}fracDen(){return ce[Se[this.id]]}cramp(){return ce[te[this.id]]}text(){return ce[ye[this.id]]}isTight(){return this.size>=2}}const F=0,z=1,R=2,$=3,Y=4,q=5,pe=6,he=7,ce=[new S(F,0,!1),new S(z,0,!0),new S(R,1,!1),new S($,1,!0),new S(Y,2,!1),new S(q,2,!0),new S(pe,3,!1),new S(he,3,!0)],be=[Y,q,Y,q,pe,he,pe,he],ae=[q,q,q,q,he,he,he,he],xe=[R,$,Y,q,pe,he,pe,he],Se=[$,$,q,q,he,he,he,he],te=[z,z,$,$,q,q,he,he],ye=[F,z,R,$,R,$,R,$];var ne={DISPLAY:ce[F],TEXT:ce[R],SCRIPT:ce[Y],SCRIPTSCRIPT:ce[pe]};const Ne=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function We(o){for(let u=0;u<Ne.length;u++){const l=Ne[u];for(let h=0;h<l.blocks.length;h++){const b=l.blocks[h];if(o>=b[0]&&o<=b[1])return l.name}}return null}const X=[];Ne.forEach(o=>o.blocks.forEach(u=>X.push(...u)));function Z(o){for(let u=0;u<X.length;u+=2)if(o>=X[u]&&o<=X[u+1])return!0;return!1}const Q=80,ie=function(o,u){return"M95,"+(622+o+u)+`
|
|
282
282
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
283
283
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
284
284
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|
|
@@ -308,7 +308,7 @@ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
|
|
|
308
308
|
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
|
|
309
309
|
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
|
|
310
310
|
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
|
|
311
|
-
M`+(1001+o)+" "+u+"h400000v"+(40+o)+"h-400000z"},
|
|
311
|
+
M`+(1001+o)+" "+u+"h400000v"+(40+o)+"h-400000z"},ue=function(o,u){return"M424,"+(2398+o+u)+`
|
|
312
312
|
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
|
|
313
313
|
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
|
|
314
314
|
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
|
|
@@ -329,7 +329,7 @@ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,1
|
|
|
329
329
|
H742v`+h+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
|
|
330
330
|
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
|
|
331
331
|
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
|
|
332
|
-
219 661 l218 661zM702 `+u+"H400000v"+(40+o)+"H742z"},Ye=function(o,u,l){u=1e3*u;let h="";switch(o){case"sqrtMain":h=
|
|
332
|
+
219 661 l218 661zM702 `+u+"H400000v"+(40+o)+"H742z"},Ye=function(o,u,l){u=1e3*u;let h="";switch(o){case"sqrtMain":h=ie(u,Q);break;case"sqrtSize1":h=fe(u,Q);break;case"sqrtSize2":h=ke(u,Q);break;case"sqrtSize3":h=ue(u,Q);break;case"sqrtSize4":h=me(u,Q);break;case"sqrtTall":h=Le(u,Q,l)}return h},Ke=function(o,u){switch(o){case"⎜":return"M291 0 H417 V"+u+" H291z M291 0 H417 V"+u+" H291z";case"∣":return"M145 0 H188 V"+u+" H145z M145 0 H188 V"+u+" H145z";case"∥":return"M145 0 H188 V"+u+" H145z M145 0 H188 V"+u+" H145z"+("M367 0 H410 V"+u+" H367z M367 0 H410 V"+u+" H367z");case"⎟":return"M457 0 H583 V"+u+" H457z M457 0 H583 V"+u+" H457z";case"⎢":return"M319 0 H403 V"+u+" H319z M319 0 H403 V"+u+" H319z";case"⎥":return"M263 0 H347 V"+u+" H263z M263 0 H347 V"+u+" H263z";case"⎪":return"M384 0 H504 V"+u+" H384z M384 0 H504 V"+u+" H384z";case"⏐":return"M312 0 H355 V"+u+" H312z M312 0 H355 V"+u+" H312z";case"‖":return"M257 0 H300 V"+u+" H257z M257 0 H300 V"+u+" H257z"+("M478 0 H521 V"+u+" H478z M478 0 H521 V"+u+" H478z");default:return""}},ut={doubleleftarrow:`M262 157
|
|
333
333
|
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
|
|
334
334
|
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
|
|
335
335
|
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
|
|
@@ -559,11 +559,11 @@ $3`),t}function Hp(e){if(!e)return e;const t=/\r?\n/.test(e),r=[],n=e.replace(/`
|
|
|
559
559
|
Copyright (c) 2018 Jed Watson.
|
|
560
560
|
Licensed under the MIT License (MIT), see
|
|
561
561
|
http://jedwatson.github.io/classnames
|
|
562
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var c=arguments[s];c&&(a=i(a,n(c)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var c in a)t.call(a,c)&&a[c]&&(s=i(s,c));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Q4);var B9=Q4.exports;const hc=M4(B9),J4={className:{type:String,default:""},viewStatus:{type:String,default:"full"},widgetAPIURL:{type:String,default:""},widgetOptions:{type:Object,default:()=>({mode:"embedded",implOptions:{}})},widgetData:{type:Object,default:()=>({})}};class M9{constructor(t){Bt(this,"root");if(!t)throw new Error("parentElement is required");this.root=document.createElement("div"),this.root.className="fx-card-container-stage__root",t.appendChild(this.root)}dispose(){this.root.remove()}getElement(){return this.root}}function N9(){function e(t,r){if(t===r)return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null||Array.isArray(t)!==Array.isArray(r))return!1;const n=Object.keys(t),i=Object.keys(r);if(n.length!==i.length)return!1;for(const a of n)if(!i.includes(a)||!e(t[a],r[a]))return!1;return!0}return{deepEqual:e}}var mc={exports:{}};(function(e,t){(function(r,n){n(t)})(B4,function(r){var n=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(Z,Q,
|
|
562
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var c=arguments[s];c&&(a=i(a,n(c)))}return a}function n(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var c in a)t.call(a,c)&&a[c]&&(s=i(s,c));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Q4);var B9=Q4.exports;const hc=M4(B9),J4={className:{type:String,default:""},viewStatus:{type:String,default:"full"},widgetAPIURL:{type:String,default:""},widgetOptions:{type:Object,default:()=>({mode:"embedded",implOptions:{}})},widgetData:{type:Object,default:()=>({})}};class M9{constructor(t){Bt(this,"root");if(!t)throw new Error("parentElement is required");this.root=document.createElement("div"),this.root.className="fx-card-container-stage__root",t.appendChild(this.root)}dispose(){this.root.remove()}getElement(){return this.root}}function N9(){function e(t,r){if(t===r)return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null||Array.isArray(t)!==Array.isArray(r))return!1;const n=Object.keys(t),i=Object.keys(r);if(n.length!==i.length)return!1;for(const a of n)if(!i.includes(a)||!e(t[a],r[a]))return!1;return!0}return{deepEqual:e}}var mc={exports:{}};(function(e,t){(function(r,n){n(t)})(B4,function(r){var n=Object.defineProperty,i=Object.defineProperties,a=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,p=(Z,Q,ie)=>Q in Z?n(Z,Q,{enumerable:!0,configurable:!0,writable:!0,value:ie}):Z[Q]=ie,g=(Z,Q)=>{for(var ie in Q||(Q={}))c.call(Q,ie)&&p(Z,ie,Q[ie]);if(s)for(var ie of s(Q))f.call(Q,ie)&&p(Z,ie,Q[ie]);return Z},m=(Z,Q)=>i(Z,a(Q)),w=(Z,Q,ie)=>new Promise((fe,ke)=>{var ue=Le=>{try{ge(ie.next(Le))}catch(Ye){ke(Ye)}},me=Le=>{try{ge(ie.throw(Le))}catch(Ye){ke(Ye)}},ge=Le=>Le.done?fe(Le.value):Promise.resolve(Le.value).then(ue,me);ge((ie=ie.apply(Z,Q)).next())}),k=(Z=>(Z[Z.NONE=0]="NONE",Z[Z.LOADING=1]="LOADING",Z[Z.LOADED=2]="LOADED",Z[Z.ERROR=3]="ERROR",Z))(k||{});class C{constructor(Q){this.items={},this.factory=Q}getOrCreateItemByURL(Q){let ie=this.items[Q];return ie||(ie=this.items[Q]=this.factory(Q)),ie}tryGetItemByURL(Q){var ie;return(ie=this.items[Q])!=null?ie:null}removeItemByURL(Q){const ie=this.items[Q];return ie&&(this.items[Q]=null,ie)}}const B="__RUNTIME_IMPORT__";function _(Z,Q){var ie,fe;const ke=globalThis,ue=(ie=ke[B])!=null?ie:ke[B]={};return(fe=ue[Z])!=null?fe:ue[Z]=Q()}const T=_("cssCache",()=>new C(Z=>({url:Z,status:k.NONE,el:null,error:null,reject:null})));function S(Z,Q,ie){const fe={handleLoad(){Z.removeEventListener("load",fe.handleLoad),Z.removeEventListener("error",fe.handleError),Q()},handleError(ke){Z.removeEventListener("load",fe.handleLoad),Z.removeEventListener("error",fe.handleError),ie(ke)}};Z.addEventListener("load",fe.handleLoad),Z.addEventListener("error",fe.handleError)}function F(Z){const Q=T.getOrCreateItemByURL(Z),{status:ie,error:fe}=Q;return ie===k.LOADED?Promise.resolve():ie===k.ERROR?Promise.reject(fe):ie===k.LOADING?new Promise((ke,ue)=>{const{el:me}=Q;S(me,()=>ke(),ge=>ue(ge.error))}):(Q.status=k.LOADING,new Promise((ke,ue)=>{const me=document.createElement("link");me.rel="stylesheet",me.href=Z,S(me,()=>{Q.status=k.LOADED,ke()},ge=>{const Le=ge.error||new Error(`Load css failed. href=${Z}`);Q.status=k.ERROR,Q.error=Le,ue(Le)}),Q.el=me,me.setAttribute("data-runtime-import-type","css"),document.head.appendChild(me)}))}function z(Z){return Promise.all(Z.map(Q=>F(Q))).then(()=>Promise.resolve()).catch(Q=>Promise.reject(Q))}const R=_("jsCache",()=>new C(Z=>({url:Z,status:k.NONE,el:null,error:null,reject:null,exportThing:void 0}))),$=globalThis,{define:Y}=$,{keys:q}=Object;let pe=!1;typeof Y<"u"&&!Y.runtime_import&&(console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."),pe=!0);const he=_("pendingItemMap",()=>({})),ce=function(...Z){const Q=Z.pop(),{currentScript:ie}=document;if(!ie)throw new Error("currentScript is null.");const{src:fe}=ie,ke=he[fe];if(!ke)throw new Error(`Can NOT find item, src=${fe}`);he[fe]=null;try{let ue=Z[0]||[],me=null;typeof ue=="string"&&(me=ue,ue=Z[1]||[]);const ge=ke.exportThing=(()=>{let Le=!1;const Ye={};let Ke=Q(...ue.map(ut=>ut==="exports"?(Le=!0,Ye):$[ut]));return!Ke&&Le&&(Ke=Ye),Ke})();me&&($[me]=ge),ge&&q(ge).length===1&&ge.default&&(ke.exportThing=ge.default,ke.exportThing.default=ge.default)}catch(ue){ke.status=k.ERROR,ue instanceof Error&&(ke.error=ue),ke.reject(ue)}},be=()=>{const{currentScript:Z}=document;if(Z){const{src:Q}=Z;if(he[Q])return!0}return!1};["amd","cmd"].forEach(Z=>{Object.defineProperty(ce,Z,{get:be})}),ce.runtime_import=!0;function ae(Z,Q){if(pe)throw new Error("runtime-import UMD mode uses window.define, you should NOT have your own window.define.");$.define||($.define=ce),he[Z]=Q}function xe(Z){const Q=/legao-comp\/(.*)\/[\d.]+\/web.js$/.exec(Z),ie=window;if(Q&&Q.length>0){const fe=Q[1];ie.g_config=ie.g_config||{},ie.g_config.appKey=fe}}function Se(Z,Q,ie){Z.status=k.LOADING,xe(Q);const{umd:fe,crossOrigin:ke}=ie;return new Promise((ue,me)=>{const ge=document.createElement("script");if(ge.src=Q,ge.async=!1,ge.crossOrigin=ke,fe){ge.setAttribute("data-runtime-import-type","javascript-umd"),Z.reject=me;const Le=ge.src;ae(Le,Z)}else ge.setAttribute("data-runtime-import-type","javascript");S(ge,()=>{Z.status=k.LOADED,Z.el=null,ue(Z.exportThing)},Le=>{const Ye=Le.error||new Error(`Load javascript failed. src=${Q}`);Z.status=k.ERROR,Z.error=Ye,Z.el=null,me(Ye)}),Z.el=ge,document.body.appendChild(ge)})}function te(Z,Q){const ie=R.getOrCreateItemByURL(Z),{status:fe,exportThing:ke,error:ue}=ie;if(fe===k.LOADED)return Promise.resolve(ke);if(fe===k.ERROR)return Promise.reject(ue);if(fe===k.LOADING){const{el:me}=ie;return new Promise((ge,Le)=>{S(me,()=>ge(ie.exportThing),Ye=>Le(Ye.error))})}return Se(ie,Z,Q)}function ye(Z,Q){let ie=Promise.resolve();const fe=Z.length-1,{umd:ke}=Q;return Z.forEach((ue,me)=>{const ge=ke&&me===fe;ie=ie.then(()=>te(ue,m(g({},Q),{umd:ge})))}),ie}function ne(Z){return w(this,null,function*(){const{scripts:Q,styles:ie}=Z;if(ie){const{urls:ge}=ie;yield z(ge)}const{dependencies:fe=[],entry:ke,umd:ue=!0,crossOrigin:me="anonymous"}=Q;if((ke?fe.concat([ke]):fe).length)return yield ye(fe.concat([ke]),{umd:ue,crossOrigin:me})})}function Ne(Z,Q){return w(this,null,function*(){const ie=Q??{};return yield ne({scripts:{dependencies:[],entry:Z,umd:ie.umd,crossOrigin:ie.crossOrigin}})})}function We(Z){return w(this,null,function*(){return yield ne({scripts:{dependencies:[],entry:""},styles:{urls:[Z]}})})}const X=ne;r.importComponent=ne,r.importModule=X,r.importScript=Ne,r.importStyle=We,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})})})(mc,mc.exports);var _9=mc.exports;function z9(){async function e(t){return await _9.importScript(t)}return{loadWidgetAPI:e}}const Wa=d.defineComponent({name:"FXWidgetContainer",props:J4,setup(e,t){const{loadWidgetAPI:r}=z9(),{deepEqual:n}=N9(),i=d.ref(null),a=d.ref(null),s=d.ref(null),c=d.ref(null),f=d.ref(null),p=d.computed(()=>{const S=fc`width:100%!important`;return hc("caf-assistant-widget-container__root",S,e.className)}),g=fc`
|
|
563
563
|
overflow: hidden;
|
|
564
564
|
`,m=hc("caf-assistant-widget-container__inner",g),w=d.computed(()=>{const S=fc`
|
|
565
565
|
display: ${f.value?"block":"none"};
|
|
566
|
-
`;return hc("caf-assistant-widget-container__error",S)}),k=()=>{const S=s.value;S&&(c.value=new M9(S))},C=()=>{const S=c.value;S&&(S.dispose(),c.value=null)},B=()=>{const S=a.value,F=i.value;S&&(S.unmount(),S.dispose()),F&&F.cleanup(),a.value=null,i.value=null},_=async()=>{const S=await r(e.widgetAPIURL);if(!S)throw new Error("Failed to load widget API");await S.initialize();const F=S.createWidget();i.value=S,a.value=F},T=S=>{console.error(S),f.value=S};return d.watch(()=>e.widgetAPIURL,async()=>{if(s.value)try{B(),await _();const S=s.value,F=a.value;F==null||F.updateOptions(e.widgetOptions),F==null||F.updateData(e.widgetData),S&&F&&await F.mount(S)}catch(S){T(S)}}),d.watch(()=>e.widgetOptions,(S,F)=>{try{const z=a.value;z&&(!F||!n(F,S))&&z.updateOptions(S)}catch(z){T(z)}}),d.watch(()=>e.widgetData,(S,F)=>{try{const z=a.value;z&&(!F||!n(F,S))&&z.updateData(S)}catch(z){T(z)}}),d.onMounted(async()=>{try{const S=s.value;if(S){k();const F=c.value;if(F){await _();const z=a.value;z&&(z.updateOptions(e.widgetOptions),z.updateData(e.widgetData),z.mount(F.getElement()),d.nextTick(()=>{S.parentElement&&(S.style.width="100%")}))}}}catch(S){T(S)}}),d.onBeforeUnmount(async()=>{try{B(),C()}catch(S){console.error(S)}}),()=>d.createVNode("div",{class:p.value},[d.createVNode("div",{ref:s,class:m},null),d.createVNode("div",{class:w.value},null)])}}),ef=(e,t)=>{var r;if(e.type===S0.AssistantWidgetComplete){const n=e;return n.widgetUrl?d.createVNode(Wa,{key:`widget-${t}`,widgetAPIURL:n.widgetUrl,widgetOptions:{mode:"embedded",implOptions:n.widgetImplOptions},widgetData:((r=n.widgetData)==null?void 0:r.data)||{}},null):null}return e.type===S0.AssistantWidgetPending?d.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[d.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),d.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[d.createTextVNode("数据生成中......")])]):null},I9=6e4,tf=8e3,V0=new Map,Tr=new Map,Vi=new Map,rn=[];function w0(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function Fo(e){const t=w0(e);if(t)for(let r=rn.length-1;r>=0;r--)rn[r]===t&&rn.splice(r,1)}function O9(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function To(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function L9(){return rn[rn.length-1]||void 0}function Bo(e,t){const r=w0(t);return r?w0(e.instanceId)===r||e.componentId!=null&&w0(String(e.componentId))===r||e.name!=null&&w0(String(e.name))===r:!1}function pc(e){const t=w0(e);if(!t)return null;const r=V0.get(t);if(r)return{canonicalKey:t,entry:r};for(const[i,a]of V0.entries())if(w0(i)===t)return{canonicalKey:i,entry:a};const n=[];for(const[i,a]of V0.entries())Bo(a.config,t)&&n.push({key:i,entry:a});if(n.length===1){const{key:i,entry:a}=n[0];return i!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${i}" (alias match)`),{canonicalKey:i,entry:a}}if(n.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${n.length} pending matches); refusing`),null;if(V0.size===1){const[i,a]=[...V0.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${i}"`),{canonicalKey:i,entry:a}}return null}function rf(e,t){for(const[r,n]of Tr){const i=w0(r),a=e!==""&&i===e,s=String(t??"").trim(),c=e&&Bo(n.config,e)||s&&Bo(n.config,s);if(a||c)return console.warn(`[DynamicComponent] register skipped: id "${e||s}" already active (canonical "${r}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function gc(){return{pendingKeys:[...V0.keys()],bootstrapQueue:[...rn],activeKeys:[...Tr.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function R9(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...gc()})}function P9(e){const t=w0(e);if(t){if(rf(t,e))return{ok:!1,reason:"already_active_duplicate"};const n=pc(t);if(n)return{ok:!0,...n}}else if(rf("",e))return{ok:!1,reason:"already_active_duplicate"};for(let r=0;r<rn.length;r++){const n=rn[r],i=pc(n);if(i)return rn.splice(r,1),t&&w0(n)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${n}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...i}}return{ok:!1,reason:"no_pending"}}function nf(e){const t=w0(e);if(!t)return null;const r=Tr.get(t);if(r)return r;for(const[a,s]of Tr.entries())if(w0(a)===t)return s;const n=[];for(const a of Tr.values())Bo(a.config,t)&&n.push(a);const i=[...new Map(n.map(a=>[a.config.instanceId,a])).values()];return i.length===1?(i[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${i[0].config.instanceId}" (alias match)`),i[0]):(i.length>1&&console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${i.length} active matches)`),null)}function V9(e){const t=w0(e);if(!t)return null;const r=Tr.get(t);if(r)return r;for(const[n,i]of Tr.entries())if(w0(n)===t)return i;return null}function H9(e){const t=w0(e);if(!t)return t;const r=nf(t);if(r)return r.config.instanceId;const n=pc(t);return n?n.canonicalKey:t}function bc(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function af(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(bc(t)),!0}catch(r){return console.warn("[DynamicComponent] onAssistantMessage failed",r),!1}}function q9(e){const t=`fluens-dynamic-component-${e.instanceId}`;let r=document.getElementById(t);return r||(r=document.createElement("div"),r.id=t,r.style.width="100%",r.style.height="100%"),r}function uf(e){const t=Tr.get(e.instanceId);if(t)return Promise.resolve(t.api);const r=V0.get(e.instanceId);if(r)return new Promise((i,a)=>{const s=r.resolve,c=r.reject;r.resolve=f=>{s(f),i(f)},r.reject=f=>{c(f),a(f)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const n=q9(e);return new Promise((i,a)=>{const s={config:e,container:n,resolve:i,reject:a,timeoutId:0},c=setTimeout(()=>{s.postLoadRegisterCheckTimerId!=null&&(clearTimeout(s.postLoadRegisterCheckTimerId),s.postLoadRegisterCheckTimerId=void 0),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},I9);s.timeoutId=c,V0.set(e.instanceId,s),rn.push(e.instanceId),O9(e.instanceId);const f=document.createElement("script");f.src=(e==null?void 0:e.jsUrl)??"",f.dataset.dynamicComponentId=e.instanceId,f.async=!1,f.onload=()=>{s.postLoadRegisterCheckTimerId=window.setTimeout(()=>{s.postLoadRegisterCheckTimerId=void 0,V0.has(e.instanceId)&&(clearTimeout(c),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${tf}ms after load: ${e.name||e.componentId}`)))},tf)},f.onerror=()=>{clearTimeout(c),s.postLoadRegisterCheckTimerId!=null&&(clearTimeout(s.postLoadRegisterCheckTimerId),s.postLoadRegisterCheckTimerId=void 0),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(f)})}function of(e){var i;const t=Tr.get(e);if(t){try{t.api.unmount()}catch{}(i=t.scriptElement)==null||i.remove(),Tr.delete(e)}const r=V0.get(e);r&&(r.postLoadRegisterCheckTimerId!=null&&(clearTimeout(r.postLoadRegisterCheckTimerId),r.postLoadRegisterCheckTimerId=void 0),clearTimeout(r.timeoutId),V0.delete(e)),Vi.delete(e);const n=document.getElementById(`fluens-dynamic-component-${e}`);n&&n.remove()}function j9(e,t){const r=w0(e);if(!r)return!1;const n=nf(r);if(n)return af(n.api,t);const i=H9(r),a=Vi.get(i)??[],s=a.findIndex(c=>c.messageId===t.messageId);return s>=0?a[s]=bc(t):a.push(bc(t)),Vi.set(i,a),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=gc,window.__fluens_dynamic_component_register=function(e,t){const r=w0(e),n=P9(e);if(!n.ok){if(n.reason==="already_active_duplicate")return;R9(r),console.warn(`[DynamicComponent] no pending for register id "${r}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:i,entry:a}=n;Fo(i),To(i),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),clearTimeout(a.timeoutId),V0.delete(i);const s={config:a.config,container:a.container,api:t,scriptElement:document.currentScript};Tr.set(i,s),s.container.parentElement;try{t.mount(a.container,a.config)}catch(f){console.error(`Failed to mount dynamic component: ${i}`,f)}const c=[i];r&&r!==i&&c.push(r);for(const f of c){const p=Vi.get(f);p&&p.length>0&&(Vi.delete(f),p.forEach(g=>af(t,g)))}a.resolve(t)});const Ga=d.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=d.ref("loading"),r=d.ref(""),n=d.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),i=d.computed(()=>e.config.position==="inline"),a=d.computed(()=>!e.config.jsUrl&&!!e.config.url),s=d.computed(()=>({...i.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&i.value?{padding:"16px 0"}:{},...t.value==="ready"&&!i.value?{height:"100%",overflow:"hidden"}:{}}));return d.onMounted(()=>{a.value||(t.value="loading",r.value="",uf(e.config).then(()=>{t.value="ready"}).catch(c=>{t.value="error",r.value=c.message||"Unknown error"}))}),d.onUnmounted(()=>{a.value||of(e.config.instanceId)}),()=>a.value?null:d.createVNode("div",{class:"f-chat-dynamic-component-body",style:s.value},[d.createVNode("div",{id:n.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&d.createVNode("div",{class:"f-chat-dynamic-component-loading"},[d.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),d.createVNode("span",null,[d.createTextVNode("加载中......")])]),t.value==="error"&&d.createVNode("div",{class:"f-chat-dynamic-component-error"},[d.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[d.createTextVNode("!")]),d.createVNode("span",null,[r.value])])])}}),sf=(e,t,r)=>{if(e.type===S0.DynamicComponentComplete){const n=e;if(!n.config)return null;if(n.config.position==="inline")return d.createVNode(Ga,{key:`dc-${t}`,config:n.config},null);const i={type:"file",fileContent:{type:"md",name:n.config.title}},a={onPreviewFile:s=>{r.emit("showDynamicComponent",n.config)}};return r.emitDynamicComponentsDetectedOnce(n.config),d.createVNode("div",{style:{padding:"16px 0"}},[r.renderFileEmbeddedContent(i,a)])}return e.type===S0.DynamicComponentPending?d.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[d.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),d.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[d.createTextVNode("组件加载中......")])]):null};function $9(){return{[S0.Text]:jp,[S0.AssistantWidgetComplete]:ef,[S0.AssistantWidgetPending]:ef,[S0.DynamicComponentComplete]:sf,[S0.DynamicComponentPending]:sf}}const U9=d.defineComponent({name:"FXBubbleTextContent",props:Cm,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:r}=G1(),{propertyStates:n,registerProperty:i,updatePropertyValue:a,startStreaming:s}=Fu();i("title",e.title??""),i("subtitle",e.subtitle??""),i("text",e.text??""),d.watch([()=>e.title,()=>e.subtitle,()=>e.text],([T,S,F])=>{a("title",T??""),a("subtitle",S??""),a("text",F??"")});const c=d.computed(()=>e.textFormat==="markdown"),f=d.ref(!1),p=d.computed(()=>{var T,S,F;return f.value?{title:((T=n.title)==null?void 0:T.displayedValue)??"",subtitle:((S=n.subtitle)==null?void 0:S.displayedValue)??"",text:((F=n.text)==null?void 0:F.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),g=d.computed(()=>Um(p.value.text)),m=new Set;function w(T){const S=String(T.instanceId??"").trim();!S||m.has(S)||(m.add(S),d.nextTick(()=>{var F;t.emit("dynamicComponentsDetected",[T]),(F=e.onDynamicComponentsDetected)==null||F.call(e,[T])}))}function k(T,...S){var F;t.emit(T,...S),T==="showDynamicComponent"&&((F=e.onShowDynamicComponent)==null||F.call(e,S[0]))}const C={shouldShowMarkdown:c,emit:k,emitDynamicComponentsDetectedOnce:w,renderFileEmbeddedContent:r},B=$9(),_=()=>g.value.length===0?null:d.createVNode("div",{class:"f-chat-bubble-text-collection"},[g.value.map((T,S)=>{var F;return(F=B[T.type])==null?void 0:F.call(B,T,S,C)})]);return d.onMounted(()=>{f.value&&s()}),()=>d.createVNode(d.Fragment,null,[p.value.title&&d.createVNode("div",{class:"f-chat-bubble-content-title"},[p.value.title]),p.value.subtitle&&d.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[p.value.subtitle]),_()])}}),W9={content:{type:Object},outputMode:{type:String,default:"full"}},G9=d.defineComponent({name:"FXBubbleThink",props:W9,setup(e,t){var pe;const{propertyStates:r,registerProperty:n,updatePropertyValue:i,isAllDone:a}=Fu(),{elapsedSeconds:s,hasEverStarted:c,start:f,stop:p,reset:g}=Os(),m=d.ref(((pe=e.content)==null?void 0:pe.completed)!==!0),w=d.ref(null),k=d.ref(null),C=d.ref(!1),B=d.ref(!1),_=d.computed(()=>e.outputMode==="streaming"),T=d.computed(()=>{var he;return(he=e.content)==null?void 0:he.completed}),S=d.computed(()=>{var ce,be;if(T.value){const ae=c.value?`(用时${s.value}秒)`:"";return((ce=e.content)==null?void 0:ce.title)??"思考完成"+ae}return((be=e.content)==null?void 0:be.title)??"正在思考......"}),F=d.computed(()=>{var he,ce;return _.value?((he=r.content)==null?void 0:he.displayedValue)??"":((ce=e.content)==null?void 0:ce.content)??""}),z=d.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!T.value,"is-completed":T.value})),R=()=>{const he=w.value;if(!he||!C.value){B.value=!1;return}B.value=he.scrollTop>0};d.watch(()=>T.value,he=>{he?p():f()},{immediate:!0}),d.watch(()=>T.value,he=>{he&&(m.value=!1)}),d.watch(()=>e.content,he=>{he&&(r.content?i("content",he.content??""):n("content",he.content??""))},{immediate:!0}),d.watch(F,async()=>{if(m.value){await d.nextTick();const he=w.value;if(!he)return;await d.nextTick(),C.value=he.scrollHeight>he.clientHeight,C.value?(he.scrollTop=he.scrollHeight,B.value=!0):B.value=!1}},{immediate:!0}),d.watch(m,async he=>{if(he){await d.nextTick();const ce=w.value;if(!ce)return;await d.nextTick(),C.value=ce.scrollHeight>ce.clientHeight,C.value?(ce.scrollTop=ce.scrollHeight,B.value=!0):B.value=!1}}),d.onUnmounted(()=>{g()}),t.expose({instance:{get loadDone(){return e.content?(_.value?a.value:!0)&&T.value:!0}}});const $=()=>{m.value=!m.value},Y=()=>T.value?null:d.createVNode(sa,{status:"Working",variant:"thinking"},null),q=()=>!F.value||!m.value?null:d.createVNode("div",{class:"f-chat-bubble-thinking-content"},[d.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:w,onScroll:R},[C.value&&B.value&&d.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),d.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[d.createVNode("div",{ref:k,class:"f-chat-bubble-thinking-content-text",innerHTML:F.value},null)])])]);return()=>d.createVNode("div",{class:z.value},[d.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:$},[Y(),d.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:S.value},null),F.value&&d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:m.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null)]),q()])}}),X9={content:{type:Object}},lf={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},theme:{type:String,default:"default"},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function},enableDrag:{type:Boolean,default:!1},renderWhenShown:{type:Boolean,default:!1}};function Y9(e){const t=e.host?e.host:"body",r=d.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),n=d.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),i=d.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),a=d.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),s=d.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:i,hostTop:r,hostWidth:a,hostHeight:s,hostBottom:n}}function Z9(e,t,r,n){const i=d.ref(e.offsetX||0),a=d.ref(e.offsetY||0),s=d.ref(-1),c=d.ref(-1),f=d.ref(-1),p=d.ref(-1),g=d.ref(e.placement),m=d.ref(0),w=d.ref(0),k=d.ref(0),C=d.computed(()=>document.documentElement.scrollLeft),B=d.computed(()=>document.documentElement.scrollTop),{hostLeft:_,hostTop:T,hostWidth:S,hostHeight:F,hostBottom:z}=n;d.watch(()=>e.offsetX,ie=>{i.value=ie});const R=d.computed(()=>{const ie={left:`${w.value}px`,top:`${k.value}px`,transform:`translate(${i.value}px, ${a.value}px)`};return e.zIndex!==-1&&(ie["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&r.value&&s.value>=r.value.getBoundingClientRect().width&&(ie.width=`${s.value}px`):s.value!==-1&&(ie.width=`${s.value}px`),e.minWidth!==-1&&(ie.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(ie,e.customStyles),c.value>0&&(ie.maxHeight=c.value+"px"),ie}),$=d.computed(()=>({left:`${m.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function Y(ie){if(ie&&e.keepWidthWithReference){const me=ie.getBoundingClientRect();s.value=Math.max(e.minWidth,me.width)}}function q(ie,me){const ge=S.value-ie.width-4;return ge>0?ge:me}function pe(ie,me){const ge=F.value-ie.height-12;return ge>0?ge:me}function he(ie,me,ge){const Le=m.value,Ye=me.left-_.value+me.width/2+C.value,Ke=me.top-T.value-(ie.height+ge.height)+B.value;return{popoverLeft:Ye,popoverTop:Ke,arrowLeft:Le}}function ce(ie,me,ge){const Le=me.top-T.value+(me.height+ge.height)+B.value,Ye=pe(ie,Le);return Math.min(Le,Ye)}function be(ie,me){const ge=q(me,ie),Le=ie<=ge?m.value:ie-ge;return{popoverLeft:Math.min(ie,ge),arrowLeft:Le,maxHeight:0}}function ae(ie,me){const ge=q(me,ie),Le=ie<=ge?m.value:ie-ge;return{popoverLeft:ie,arrowLeft:Le,maxHeight:0}}function xe(ie,me,ge){const Le=me.left-_.value+C.value,{arrowLeft:Ye,popoverLeft:Ke}=ae(Le,ie),{popoverTop:ut}=he(ie,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function Se(ie,me,ge){const Le=me.left-_.value+me.width/2-(ge.width/2-(ie.left-_.value))+C.value,{arrowLeft:Ye,popoverLeft:Ke}=be(Le,ie),ut=ce(ie,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function te(ie,me,ge){const Le=me.left-_.value+C.value,{arrowLeft:Ye,popoverLeft:Ke}=be(Le,ie),ut=ce(ie,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function ye(ie,me,ge){const Le=me.right-_.value-ie.width+C.value,Ke=Math.max(Le,4),ut=Ke-Le,ot=ie.width-ge.width-20-ut,st=ce(ie,me,ge);return{popoverLeft:Ke,popoverTop:st,arrowLeft:ot,maxHeight:0}}function ne(ie,me,ge){const Le=me.left-_.value;let Ye=0,Ke=0,ut=0,ot=0,st="bottom-left";window.innerWidth-Le>ie.width?Ye=Le+C.value:(Ye=me.right-ie.width+C.value,ut=ie.width-ge.width-20);let Xt=0;if(e.limitContentBySpace){const Ce={topHeight:me.top-T.value-ge.height-8,bottomHeight:z.value-me.bottom-ge.height-8};Xt=Math.max(Ce.topHeight,Ce.bottomHeight),ie.height>Xt&&(ot=Xt,r.value.classList.add("popover-limitmax"))}const $0=ot?Math.floor(ot):ie.height,Jt=me.top-T.value+(me.height+ge.height);return z.value-Jt>$0?Ke=Jt+B.value:(Ke=me.top-$0-ge.height+B.value,z.value-Jt>me.top?(Ke=Jt+B.value,$0>me.top&&(Ke=z.value-$0)):(Ke=Ke<0?0:Ke,st="top")),r.value.classList.add("popover-"+st,"bs-popover-"+st),{popoverLeft:Ye<0?5:Ye,popoverTop:Ke,arrowLeft:ut,maxHeight:ot}}function Ne(ie,me,ge){const Le=me.left+me.width,Ye=0;let Ke=0,ut=ie.height;if(e.limitContentBySpace){const ft=F.value-16-Math.abs(a.value);ie.height>ft?(Ke=ft,ut=ft,r.value.classList.add("popover-limitmax")):r.value.classList.remove("popover-limitmax")}const ot=Math.max(me.top-(ut/2-me.height/2),T.value);let st=T.value+F.value-ut-a.value;st<0&&(st=ot);const Xt=Math.min(ot,st);return{popoverLeft:Le,popoverTop:Xt,arrowLeft:Ye,maxHeight:Ke}}function We(ie,me,ge){const Le=me.left+me.width,Ye=Math.max(me.top-me.height,T.value);let Ke=T.value+F.value-ie.height;Ke<0&&(Ke=Ye);const ut=Math.min(Ye,Ke);return{popoverLeft:Le,popoverTop:ut,arrowLeft:0,maxHeight:0}}function X(ie,me,ge){const Le=me.left-_.value+me.width/2-ie.width/2+C.value,Ye=me.top-T.value-(ie.height+ge.height)+B.value,Ke=ie.width/2-ge.width/2;return{popoverLeft:Le,popoverTop:Ye,arrowLeft:Ke,maxHeight:0}}function Z(ie,me,ge){const Le=me.left-_.value+me.width/2-ie.width/2+C.value,Ye=ce(ie,me,ge),Ke=ie.width/2-ge.width/2;return{popoverLeft:Le,popoverTop:Ye,arrowLeft:Ke,maxHeight:0}}const Q=new Map([["top",he],["top-left",xe],["top-center",X],["bottom",Se],["bottom-left",te],["bottom-right",ye],["bottom-center",Z],["right",Ne],["right-top",We],["auto",ne]]);function ue(ie){var Ke;e.keepWidthWithReference&&Y(ie);const me=ie.getBoundingClientRect();f.value=me.top,p.value=me.left;const ge=t.value?t.value.getBoundingClientRect():{height:4,width:4},Le=(Ke=r.value)==null?void 0:Ke.getBoundingClientRect();s.value=Le.width;const Ye=Q.get(g.value);if(Ye){const{arrowLeft:ut,popoverLeft:ot,popoverTop:st,maxHeight:Xt}=Ye(Le,me,ge);m.value=ut,w.value=ot,k.value=st,c.value=Xt||-1}}function fe(ie){if(ie){const me=ie.getBoundingClientRect();(me.left!==p.value||me.top!==f.value)&&ue(ie)}}function ke(){g.value=e.placement,m.value=0,w.value=0,k.value=0,s.value=-1}return{arrowStyle:$,popoverStyle:R,position:g,popoverWidth:s,fitToReference:Y,followToReferencePosition:fe,locateToReference:ue,resetPosition:ke}}function K9(e,t,r,n,i,a,s,c){const f=d.ref(e.visible),p=d.computed(()=>f.value),g=d.ref(!1),{fitToReference:m,followToReferencePosition:w,locateToReference:k,resetPosition:C}=s;function B(){g.value=!0}function _(){g.value=!1}d.watch(()=>e.visible,async R=>{R&&e.reference?(c.value||(c.value=!0,await d.nextTick()),await d.nextTick(),F(e.reference)):R||S()},{flush:"post"});let T;async function S(){f.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(f.value=!1,document.body.removeEventListener("click",T),document.body.removeEventListener("mousedown",T),document.body.removeEventListener("wheel",T,!0),document.removeEventListener("scroll",T),e.enableDrag&&(document.removeEventListener("dragstart",B),document.removeEventListener("dragend",_),g.value=!1),C(),t.emit("hidden"),e.renderWhenShown&&(c.value=!1)))}T=R=>{var q;if(g.value||!i.value)return;const $=i.value.contains(R.target);if(R.type==="scroll"||R.type==="wheel"&&$){S();return}if(R.target.closest(".time-picker-panel"))return;const Y=(q=R.target)==null?void 0:q.closest(".popover");if(Y&&n.value&&Y===n.value){R.type!=="scroll"&&R.type!=="wheel"&&R.stopPropagation();return}if(!$&&f.value){const pe=i.value.closest(".popover");pe&&pe.removeEventListener("click",T),S()}};async function F(R){if(e.renderWhenShown&&!c.value&&(c.value=!0,await d.nextTick()),n.value&&(e.showArrow===!1||e.showArrow&&r.value)&&R){C(),f.value=!0,i.value=R,a.value&&m(R),await d.nextTick(),k(R),document.body.addEventListener("click",T),document.body.addEventListener("mousedown",T),document.body.addEventListener("wheel",T,!0),document.addEventListener("scroll",T),e.enableDrag&&(document.addEventListener("dragstart",B),document.addEventListener("dragend",_)),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",T));const $=R.closest(".popover");$&&$.addEventListener("click",T),t.emit("shown")}}function z(){f.value&&i.value&&w(i.value)}return t.expose({hide:S,popoverRef:n,show:F,shown:p,isShow:f,updatePosition:z}),{showPopover:f,hidePopverOnClickBodyHandler:T}}function Q9(e,t,r,n,i,a){const{popoverWidth:s,fitToReference:c,followToReferencePosition:f}=i;function p(){var g;if(a.value&&((g=a.value.style)==null?void 0:g.display)!=="none"&&r.value){f(r.value);const m=r.value.getBoundingClientRect();n.value&&m.width!==s.value&&c(r.value)}}return{onResize:p}}function J9(e,t=500){const r=d.ref(e.value);let n;const i=d.watch(e,s=>{clearTimeout(n),n=setTimeout(()=>{r.value=s},t)}),a=()=>{clearTimeout(n),i()};return d.onUnmounted(a),{delayedValue:r,cleanup:a}}const fa=d.defineComponent({name:"FXPopover",props:lf,emits:["shown","hidden"],setup(e,t){const r=d.ref(),n=d.ref(),i=d.ref(e.reference),a=d.ref(e.keepWidthWithReference),s=d.computed(()=>!!e.title),c=d.ref(!e.renderWhenShown||e.visible),f=Y9(e),{host:p}=f,g=Z9(e,r,n,f),{position:m,arrowStyle:w,popoverStyle:k,fitToReference:C,locateToReference:B}=g,{showPopover:_,hidePopverOnClickBodyHandler:T}=K9(e,t,r,n,i,a,g,c),{onResize:S}=Q9(e,t,i,a,g,n),F=d.computed(()=>{let q=m.value;const pe=`popover in popover-${q}`,he=`bs-popover-${q}`,ce={"popover-fitcontent":e.fitContent,fade:!0};ce[pe]=!0,ce[he]=!0,e.theme==="dark"&&(ce["popover-theme-dark"]=!0);const be=(e.class||"").split(" ");return e.isSimpleTips&&be.unshift("popover-tips"),be.reduce((ae,xe)=>(ae[xe]=!0,ae),ce),ce}),z=d.computed(()=>({"popover-content":!0,"popover-body":!0})),R=d.computed(()=>{const q={};return q.opacity=_.value?1:0,q.visibility=_.value?"visible":"hidden",q.zIndex=1060,q}),$=d.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:Y}=J9(R,50);return d.onMounted(()=>{var q;c.value&&(a.value&&C(i.value),e.reference&&B(i.value)),window.addEventListener("resize",S),(q=n.value)==null||q.focus()}),d.onUnmounted(()=>{document.body.removeEventListener("click",T),window.removeEventListener("resize",S),_.value=!1}),()=>c.value?d.createVNode(d.Teleport,{to:p},{default:()=>{var q;return[d.withDirectives(d.createVNode("div",{tabindex:"-1",ref:n,class:F.value,style:{...k.value,...Y.value},onMousedown:pe=>{e.enableDrag||pe.stopPropagation()},onClick:pe=>{pe.stopPropagation()}},[$.value&&d.createVNode("div",{ref:r,class:"popover-arrow arrow",style:w.value},null),s.value&&d.createVNode("h3",{class:"popover-title popover-header"},[e.title]),d.createVNode("div",{class:z.value},[t.slots.default&&((q=t.slots)==null?void 0:q.default())])]),[[d.vShow,_.value]])]}}):null}}),Mo="FarrisX_PopoverInstancesKey";window[Mo]=window[Mo]||new WeakMap;function yc(e,t,r){e.stopPropagation();const n=t.value;n&&n.value&&!n.value.isShow&&(n.value.show(r),window[Mo].set(r,n.value))}function cf(e,t,r){e.stopPropagation(),t.value.value.hide(),window[Mo].delete(r)}function eg(e,t,r){e.stopPropagation();const n=t.value;n&&n.value&&(n.value.isShow?cf(e,t,r):yc(e,t,r))}function df(e,t,r){t.arg&&t.arg==="toggle"?eg(e,t,r):yc(e,t,r)}const ff={mounted:(e,t,r)=>{t.modifiers.hover?(e.addEventListener("mouseenter",n=>yc(n,t,e)),e.addEventListener("mouseleave",n=>cf(n,t,e))):t.modifiers.click?e.addEventListener("click",n=>df(n,t,e)):e.addEventListener("click",n=>df(n,t,e)),e.classList.add("v-popover")},unMounted:(e,t,r)=>{}};fa.install=e=>{e.component(fa.name,fa),e.directive("fxpopover",ff)};const hf={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"},listStatus:{type:String,default:void 0},completedCount:{type:Number,default:void 0},totalCount:{type:Number,default:void 0}},mf={items:{type:Array,default:()=>[]}},pf={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},No=d.defineComponent({name:"FXTodoListItemView",props:pf,emits:["click"],setup(e,{emit:t}){const{propertyStates:r,registerProperty:n,updatePropertyValue:i,startStreaming:a}=Fu();n("title",e.title??""),n("task",e.task??""),n("detail",e.message??""),d.watch([()=>e.title,()=>e.task,()=>e.message],([k,C,B])=>{i("title",k??""),i("task",C??""),i("detail",B??"")});const s=d.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),c=d.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function f(){t("click",e,e.id)}const p=d.computed(()=>e.outputMode==="streaming"),g=d.computed(()=>{var k;return p.value?((k=r.title)==null?void 0:k.displayedValue)??"":e.title??""}),m=d.computed(()=>{var k;return p.value?((k=r.task)==null?void 0:k.displayedValue)??"":e.task??""}),w=d.computed(()=>{var k;return p.value?((k=r.detail)==null?void 0:k.displayedValue)??"":e.message??""});return d.onMounted(()=>{p.value&&a()}),()=>d.createVNode("li",{key:e.id,class:s.value,onClick:f},[e.todoList&&e.todoList.length>0&&d.createVNode(ha,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&d.createVNode(d.Fragment,null,[e.showLoading&&d.createVNode(sa,{status:e.status??"Done",variant:"todo"},null),g.value?d.createVNode("div",{class:"f-chat-todo-task-wrapper"},[d.createVNode("span",{class:c.value},[g.value]),d.createVNode("div",{class:"f-chat-todo-task-description"},[m.value]),w.value?d.withDirectives(d.createVNode("div",{class:"f-chat-todo-task-description"},[w.value]),[[d.resolveDirective("overflow-tooltip")]]):null]):d.createVNode("div",{class:"f-chat-todo-task-wrapper"},[d.createVNode("span",{class:c.value},[m.value]),w.value?d.withDirectives(d.createVNode("div",{class:"f-chat-todo-task-description"},[w.value]),[[d.resolveDirective("overflow-tooltip")]]):null])])])}}),Hi=d.defineComponent({name:"FXTodoListView",props:mf,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?d.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((r,n)=>d.createVNode(No,d.mergeProps({key:n},r),null))]):null}}}),tg=300,rg={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},ha=d.defineComponent({name:"FXStartedTodo",props:hf,setup(e){const t=d.ref(null),r=d.ref(null),n=d.ref(null),i=d.ref(null),a=d.computed(()=>e.outputMode==="streaming"),{displayContent:s}=P1(()=>({detail:e.taskDetail??""}),()=>!0,a,{charInterval:30}),c=d.ref(e.initExpanded),f=d.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!c.value}));function p(){e.detailViewMode!=="expand"&&(i.value!=null&&(window.clearTimeout(i.value),i.value=null),n.value=window.setTimeout(()=>{t.value&&r.value&&r.value.show(t.value),n.value=null},tg))}function g(){e.detailViewMode!=="expand"&&(n.value!=null&&(window.clearTimeout(n.value),n.value=null),i.value=window.setTimeout(()=>{var S,F;(F=(S=r.value)==null?void 0:S.hide)==null||F.call(S),i.value=null},150))}function m(){if(e.detailViewMode==="none")return null;const S=s.value.detail??"";return d.createVNode(d.Fragment,null,[S?d.createVNode("div",{class:"f-chat-started-todo-task-detail"},[S]):null,d.createVNode(Hi,{items:e.todoList},null)])}function w(){e.detailViewMode==="expand"&&(c.value=!c.value)}function k(){return e.detailViewMode==="expand"?d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:c.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null):null}function C(){return e.detailViewMode==="hover"&&d.createVNode(fa,{ref:r,class:"f-chat-started-todo-popover"},{default:()=>[d.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{i.value!=null&&(window.clearTimeout(i.value),i.value=null)},onMouseleave:g},[m()])]})}const B=d.computed(()=>e.listStatus==="completed"),_=d.computed(()=>{const S=e.todoList??[],F=e.totalCount??S.length;return{done:e.completedCount??S.filter(R=>(R==null?void 0:R.status)==="Done").length,total:F}});function T(){if(!B.value)return null;const{done:S,total:F}=_.value,z=F>0?`已完成 (${S}/${F})`:"已完成";return d.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":z},[z])}return()=>d.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":B.value}],onMouseenter:p,onMouseleave:g},[d.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:w},[e.showLabel&&d.createVNode("span",{class:"f-chat-started-todo-label"},[rg[e.status]]),d.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),T(),k()]),e.detailViewMode==="expand"&&d.createVNode("div",{class:f.value},[m()]),C()])}});ha.install=e=>{e.component(ha.name,ha)};const ng=d.defineComponent({name:"FXBubbleThoughtChain",props:X9,setup(e,t){const{elapsedSeconds:r,hasEverStarted:n,start:i,stop:a,reset:s}=Os(),c=d.computed(()=>{var m;return((m=e.content)==null?void 0:m.status)==="Done"}),f=d.computed(()=>{var m;return((m=e.content)==null?void 0:m.message)??"正在思考......"}),p=d.computed(()=>{var k,C;const m=((k=e.content)==null?void 0:k.doneMessage)??((C=e.content)==null?void 0:C.message)??"思考完成",w=n.value?`(用时${r.value}秒)`:"";return""+m+w}),g=d.computed(()=>c.value?p.value:f.value);return d.watch(()=>{var m;return(m=e.content)==null?void 0:m.status},m=>{m==="Working"?i():m==="Done"?a():s()},{immediate:!0}),d.onUnmounted(()=>{s()}),t.expose({instance:{get loadDone(){return e.content?c.value:!0}}}),()=>{var m,w,k,C,B,_;return e.content?d.createVNode(ha,{status:((m=e.content)==null?void 0:m.status)??"Working",message:g.value,todoList:(w=e.content)==null?void 0:w.todoList,detailViewMode:((k=e.content)==null?void 0:k.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0,listStatus:(C=e.content)==null?void 0:C.listStatus,completedCount:(B=e.content)==null?void 0:B.completedCount,totalCount:(_=e.content)==null?void 0:_.totalCount},null):null}}}),qi=d.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-auth"},[d.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),d.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>d.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var r;(r=e.onConfirm)==null||r.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),ag=300,Xa=d.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),{getToolIconClass:r}=Ls(),n=d.computed(()=>e.content.success===!1),i=d.ref(!1);let a=setTimeout(()=>{i.value=!0},ag);d.onBeforeUnmount(()=>{a&&clearTimeout(a)});const s=d.computed(()=>t.value),c=d.computed(()=>i.value&&!t.value),f=d.computed(()=>n.value?"执行完成":s.value?"执行成功":"调用中"),p=d.ref(!1),g=d.computed(()=>({"f-chat-tool-use":!0,"is-done":s.value,"is-error":n.value})),m=d.computed(()=>({"f-chat-tool-use-status":!0,"is-done":s.value&&!n.value,"is-run":c.value&&!n.value,"is-error":n.value}));d.watch(()=>t.value,(k,C)=>{k&&!C&&(p.value=!1)},{flush:"post"});const w=()=>t.value?d.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>d.createVNode("div",{class:g.value},[d.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{p.value=!p.value}},[d.createVNode("i",{class:"fx-icon fx-icon-"+r(e.content.toolName)+" tool-icon"},null),d.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),d.createVNode("div",{class:m.value},[n.value?d.createVNode(sa,{status:"Error",variant:"tool-use"},null):d.createVNode(sa,{status:s.value?"Done":c.value?"Working":"NotStart",variant:"tool-use"},null),d.createVNode("span",{class:"f-chat-tool-use-status-text"},[f.value])]),d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:p.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),p.value&&d.createVNode("div",{class:"f-chat-tool-use-content"},[w()])])}});Xa.install=e=>{e.component(Xa.name,Xa)};const ji=d.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":qi,"fx-app-preview-inline":Cr,FXToolUse:Xa},props:Cu,setup(e,t){const r=d.shallowRef(),n=d.ref(),i=d.ref(),a=d.computed(()=>!!e.showAvatar),s=d.computed(()=>a.value===!0||e.header==="ContentHeader"),c=d.computed(()=>t.slots.leftFooter||t.slots.rightFooter),f=d.computed(()=>{var ae;return c0({},(ae=e.styles)==null?void 0:ae.footer)}),p=ae=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(ae.type==="md"&&ae.content){e.onPreview({content:ae.content,contentType:"markdown"});return}if(ae!=null&&ae.url){const xe=ae!=null&&ae.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:ae.url,previewMode:xe,title:ae.name})}}},g=ae=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const xe=ae==null?void 0:ae.filter(te=>te.type==="md"&&te.content);if(xe.length===0)return;const Se=Object.fromEntries(xe.map(te=>[te.name,te.content??""]));e.onPreview({contentMap:Se,contentType:"markdown"})},{renderFileEmbeddedContent:m,renderPageEmbeddedContent:w}=G1(),k=d.ref(""),C=d.computed(()=>{var xe,Se;if((xe=e.content)!=null&&xe.footerContent)return e.content.footerContent;const ae=(Se=e.content)==null?void 0:Se.structuredContent;return ae&&(ae.footerTemplate||ae.footerUrl||ae.footerFile)?{type:ae.footerUrl?"page":ae.footerFile?"file":"template",pageUrl:ae.footerUrl,fileContent:ae.footerFile,template:ae.footerTemplate,width:ae.footerWidth,height:ae.footerHeight}:null});d.watch(()=>{var ae;return(ae=C.value)==null?void 0:ae.width},ae=>{if(!ae){k.value="";return}if(ae.endsWith("%")){const xe=parseFloat(ae);isNaN(xe)||d.nextTick(()=>{var te,ye;const Se=(ye=(te=r.value)==null?void 0:te.parentElement)==null?void 0:ye.clientWidth;Se&&(k.value=`${Se*xe/100}px`)})}else k.value=ae},{immediate:!0});const B=ae=>{if(!ae||ae.length===0)return"我";const xe=ae.charAt(0);return/[\u4e00-\u9fa5]/.test(xe)?xe:xe.toUpperCase()};function _(){return e.header==="ContentHeader"?wm:xm}const T=_(),{renderHeader:S}=T(e,t),F=()=>{var Se,te,ye;const ae=((Se=e.content)==null?void 0:Se.sender)??"发送人",xe=B(((te=e.content)==null?void 0:te.sender)??"");return d.createVNode("div",{class:"f-chat-bubble-avatar"},[(ye=e.content)!=null&&ye.avatar?d.createVNode("img",{src:e.content.avatar,alt:ae},null):d.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[xe])])},z=()=>{var xe;const ae=(xe=e.content)==null?void 0:xe.toolUseAboveText;return ae!=null&&ae.length?d.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[ae.map((Se,te)=>d.createVNode(Xa,{key:Se.toolUseId??`tu-${te}`,content:Se},null))]):null},R=()=>{var ae;return(ae=e.content)!=null&&ae.thinkingContent?d.createVNode(G9,{ref:n,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},$=()=>{var ae;return(ae=e.content)!=null&&ae.startedTodo?d.createVNode(ng,{ref:i,content:e.content.startedTodo},null):null},Y=ae=>{if(!(ae!=null&&ae.type))return null;const{type:xe}=ae;return xe==="page"&&ae.pageUrl?w(ae,{onNavigate:Se=>{var te;(te=e.onPreview)==null||te.call(e,{url:Se})}}):xe==="file"&&ae.fileContent?m(ae,{onPreviewFile:p,onBatchPreviewFile:g}):xe==="template"&&ae.template?ae.template():null},q=()=>{var te,ye,ne;if(!((ne=(ye=(te=e.content)==null?void 0:te.structuredContent)==null?void 0:ye.sections)!=null&&ne.length))return null;const{sections:ae,showDivider:xe}=e.content.structuredContent,Se=Ne=>{const{content:We,label:X}=Ne;return X||We&&typeof We=="string"?d.createVNode(d.Fragment,null,[d.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),Ne.label&&d.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[Ne.label]),d.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[Ne.content])]):Y(Ne.content)};return d.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":xe}]},[ae.map((Ne,We)=>d.createVNode("div",{key:We,class:["f-chat-bubble-structured-section",{"section-divider":Ne.showDivider}]},[d.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[Ne.icon&&(Ne.icon.startsWith("http")||Ne.icon.startsWith("//")||Ne.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(Ne.icon)?d.createVNode("img",{alt:Ne.title,src:Ne.icon,class:"f-chat-bubble-structured-section-icon"},null):d.createVNode("i",{class:`fx-icon ${Ne.icon}`,style:Ne.iconStyle},null)),d.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[Ne.title])]),Ne.items&&Ne.items.length>0&&d.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[Ne.items.map((X,Z)=>d.createVNode("div",{key:Z,class:"f-chat-bubble-structured-section-item"},[Se(X)]))])]))])},pe=()=>{const ae=C.value;if(!ae)return null;const xe={};return k.value&&(xe.width=k.value),ae.height&&(xe.height=`${ae.height}px`),d.createVNode("div",{class:"f-chat-bubble-content-footer",style:xe},[Y(ae)])},he=()=>{const ae=e.attachmentRowClickOpensPreview!==!1?p:void 0;return d.createVNode(U1,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:ae,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?g:void 0,role:e.role},null)},ce=()=>{var xe;const ae=(xe=e.content)==null?void 0:xe.compositeInlineBlocks;return ae!=null&&ae.length?ae.map((Se,te)=>Se.kind==="userAuth"?d.createVNode(d.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${te}`,content:Se.content,onConfirm:e.onUserAuthConfirm},null):d.createVNode(d.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${te}`,content:Se.content,onOpen:e.onPreview},null)):null},be=()=>{var ae,xe,Se,te,ye,ne;return d.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[s.value&&S(),he(),d.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(ae=e.content)!=null&&ae.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():d.createVNode(d.Fragment,null,[R(),z()]),$(),q(),d.createVNode(U9,{title:((xe=e.content)==null?void 0:xe.title)??"",subtitle:((Se=e.content)==null?void 0:Se.subtitle)??"",text:typeof((te=e.content)==null?void 0:te.text)=="string"?e.content.text:"",textFormat:((ye=e.content)==null?void 0:ye.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),pe(),(ne=e.compositeTailRender)==null?void 0:ne.call(e),ce()]),c.value&&d.createVNode("div",{class:"f-chat-bubble-footer",style:f.value},[t.slots.leftFooter&&d.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&d.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>d.createVNode("div",{class:"f-chat-bubble-container",ref:r},[d.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?d.createVNode(d.Fragment,null,[a.value&&F(),be()]):d.createVNode(d.Fragment,null,[be(),a.value&&F()])])])}}),gf={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},vc=d.defineComponent({name:"FXBubbleAction",props:gf,setup(e,t){const r=d.computed(()=>c0({},e.customStyle));return()=>t.slots.default&&d.createVNode("span",{class:"f-chat-bubble-footer-action",style:r.value},[t.slots.default()])}});ji.install=e=>{e.component(ji.name,ji),e.component(vc.name,vc)};const bf={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},yf={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},_o=d.defineComponent({name:"FXCarouselItem",props:yf,emits:["click"],setup(e,{slots:t,emit:r}){const n=d.computed(()=>{var m;const g={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return Kt(g,(m=e.classNames)==null?void 0:m.item)}),i=d.computed(()=>{var m,w;const g=c0({},(m=e.styles)==null?void 0:m.item);return c0(g,(w=e.styles)==null?void 0:w.item)}),a=()=>{var g,m,w;return e.item.image?d.createVNode("img",{class:["fx-carousel--item-image",(g=e.classNames)==null?void 0:g.image],style:(m=e.styles)==null?void 0:m.image,src:e.item.image,alt:(w=e.item.title)==null?void 0:w.toString()},null):null},s=()=>{var g,m,w,k;return e.item.content?d.createVNode("div",{class:["fx-carousel--item-content",(g=e.classNames)==null?void 0:g.content],style:(m=e.styles)==null?void 0:m.content},[e.item.content]):t.default?d.createVNode("div",{class:["fx-carousel--item-content",(w=e.classNames)==null?void 0:w.content],style:(k=e.styles)==null?void 0:k.content},[t.default()]):null},c=()=>{var g,m;return e.item.title?d.createVNode("h3",{class:["fx-carousel--item-title",(g=e.classNames)==null?void 0:g.title],style:(m=e.styles)==null?void 0:m.title},[e.item.title]):null},f=()=>{var g,m;return e.item.description?d.createVNode("p",{class:["fx-carousel--item-description",(g=e.classNames)==null?void 0:g.description],style:(m=e.styles)==null?void 0:m.description},[e.item.description]):null},p=g=>{e.item.disabled||r("click",g,e.item,e.index)};return()=>d.createVNode("div",{class:n.value,style:i.value,onClick:p},[a(),s(),e.showInfo&&d.createVNode("div",{class:"fx-carousel--item-info"},[c(),f()])])}});function ig(e){const{items:t,autoplay:r=!1,interval:n=3e3,loop:i=!0,direction:a="horizontal"}=e,s=d.ref(0),c=d.ref(!1),f=d.ref(null),p=d.computed(()=>t.length),g=d.computed(()=>p.value<=1);d.computed(()=>s.value===0?i?p.value-1:0:s.value-1),d.computed(()=>s.value===p.value-1?i?0:s.value:s.value+1);const m=d.computed(()=>{const F=-s.value*100;return{transform:a==="horizontal"?`translateX(${F}%)`:`translateY(${F}%)`,transition:"transform 0.5s ease"}}),w=F=>{F<0||F>=p.value||(s.value,s.value=F)},k=()=>{g.value||(s.value===p.value-1?w(i?0:s.value):w(s.value+1))},C=()=>{g.value||(s.value===0?w(i?p.value-1:0):w(s.value-1))},B=()=>{!r||g.value||(_(),f.value=window.setInterval(()=>{c.value||k()},n))},_=()=>{f.value&&(clearInterval(f.value),f.value=null)},T=()=>{c.value=!0,r&&_()},S=()=>{c.value=!1,r&&B()};return d.onMounted(()=>{B()}),d.onUnmounted(()=>{_()}),{currentIndex:s,totalItems:p,isSingleItem:g,trackStyle:m,goTo:w,next:k,prev:C,handleMouseEnter:T,handleMouseLeave:S}}const $i=d.defineComponent({name:"FXCarousel",props:bf,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:r}){const{currentIndex:n,isSingleItem:i,trackStyle:a,goTo:s,next:c,prev:f,handleMouseEnter:p,handleMouseLeave:g}=ig({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),m=R=>{r("update:modelValue",R),r("change",R,n.value)},w=d.computed(()=>{var $;const R={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":i.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return Kt(R,($=e.classNames)==null?void 0:$.root)}),k=d.computed(()=>{var Y;const R={height:typeof e.height=="number"?`${e.height}px`:e.height},$=c0(R,e.customStyle);return c0($,(Y=e.styles)==null?void 0:Y.root)}),C=d.computed(()=>{var $;const R={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return Kt(R,($=e.classNames)==null?void 0:$.container)}),B=d.computed(()=>{var $;return Kt({"fx-carousel--track":!0},($=e.classNames)==null?void 0:$.track)}),_=d.computed(()=>{var $;const R={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return Kt(R,($=e.classNames)==null?void 0:$.indicator)}),T=R=>{var Y,q;const $={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":R==="left","fx-carousel--arrow-right":R==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return $[`fx-carousel--arrow-${e.buttonPosition}`]=!0,Kt($,R==="left"?(Y=e.classNames)==null?void 0:Y.arrowLeft:(q=e.classNames)==null?void 0:q.arrowRight)},S=R=>{var q,pe;if(i.value)return null;const $=R==="left"?f:c,Y=t[R==="left"?"prevArrow":"nextArrow"];return d.createVNode("button",{class:T(R),style:R==="left"?(q=e.styles)==null?void 0:q.arrowLeft:(pe=e.styles)==null?void 0:pe.arrowRight,onClick:$,"aria-label":`${R} arrow`},[Y?Y():d.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${R==="left"?"left":"right"}`},null)])},F=()=>{var R;return i.value||!e.showIndicator?null:d.createVNode("div",{class:_.value,style:(R=e.styles)==null?void 0:R.indicator},[e.items.map(($,Y)=>{var q,pe;return d.createVNode("button",{"aria-label":`indicator ${Y}`,key:Y,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":Y===n.value}],style:Y===n.value?(q=e.styles)==null?void 0:q.indicatorItemActive:(pe=e.styles)==null?void 0:pe.indicatorItem,onClick:()=>{s(Y),m(Y)}},null)})])},z=()=>d.createVNode("div",{class:B.value,style:a.value},[e.items.map((R,$)=>d.createVNode(_o,{key:R.id||`item_${$}`,item:R,showInfo:e.showInfo,index:$,active:$===n.value,styles:e.styles,classNames:e.classNames,onClick:(Y,q,pe)=>{r("item-click",Y,q,pe)}},{default:()=>{var Y,q;return[(Y=t.item)==null?void 0:Y.call(t,{item:R,index:$,active:$===n.value}),(q=t[`item${$}`])==null?void 0:q.call(t,{item:R,index:$,active:$===n.value})]}}))]);return()=>{var R;return d.createVNode("div",{class:w.value,style:k.value,onMouseenter:p,onMouseleave:g},[e.buttonPosition==="outer"&&S("left"),d.createVNode("div",{class:C.value,style:(R=e.styles)==null?void 0:R.container},[e.buttonPosition==="inner"&&S("left"),z(),e.buttonPosition==="inner"&&S("right")]),e.buttonPosition==="outer"&&S("right"),F()])}}});$i.install=e=>{e.component($i.name,$i),e.component(_o.name,_o)};const vf={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function ug(e){const t=d.ref(-1),r=d.ref(-1),n=d.ref(0),i=d.ref(0),a=d.ref(!1),s=d.ref(!1),c=d.computed(()=>({display:a.value?"block":"none",left:`${n.value}px`,cursor:"e-resize"})),f=d.computed(()=>({display:s.value?"block":"none",top:`${i.value}px`,cursor:"n-resize"})),p=d.computed(()=>{const _={display:s.value||a.value?"block":"none"};return i.value>0&&(_.cursor="n-resize"),_});function g(_,T,S,F){const z=e.value;if(z){const{left:R,right:$,width:Y}=z.getBoundingClientRect();let q=_.clientX-R;F==="right"&&(q=$-_.clientX),q>T&&(q=T),q<S&&(q=S),F==="right"&&(q=Y-q),n.value=q}}function m(_,T,S,F){const z=e.value;if(z){const{top:R,bottom:$,height:Y}=z.getBoundingClientRect();let q=_.clientY-R;F==="bottom"&&(q=$-_.clientY),q>T&&(q=T),q<S&&(q=S),F==="bottom"&&(q=Y-q),i.value=q}}function w(){const _=e.value;if(_){const{width:T,height:S}=_.getBoundingClientRect();return{width:T,height:S}}return null}function k(){const _=e.value;return _?Array.from(_.querySelectorAll("[data-position]")).reduce((T,S)=>{const F=S.getAttribute("data-position");return T=Object.assign(T,{[F]:S}),T},{}):null}function C(_,T){const S=w(),F=k();if(S&&F){const z=F==null?void 0:F.right,R=F==null?void 0:F.left;if(_==="left"&&R)return z?S.width-z.clientWidth-T:S.width-T;if(_==="right"&&z)return R?S.width-R.clientWidth-T:S.width-T}}function B(_,T){const S=w(),F=k();if(S&&F){const z=F==null?void 0:F.bottom,R=F==null?void 0:F.top;if(_==="top"&&R)return z?S.height-z.clientHeight-T:S.height-T;if(_==="bottom"&&z)return R?S.height-R.clientHeight-T:S.height-T}}return{horizontalResizeHandleStyle:c,verticalResizeHandleStyle:f,resizeOverlayStyle:p,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,horizontalResizeBarPosition:t,verticalResizeBarPosition:r,verticalResizeHandleOffset:i,horizontalResizeHandleOffset:n,draggingHorizontalResizeHandle:g,draggingVerticalResizeHandle:m,getPanelMaxWidth:C,getPanelMaxHeight:B}}const Ya=d.defineComponent({name:"FXSplitter",props:vf,emits:[],setup(e,t){const r=d.ref(),n=ug(r),{horizontalResizeHandleStyle:i,verticalResizeHandleStyle:a,resizeOverlayStyle:s}=n;d.provide("splitter",{useResizeHandleComposition:n});const c=d.computed(()=>Kt({"f-splitter":!0},e==null?void 0:e.customClass)),f=d.computed(()=>{const p={"flex-direction":e.direction==="row"?"row":"column"};return c0(p,e==null?void 0:e.customStyle)});return()=>d.createVNode("div",{class:c.value,ref:r,style:f.value},[t.slots.default&&t.slots.default(),d.createVNode("div",{class:"f-splitter-resize-overlay",style:s.value},null),d.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:i.value},null),d.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:a.value},null)])}}),og={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function sg(e,t){const r=d.ref(e.width),n=d.ref(e.height),{horizontalResizeBarPosition:i,horizontalResizeHandleOffset:a,showHorizontalResizeHandle:s,showVerticalResizeHandle:c,verticalResizeBarPosition:f,verticalResizeHandleOffset:p,draggingHorizontalResizeHandle:g,draggingVerticalResizeHandle:m,getPanelMaxWidth:w,getPanelMaxHeight:k}=t;let C="",B,_,T;const S=()=>e.maxWidth?e.maxWidth:w(C,e.minWidth)||0,F=()=>e.maxHeight?e.maxHeight:k(C,e.minHeight)||0;function z(Y){if((C==="left"||C==="right")&&_){const{left:q}=_.getBoundingClientRect(),{width:pe}=B.getBoundingClientRect(),he=Y.clientX-q;let ce=C==="left"?(pe||0)+(he-i.value):(pe||0)-(he-i.value);ce=e.minWidth>0?Math.max(e.minWidth,ce):ce;const be=S();be!=null&&be>0&&(ce=be>ce?ce:be),r.value=ce}if((C==="top"||C==="bottom")&&_){const{top:q}=_.getBoundingClientRect(),{height:pe}=B.getBoundingClientRect(),he=Y.clientY-q;let ce=C==="top"?(pe||0)+(he-f.value):(pe||0)-(he-f.value);ce=e.minHeight>0?Math.max(e.minHeight,ce):ce;const be=F();be!=null&&be>0&&(ce=be>ce?ce:be),n.value=ce}a.value=0,p.value=0,i.value=-1,f.value=-1,s.value=!1,c.value=!1,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",z),document.body.style.userSelect="",C="",B=null,_=null}function R(Y,q,pe){if(C=q,B=pe,s.value=!0,_=Y.composedPath().find(ce=>ce.className.split(" ")[0]==="f-splitter"),_){const{left:ce}=_.getBoundingClientRect();a.value=Y.clientX-ce,i.value=Y.clientX-ce;const be=S();T=ae=>g(ae,be,e.minWidth,C),document.addEventListener("mousemove",T),document.addEventListener("mouseup",z),document.body.style.userSelect="none"}}function $(Y,q,pe){if(C=q,B=pe,c.value=!0,_=Y.composedPath().find(ce=>ce.className.split(" ")[0]==="f-splitter"),_){const{top:ce}=_.getBoundingClientRect();p.value=Y.clientY-ce,f.value=Y.clientY-ce;const be=F();T=ae=>m(ae,be,e.minHeight,C),document.addEventListener("mousemove",T),document.addEventListener("mouseup",z),document.body.style.userSelect="none"}}return{actualWidth:r,actualHeight:n,onClickSplitterHorizontalResizeBar:R,onClickSplitterVerticalResizeBar:$}}const Ui=d.defineComponent({name:"FSplitterPane",props:og,emits:[],setup(e,t){const r=d.ref(),n=d.inject("splitter"),{useResizeHandleComposition:i}=n,a=sg(e,i),{actualHeight:s,actualWidth:c,onClickSplitterHorizontalResizeBar:f,onClickSplitterVerticalResizeBar:p}=a,g=d.ref(e.position),m=d.computed(()=>{const F={"f-splitter-pane":!0,"f-splitter-pane-main":g.value==="center","has-resize-bar":e.resizable};return F["f-splitter-pane-"+g.value]=!0,Kt(F,e==null?void 0:e.customClass)}),w=d.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(F=>["e","n","s","w"].find(z=>z===F)):[]),k=d.computed(()=>{const F={};return(c.value||c.value===0)&&(g.value==="left"||g.value==="right"||w.value.find(z=>z==="e")||w.value.find(z=>z==="w"))&&(F.width=`${c.value}px`),(s.value||s.value===0)&&(g.value==="bottom"||g.value==="top"||w.value.find(z=>z==="s")||w.value.find(z=>z==="n"))&&(F.height=`${s.value}px`),e.visible||(F.display="none"),c0(F,e==null?void 0:e.customStyle)}),C=d.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":g.value==="left","f-splitter-resize-bar-n":g.value==="bottom","f-splitter-resize-bar-s":g.value==="top","f-splitter-resize-bar-w":g.value==="right"}));function B(F){return{e:"left",w:"right",s:"top",n:"bottom"}[F]||F}function _(F,z){z=B(z),["left","right"].find(R=>R===z)&&f(F,z,r.value),["top","bottom"].find(R=>R===z)&&p(F,z,r.value)}function T(){return w.value.length>0?w.value.map(F=>d.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+F,onMousedown:z=>_(z,F)},null)):d.createVNode("span",{class:C.value,onMousedown:F=>_(F,g.value)},null)}function S(){c.value=e.width,s.value=e.height,k.value}return t.expose({reset:S}),()=>d.createVNode("div",{ref:r,class:m.value,style:k.value,"data-position":g.value},[t.slots.default&&t.slots.default(),e.resizable&&T()])}});Ya.install=e=>{e.component(Ya.name,Ya),e.component(Ui.name,Ui)};const wf={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},xf={content:{type:String,default:null}},lg=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},cg=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},Wi=(e,t=new WeakMap)=>{if(e===null||lg(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return cg(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const n=new Map;return t.set(e,n),e.forEach((i,a)=>{n.set(a,Wi(i,t))}),n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const i of e)n.add(Wi(i,t));return n}if(Array.isArray(e)){const n=[];return t.set(e,n),e.forEach(i=>{n.push(Wi(i,t))}),n}const r={};t.set(e,r);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Wi(e[n],t));return r},dg=(e,t=200)=>{let r=0;return(...n)=>new Promise(i=>{r&&(clearTimeout(r),i("cancel")),r=window.setTimeout(()=>{e.apply(void 0,n),r=0,i("done")},t)})},wc=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,zo=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),fg=new Set(["__proto__","constructor","prototype"]),hg=e=>!fg.has(e),xc=(e,t,r={})=>{if(Array.isArray(e)&&Array.isArray(t))return Ac(e,t,r);const{excludeKeys:n}=r,i=e,a=t;for(const s of Object.keys(a)){if(!hg(s))continue;const c=a[s],f=i[s];n&&n(s)?i[s]=c:Array.isArray(c)&&Array.isArray(f)?i[s]=Ac(f,c,r):zo(c)&&zo(f)?i[s]=xc(f,c,r):i[s]=c}return e},Ac=(e,t,r)=>{const n=e.slice();return t.forEach((i,a)=>{const s=n[a];Array.isArray(i)&&Array.isArray(s)?n[a]=Ac(s,i,r):zo(i)&&zo(s)?n[a]=xc(s,i,r):n[a]=i}),n},Re="md-editor",Ft="https://unpkg.com",mg=`${Ft}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,Af={main:`${Ft}/prettier@3.8.1/standalone.js`,markdown:`${Ft}/prettier@3.8.1/plugins/markdown.js`},pg={css:`${Ft}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${Ft}/cropperjs@1.6.2/dist/cropper.min.js`},gg=`${Ft}/screenfull@5.2.0/dist/screenfull.js`,bg=`${Ft}/mermaid@11.12.3/dist/mermaid.min.js`,yg={js:`${Ft}/katex@0.16.33/dist/katex.min.js`,css:`${Ft}/katex@0.16.33/dist/katex.min.css`},Dc={a11y:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},vg=`${Ft}/echarts@6.0.0/dist/echarts.min.js`,Df={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},Br={editorExtensions:{highlight:{js:mg,css:Dc},prettier:{standaloneJs:Af.main,parserMarkdownJs:Af.markdown},cropper:{...pg},screenfull:{js:gg},mermaid:{js:bg,enableZoom:!0},katex:{...yg},echarts:{js:vg}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},wg=({instance:e,ctx:t,props:r={}},n="default")=>{const i=(e==null?void 0:e.$slots[n])||(t==null?void 0:t.slots[n]);return(i?i(e):"")||r[n]},xg="buildFinished",kc="errorCatcher",Cc="catalogChanged",Ag="pushCatalog",kf="rerender",Dg="taskStateChanged";let kg=class{constructor(){Bt(this,"pools",{})}remove(t,r,n){const i=this.pools[t]&&this.pools[t][r];i&&(this.pools[t][r]=i.filter(a=>a!==n))}clear(t){this.pools[t]={}}on(t,r){return this.pools[t]||(this.pools[t]={}),this.pools[t][r.name]||(this.pools[t][r.name]=[]),this.pools[t][r.name].push(r.callback),this.pools[t][r.name].includes(r.callback)}emit(t,r,...n){this.pools[t]||(this.pools[t]={});const i=this.pools[t][r];i&&i.forEach(a=>{try{a(...n)}catch(s){console.error(`${r} monitor event exception!`,s)}})}};const yr=new kg,Cg=(e,t)=>{if(!e)return e;const r=t.split(`
|
|
566
|
+
`;return hc("caf-assistant-widget-container__error",S)}),k=()=>{const S=s.value;S&&(c.value=new M9(S))},C=()=>{const S=c.value;S&&(S.dispose(),c.value=null)},B=()=>{const S=a.value,F=i.value;S&&(S.unmount(),S.dispose()),F&&F.cleanup(),a.value=null,i.value=null},_=async()=>{const S=await r(e.widgetAPIURL);if(!S)throw new Error("Failed to load widget API");await S.initialize();const F=S.createWidget();i.value=S,a.value=F},T=S=>{console.error(S),f.value=S};return d.watch(()=>e.widgetAPIURL,async()=>{if(s.value)try{B(),await _();const S=s.value,F=a.value;F==null||F.updateOptions(e.widgetOptions),F==null||F.updateData(e.widgetData),S&&F&&await F.mount(S)}catch(S){T(S)}}),d.watch(()=>e.widgetOptions,(S,F)=>{try{const z=a.value;z&&(!F||!n(F,S))&&z.updateOptions(S)}catch(z){T(z)}}),d.watch(()=>e.widgetData,(S,F)=>{try{const z=a.value;z&&(!F||!n(F,S))&&z.updateData(S)}catch(z){T(z)}}),d.onMounted(async()=>{try{const S=s.value;if(S){k();const F=c.value;if(F){await _();const z=a.value;z&&(z.updateOptions(e.widgetOptions),z.updateData(e.widgetData),z.mount(F.getElement()),d.nextTick(()=>{S.parentElement&&(S.style.width="100%")}))}}}catch(S){T(S)}}),d.onBeforeUnmount(async()=>{try{B(),C()}catch(S){console.error(S)}}),()=>d.createVNode("div",{class:p.value},[d.createVNode("div",{ref:s,class:m},null),d.createVNode("div",{class:w.value},null)])}}),ef=(e,t)=>{var r;if(e.type===S0.AssistantWidgetComplete){const n=e;return n.widgetUrl?d.createVNode(Wa,{key:`widget-${t}`,widgetAPIURL:n.widgetUrl,widgetOptions:{mode:"embedded",implOptions:n.widgetImplOptions},widgetData:((r=n.widgetData)==null?void 0:r.data)||{}},null):null}return e.type===S0.AssistantWidgetPending?d.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`widget-loading-${t}`},[d.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),d.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[d.createTextVNode("数据生成中......")])]):null},I9=6e4,tf=8e3,V0=new Map,Tr=new Map,Vi=new Map,rn=[];function w0(e){return String(e??"").replace(/^\ufeff/,"").replace(/[\u200b\u200c\u200d]/g,"").replace(/\u00a0/g," ").trim()}function Fo(e){const t=w0(e);if(t)for(let r=rn.length-1;r>=0;r--)rn[r]===t&&rn.splice(r,1)}function O9(e){typeof window>"u"||(window.__fluens_dynamic_component_bootstrap_instance_id=e)}function To(e){if(typeof window>"u")return;const t=window;t.__fluens_dynamic_component_bootstrap_instance_id===e&&delete t.__fluens_dynamic_component_bootstrap_instance_id}function L9(){return rn[rn.length-1]||void 0}function Bo(e,t){const r=w0(t);return r?w0(e.instanceId)===r||e.componentId!=null&&w0(String(e.componentId))===r||e.name!=null&&w0(String(e.name))===r:!1}function pc(e){const t=w0(e);if(!t)return null;const r=V0.get(t);if(r)return{canonicalKey:t,entry:r};for(const[i,a]of V0.entries())if(w0(i)===t)return{canonicalKey:i,entry:a};const n=[];for(const[i,a]of V0.entries())Bo(a.config,t)&&n.push({key:i,entry:a});if(n.length===1){const{key:i,entry:a}=n[0];return i!==t&&console.warn(`[DynamicComponent] register id "${t}" resolved to pending instanceId "${i}" (alias match)`),{canonicalKey:i,entry:a}}if(n.length>1)return console.warn(`[DynamicComponent] register id "${t}" is ambiguous (${n.length} pending matches); refusing`),null;if(V0.size===1){const[i,a]=[...V0.entries()][0];return console.warn(`[DynamicComponent] register id "${t}" unmatched; using sole pending instance "${i}"`),{canonicalKey:i,entry:a}}return null}function rf(e,t){for(const[r,n]of Tr){const i=w0(r),a=e!==""&&i===e,s=String(t??"").trim(),c=e&&Bo(n.config,e)||s&&Bo(n.config,s);if(a||c)return console.warn(`[DynamicComponent] register skipped: id "${e||s}" already active (canonical "${r}"); unload first — second register yields "no pending", not duplicate mount`),!0}return!1}function gc(){return{pendingKeys:[...V0.keys()],bootstrapQueue:[...rn],activeKeys:[...Tr.keys()],...typeof window<"u"?{windowBootstrapPeek:window.__fluens_dynamic_component_bootstrap_instance_id}:{}}}function R9(e){console.warn("[DynamicComponent] register diagnostics",{claimedNormalized:e,...gc()})}function P9(e){const t=w0(e);if(t){if(rf(t,e))return{ok:!1,reason:"already_active_duplicate"};const n=pc(t);if(n)return{ok:!0,...n}}else if(rf("",e))return{ok:!1,reason:"already_active_duplicate"};for(let r=0;r<rn.length;r++){const n=rn[r],i=pc(n);if(i)return rn.splice(r,1),t&&w0(n)!==t&&console.warn(`[DynamicComponent] register id "${t}" did not match pending; using bootstrap instanceId "${n}" (sync bundle entry or use window.__fluens_dynamic_component_bootstrap_instance_id)`),{ok:!0,...i}}return{ok:!1,reason:"no_pending"}}function nf(e){const t=w0(e);if(!t)return null;const r=Tr.get(t);if(r)return r;for(const[a,s]of Tr.entries())if(w0(a)===t)return s;const n=[];for(const a of Tr.values())Bo(a.config,t)&&n.push(a);const i=[...new Map(n.map(a=>[a.config.instanceId,a])).values()];return i.length===1?(i[0].config.instanceId!==t&&console.warn(`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${i[0].config.instanceId}" (alias match)`),i[0]):(i.length>1&&console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${i.length} active matches)`),null)}function V9(e){const t=w0(e);if(!t)return null;const r=Tr.get(t);if(r)return r;for(const[n,i]of Tr.entries())if(w0(n)===t)return i;return null}function H9(e){const t=w0(e);if(!t)return t;const r=nf(t);if(r)return r.config.instanceId;const n=pc(t);return n?n.canonicalKey:t}function bc(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e}}}function af(e,t){if(typeof e.onAssistantMessage!="function")return!0;try{return e.onAssistantMessage(bc(t)),!0}catch(r){return console.warn("[DynamicComponent] onAssistantMessage failed",r),!1}}function q9(e){const t=`fluens-dynamic-component-${e.instanceId}`;let r=document.getElementById(t);return r||(r=document.createElement("div"),r.id=t,r.style.width="100%",r.style.height="100%"),r}function uf(e){const t=Tr.get(e.instanceId);if(t)return Promise.resolve(t.api);const r=V0.get(e.instanceId);if(r)return new Promise((i,a)=>{const s=r.resolve,c=r.reject;r.resolve=f=>{s(f),i(f)},r.reject=f=>{c(f),a(f)}});if((e.name||e.componentId)&&!e.jsUrl)return Promise.reject(new Error(`Dynamic component resource is empty: ${e.name||e.componentId}`));const n=q9(e);return new Promise((i,a)=>{const s={config:e,container:n,resolve:i,reject:a,timeoutId:0},c=setTimeout(()=>{s.postLoadRegisterCheckTimerId!=null&&(clearTimeout(s.postLoadRegisterCheckTimerId),s.postLoadRegisterCheckTimerId=void 0),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Dynamic component script load timeout: ${e.name||e.componentId}`))},I9);s.timeoutId=c,V0.set(e.instanceId,s),rn.push(e.instanceId),O9(e.instanceId);const f=document.createElement("script");f.src=(e==null?void 0:e.jsUrl)??"",f.dataset.dynamicComponentId=e.instanceId,f.async=!1,f.onload=()=>{s.postLoadRegisterCheckTimerId=window.setTimeout(()=>{s.postLoadRegisterCheckTimerId=void 0,V0.has(e.instanceId)&&(clearTimeout(c),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Dynamic component did not call __fluens_dynamic_component_register within ${tf}ms after load: ${e.name||e.componentId}`)))},tf)},f.onerror=()=>{clearTimeout(c),s.postLoadRegisterCheckTimerId!=null&&(clearTimeout(s.postLoadRegisterCheckTimerId),s.postLoadRegisterCheckTimerId=void 0),V0.delete(e.instanceId),Fo(e.instanceId),To(e.instanceId),a(new Error(`Failed to load dynamic component: ${e.name||e.componentId}`))},document.head.appendChild(f)})}function of(e){var i;const t=Tr.get(e);if(t){try{t.api.unmount()}catch{}(i=t.scriptElement)==null||i.remove(),Tr.delete(e)}const r=V0.get(e);r&&(r.postLoadRegisterCheckTimerId!=null&&(clearTimeout(r.postLoadRegisterCheckTimerId),r.postLoadRegisterCheckTimerId=void 0),clearTimeout(r.timeoutId),V0.delete(e)),Vi.delete(e);const n=document.getElementById(`fluens-dynamic-component-${e}`);n&&n.remove()}function j9(e,t){const r=w0(e);if(!r)return!1;const n=nf(r);if(n)return af(n.api,t);const i=H9(r),a=Vi.get(i)??[],s=a.findIndex(c=>c.messageId===t.messageId);return s>=0?a[s]=bc(t):a.push(bc(t)),Vi.set(i,a),!1}typeof window<"u"&&(window.__fluens_get_dynamic_component_registry_debug_snapshot=gc,window.__fluens_dynamic_component_register=function(e,t){const r=w0(e),n=P9(e);if(!n.ok){if(n.reason==="already_active_duplicate")return;R9(r),console.warn(`[DynamicComponent] no pending for register id "${r}" (raw ${JSON.stringify(e)}); see diagnostics above. Try: unload tab / avoid double register / ensure FXDynamicComponent loaded this jsUrl first / empty id if sole pending`);return}const{canonicalKey:i,entry:a}=n;Fo(i),To(i),a.postLoadRegisterCheckTimerId!=null&&(clearTimeout(a.postLoadRegisterCheckTimerId),a.postLoadRegisterCheckTimerId=void 0),clearTimeout(a.timeoutId),V0.delete(i);const s={config:a.config,container:a.container,api:t,scriptElement:document.currentScript};Tr.set(i,s),s.container.parentElement;try{t.mount(a.container,a.config)}catch(f){console.error(`Failed to mount dynamic component: ${i}`,f)}const c=[i];r&&r!==i&&c.push(r);for(const f of c){const p=Vi.get(f);p&&p.length>0&&(Vi.delete(f),p.forEach(g=>af(t,g)))}a.resolve(t)});const Ga=d.defineComponent({name:"FXDynamicComponent",props:{config:{type:Object,required:!0}},setup(e){const t=d.ref("loading"),r=d.ref(""),n=d.computed(()=>`fluens-dynamic-component-${e.config.instanceId}`),i=d.computed(()=>e.config.position==="inline"),a=d.computed(()=>!e.config.jsUrl&&!!e.config.url),s=d.computed(()=>({...i.value?{width:"fit-content",maxWidth:"100%"}:{width:"100%"},height:"auto",...t.value==="ready"&&i.value?{padding:"16px 0"}:{},...t.value==="ready"&&!i.value?{height:"100%",overflow:"hidden"}:{}}));return d.onMounted(()=>{a.value||(t.value="loading",r.value="",uf(e.config).then(()=>{t.value="ready"}).catch(c=>{t.value="error",r.value=c.message||"Unknown error"}))}),d.onUnmounted(()=>{a.value||of(e.config.instanceId)}),()=>a.value?null:d.createVNode("div",{class:"f-chat-dynamic-component-body",style:s.value},[d.createVNode("div",{id:n.value,style:{width:"100%",height:"100%",display:t.value==="ready"?"":"none"}},null),t.value==="loading"&&d.createVNode("div",{class:"f-chat-dynamic-component-loading"},[d.createVNode("span",{class:"f-chat-dynamic-component-loading-spinner"},null),d.createVNode("span",null,[d.createTextVNode("加载中......")])]),t.value==="error"&&d.createVNode("div",{class:"f-chat-dynamic-component-error"},[d.createVNode("span",{class:"f-chat-dynamic-component-error-icon"},[d.createTextVNode("!")]),d.createVNode("span",null,[r.value])])])}}),sf=(e,t,r)=>{if(e.type===S0.DynamicComponentComplete){const n=e;if(!n.config)return null;if(n.config.position==="inline")return d.createVNode(Ga,{key:`dc-${t}`,config:n.config},null);const i={type:"file",fileContent:{type:"md",name:n.config.title}},a={onPreviewFile:s=>{r.emit("showDynamicComponent",n.config)}};return r.emitDynamicComponentsDetectedOnce(n.config),d.createVNode("div",{style:{padding:"16px 0"}},[r.renderFileEmbeddedContent(i,a)])}return e.type===S0.DynamicComponentPending?d.createVNode("div",{class:"f-chat-bubble-widget-pending",key:`dc-loading-${t}`},[d.createVNode("span",{class:"f-chat-todo-status-icon f-chat-todo-status-working"},null),d.createVNode("span",{class:"f-chat-bubble-widget-pending-text"},[d.createTextVNode("组件加载中......")])]):null};function $9(){return{[S0.Text]:jp,[S0.AssistantWidgetComplete]:ef,[S0.AssistantWidgetPending]:ef,[S0.DynamicComponentComplete]:sf,[S0.DynamicComponentPending]:sf}}const U9=d.defineComponent({name:"FXBubbleTextContent",props:Cm,emits:["dynamicComponentsDetected","showDynamicComponent"],setup(e,t){const{renderFileEmbeddedContent:r}=G1(),{propertyStates:n,registerProperty:i,updatePropertyValue:a,startStreaming:s}=Fu();i("title",e.title??""),i("subtitle",e.subtitle??""),i("text",e.text??""),d.watch([()=>e.title,()=>e.subtitle,()=>e.text],([T,S,F])=>{a("title",T??""),a("subtitle",S??""),a("text",F??"")});const c=d.computed(()=>e.textFormat==="markdown"),f=d.ref(!1),p=d.computed(()=>{var T,S,F;return f.value?{title:((T=n.title)==null?void 0:T.displayedValue)??"",subtitle:((S=n.subtitle)==null?void 0:S.displayedValue)??"",text:((F=n.text)==null?void 0:F.displayedValue)??""}:{title:e.title,subtitle:e.subtitle,text:e.text}}),g=d.computed(()=>Um(p.value.text)),m=new Set;function w(T){const S=String(T.instanceId??"").trim();!S||m.has(S)||(m.add(S),d.nextTick(()=>{var F;t.emit("dynamicComponentsDetected",[T]),(F=e.onDynamicComponentsDetected)==null||F.call(e,[T])}))}function k(T,...S){var F;t.emit(T,...S),T==="showDynamicComponent"&&((F=e.onShowDynamicComponent)==null||F.call(e,S[0]))}const C={shouldShowMarkdown:c,emit:k,emitDynamicComponentsDetectedOnce:w,renderFileEmbeddedContent:r},B=$9(),_=()=>g.value.length===0?null:d.createVNode("div",{class:"f-chat-bubble-text-collection"},[g.value.map((T,S)=>{var F;return(F=B[T.type])==null?void 0:F.call(B,T,S,C)})]);return d.onMounted(()=>{f.value&&s()}),()=>d.createVNode(d.Fragment,null,[p.value.title&&d.createVNode("div",{class:"f-chat-bubble-content-title"},[p.value.title]),p.value.subtitle&&d.createVNode("div",{class:"f-chat-bubble-content-subtitle"},[p.value.subtitle]),_()])}}),W9={content:{type:Object},outputMode:{type:String,default:"full"}},G9=d.defineComponent({name:"FXBubbleThink",props:W9,setup(e,t){var pe;const{propertyStates:r,registerProperty:n,updatePropertyValue:i,isAllDone:a}=Fu(),{elapsedSeconds:s,hasEverStarted:c,start:f,stop:p,reset:g}=Os(),m=d.ref(((pe=e.content)==null?void 0:pe.completed)!==!0),w=d.ref(null),k=d.ref(null),C=d.ref(!1),B=d.ref(!1),_=d.computed(()=>e.outputMode==="streaming"),T=d.computed(()=>{var he;return(he=e.content)==null?void 0:he.completed}),S=d.computed(()=>{var ce,be;if(T.value){const ae=c.value?`(用时${s.value}秒)`:"";return((ce=e.content)==null?void 0:ce.title)??"思考完成"+ae}return((be=e.content)==null?void 0:be.title)??"正在思考......"}),F=d.computed(()=>{var he,ce;return _.value?((he=r.content)==null?void 0:he.displayedValue)??"":((ce=e.content)==null?void 0:ce.content)??""}),z=d.computed(()=>({"f-chat-bubble-thinking":!0,"is-pending":!T.value,"is-completed":T.value})),R=()=>{const he=w.value;if(!he||!C.value){B.value=!1;return}B.value=he.scrollTop>0};d.watch(()=>T.value,he=>{he?p():f()},{immediate:!0}),d.watch(()=>T.value,he=>{he&&(m.value=!1)}),d.watch(()=>e.content,he=>{he&&(r.content?i("content",he.content??""):n("content",he.content??""))},{immediate:!0}),d.watch(F,async()=>{if(m.value){await d.nextTick();const he=w.value;if(!he)return;await d.nextTick(),C.value=he.scrollHeight>he.clientHeight,C.value?(he.scrollTop=he.scrollHeight,B.value=!0):B.value=!1}},{immediate:!0}),d.watch(m,async he=>{if(he){await d.nextTick();const ce=w.value;if(!ce)return;await d.nextTick(),C.value=ce.scrollHeight>ce.clientHeight,C.value?(ce.scrollTop=ce.scrollHeight,B.value=!0):B.value=!1}}),d.onUnmounted(()=>{g()}),t.expose({instance:{get loadDone(){return e.content?(_.value?a.value:!0)&&T.value:!0}}});const $=()=>{m.value=!m.value},Y=()=>T.value?null:d.createVNode(sa,{status:"Working",variant:"thinking"},null),q=()=>!F.value||!m.value?null:d.createVNode("div",{class:"f-chat-bubble-thinking-content"},[d.createVNode("div",{class:"f-chat-bubble-thinking-scroll-container",ref:w,onScroll:R},[C.value&&B.value&&d.createVNode("div",{class:"f-chat-bubble-thinking-fade-mask"},null),d.createVNode("div",{class:"f-chat-bubble-thinking-text-wrapper"},[d.createVNode("div",{ref:k,class:"f-chat-bubble-thinking-content-text",innerHTML:F.value},null)])])]);return()=>d.createVNode("div",{class:z.value},[d.createVNode("div",{class:"f-chat-bubble-thinking-header",onClick:$},[Y(),d.createVNode("span",{class:"f-chat-bubble-thinking-title",innerHTML:S.value},null),F.value&&d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:m.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null)]),q()])}}),X9={content:{type:Object}},lf={id:{type:String},arrowOffsetX:{type:Number,default:0},class:{type:String,default:""},customStyles:{type:Object,default:null},isSimpleTips:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},host:{type:Object},leftBoundary:{type:Object},keepWidthWithReference:{type:Boolean,default:!1},minWidth:{type:Number,default:-1},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},placement:{type:String,default:"bottom"},reference:{type:Object},rightBoundary:{type:Object},showArrow:{type:Boolean,default:!1},theme:{type:String,default:"default"},title:{type:String},visible:{type:Boolean,default:!1},zIndex:{type:Number,default:-1},limitContentBySpace:{type:Boolean,default:!1},beforeClose:{type:Function},enableDrag:{type:Boolean,default:!1},renderWhenShown:{type:Boolean,default:!1}};function Y9(e){const t=e.host?e.host:"body",r=d.computed(()=>t==="body"?0:t?t.getBoundingClientRect().top:0),n=d.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().bottom:window.innerHeight),i=d.computed(()=>t==="body"?0:t?t.getBoundingClientRect().left:0),a=d.computed(()=>t==="body"?document.body.getBoundingClientRect().width:t?t.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),s=d.computed(()=>t==="body"?window.innerHeight:t?t.getBoundingClientRect().height:window.innerHeight);return{host:t,hostLeft:i,hostTop:r,hostWidth:a,hostHeight:s,hostBottom:n}}function Z9(e,t,r,n){const i=d.ref(e.offsetX||0),a=d.ref(e.offsetY||0),s=d.ref(-1),c=d.ref(-1),f=d.ref(-1),p=d.ref(-1),g=d.ref(e.placement),m=d.ref(0),w=d.ref(0),k=d.ref(0),C=d.computed(()=>document.documentElement.scrollLeft),B=d.computed(()=>document.documentElement.scrollTop),{hostLeft:_,hostTop:T,hostWidth:S,hostHeight:F,hostBottom:z}=n;d.watch(()=>e.offsetX,ue=>{i.value=ue});const R=d.computed(()=>{const ue={left:`${w.value}px`,top:`${k.value}px`,transform:`translate(${i.value}px, ${a.value}px)`};return e.zIndex!==-1&&(ue["z-index"]=e.zIndex),e.fitContent?e.keepWidthWithReference&&r.value&&s.value>=r.value.getBoundingClientRect().width&&(ue.width=`${s.value}px`):s.value!==-1&&(ue.width=`${s.value}px`),e.minWidth!==-1&&(ue.minWidth=`${e.minWidth}px`),e.customStyles&&Object.assign(ue,e.customStyles),c.value>0&&(ue.maxHeight=c.value+"px"),ue}),$=d.computed(()=>({left:`${m.value}px`,transform:`translateX(${e.arrowOffsetX}px)`}));function Y(ue){if(ue&&e.keepWidthWithReference){const me=ue.getBoundingClientRect();s.value=Math.max(e.minWidth,me.width)}}function q(ue,me){const ge=S.value-ue.width-4;return ge>0?ge:me}function pe(ue,me){const ge=F.value-ue.height-12;return ge>0?ge:me}function he(ue,me,ge){const Le=m.value,Ye=me.left-_.value+me.width/2+C.value,Ke=me.top-T.value-(ue.height+ge.height)+B.value;return{popoverLeft:Ye,popoverTop:Ke,arrowLeft:Le}}function ce(ue,me,ge){const Le=me.top-T.value+(me.height+ge.height)+B.value,Ye=pe(ue,Le);return Math.min(Le,Ye)}function be(ue,me){const ge=q(me,ue),Le=ue<=ge?m.value:ue-ge;return{popoverLeft:Math.min(ue,ge),arrowLeft:Le,maxHeight:0}}function ae(ue,me){const ge=q(me,ue),Le=ue<=ge?m.value:ue-ge;return{popoverLeft:ue,arrowLeft:Le,maxHeight:0}}function xe(ue,me,ge){const Le=me.left-_.value+C.value,{arrowLeft:Ye,popoverLeft:Ke}=ae(Le,ue),{popoverTop:ut}=he(ue,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function Se(ue,me,ge){const Le=me.left-_.value+me.width/2-(ge.width/2-(ue.left-_.value))+C.value,{arrowLeft:Ye,popoverLeft:Ke}=be(Le,ue),ut=ce(ue,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function te(ue,me,ge){const Le=me.left-_.value+C.value,{arrowLeft:Ye,popoverLeft:Ke}=be(Le,ue),ut=ce(ue,me,ge);return{popoverLeft:Ke,popoverTop:ut,arrowLeft:Ye,maxHeight:0}}function ye(ue,me,ge){const Le=me.right-_.value-ue.width+C.value,Ke=Math.max(Le,4),ut=Ke-Le,ot=ue.width-ge.width-20-ut,st=ce(ue,me,ge);return{popoverLeft:Ke,popoverTop:st,arrowLeft:ot,maxHeight:0}}function ne(ue,me,ge){const Le=me.left-_.value;let Ye=0,Ke=0,ut=0,ot=0,st="bottom-left";window.innerWidth-Le>ue.width?Ye=Le+C.value:(Ye=me.right-ue.width+C.value,ut=ue.width-ge.width-20);let Xt=0;if(e.limitContentBySpace){const Ce={topHeight:me.top-T.value-ge.height-8,bottomHeight:z.value-me.bottom-ge.height-8};Xt=Math.max(Ce.topHeight,Ce.bottomHeight),ue.height>Xt&&(ot=Xt,r.value.classList.add("popover-limitmax"))}const $0=ot?Math.floor(ot):ue.height,Jt=me.top-T.value+(me.height+ge.height);return z.value-Jt>$0?Ke=Jt+B.value:(Ke=me.top-$0-ge.height+B.value,z.value-Jt>me.top?(Ke=Jt+B.value,$0>me.top&&(Ke=z.value-$0)):(Ke=Ke<0?0:Ke,st="top")),r.value.classList.add("popover-"+st,"bs-popover-"+st),{popoverLeft:Ye<0?5:Ye,popoverTop:Ke,arrowLeft:ut,maxHeight:ot}}function Ne(ue,me,ge){const Le=me.left+me.width,Ye=0;let Ke=0,ut=ue.height;if(e.limitContentBySpace){const ft=F.value-16-Math.abs(a.value);ue.height>ft?(Ke=ft,ut=ft,r.value.classList.add("popover-limitmax")):r.value.classList.remove("popover-limitmax")}const ot=Math.max(me.top-(ut/2-me.height/2),T.value);let st=T.value+F.value-ut-a.value;st<0&&(st=ot);const Xt=Math.min(ot,st);return{popoverLeft:Le,popoverTop:Xt,arrowLeft:Ye,maxHeight:Ke}}function We(ue,me,ge){const Le=me.left+me.width,Ye=Math.max(me.top-me.height,T.value);let Ke=T.value+F.value-ue.height;Ke<0&&(Ke=Ye);const ut=Math.min(Ye,Ke);return{popoverLeft:Le,popoverTop:ut,arrowLeft:0,maxHeight:0}}function X(ue,me,ge){const Le=me.left-_.value+me.width/2-ue.width/2+C.value,Ye=me.top-T.value-(ue.height+ge.height)+B.value,Ke=ue.width/2-ge.width/2;return{popoverLeft:Le,popoverTop:Ye,arrowLeft:Ke,maxHeight:0}}function Z(ue,me,ge){const Le=me.left-_.value+me.width/2-ue.width/2+C.value,Ye=ce(ue,me,ge),Ke=ue.width/2-ge.width/2;return{popoverLeft:Le,popoverTop:Ye,arrowLeft:Ke,maxHeight:0}}const Q=new Map([["top",he],["top-left",xe],["top-center",X],["bottom",Se],["bottom-left",te],["bottom-right",ye],["bottom-center",Z],["right",Ne],["right-top",We],["auto",ne]]);function ie(ue){var Ke;e.keepWidthWithReference&&Y(ue);const me=ue.getBoundingClientRect();f.value=me.top,p.value=me.left;const ge=t.value?t.value.getBoundingClientRect():{height:4,width:4},Le=(Ke=r.value)==null?void 0:Ke.getBoundingClientRect();s.value=Le.width;const Ye=Q.get(g.value);if(Ye){const{arrowLeft:ut,popoverLeft:ot,popoverTop:st,maxHeight:Xt}=Ye(Le,me,ge);m.value=ut,w.value=ot,k.value=st,c.value=Xt||-1}}function fe(ue){if(ue){const me=ue.getBoundingClientRect();(me.left!==p.value||me.top!==f.value)&&ie(ue)}}function ke(){g.value=e.placement,m.value=0,w.value=0,k.value=0,s.value=-1}return{arrowStyle:$,popoverStyle:R,position:g,popoverWidth:s,fitToReference:Y,followToReferencePosition:fe,locateToReference:ie,resetPosition:ke}}function K9(e,t,r,n,i,a,s,c){const f=d.ref(e.visible),p=d.computed(()=>f.value),g=d.ref(!1),{fitToReference:m,followToReferencePosition:w,locateToReference:k,resetPosition:C}=s;function B(){g.value=!0}function _(){g.value=!1}d.watch(()=>e.visible,async R=>{R&&e.reference?(c.value||(c.value=!0,await d.nextTick()),await d.nextTick(),F(e.reference)):R||S()},{flush:"post"});let T;async function S(){f.value&&(e.beforeClose&&typeof e.beforeClose=="function"&&!await e.beforeClose()||(f.value=!1,document.body.removeEventListener("click",T),document.body.removeEventListener("mousedown",T),document.body.removeEventListener("wheel",T,!0),document.removeEventListener("scroll",T),e.enableDrag&&(document.removeEventListener("dragstart",B),document.removeEventListener("dragend",_),g.value=!1),C(),t.emit("hidden"),e.renderWhenShown&&(c.value=!1)))}T=R=>{var q;if(g.value||!i.value)return;const $=i.value.contains(R.target);if(R.type==="scroll"||R.type==="wheel"&&$){S();return}if(R.target.closest(".time-picker-panel"))return;const Y=(q=R.target)==null?void 0:q.closest(".popover");if(Y&&n.value&&Y===n.value){R.type!=="scroll"&&R.type!=="wheel"&&R.stopPropagation();return}if(!$&&f.value){const pe=i.value.closest(".popover");pe&&pe.removeEventListener("click",T),S()}};async function F(R){if(e.renderWhenShown&&!c.value&&(c.value=!0,await d.nextTick()),n.value&&(e.showArrow===!1||e.showArrow&&r.value)&&R){C(),f.value=!0,i.value=R,a.value&&m(R),await d.nextTick(),k(R),document.body.addEventListener("click",T),document.body.addEventListener("mousedown",T),document.body.addEventListener("wheel",T,!0),document.addEventListener("scroll",T),e.enableDrag&&(document.addEventListener("dragstart",B),document.addEventListener("dragend",_)),(top==null?void 0:top.document)!==document&&(top==null||top.document.addEventListener("mousedown",T));const $=R.closest(".popover");$&&$.addEventListener("click",T),t.emit("shown")}}function z(){f.value&&i.value&&w(i.value)}return t.expose({hide:S,popoverRef:n,show:F,shown:p,isShow:f,updatePosition:z}),{showPopover:f,hidePopverOnClickBodyHandler:T}}function Q9(e,t,r,n,i,a){const{popoverWidth:s,fitToReference:c,followToReferencePosition:f}=i;function p(){var g;if(a.value&&((g=a.value.style)==null?void 0:g.display)!=="none"&&r.value){f(r.value);const m=r.value.getBoundingClientRect();n.value&&m.width!==s.value&&c(r.value)}}return{onResize:p}}function J9(e,t=500){const r=d.ref(e.value);let n;const i=d.watch(e,s=>{clearTimeout(n),n=setTimeout(()=>{r.value=s},t)}),a=()=>{clearTimeout(n),i()};return d.onUnmounted(a),{delayedValue:r,cleanup:a}}const fa=d.defineComponent({name:"FXPopover",props:lf,emits:["shown","hidden"],setup(e,t){const r=d.ref(),n=d.ref(),i=d.ref(e.reference),a=d.ref(e.keepWidthWithReference),s=d.computed(()=>!!e.title),c=d.ref(!e.renderWhenShown||e.visible),f=Y9(e),{host:p}=f,g=Z9(e,r,n,f),{position:m,arrowStyle:w,popoverStyle:k,fitToReference:C,locateToReference:B}=g,{showPopover:_,hidePopverOnClickBodyHandler:T}=K9(e,t,r,n,i,a,g,c),{onResize:S}=Q9(e,t,i,a,g,n),F=d.computed(()=>{let q=m.value;const pe=`popover in popover-${q}`,he=`bs-popover-${q}`,ce={"popover-fitcontent":e.fitContent,fade:!0};ce[pe]=!0,ce[he]=!0,e.theme==="dark"&&(ce["popover-theme-dark"]=!0);const be=(e.class||"").split(" ");return e.isSimpleTips&&be.unshift("popover-tips"),be.reduce((ae,xe)=>(ae[xe]=!0,ae),ce),ce}),z=d.computed(()=>({"popover-content":!0,"popover-body":!0})),R=d.computed(()=>{const q={};return q.opacity=_.value?1:0,q.visibility=_.value?"visible":"hidden",q.zIndex=1060,q}),$=d.computed(()=>e.isSimpleTips?!0:e.showArrow),{delayedValue:Y}=J9(R,50);return d.onMounted(()=>{var q;c.value&&(a.value&&C(i.value),e.reference&&B(i.value)),window.addEventListener("resize",S),(q=n.value)==null||q.focus()}),d.onUnmounted(()=>{document.body.removeEventListener("click",T),window.removeEventListener("resize",S),_.value=!1}),()=>c.value?d.createVNode(d.Teleport,{to:p},{default:()=>{var q;return[d.withDirectives(d.createVNode("div",{tabindex:"-1",ref:n,class:F.value,style:{...k.value,...Y.value},onMousedown:pe=>{e.enableDrag||pe.stopPropagation()},onClick:pe=>{pe.stopPropagation()}},[$.value&&d.createVNode("div",{ref:r,class:"popover-arrow arrow",style:w.value},null),s.value&&d.createVNode("h3",{class:"popover-title popover-header"},[e.title]),d.createVNode("div",{class:z.value},[t.slots.default&&((q=t.slots)==null?void 0:q.default())])]),[[d.vShow,_.value]])]}}):null}}),Mo="FarrisX_PopoverInstancesKey";window[Mo]=window[Mo]||new WeakMap;function yc(e,t,r){e.stopPropagation();const n=t.value;n&&n.value&&!n.value.isShow&&(n.value.show(r),window[Mo].set(r,n.value))}function cf(e,t,r){e.stopPropagation(),t.value.value.hide(),window[Mo].delete(r)}function eg(e,t,r){e.stopPropagation();const n=t.value;n&&n.value&&(n.value.isShow?cf(e,t,r):yc(e,t,r))}function df(e,t,r){t.arg&&t.arg==="toggle"?eg(e,t,r):yc(e,t,r)}const ff={mounted:(e,t,r)=>{t.modifiers.hover?(e.addEventListener("mouseenter",n=>yc(n,t,e)),e.addEventListener("mouseleave",n=>cf(n,t,e))):t.modifiers.click?e.addEventListener("click",n=>df(n,t,e)):e.addEventListener("click",n=>df(n,t,e)),e.classList.add("v-popover")},unMounted:(e,t,r)=>{}};fa.install=e=>{e.component(fa.name,fa),e.directive("fxpopover",ff)};const hf={type:{type:String,default:"StartedToDo"},status:{type:String,default:"NotStart"},message:{type:String,default:""},taskDetail:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"hover"},initExpanded:{type:Boolean,default:!1},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!0},loading:Object,shimmer:{type:Boolean,default:!0},outputMode:{type:String,default:"streaming"},listStatus:{type:String,default:void 0},completedCount:{type:Number,default:void 0},totalCount:{type:Number,default:void 0}},mf={items:{type:Array,default:()=>[]}},pf={id:{type:Number||String,default:0},status:{type:String},task:{type:String,default:""},todoList:{type:Array,default:[]},detailViewMode:{type:String,default:"expand"},initExpanded:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showLabel:{type:Boolean,default:!1},shimmer:{type:Boolean,default:!0},title:{type:String,default:""},message:{type:String,default:""},outputMode:{type:String,default:"full"}},No=d.defineComponent({name:"FXTodoListItemView",props:pf,emits:["click"],setup(e,{emit:t}){const{propertyStates:r,registerProperty:n,updatePropertyValue:i,startStreaming:a}=Fu();n("title",e.title??""),n("task",e.task??""),n("detail",e.message??""),d.watch([()=>e.title,()=>e.task,()=>e.message],([k,C,B])=>{i("title",k??""),i("task",C??""),i("detail",B??"")});const s=d.computed(()=>["f-chat-todo-item",{"is-done":e.status==="Done","is-working":e.status==="Working","is-not-start":e.status==="NotStart","no-shimmer":!e.shimmer}]),c=d.computed(()=>["f-chat-todo-task",{"is-done":e.status==="Done"}]);function f(){t("click",e,e.id)}const p=d.computed(()=>e.outputMode==="streaming"),g=d.computed(()=>{var k;return p.value?((k=r.title)==null?void 0:k.displayedValue)??"":e.title??""}),m=d.computed(()=>{var k;return p.value?((k=r.task)==null?void 0:k.displayedValue)??"":e.task??""}),w=d.computed(()=>{var k;return p.value?((k=r.detail)==null?void 0:k.displayedValue)??"":e.message??""});return d.onMounted(()=>{p.value&&a()}),()=>d.createVNode("li",{key:e.id,class:s.value,onClick:f},[e.todoList&&e.todoList.length>0&&d.createVNode(ha,{todoList:e.todoList,status:e.status,message:e.task,taskDetail:e.message,detailViewMode:e.detailViewMode,initExpanded:e.initExpanded,showLoading:e.showLoading,showLabel:e.showLabel,outputMode:e.outputMode},null),!e.todoList||e.todoList.length===0&&d.createVNode(d.Fragment,null,[e.showLoading&&d.createVNode(sa,{status:e.status??"Done",variant:"todo"},null),g.value?d.createVNode("div",{class:"f-chat-todo-task-wrapper"},[d.createVNode("span",{class:c.value},[g.value]),d.createVNode("div",{class:"f-chat-todo-task-description"},[m.value]),w.value?d.withDirectives(d.createVNode("div",{class:"f-chat-todo-task-description"},[w.value]),[[d.resolveDirective("overflow-tooltip")]]):null]):d.createVNode("div",{class:"f-chat-todo-task-wrapper"},[d.createVNode("span",{class:c.value},[m.value]),w.value?d.withDirectives(d.createVNode("div",{class:"f-chat-todo-task-description"},[w.value]),[[d.resolveDirective("overflow-tooltip")]]):null])])])}}),Hi=d.defineComponent({name:"FXTodoListView",props:mf,setup(e){return()=>{var t;return(t=e.items)!=null&&t.length?d.createVNode("ul",{class:"f-chat-todo-items"},[e.items.map((r,n)=>d.createVNode(No,d.mergeProps({key:n},r),null))]):null}}}),tg=300,rg={Working:"正在执行任务",Done:"已完成任务",NotStart:"待执行任务"},ha=d.defineComponent({name:"FXStartedTodo",props:hf,setup(e){const t=d.ref(null),r=d.ref(null),n=d.ref(null),i=d.ref(null),a=d.computed(()=>e.outputMode==="streaming"),{displayContent:s}=P1(()=>({detail:e.taskDetail??""}),()=>!0,a,{charInterval:30}),c=d.ref(e.initExpanded),f=d.computed(()=>({"f-chat-message-started-todo--content":!0,"d-none":!c.value}));function p(){e.detailViewMode!=="expand"&&(i.value!=null&&(window.clearTimeout(i.value),i.value=null),n.value=window.setTimeout(()=>{t.value&&r.value&&r.value.show(t.value),n.value=null},tg))}function g(){e.detailViewMode!=="expand"&&(n.value!=null&&(window.clearTimeout(n.value),n.value=null),i.value=window.setTimeout(()=>{var S,F;(F=(S=r.value)==null?void 0:S.hide)==null||F.call(S),i.value=null},150))}function m(){if(e.detailViewMode==="none")return null;const S=s.value.detail??"";return d.createVNode(d.Fragment,null,[S?d.createVNode("div",{class:"f-chat-started-todo-task-detail"},[S]):null,d.createVNode(Hi,{items:e.todoList},null)])}function w(){e.detailViewMode==="expand"&&(c.value=!c.value)}function k(){return e.detailViewMode==="expand"?d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:c.value?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null):null}function C(){return e.detailViewMode==="hover"&&d.createVNode(fa,{ref:r,class:"f-chat-started-todo-popover"},{default:()=>[d.createVNode("div",{class:"f-chat-started-todo-popover-content",onMouseenter:()=>{i.value!=null&&(window.clearTimeout(i.value),i.value=null)},onMouseleave:g},[m()])]})}const B=d.computed(()=>e.listStatus==="completed"),_=d.computed(()=>{const S=e.todoList??[],F=e.totalCount??S.length;return{done:e.completedCount??S.filter(R=>(R==null?void 0:R.status)==="Done").length,total:F}});function T(){if(!B.value)return null;const{done:S,total:F}=_.value,z=F>0?`已完成 (${S}/${F})`:"已完成";return d.createVNode("span",{class:"f-chat-started-todo-completed-chip","aria-label":z},[z])}return()=>d.createVNode("div",{ref:t,class:["f-chat-message-started-todo",{"is-working":e.status==="Working","is-completed":B.value}],onMouseenter:p,onMouseleave:g},[d.createVNode("div",{class:"f-chat-message-started-todo--header",onClick:w},[e.showLabel&&d.createVNode("span",{class:"f-chat-started-todo-label"},[rg[e.status]]),d.createVNode("span",{class:"f-chat-started-todo-message",innerHTML:e.message},null),T(),k()]),e.detailViewMode==="expand"&&d.createVNode("div",{class:f.value},[m()]),C()])}});ha.install=e=>{e.component(ha.name,ha)};const ng=d.defineComponent({name:"FXBubbleThoughtChain",props:X9,setup(e,t){const{elapsedSeconds:r,hasEverStarted:n,start:i,stop:a,reset:s}=Os(),c=d.computed(()=>{var m;return((m=e.content)==null?void 0:m.status)==="Done"}),f=d.computed(()=>{var m;return((m=e.content)==null?void 0:m.message)??"正在思考......"}),p=d.computed(()=>{var k,C;const m=((k=e.content)==null?void 0:k.doneMessage)??((C=e.content)==null?void 0:C.message)??"思考完成",w=n.value?`(用时${r.value}秒)`:"";return""+m+w}),g=d.computed(()=>c.value?p.value:f.value);return d.watch(()=>{var m;return(m=e.content)==null?void 0:m.status},m=>{m==="Working"?i():m==="Done"?a():s()},{immediate:!0}),d.onUnmounted(()=>{s()}),t.expose({instance:{get loadDone(){return e.content?c.value:!0}}}),()=>{var m,w,k,C,B,_;return e.content?d.createVNode(ha,{status:((m=e.content)==null?void 0:m.status)??"Working",message:g.value,todoList:(w=e.content)==null?void 0:w.todoList,detailViewMode:((k=e.content)==null?void 0:k.detailViewMode)??"expand",showLabel:!1,showLoading:!0,initExpanded:!0,listStatus:(C=e.content)==null?void 0:C.listStatus,completedCount:(B=e.content)==null?void 0:B.completedCount,totalCount:(_=e.content)==null?void 0:_.totalCount},null):null}}}),qi=d.defineComponent({name:"UserAuthMessage",props:{content:{type:Object,required:!0},onConfirm:{type:Function,default:void 0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-auth"},[d.createVNode("div",{class:"f-ec-auth-desc"},[e.content.description]),d.createVNode("div",{class:"f-ec-auth-actions"},[e.content.options.map(t=>d.createVNode("button",{key:t.optionId,type:"button",class:"f-ec-auth-btn",onClick:()=>{var r;(r=e.onConfirm)==null||r.call(e,t.optionId,t.name,t.message??t.name),console.info("[UserAuth]",t.optionId,t.name)}},[t.name]))])])}}),ag=300,Xa=d.defineComponent({name:"FXToolUseMessage",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>e.content.toolResultApplied===!0||String(e.content.result??"").trim().length>0),{getToolIconClass:r}=Ls(),n=d.computed(()=>e.content.success===!1),i=d.ref(!1);let a=setTimeout(()=>{i.value=!0},ag);d.onBeforeUnmount(()=>{a&&clearTimeout(a)});const s=d.computed(()=>t.value),c=d.computed(()=>i.value&&!t.value),f=d.computed(()=>n.value?"执行完成":s.value?"执行成功":"调用中"),p=d.ref(!1),g=d.computed(()=>({"f-chat-tool-use":!0,"is-done":s.value,"is-error":n.value})),m=d.computed(()=>({"f-chat-tool-use-status":!0,"is-done":s.value&&!n.value,"is-run":c.value&&!n.value,"is-error":n.value}));d.watch(()=>t.value,(k,C)=>{k&&!C&&(p.value=!1)},{flush:"post"});const w=()=>t.value?d.createVNode("div",{class:"f-chat-tool-use-result"},[e.content.result??""]):null;return()=>d.createVNode("div",{class:g.value},[d.createVNode("div",{class:"f-chat-tool-use-header",onClick:()=>{p.value=!p.value}},[d.createVNode("i",{class:"fx-icon fx-icon-"+r(e.content.toolName)+" tool-icon"},null),d.createVNode("span",{class:"f-chat-tool-use-name"},[e.content.toolDescription??"tool"]),d.createVNode("div",{class:m.value},[n.value?d.createVNode(sa,{status:"Error",variant:"tool-use"},null):d.createVNode(sa,{status:s.value?"Done":c.value?"Working":"NotStart",variant:"tool-use"},null),d.createVNode("span",{class:"f-chat-tool-use-status-text"},[f.value])]),d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:p.value?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.2s ease"}},null)]),p.value&&d.createVNode("div",{class:"f-chat-tool-use-content"},[w()])])}});Xa.install=e=>{e.component(Xa.name,Xa)};const ji=d.defineComponent({name:"FXBubble",components:{"fx-user-auth-inline":qi,"fx-app-preview-inline":Cr,FXToolUse:Xa},props:Cu,setup(e,t){const r=d.shallowRef(),n=d.ref(),i=d.ref(),a=d.computed(()=>!!e.showAvatar),s=d.computed(()=>a.value===!0||e.header==="ContentHeader"),c=d.computed(()=>t.slots.leftFooter||t.slots.rightFooter),f=d.computed(()=>{var ae;return c0({},(ae=e.styles)==null?void 0:ae.footer)}),p=ae=>{if(e.attachmentRowClickOpensPreview!==!1&&e.onPreview){if(ae.type==="md"&&ae.content){e.onPreview({content:ae.content,contentType:"markdown"});return}if(ae!=null&&ae.url){const xe=ae!=null&&ae.fullScreenPreview?"fullScreen":"splitScreen";e.onPreview({url:ae.url,previewMode:xe,title:ae.name})}}},g=ae=>{if(e.attachmentRowClickOpensPreview===!1||!e.onPreview)return;const xe=ae==null?void 0:ae.filter(te=>te.type==="md"&&te.content);if(xe.length===0)return;const Se=Object.fromEntries(xe.map(te=>[te.name,te.content??""]));e.onPreview({contentMap:Se,contentType:"markdown"})},{renderFileEmbeddedContent:m,renderPageEmbeddedContent:w}=G1(),k=d.ref(""),C=d.computed(()=>{var xe,Se;if((xe=e.content)!=null&&xe.footerContent)return e.content.footerContent;const ae=(Se=e.content)==null?void 0:Se.structuredContent;return ae&&(ae.footerTemplate||ae.footerUrl||ae.footerFile)?{type:ae.footerUrl?"page":ae.footerFile?"file":"template",pageUrl:ae.footerUrl,fileContent:ae.footerFile,template:ae.footerTemplate,width:ae.footerWidth,height:ae.footerHeight}:null});d.watch(()=>{var ae;return(ae=C.value)==null?void 0:ae.width},ae=>{if(!ae){k.value="";return}if(ae.endsWith("%")){const xe=parseFloat(ae);isNaN(xe)||d.nextTick(()=>{var te,ye;const Se=(ye=(te=r.value)==null?void 0:te.parentElement)==null?void 0:ye.clientWidth;Se&&(k.value=`${Se*xe/100}px`)})}else k.value=ae},{immediate:!0});const B=ae=>{if(!ae||ae.length===0)return"我";const xe=ae.charAt(0);return/[\u4e00-\u9fa5]/.test(xe)?xe:xe.toUpperCase()};function _(){return e.header==="ContentHeader"?wm:xm}const T=_(),{renderHeader:S}=T(e,t),F=()=>{var Se,te,ye;const ae=((Se=e.content)==null?void 0:Se.sender)??"发送人",xe=B(((te=e.content)==null?void 0:te.sender)??"");return d.createVNode("div",{class:"f-chat-bubble-avatar"},[(ye=e.content)!=null&&ye.avatar?d.createVNode("img",{src:e.content.avatar,alt:ae},null):d.createVNode("div",{class:"f-chat-bubble-avatar-initial"},[xe])])},z=()=>{var xe;const ae=(xe=e.content)==null?void 0:xe.toolUseAboveText;return ae!=null&&ae.length?d.createVNode("div",{class:"f-chat-bubble-tool-use-group"},[ae.map((Se,te)=>d.createVNode(Xa,{key:Se.toolUseId??`tu-${te}`,content:Se},null))]):null},R=()=>{var ae;return(ae=e.content)!=null&&ae.thinkingContent?d.createVNode(G9,{ref:n,content:e.content.thinkingContent,outputMode:e.outputMode},null):null},$=()=>{var ae;return(ae=e.content)!=null&&ae.startedTodo?d.createVNode(ng,{ref:i,content:e.content.startedTodo},null):null},Y=ae=>{if(!(ae!=null&&ae.type))return null;const{type:xe}=ae;return xe==="page"&&ae.pageUrl?w(ae,{onNavigate:Se=>{var te;(te=e.onPreview)==null||te.call(e,{url:Se})}}):xe==="file"&&ae.fileContent?m(ae,{onPreviewFile:p,onBatchPreviewFile:g}):xe==="template"&&ae.template?ae.template():null},q=()=>{var te,ye,ne;if(!((ne=(ye=(te=e.content)==null?void 0:te.structuredContent)==null?void 0:ye.sections)!=null&&ne.length))return null;const{sections:ae,showDivider:xe}=e.content.structuredContent,Se=Ne=>{const{content:We,label:X}=Ne;return X||We&&typeof We=="string"?d.createVNode(d.Fragment,null,[d.createVNode("span",{class:"f-chat-bubble-structured-section-item-dot"},null),Ne.label&&d.createVNode("span",{class:"f-chat-bubble-structured-section-item-label"},[Ne.label]),d.createVNode("span",{class:"f-chat-bubble-structured-section-item-content"},[Ne.content])]):Y(Ne.content)};return d.createVNode("div",{class:["f-chat-bubble-structured",{"structure-content-divider":xe}]},[ae.map((Ne,We)=>d.createVNode("div",{key:We,class:["f-chat-bubble-structured-section",{"section-divider":Ne.showDivider}]},[d.createVNode("div",{class:"f-chat-bubble-structured-section-header"},[Ne.icon&&(Ne.icon.startsWith("http")||Ne.icon.startsWith("//")||Ne.icon.startsWith("../")||/\.(png|jpg|jpeg|gif|svg|webp|bmp)$/i.test(Ne.icon)?d.createVNode("img",{alt:Ne.title,src:Ne.icon,class:"f-chat-bubble-structured-section-icon"},null):d.createVNode("i",{class:`fx-icon ${Ne.icon}`,style:Ne.iconStyle},null)),d.createVNode("span",{class:"f-chat-bubble-structured-section-title"},[Ne.title])]),Ne.items&&Ne.items.length>0&&d.createVNode("div",{class:"f-chat-bubble-structured-section-items"},[Ne.items.map((X,Z)=>d.createVNode("div",{key:Z,class:"f-chat-bubble-structured-section-item"},[Se(X)]))])]))])},pe=()=>{const ae=C.value;if(!ae)return null;const xe={};return k.value&&(xe.width=k.value),ae.height&&(xe.height=`${ae.height}px`),d.createVNode("div",{class:"f-chat-bubble-content-footer",style:xe},[Y(ae)])},he=()=>{const ae=e.attachmentRowClickOpensPreview!==!1?p:void 0;return d.createVNode(U1,{attachments:e.attachments??[],enableFixedWidth:e.placement==="end",showDownloadButton:e.attachmentShowDownload!==!1,onPreview:ae,onBatchPreview:e.attachmentRowClickOpensPreview!==!1?g:void 0,role:e.role},null)},ce=()=>{var xe;const ae=(xe=e.content)==null?void 0:xe.compositeInlineBlocks;return ae!=null&&ae.length?ae.map((Se,te)=>Se.kind==="userAuth"?d.createVNode(d.resolveComponent("fx-user-auth-inline"),{key:`inline-auth-${te}`,content:Se.content,onConfirm:e.onUserAuthConfirm},null):d.createVNode(d.resolveComponent("fx-app-preview-inline"),{key:`inline-preview-${te}`,content:Se.content,onOpen:e.onPreview},null)):null},be=()=>{var ae,xe,Se,te,ye,ne;return d.createVNode("div",{class:`f-chat-bubble-content ${e.placement}`},[s.value&&S(),he(),d.createVNode("div",{class:`f-chat-bubble-content-text-wrapper ${e.placement}`},[(ae=e.content)!=null&&ae.compositeOrderedBeforeMarkdownRender?e.content.compositeOrderedBeforeMarkdownRender():d.createVNode(d.Fragment,null,[R(),z()]),$(),q(),d.createVNode(U9,{title:((xe=e.content)==null?void 0:xe.title)??"",subtitle:((Se=e.content)==null?void 0:Se.subtitle)??"",text:typeof((te=e.content)==null?void 0:te.text)=="string"?e.content.text:"",textFormat:((ye=e.content)==null?void 0:ye.textFormat)??"plain",placement:e.placement,onDynamicComponentsDetected:e==null?void 0:e.onDynamicComponentsDetected,onShowDynamicComponent:e==null?void 0:e.onShowDynamicComponent},null),pe(),(ne=e.compositeTailRender)==null?void 0:ne.call(e),ce()]),c.value&&d.createVNode("div",{class:"f-chat-bubble-footer",style:f.value},[t.slots.leftFooter&&d.createVNode("div",{class:"f-chat-bubble-footer-left"},[t.slots.leftFooter()]),t.slots.rightFooter&&d.createVNode("div",{class:"f-chat-bubble-footer-right"},[t.slots.rightFooter()])])])};return()=>d.createVNode("div",{class:"f-chat-bubble-container",ref:r},[d.createVNode("div",{class:`f-chat-bubble-wrapper ${e.placement}`},[e.placement==="start"?d.createVNode(d.Fragment,null,[a.value&&F(),be()]):d.createVNode(d.Fragment,null,[be(),a.value&&F()])])])}}),gf={customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}},vc=d.defineComponent({name:"FXBubbleAction",props:gf,setup(e,t){const r=d.computed(()=>c0({},e.customStyle));return()=>t.slots.default&&d.createVNode("span",{class:"f-chat-bubble-footer-action",style:r.value},[t.slots.default()])}});ji.install=e=>{e.component(ji.name,ji),e.component(vc.name,vc)};const bf={items:{type:Array,default:()=>[]},modelValue:{type:Number,default:0},direction:{type:String,default:"horizontal"},autoplay:{type:Boolean,default:!1},interval:{type:Number,default:3e3},loop:{type:Boolean,default:!0},trigger:{type:String,default:"click"},indicatorPosition:{type:String,default:"inside"},arrowVisibility:{type:String,default:"hover"},showIndicator:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showInfo:{type:Boolean,default:!0},height:{type:[String,Number],default:"400px"},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[String,Array,Object],default:""},customStyle:{type:[Object,String],default:""},buttonPosition:{type:String,default:"inner"}},yf={item:{type:Object,default:()=>({})},index:{type:Number,default:0},active:{type:Boolean,default:!1},showInfo:{type:Boolean,default:!0},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},_o=d.defineComponent({name:"FXCarouselItem",props:yf,emits:["click"],setup(e,{slots:t,emit:r}){const n=d.computed(()=>{var m;const g={"fx-carousel--item":!0,"fx-carousel--item-active":e.active};return Kt(g,(m=e.classNames)==null?void 0:m.item)}),i=d.computed(()=>{var m,w;const g=c0({},(m=e.styles)==null?void 0:m.item);return c0(g,(w=e.styles)==null?void 0:w.item)}),a=()=>{var g,m,w;return e.item.image?d.createVNode("img",{class:["fx-carousel--item-image",(g=e.classNames)==null?void 0:g.image],style:(m=e.styles)==null?void 0:m.image,src:e.item.image,alt:(w=e.item.title)==null?void 0:w.toString()},null):null},s=()=>{var g,m,w,k;return e.item.content?d.createVNode("div",{class:["fx-carousel--item-content",(g=e.classNames)==null?void 0:g.content],style:(m=e.styles)==null?void 0:m.content},[e.item.content]):t.default?d.createVNode("div",{class:["fx-carousel--item-content",(w=e.classNames)==null?void 0:w.content],style:(k=e.styles)==null?void 0:k.content},[t.default()]):null},c=()=>{var g,m;return e.item.title?d.createVNode("h3",{class:["fx-carousel--item-title",(g=e.classNames)==null?void 0:g.title],style:(m=e.styles)==null?void 0:m.title},[e.item.title]):null},f=()=>{var g,m;return e.item.description?d.createVNode("p",{class:["fx-carousel--item-description",(g=e.classNames)==null?void 0:g.description],style:(m=e.styles)==null?void 0:m.description},[e.item.description]):null},p=g=>{e.item.disabled||r("click",g,e.item,e.index)};return()=>d.createVNode("div",{class:n.value,style:i.value,onClick:p},[a(),s(),e.showInfo&&d.createVNode("div",{class:"fx-carousel--item-info"},[c(),f()])])}});function ig(e){const{items:t,autoplay:r=!1,interval:n=3e3,loop:i=!0,direction:a="horizontal"}=e,s=d.ref(0),c=d.ref(!1),f=d.ref(null),p=d.computed(()=>t.length),g=d.computed(()=>p.value<=1);d.computed(()=>s.value===0?i?p.value-1:0:s.value-1),d.computed(()=>s.value===p.value-1?i?0:s.value:s.value+1);const m=d.computed(()=>{const F=-s.value*100;return{transform:a==="horizontal"?`translateX(${F}%)`:`translateY(${F}%)`,transition:"transform 0.5s ease"}}),w=F=>{F<0||F>=p.value||(s.value,s.value=F)},k=()=>{g.value||(s.value===p.value-1?w(i?0:s.value):w(s.value+1))},C=()=>{g.value||(s.value===0?w(i?p.value-1:0):w(s.value-1))},B=()=>{!r||g.value||(_(),f.value=window.setInterval(()=>{c.value||k()},n))},_=()=>{f.value&&(clearInterval(f.value),f.value=null)},T=()=>{c.value=!0,r&&_()},S=()=>{c.value=!1,r&&B()};return d.onMounted(()=>{B()}),d.onUnmounted(()=>{_()}),{currentIndex:s,totalItems:p,isSingleItem:g,trackStyle:m,goTo:w,next:k,prev:C,handleMouseEnter:T,handleMouseLeave:S}}const $i=d.defineComponent({name:"FXCarousel",props:bf,emits:["update:modelValue","change","item-click"],setup(e,{slots:t,emit:r}){const{currentIndex:n,isSingleItem:i,trackStyle:a,goTo:s,next:c,prev:f,handleMouseEnter:p,handleMouseLeave:g}=ig({items:e.items,autoplay:e.autoplay,interval:e.interval,loop:e.loop,direction:e.direction}),m=R=>{r("update:modelValue",R),r("change",R,n.value)},w=d.computed(()=>{var $;const R={"fx-carousel":!0,"fx-carousel--vertical":e.direction==="vertical","fx-carousel--single":i.value,"fx-carousel--button-outer":e.buttonPosition==="outer","fx-carousel--button-inner":e.buttonPosition==="inner"};return Kt(R,($=e.classNames)==null?void 0:$.root)}),k=d.computed(()=>{var Y;const R={height:typeof e.height=="number"?`${e.height}px`:e.height},$=c0(R,e.customStyle);return c0($,(Y=e.styles)==null?void 0:Y.root)}),C=d.computed(()=>{var $;const R={"fx-carousel--container":!0,"fx-carousel--container-hover":e.arrowVisibility==="hover"};return Kt(R,($=e.classNames)==null?void 0:$.container)}),B=d.computed(()=>{var $;return Kt({"fx-carousel--track":!0},($=e.classNames)==null?void 0:$.track)}),_=d.computed(()=>{var $;const R={"fx-carousel--indicator":!0,"fx-carousel--indicator-outside":e.indicatorPosition==="outside","fx-carousel--indicator-none":e.indicatorPosition==="none"||!e.showIndicator};return Kt(R,($=e.classNames)==null?void 0:$.indicator)}),T=R=>{var Y,q;const $={"fx-carousel--arrow":!0,"fx-carousel--arrow-left":R==="left","fx-carousel--arrow-right":R==="right","fx-carousel--arrow-never":e.arrowVisibility==="never"||!e.showArrow};return $[`fx-carousel--arrow-${e.buttonPosition}`]=!0,Kt($,R==="left"?(Y=e.classNames)==null?void 0:Y.arrowLeft:(q=e.classNames)==null?void 0:q.arrowRight)},S=R=>{var q,pe;if(i.value)return null;const $=R==="left"?f:c,Y=t[R==="left"?"prevArrow":"nextArrow"];return d.createVNode("button",{class:T(R),style:R==="left"?(q=e.styles)==null?void 0:q.arrowLeft:(pe=e.styles)==null?void 0:pe.arrowRight,onClick:$,"aria-label":`${R} arrow`},[Y?Y():d.createVNode("i",{style:"font-size: 60px;",class:`fx-icon fx-icon-arrow-${R==="left"?"left":"right"}`},null)])},F=()=>{var R;return i.value||!e.showIndicator?null:d.createVNode("div",{class:_.value,style:(R=e.styles)==null?void 0:R.indicator},[e.items.map(($,Y)=>{var q,pe;return d.createVNode("button",{"aria-label":`indicator ${Y}`,key:Y,class:["fx-carousel--indicator-item",{"fx-carousel--indicator-item-active":Y===n.value}],style:Y===n.value?(q=e.styles)==null?void 0:q.indicatorItemActive:(pe=e.styles)==null?void 0:pe.indicatorItem,onClick:()=>{s(Y),m(Y)}},null)})])},z=()=>d.createVNode("div",{class:B.value,style:a.value},[e.items.map((R,$)=>d.createVNode(_o,{key:R.id||`item_${$}`,item:R,showInfo:e.showInfo,index:$,active:$===n.value,styles:e.styles,classNames:e.classNames,onClick:(Y,q,pe)=>{r("item-click",Y,q,pe)}},{default:()=>{var Y,q;return[(Y=t.item)==null?void 0:Y.call(t,{item:R,index:$,active:$===n.value}),(q=t[`item${$}`])==null?void 0:q.call(t,{item:R,index:$,active:$===n.value})]}}))]);return()=>{var R;return d.createVNode("div",{class:w.value,style:k.value,onMouseenter:p,onMouseleave:g},[e.buttonPosition==="outer"&&S("left"),d.createVNode("div",{class:C.value,style:(R=e.styles)==null?void 0:R.container},[e.buttonPosition==="inner"&&S("left"),z(),e.buttonPosition==="inner"&&S("right")]),e.buttonPosition==="outer"&&S("right"),F()])}}});$i.install=e=>{e.component($i.name,$i),e.component(_o.name,_o)};const vf={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"row"}};function ug(e){const t=d.ref(-1),r=d.ref(-1),n=d.ref(0),i=d.ref(0),a=d.ref(!1),s=d.ref(!1),c=d.computed(()=>({display:a.value?"block":"none",left:`${n.value}px`,cursor:"e-resize"})),f=d.computed(()=>({display:s.value?"block":"none",top:`${i.value}px`,cursor:"n-resize"})),p=d.computed(()=>{const _={display:s.value||a.value?"block":"none"};return i.value>0&&(_.cursor="n-resize"),_});function g(_,T,S,F){const z=e.value;if(z){const{left:R,right:$,width:Y}=z.getBoundingClientRect();let q=_.clientX-R;F==="right"&&(q=$-_.clientX),q>T&&(q=T),q<S&&(q=S),F==="right"&&(q=Y-q),n.value=q}}function m(_,T,S,F){const z=e.value;if(z){const{top:R,bottom:$,height:Y}=z.getBoundingClientRect();let q=_.clientY-R;F==="bottom"&&(q=$-_.clientY),q>T&&(q=T),q<S&&(q=S),F==="bottom"&&(q=Y-q),i.value=q}}function w(){const _=e.value;if(_){const{width:T,height:S}=_.getBoundingClientRect();return{width:T,height:S}}return null}function k(){const _=e.value;return _?Array.from(_.querySelectorAll("[data-position]")).reduce((T,S)=>{const F=S.getAttribute("data-position");return T=Object.assign(T,{[F]:S}),T},{}):null}function C(_,T){const S=w(),F=k();if(S&&F){const z=F==null?void 0:F.right,R=F==null?void 0:F.left;if(_==="left"&&R)return z?S.width-z.clientWidth-T:S.width-T;if(_==="right"&&z)return R?S.width-R.clientWidth-T:S.width-T}}function B(_,T){const S=w(),F=k();if(S&&F){const z=F==null?void 0:F.bottom,R=F==null?void 0:F.top;if(_==="top"&&R)return z?S.height-z.clientHeight-T:S.height-T;if(_==="bottom"&&z)return R?S.height-R.clientHeight-T:S.height-T}}return{horizontalResizeHandleStyle:c,verticalResizeHandleStyle:f,resizeOverlayStyle:p,showHorizontalResizeHandle:a,showVerticalResizeHandle:s,horizontalResizeBarPosition:t,verticalResizeBarPosition:r,verticalResizeHandleOffset:i,horizontalResizeHandleOffset:n,draggingHorizontalResizeHandle:g,draggingVerticalResizeHandle:m,getPanelMaxWidth:C,getPanelMaxHeight:B}}const Ya=d.defineComponent({name:"FXSplitter",props:vf,emits:[],setup(e,t){const r=d.ref(),n=ug(r),{horizontalResizeHandleStyle:i,verticalResizeHandleStyle:a,resizeOverlayStyle:s}=n;d.provide("splitter",{useResizeHandleComposition:n});const c=d.computed(()=>Kt({"f-splitter":!0},e==null?void 0:e.customClass)),f=d.computed(()=>{const p={"flex-direction":e.direction==="row"?"row":"column"};return c0(p,e==null?void 0:e.customStyle)});return()=>d.createVNode("div",{class:c.value,ref:r,style:f.value},[t.slots.default&&t.slots.default(),d.createVNode("div",{class:"f-splitter-resize-overlay",style:s.value},null),d.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:i.value},null),d.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:a.value},null)])}}),og={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},resizeHandle:{type:String,default:""},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:100},minHeight:{type:Number,default:100},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0}};function sg(e,t){const r=d.ref(e.width),n=d.ref(e.height),{horizontalResizeBarPosition:i,horizontalResizeHandleOffset:a,showHorizontalResizeHandle:s,showVerticalResizeHandle:c,verticalResizeBarPosition:f,verticalResizeHandleOffset:p,draggingHorizontalResizeHandle:g,draggingVerticalResizeHandle:m,getPanelMaxWidth:w,getPanelMaxHeight:k}=t;let C="",B,_,T;const S=()=>e.maxWidth?e.maxWidth:w(C,e.minWidth)||0,F=()=>e.maxHeight?e.maxHeight:k(C,e.minHeight)||0;function z(Y){if((C==="left"||C==="right")&&_){const{left:q}=_.getBoundingClientRect(),{width:pe}=B.getBoundingClientRect(),he=Y.clientX-q;let ce=C==="left"?(pe||0)+(he-i.value):(pe||0)-(he-i.value);ce=e.minWidth>0?Math.max(e.minWidth,ce):ce;const be=S();be!=null&&be>0&&(ce=be>ce?ce:be),r.value=ce}if((C==="top"||C==="bottom")&&_){const{top:q}=_.getBoundingClientRect(),{height:pe}=B.getBoundingClientRect(),he=Y.clientY-q;let ce=C==="top"?(pe||0)+(he-f.value):(pe||0)-(he-f.value);ce=e.minHeight>0?Math.max(e.minHeight,ce):ce;const be=F();be!=null&&be>0&&(ce=be>ce?ce:be),n.value=ce}a.value=0,p.value=0,i.value=-1,f.value=-1,s.value=!1,c.value=!1,document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",z),document.body.style.userSelect="",C="",B=null,_=null}function R(Y,q,pe){if(C=q,B=pe,s.value=!0,_=Y.composedPath().find(ce=>ce.className.split(" ")[0]==="f-splitter"),_){const{left:ce}=_.getBoundingClientRect();a.value=Y.clientX-ce,i.value=Y.clientX-ce;const be=S();T=ae=>g(ae,be,e.minWidth,C),document.addEventListener("mousemove",T),document.addEventListener("mouseup",z),document.body.style.userSelect="none"}}function $(Y,q,pe){if(C=q,B=pe,c.value=!0,_=Y.composedPath().find(ce=>ce.className.split(" ")[0]==="f-splitter"),_){const{top:ce}=_.getBoundingClientRect();p.value=Y.clientY-ce,f.value=Y.clientY-ce;const be=F();T=ae=>m(ae,be,e.minHeight,C),document.addEventListener("mousemove",T),document.addEventListener("mouseup",z),document.body.style.userSelect="none"}}return{actualWidth:r,actualHeight:n,onClickSplitterHorizontalResizeBar:R,onClickSplitterVerticalResizeBar:$}}const Ui=d.defineComponent({name:"FSplitterPane",props:og,emits:[],setup(e,t){const r=d.ref(),n=d.inject("splitter"),{useResizeHandleComposition:i}=n,a=sg(e,i),{actualHeight:s,actualWidth:c,onClickSplitterHorizontalResizeBar:f,onClickSplitterVerticalResizeBar:p}=a,g=d.ref(e.position),m=d.computed(()=>{const F={"f-splitter-pane":!0,"f-splitter-pane-main":g.value==="center","has-resize-bar":e.resizable};return F["f-splitter-pane-"+g.value]=!0,Kt(F,e==null?void 0:e.customClass)}),w=d.computed(()=>e.resizeHandle?e.resizeHandle.split(",").filter(F=>["e","n","s","w"].find(z=>z===F)):[]),k=d.computed(()=>{const F={};return(c.value||c.value===0)&&(g.value==="left"||g.value==="right"||w.value.find(z=>z==="e")||w.value.find(z=>z==="w"))&&(F.width=`${c.value}px`),(s.value||s.value===0)&&(g.value==="bottom"||g.value==="top"||w.value.find(z=>z==="s")||w.value.find(z=>z==="n"))&&(F.height=`${s.value}px`),e.visible||(F.display="none"),c0(F,e==null?void 0:e.customStyle)}),C=d.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":g.value==="left","f-splitter-resize-bar-n":g.value==="bottom","f-splitter-resize-bar-s":g.value==="top","f-splitter-resize-bar-w":g.value==="right"}));function B(F){return{e:"left",w:"right",s:"top",n:"bottom"}[F]||F}function _(F,z){z=B(z),["left","right"].find(R=>R===z)&&f(F,z,r.value),["top","bottom"].find(R=>R===z)&&p(F,z,r.value)}function T(){return w.value.length>0?w.value.map(F=>d.createVNode("span",{class:"f-splitter-resize-bar f-splitter-resize-bar-"+F,onMousedown:z=>_(z,F)},null)):d.createVNode("span",{class:C.value,onMousedown:F=>_(F,g.value)},null)}function S(){c.value=e.width,s.value=e.height,k.value}return t.expose({reset:S}),()=>d.createVNode("div",{ref:r,class:m.value,style:k.value,"data-position":g.value},[t.slots.default&&t.slots.default(),e.resizable&&T()])}});Ya.install=e=>{e.component(Ya.name,Ya),e.component(Ui.name,Ui)};const wf={previewConfig:{type:Object,default:()=>({})},onClose:{type:Function,default:()=>{}},onIframeLoad:{type:Function,default:()=>{}}},xf={content:{type:String,default:null}},lg=e=>{const t=typeof e;return t!=="function"&&t!=="object"||e===null},cg=e=>{const t=e.flags===""?void 0:e.flags;return new RegExp(e.source,t)},Wi=(e,t=new WeakMap)=>{if(e===null||lg(e))return e;if(t.has(e))return t.get(e);if(e instanceof RegExp)return cg(e);if(e instanceof Date)return new Date(e.getTime());if(e instanceof Function)return e;if(e instanceof Map){const n=new Map;return t.set(e,n),e.forEach((i,a)=>{n.set(a,Wi(i,t))}),n}if(e instanceof Set){const n=new Set;t.set(e,n);for(const i of e)n.add(Wi(i,t));return n}if(Array.isArray(e)){const n=[];return t.set(e,n),e.forEach(i=>{n.push(Wi(i,t))}),n}const r={};t.set(e,r);for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=Wi(e[n],t));return r},dg=(e,t=200)=>{let r=0;return(...n)=>new Promise(i=>{r&&(clearTimeout(r),i("cancel")),r=window.setTimeout(()=>{e.apply(void 0,n),r=0,i("done")},t)})},wc=()=>`${Date.now().toString(36)}${Math.random().toString(36).substring(2)}`,zo=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),fg=new Set(["__proto__","constructor","prototype"]),hg=e=>!fg.has(e),xc=(e,t,r={})=>{if(Array.isArray(e)&&Array.isArray(t))return Ac(e,t,r);const{excludeKeys:n}=r,i=e,a=t;for(const s of Object.keys(a)){if(!hg(s))continue;const c=a[s],f=i[s];n&&n(s)?i[s]=c:Array.isArray(c)&&Array.isArray(f)?i[s]=Ac(f,c,r):zo(c)&&zo(f)?i[s]=xc(f,c,r):i[s]=c}return e},Ac=(e,t,r)=>{const n=e.slice();return t.forEach((i,a)=>{const s=n[a];Array.isArray(i)&&Array.isArray(s)?n[a]=Ac(s,i,r):zo(i)&&zo(s)?n[a]=xc(s,i,r):n[a]=i}),n},Re="md-editor",Ft="https://unpkg.com",mg=`${Ft}/@highlightjs/cdn-assets@11.11.1/highlight.min.js`,Af={main:`${Ft}/prettier@3.8.1/standalone.js`,markdown:`${Ft}/prettier@3.8.1/plugins/markdown.js`},pg={css:`${Ft}/cropperjs@1.6.2/dist/cropper.min.css`,js:`${Ft}/cropperjs@1.6.2/dist/cropper.min.js`},gg=`${Ft}/screenfull@5.2.0/dist/screenfull.js`,bg=`${Ft}/mermaid@11.12.3/dist/mermaid.min.js`,yg={js:`${Ft}/katex@0.16.33/dist/katex.min.js`,css:`${Ft}/katex@0.16.33/dist/katex.min.css`},Dc={a11y:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/a11y-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/a11y-dark.min.css`},atom:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/atom-one-dark.min.css`},github:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/github.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/github-dark.min.css`},gradient:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/gradient-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/gradient-dark.min.css`},kimbie:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/kimbie-dark.min.css`},paraiso:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/paraiso-dark.min.css`},qtcreator:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/qtcreator-dark.min.css`},stackoverflow:{light:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-light.min.css`,dark:`${Ft}/@highlightjs/cdn-assets@11.11.1/styles/stackoverflow-dark.min.css`}},vg=`${Ft}/echarts@6.0.0/dist/echarts.min.js`,Df={"zh-CN":{toolbarTips:{bold:"加粗",underline:"下划线",italic:"斜体",strikeThrough:"删除线",title:"标题",sub:"下标",sup:"上标",quote:"引用",unorderedList:"无序列表",orderedList:"有序列表",task:"任务列表",codeRow:"行内代码",code:"块级代码",link:"链接",image:"图片",table:"表格",mermaid:"mermaid图",katex:"katex公式",revoke:"后退",next:"前进",save:"保存",prettier:"美化",pageFullscreen:"浏览器全屏",fullscreen:"屏幕全屏",preview:"预览",previewOnly:"仅预览",htmlPreview:"html代码预览",catalog:"目录",github:"源码地址"},titleItem:{h1:"一级标题",h2:"二级标题",h3:"三级标题",h4:"四级标题",h5:"五级标题",h6:"六级标题"},imgTitleItem:{link:"添加链接",upload:"上传图片",clip2upload:"裁剪上传"},linkModalTips:{linkTitle:"添加链接",imageTitle:"添加图片",descLabel:"链接描述:",descLabelPlaceHolder:"请输入描述...",urlLabel:"链接地址:",urlLabelPlaceHolder:"请输入链接...",buttonOK:"确定"},clipModalTips:{title:"裁剪图片上传",buttonUpload:"上传"},copyCode:{text:"复制代码",successTips:"已复制!",failTips:"复制失败!"},mermaid:{flow:"流程图",sequence:"时序图",gantt:"甘特图",class:"类图",state:"状态图",pie:"饼图",relationship:"关系图",journey:"旅程图"},katex:{inline:"行内公式",block:"块级公式"},footer:{markdownTotal:"字数",scrollAuto:"同步滚动"}},"en-US":{toolbarTips:{bold:"bold",underline:"underline",italic:"italic",strikeThrough:"strikeThrough",title:"title",sub:"subscript",sup:"superscript",quote:"quote",unorderedList:"unordered list",orderedList:"ordered list",task:"task list",codeRow:"inline code",code:"block-level code",link:"link",image:"image",table:"table",mermaid:"mermaid",katex:"formula",revoke:"revoke",next:"undo revoke",save:"save",prettier:"prettier",pageFullscreen:"fullscreen in page",fullscreen:"fullscreen",preview:"preview",previewOnly:"preview only",htmlPreview:"html preview",catalog:"catalog",github:"source code"},titleItem:{h1:"Lv1 Heading",h2:"Lv2 Heading",h3:"Lv3 Heading",h4:"Lv4 Heading",h5:"Lv5 Heading",h6:"Lv6 Heading"},imgTitleItem:{link:"Add Image Link",upload:"Upload Images",clip2upload:"Crop And Upload"},linkModalTips:{linkTitle:"Add Link",imageTitle:"Add Image",descLabel:"Desc:",descLabelPlaceHolder:"Enter a description...",urlLabel:"Link:",urlLabelPlaceHolder:"Enter a link...",buttonOK:"OK"},clipModalTips:{title:"Crop Image",buttonUpload:"Upload"},copyCode:{text:"Copy",successTips:"Copied!",failTips:"Copy failed!"},mermaid:{flow:"flow",sequence:"sequence",gantt:"gantt",class:"class",state:"state",pie:"pie",relationship:"relationship",journey:"journey"},katex:{inline:"inline",block:"block"},footer:{markdownTotal:"Character Count",scrollAuto:"Scroll Auto"}}},Br={editorExtensions:{highlight:{js:mg,css:Dc},prettier:{standaloneJs:Af.main,parserMarkdownJs:Af.markdown},cropper:{...pg},screenfull:{js:gg},mermaid:{js:bg,enableZoom:!0},katex:{...yg},echarts:{js:vg}},editorExtensionsAttrs:{},editorConfig:{languageUserDefined:{},mermaidTemplate:{},renderDelay:500,zIndex:2e4},codeMirrorExtensions:e=>e,markdownItConfig:()=>{},markdownItPlugins:e=>e,mermaidConfig:e=>e,katexConfig:e=>e,echartsConfig:e=>e},wg=({instance:e,ctx:t,props:r={}},n="default")=>{const i=(e==null?void 0:e.$slots[n])||(t==null?void 0:t.slots[n]);return(i?i(e):"")||r[n]},xg="buildFinished",kc="errorCatcher",Cc="catalogChanged",Ag="pushCatalog",kf="rerender",Dg="taskStateChanged";let kg=class{constructor(){Bt(this,"pools",{})}remove(t,r,n){const i=this.pools[t]&&this.pools[t][r];i&&(this.pools[t][r]=i.filter(a=>a!==n))}clear(t){this.pools[t]={}}on(t,r){return this.pools[t]||(this.pools[t]={}),this.pools[t][r.name]||(this.pools[t][r.name]=[]),this.pools[t][r.name].push(r.callback),this.pools[t][r.name].includes(r.callback)}emit(t,r,...n){this.pools[t]||(this.pools[t]={});const i=this.pools[t][r];i&&i.forEach(a=>{try{a(...n)}catch(s){console.error(`${r} monitor event exception!`,s)}})}};const yr=new kg,Cg=(e,t)=>{if(!e)return e;const r=t.split(`
|
|
567
567
|
`),n=['<span rn-wrapper aria-hidden="true">'];return r.forEach(()=>{n.push("<span></span>")}),n.push("</span>"),`<span class="${Re}-code-block">${e}</span>${n.join("")}`};var Sg=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,Eg=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,Fg=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Sc={Space_Separator:Sg,ID_Start:Eg,ID_Continue:Fg},Qt={isSpaceSeparator(e){return typeof e=="string"&&Sc.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Sc.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e===""||e===""||Sc.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let Ec,H0,yn,Io,qn,Mr,x0,Fc,Gi;var Tg=function(t,r){Ec=String(t),H0="start",yn=[],Io=0,qn=1,Mr=0,x0=void 0,Fc=void 0,Gi=void 0;do x0=Bg(),_g[H0]();while(x0.type!=="eof");return typeof r=="function"?Tc({"":Gi},"",r):Gi};function Tc(e,t,r){const n=e[t];if(n!=null&&typeof n=="object")if(Array.isArray(n))for(let i=0;i<n.length;i++){const a=String(i),s=Tc(n,a,r);s===void 0?delete n[a]:Object.defineProperty(n,a,{value:s,writable:!0,enumerable:!0,configurable:!0})}else for(const i in n){const a=Tc(n,i,r);a===void 0?delete n[i]:Object.defineProperty(n,i,{value:a,writable:!0,enumerable:!0,configurable:!0})}return r.call(e,t,n)}let it,rt,Xi,vn,dt;function Bg(){for(it="default",rt="",Xi=!1,vn=1;;){dt=wn();const e=Cf[it]();if(e)return e}}function wn(){if(Ec[Io])return String.fromCodePoint(Ec.codePointAt(Io))}function ve(){const e=wn();return e===`
|
|
568
568
|
`?(qn++,Mr=0):e?Mr+=e.length:Mr++,e&&(Io+=e.length),e}const Cf={default(){switch(dt){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
569
569
|
`:case"\r":case"\u2028":case"\u2029":ve();return;case"/":ve(),it="comment";return;case void 0:return ve(),Mt("eof")}if(Qt.isSpaceSeparator(dt)){ve();return}return Cf[H0]()},comment(){switch(dt){case"*":ve(),it="multiLineComment";return;case"/":ve(),it="singleLineComment";return}throw Nt(ve())},multiLineComment(){switch(dt){case"*":ve(),it="multiLineCommentAsterisk";return;case void 0:throw Nt(ve())}ve()},multiLineCommentAsterisk(){switch(dt){case"*":ve();return;case"/":ve(),it="default";return;case void 0:throw Nt(ve())}ve(),it="multiLineComment"},singleLineComment(){switch(dt){case`
|
|
@@ -579,7 +579,7 @@ $3`),t}function Hp(e){if(!e)return e;const t=/\r?\n/.test(e),r=[],n=e.replace(/`
|
|
|
579
579
|
`+a+z+`,
|
|
580
580
|
`+_+"]"}return i.pop(),a=_,S}},Og={parse:Tg,stringify:Ig};async function Ff(e){if(typeof e=="string"){if(window.isSecureContext&&navigator.clipboard)return await navigator.clipboard.writeText(e);{const t=document.createElement("textarea");let r=!1;if(t.value=e,t.style.position="fixed",t.style.opacity=0,t.style.zIndex="-10000",t.style.top="-10000",document.body.appendChild(t),t.select(),r=document.execCommand("copy"),document.body.removeChild(t),r)return;throw new Error('Failed to copy content via "execCommand"!')}}}const Lg={copy:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy ${Re}-icon"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>`,"collapse-tips":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-chevron-left ${Re}-icon"><circle cx="12" cy="12" r="10"/><path d="m14 16-4-4 4-4"/></svg>`,pin:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin ${Re}-icon"><path d="M12 17v5"/><path d="M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z"/></svg>`,"pin-off":`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-pin-off ${Re}-icon"><path d="M12 17v5"/><path d="M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89"/><path d="m2 2 20 20"/><path d="M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11"/></svg>`,check:`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-check ${Re}-icon"><path d="M20 6 9 17l-5-5"/></svg>`},nn=(e,t)=>typeof t[e]=="string"?t[e]:Lg[e],jn=(e,t,r="")=>{var i;const n=document.getElementById(t.id);if(n)r!==""&&(Reflect.get(window,r)?(i=t.onload)==null||i.call(n,new Event("load")):t.onload&&n.addEventListener("load",t.onload));else{const a={...t};a.onload=null;const s=Pg(e,a);t.onload&&s.addEventListener("load",t.onload),document.head.appendChild(s)}},Rg=(e,t)=>{var r;(r=document.getElementById(t.id))==null||r.remove(),jn(e,t)},Pg=(e,t)=>{const r=document.createElement(e);return Object.keys(t).forEach(n=>{t[n]!==void 0&&(r[n]=t[n])}),r},Vg=(e,t)=>{const r=new Map;return e==null||e.forEach(n=>{let i=n.querySelector(`.${Re}-mermaid-action`);i?i.querySelector(`.${Re}-mermaid-copy`)||i.insertAdjacentHTML("beforeend",`<span class="${Re}-mermaid-copy">${nn("copy",t.customIcon)}</span>`):(n.insertAdjacentHTML("beforeend",`<div class="${Re}-mermaid-action"><span class="${Re}-mermaid-copy">${nn("copy",t.customIcon)}</span></div>`),i=n.querySelector(`.${Re}-mermaid-action`));const a=i.querySelector(`.${Re}-mermaid-copy`);let s=-1;const c=()=>{clearTimeout(s),Ff(n.dataset.content||"").then(()=>{a.innerHTML=nn("check",t.customIcon)}).catch(()=>{a.innerHTML=nn("copy",t.customIcon)}).finally(()=>{s=window.setTimeout(()=>{a.innerHTML=nn("copy",t.customIcon)},1500)})};a.addEventListener("click",c),r.set(n,{removeClick:()=>{a.removeEventListener("click",c)}})}),()=>{r.forEach(({removeClick:n})=>{n==null||n()}),r.clear()}},Hg=(()=>{const e=t=>{if(!t)return()=>{};const r=t.firstChild;let n=1,i=0,a=0,s=!1,c,f,p,g=1;const m=()=>{r.style.transform=`translate(${i}px, ${a}px) scale(${n})`},w=z=>{z.touches.length===1?(s=!0,c=z.touches[0].clientX-i,f=z.touches[0].clientY-a):z.touches.length===2&&(p=Math.hypot(z.touches[0].clientX-z.touches[1].clientX,z.touches[0].clientY-z.touches[1].clientY),g=n)},k=z=>{if(z.preventDefault(),s&&z.touches.length===1)i=z.touches[0].clientX-c,a=z.touches[0].clientY-f,m();else if(z.touches.length===2){const R=Math.hypot(z.touches[0].clientX-z.touches[1].clientX,z.touches[0].clientY-z.touches[1].clientY)/p,$=n;n=g*(1+(R-1));const Y=(z.touches[0].clientX+z.touches[1].clientX)/2,q=(z.touches[0].clientY+z.touches[1].clientY)/2,pe=r.getBoundingClientRect(),he=(Y-pe.left)/$,ce=(q-pe.top)/$;i-=he*(n-$),a-=ce*(n-$),m()}},C=()=>{s=!1},B=z=>{z.preventDefault();const R=.02,$=n;z.deltaY<0?n+=R:n=Math.max(.1,n-R);const Y=r.getBoundingClientRect(),q=z.clientX-Y.left,pe=z.clientY-Y.top;i-=q/$*(n-$),a-=pe/$*(n-$),m()},_=z=>{s=!0,c=z.clientX-i,f=z.clientY-a},T=z=>{s&&(i=z.clientX-c,a=z.clientY-f,m())},S=()=>{s=!1},F=()=>{s=!1};return t.addEventListener("touchstart",w,{passive:!1}),t.addEventListener("touchmove",k,{passive:!1}),t.addEventListener("touchend",C),t.addEventListener("wheel",B,{passive:!1}),t.addEventListener("mousedown",_),t.addEventListener("mousemove",T),t.addEventListener("mouseup",S),t.addEventListener("mouseleave",F),()=>{t.removeEventListener("touchstart",w),t.removeEventListener("touchmove",k),t.removeEventListener("touchend",C),t.removeEventListener("wheel",B),t.removeEventListener("mousedown",_),t.removeEventListener("mousemove",T),t.removeEventListener("mouseup",S),t.removeEventListener("mouseleave",F)}};return(t,r)=>{const n=new Map;return t==null||t.forEach(i=>{let a=i.querySelector(`.${Re}-mermaid-action`);a?a.querySelector(`.${Re}-mermaid-zoom`)||a.insertAdjacentHTML("beforeend",`<span class="${Re}-mermaid-zoom">${nn("pin-off",r.customIcon)}</span>`):(i.insertAdjacentHTML("beforeend",`<div class="${Re}-mermaid-action"><span class="${Re}-mermaid-zoom">${nn("pin-off",r.customIcon)}</span></div>`),a=i.querySelector(`.${Re}-mermaid-action`));const s=a.querySelector(`.${Re}-mermaid-zoom`),c=()=>{const f=n.get(i);if(f!=null&&f.removeEvent)f.removeEvent(),i.removeAttribute("data-grab"),n.set(i,{removeClick:f.removeClick}),s.innerHTML=nn("pin-off",r.customIcon);else{const p=e(i);i.setAttribute("data-grab",""),n.set(i,{removeEvent:p,removeClick:f==null?void 0:f.removeClick}),s.innerHTML=nn("pin",r.customIcon)}};s.addEventListener("click",c),n.set(i,{removeClick:()=>s.removeEventListener("click",c)})}),()=>{n.forEach(({removeEvent:i,removeClick:a})=>{i==null||i(),a==null||a()}),n.clear()}}})(),Tf=new Set([!0,!1,"alt","title"]);function Bf(e,t){return(Array.isArray(e)?e:[]).filter(([r])=>r!==t)}function Mf(e,t){e&&e.attrs&&(e.attrs=Bf(e.attrs,t))}function qg(e,t){if(!Tf.has(e))throw new TypeError(`figcaption must be one of: ${[...Tf]}.`);if(e==="alt")return t.content;const r=t.attrs.find(([n])=>n==="title");return Array.isArray(r)&&r[1]?(Mf(t,"title"),r[1]):void 0}function jg(e,t){t=t||{},e.core.ruler.before("linkify","image_figures",function(r){let n=1;for(let i=1,a=r.tokens.length;i<a-1;++i){const s=r.tokens[i];if(s.type!=="inline"||!s.children||s.children.length!==1&&s.children.length!==3||s.children.length===1&&s.children[0].type!=="image")continue;if(s.children.length===3){const[p,g,m]=s.children;if(p.type!=="link_open"||g.type!=="image"||m.type!=="link_close")continue}if(i!==0&&r.tokens[i-1].type!=="paragraph_open"||i!==a-1&&r.tokens[i+1].type!=="paragraph_close")continue;const c=r.tokens[i-1];let f;if(c.type="figure_open",c.tag="figure",r.tokens[i+1].type="figure_close",r.tokens[i+1].tag="figure",t.dataType&&r.tokens[i-1].attrPush(["data-type","image"]),t.link&&s.children.length===1){[f]=s.children;const p=new r.Token("link_open","a",1);p.attrPush(["href",f.attrGet("src")]),s.children.unshift(p),s.children.push(new r.Token("link_close","a",-1))}if(f=s.children.length===1?s.children[0]:s.children[1],t.figcaption){const p=qg(t.figcaption,f);if(p){const[g]=e.parseInline(p,r.env);s.children.push(new r.Token("figcaption_open","figcaption",1)),s.children.push(...g.children),s.children.push(new r.Token("figcaption_close","figcaption",-1)),f.attrs&&(f.attrs=Bf(f.attrs,"title"))}}if(t.copyAttrs&&f.attrs){const p=t.copyAttrs===!0?"":t.copyAttrs;c.attrs=f.attrs.filter(([g])=>g.match(p)).map(g=>Array.from(g))}if(t.tabindex&&(r.tokens[i-1].attrPush(["tabindex",n]),n++),t.lazy&&(f.attrs.some(([p])=>p==="loading")||f.attrs.push(["loading","lazy"])),t.async&&(f.attrs.some(([p])=>p==="decoding")||f.attrs.push(["decoding","async"])),t.classes&&typeof t.classes=="string"){let p=!1;for(let g=0,m=f.attrs.length;g<m&&!p;g++){const w=f.attrs[g];w[0]==="class"&&(w[1]=`${w[1]} ${t.classes}`,p=!0)}p||f.attrs.push(["class",t.classes])}if(t.removeSrc){const p=f.attrs.find(([g])=>g==="src");f.attrs.push(["data-src",p[1]]),Mf(f,"src")}}})}const $g=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Ug(e,t){const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==126||t||n+2>=r)return!1;e.pos=n+1;let i=!1;for(;e.pos<r;){if(e.src.charCodeAt(e.pos)===126){i=!0;break}e.md.inline.skipToken(e)}if(!i||n+1===e.pos)return e.pos=n,!1;const a=e.src.slice(n+1,e.pos);if(a.match(/(^|[^\\])(\\\\)*\s/))return e.pos=n,!1;e.posMax=e.pos,e.pos=n+1;const s=e.push("sub_open","sub",1);s.markup="~";const c=e.push("text","",0);c.content=a.replace($g,"$1");const f=e.push("sub_close","sub",-1);return f.markup="~",e.pos=e.posMax+1,e.posMax=r,!0}function Wg(e){e.inline.ruler.after("emphasis","sub",Ug)}const Gg=/\\([ \\!"#$%&'()*+,./:;<=>?@[\]^_`{|}~-])/g;function Xg(e,t){const r=e.posMax,n=e.pos;if(e.src.charCodeAt(n)!==94||t||n+2>=r)return!1;e.pos=n+1;let i=!1;for(;e.pos<r;){if(e.src.charCodeAt(e.pos)===94){i=!0;break}e.md.inline.skipToken(e)}if(!i||n+1===e.pos)return e.pos=n,!1;const a=e.src.slice(n+1,e.pos);if(a.match(/(^|[^\\])(\\\\)*\s/))return e.pos=n,!1;e.posMax=e.pos,e.pos=n+1;const s=e.push("sup_open","sup",1);s.markup="^";const c=e.push("text","",0);c.content=a.replace(Gg,"$1");const f=e.push("sup_close","sup",-1);return f.markup="^",e.pos=e.posMax+1,e.posMax=r,!0}function Yg(e){e.inline.ruler.after("emphasis","sup",Xg)}var Zg=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Nf=new Set,Nc=typeof process=="object"&&process?process:{},_f=(e,t,r,n)=>{typeof Nc.emitWarning=="function"?Nc.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)},Ro=globalThis.AbortController,zf=globalThis.AbortSignal;if(typeof Ro>"u"){zf=class{constructor(){Bt(this,"onabort");Bt(this,"_onabort",[]);Bt(this,"reason");Bt(this,"aborted",!1)}addEventListener(r,n){this._onabort.push(n)}},Ro=class{constructor(){Bt(this,"signal",new zf);t()}abort(r){var n,i;if(!this.signal.aborted){this.signal.reason=r,this.signal.aborted=!0;for(let a of this.signal._onabort)a(r);(i=(n=this.signal).onabort)==null||i.call(n,r)}}};let e=(($h=Nc.env)==null?void 0:$h.LRU_CACHE_IGNORE_AC_WARNING)!=="1",t=()=>{e&&(e=!1,_f("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var Kg=e=>!Nf.has(e),$n=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),If=e=>$n(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Po:null:null,Po=class extends Array{constructor(t){super(t),this.fill(0)}},Qg=(an=class{constructor(t,r){Bt(this,"heap");Bt(this,"length");if(!V(an,ti))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}static create(t){let r=If(t);if(!r)return[];Xe(an,ti,!0);let n=new an(t,r);return Xe(an,ti,!1),n}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},ti=new WeakMap,ct(an,ti,!1),an),Jg=(ui=class{constructor(t){ct(this,Oe);ct(this,vr);ct(this,ur);ct(this,Nr);ct(this,wa);ct(this,_r);ct(this,ri);ct(this,ni);ct(this,zr);Bt(this,"ttl");Bt(this,"ttlResolution");Bt(this,"ttlAutopurge");Bt(this,"updateAgeOnGet");Bt(this,"updateAgeOnHas");Bt(this,"allowStale");Bt(this,"noDisposeOnSet");Bt(this,"noUpdateTTL");Bt(this,"maxEntrySize");Bt(this,"sizeCalculation");Bt(this,"noDeleteOnFetchRejection");Bt(this,"noDeleteOnStaleGet");Bt(this,"allowStaleOnFetchAbort");Bt(this,"allowStaleOnFetchRejection");Bt(this,"ignoreFetchAbort");ct(this,f0);ct(this,Ir);ct(this,i0);ct(this,_t);ct(this,tt);ct(this,q0);ct(this,or);ct(this,T0);ct(this,A0);ct(this,Or);ct(this,D0);ct(this,Lr);ct(this,Rr);ct(this,sr);ct(this,lr);ct(this,Pr);ct(this,Xn);ct(this,j0);ct(this,ai);ct(this,xa,()=>{});ct(this,An,()=>{});ct(this,mu,()=>{});ct(this,cr,()=>!1);ct(this,Aa,t=>{});ct(this,ii,(t,r,n)=>{});ct(this,pu,(t,r,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Bt(this,Uh,"LRUCache");let{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:a,updateAgeOnGet:s,updateAgeOnHas:c,allowStale:f,dispose:p,onInsert:g,disposeAfter:m,noDisposeOnSet:w,noUpdateTTL:k,maxSize:C=0,maxEntrySize:B=0,sizeCalculation:_,fetchMethod:T,memoMethod:S,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:z,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:$,ignoreFetchAbort:Y,perf:q}=t;if(q!==void 0&&typeof(q==null?void 0:q.now)!="function")throw new TypeError("perf option must have a now() method if specified");if(Xe(this,zr,q??Zg),r!==0&&!$n(r))throw new TypeError("max option must be a nonnegative integer");let pe=r?If(r):Array;if(!pe)throw new Error("invalid max value: "+r);if(Xe(this,vr,r),Xe(this,ur,C),this.maxEntrySize=B||V(this,ur),this.sizeCalculation=_,this.sizeCalculation){if(!V(this,ur)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("memoMethod must be a function if defined");if(Xe(this,ni,S),T!==void 0&&typeof T!="function")throw new TypeError("fetchMethod must be a function if specified");if(Xe(this,ri,T),Xe(this,Xn,!!T),Xe(this,i0,new Map),Xe(this,_t,new Array(r).fill(void 0)),Xe(this,tt,new Array(r).fill(void 0)),Xe(this,q0,new pe(r)),Xe(this,or,new pe(r)),Xe(this,T0,0),Xe(this,A0,0),Xe(this,Or,Qg.create(r)),Xe(this,f0,0),Xe(this,Ir,0),typeof p=="function"&&Xe(this,Nr,p),typeof g=="function"&&Xe(this,wa,g),typeof m=="function"?(Xe(this,_r,m),Xe(this,D0,[])):(Xe(this,_r,void 0),Xe(this,D0,void 0)),Xe(this,Pr,!!V(this,Nr)),Xe(this,ai,!!V(this,wa)),Xe(this,j0,!!V(this,_r)),this.noDisposeOnSet=!!w,this.noUpdateTTL=!!k,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!$,this.ignoreFetchAbort=!!Y,this.maxEntrySize!==0){if(V(this,ur)!==0&&!$n(V(this,ur)))throw new TypeError("maxSize must be a positive integer if specified");if(!$n(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");je(this,Oe,lm).call(this)}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!z,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!c,this.ttlResolution=$n(i)||i===0?i:1,this.ttlAutopurge=!!a,this.ttl=n||0,this.ttl){if(!$n(this.ttl))throw new TypeError("ttl must be a positive integer if specified");je(this,Oe,M1).call(this)}if(V(this,vr)===0&&this.ttl===0&&V(this,ur)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!V(this,vr)&&!V(this,ur)){let he="LRU_CACHE_UNBOUNDED";Kg(he)&&(Nf.add(he),_f("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",he,ui))}}get perf(){return V(this,zr)}static unsafeExposeInternals(t){return{starts:V(t,Rr),ttls:V(t,sr),autopurgeTimers:V(t,lr),sizes:V(t,Lr),keyMap:V(t,i0),keyList:V(t,_t),valList:V(t,tt),next:V(t,q0),prev:V(t,or),get head(){return V(t,T0)},get tail(){return V(t,A0)},free:V(t,Or),isBackgroundFetch:r=>{var n;return je(n=t,Oe,Ot).call(n,r)},backgroundFetch:(r,n,i,a)=>{var s;return je(s=t,Oe,_s).call(s,r,n,i,a)},moveToTail:r=>{var n;return je(n=t,Oe,ku).call(n,r)},indexes:r=>{var n;return je(n=t,Oe,ia).call(n,r)},rindexes:r=>{var n;return je(n=t,Oe,ua).call(n,r)},isStale:r=>{var n;return V(n=t,cr).call(n,r)}}}get max(){return V(this,vr)}get maxSize(){return V(this,ur)}get calculatedSize(){return V(this,Ir)}get size(){return V(this,f0)}get fetchMethod(){return V(this,ri)}get memoMethod(){return V(this,ni)}get dispose(){return V(this,Nr)}get onInsert(){return V(this,wa)}get disposeAfter(){return V(this,_r)}getRemainingTTL(t){return V(this,i0).has(t)?1/0:0}*entries(){for(let t of je(this,Oe,ia).call(this))V(this,tt)[t]!==void 0&&V(this,_t)[t]!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield[V(this,_t)[t],V(this,tt)[t]])}*rentries(){for(let t of je(this,Oe,ua).call(this))V(this,tt)[t]!==void 0&&V(this,_t)[t]!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield[V(this,_t)[t],V(this,tt)[t]])}*keys(){for(let t of je(this,Oe,ia).call(this)){let r=V(this,_t)[t];r!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield r)}}*rkeys(){for(let t of je(this,Oe,ua).call(this)){let r=V(this,_t)[t];r!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield r)}}*values(){for(let t of je(this,Oe,ia).call(this))V(this,tt)[t]!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield V(this,tt)[t])}*rvalues(){for(let t of je(this,Oe,ua).call(this))V(this,tt)[t]!==void 0&&!je(this,Oe,Ot).call(this,V(this,tt)[t])&&(yield V(this,tt)[t])}[(Wh=Symbol.iterator,Uh=Symbol.toStringTag,Wh)](){return this.entries()}find(t,r={}){for(let n of je(this,Oe,ia).call(this)){let i=V(this,tt)[n],a=je(this,Oe,Ot).call(this,i)?i.__staleWhileFetching:i;if(a!==void 0&&t(a,V(this,_t)[n],this))return this.get(V(this,_t)[n],r)}}forEach(t,r=this){for(let n of je(this,Oe,ia).call(this)){let i=V(this,tt)[n],a=je(this,Oe,Ot).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&t.call(r,a,V(this,_t)[n],this)}}rforEach(t,r=this){for(let n of je(this,Oe,ua).call(this)){let i=V(this,tt)[n],a=je(this,Oe,Ot).call(this,i)?i.__staleWhileFetching:i;a!==void 0&&t.call(r,a,V(this,_t)[n],this)}}purgeStale(){let t=!1;for(let r of je(this,Oe,ua).call(this,{allowStale:!0}))V(this,cr).call(this,r)&&(je(this,Oe,oa).call(this,V(this,_t)[r],"expire"),t=!0);return t}info(t){let r=V(this,i0).get(t);if(r===void 0)return;let n=V(this,tt)[r],i=je(this,Oe,Ot).call(this,n)?n.__staleWhileFetching:n;if(i===void 0)return;let a={value:i};if(V(this,sr)&&V(this,Rr)){let s=V(this,sr)[r],c=V(this,Rr)[r];if(s&&c){let f=s-(V(this,zr).now()-c);a.ttl=f,a.start=Date.now()}}return V(this,Lr)&&(a.size=V(this,Lr)[r]),a}dump(){let t=[];for(let r of je(this,Oe,ia).call(this,{allowStale:!0})){let n=V(this,_t)[r],i=V(this,tt)[r],a=je(this,Oe,Ot).call(this,i)?i.__staleWhileFetching:i;if(a===void 0||n===void 0)continue;let s={value:a};if(V(this,sr)&&V(this,Rr)){s.ttl=V(this,sr)[r];let c=V(this,zr).now()-V(this,Rr)[r];s.start=Math.floor(Date.now()-c)}V(this,Lr)&&(s.size=V(this,Lr)[r]),t.unshift([n,s])}return t}load(t){this.clear();for(let[r,n]of t){if(n.start){let i=Date.now()-n.start;n.start=V(this,zr).now()-i}this.set(r,n.value,n)}}set(t,r,n={}){var w,k,C,B,_,T,S;if(r===void 0)return this.delete(t),this;let{ttl:i=this.ttl,start:a,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:f}=n,{noUpdateTTL:p=this.noUpdateTTL}=n,g=V(this,pu).call(this,t,r,n.size||0,c);if(this.maxEntrySize&&g>this.maxEntrySize)return f&&(f.set="miss",f.maxEntrySizeExceeded=!0),je(this,Oe,oa).call(this,t,"set"),this;let m=V(this,f0)===0?void 0:V(this,i0).get(t);if(m===void 0)m=V(this,f0)===0?V(this,A0):V(this,Or).length!==0?V(this,Or).pop():V(this,f0)===V(this,vr)?je(this,Oe,Ns).call(this,!1):V(this,f0),V(this,_t)[m]=t,V(this,tt)[m]=r,V(this,i0).set(t,m),V(this,q0)[V(this,A0)]=m,V(this,or)[m]=V(this,A0),Xe(this,A0,m),Ms(this,f0)._++,V(this,ii).call(this,m,g,f),f&&(f.set="add"),p=!1,V(this,ai)&&((w=V(this,wa))==null||w.call(this,r,t,"add"));else{je(this,Oe,ku).call(this,m);let F=V(this,tt)[m];if(r!==F){if(V(this,Xn)&&je(this,Oe,Ot).call(this,F)){F.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:z}=F;z!==void 0&&!s&&(V(this,Pr)&&((k=V(this,Nr))==null||k.call(this,z,t,"set")),V(this,j0)&&((C=V(this,D0))==null||C.push([z,t,"set"])))}else s||(V(this,Pr)&&((B=V(this,Nr))==null||B.call(this,F,t,"set")),V(this,j0)&&((_=V(this,D0))==null||_.push([F,t,"set"])));if(V(this,Aa).call(this,m),V(this,ii).call(this,m,g,f),V(this,tt)[m]=r,f){f.set="replace";let z=F&&je(this,Oe,Ot).call(this,F)?F.__staleWhileFetching:F;z!==void 0&&(f.oldValue=z)}}else f&&(f.set="update");V(this,ai)&&((T=this.onInsert)==null||T.call(this,r,t,r===F?"update":"replace"))}if(i!==0&&!V(this,sr)&&je(this,Oe,M1).call(this),V(this,sr)&&(p||V(this,mu).call(this,m,i,a),f&&V(this,An).call(this,f,m)),!s&&V(this,j0)&&V(this,D0)){let F=V(this,D0),z;for(;z=F==null?void 0:F.shift();)(S=V(this,_r))==null||S.call(this,...z)}return this}pop(){var t;try{for(;V(this,f0);){let r=V(this,tt)[V(this,T0)];if(je(this,Oe,Ns).call(this,!0),je(this,Oe,Ot).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(V(this,j0)&&V(this,D0)){let r=V(this,D0),n;for(;n=r==null?void 0:r.shift();)(t=V(this,_r))==null||t.call(this,...n)}}}has(t,r={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=r,a=V(this,i0).get(t);if(a!==void 0){let s=V(this,tt)[a];if(je(this,Oe,Ot).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(V(this,cr).call(this,a))i&&(i.has="stale",V(this,An).call(this,i,a));else return n&&V(this,xa).call(this,a),i&&(i.has="hit",V(this,An).call(this,i,a)),!0}else i&&(i.has="miss");return!1}peek(t,r={}){let{allowStale:n=this.allowStale}=r,i=V(this,i0).get(t);if(i===void 0||!n&&V(this,cr).call(this,i))return;let a=V(this,tt)[i];return je(this,Oe,Ot).call(this,a)?a.__staleWhileFetching:a}async fetch(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:f=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL,noDeleteOnFetchRejection:m=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:k=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:B,forceRefresh:_=!1,status:T,signal:S}=r;if(!V(this,Xn))return T&&(T.fetch="get"),this.get(t,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:T});let F={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:s,noDisposeOnSet:c,size:f,sizeCalculation:p,noUpdateTTL:g,noDeleteOnFetchRejection:m,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:C,ignoreFetchAbort:k,status:T,signal:S},z=V(this,i0).get(t);if(z===void 0){T&&(T.fetch="miss");let R=je(this,Oe,_s).call(this,t,z,F,B);return R.__returned=R}else{let R=V(this,tt)[z];if(je(this,Oe,Ot).call(this,R)){let pe=n&&R.__staleWhileFetching!==void 0;return T&&(T.fetch="inflight",pe&&(T.returnedStale=!0)),pe?R.__staleWhileFetching:R.__returned=R}let $=V(this,cr).call(this,z);if(!_&&!$)return T&&(T.fetch="hit"),je(this,Oe,ku).call(this,z),i&&V(this,xa).call(this,z),T&&V(this,An).call(this,T,z),R;let Y=je(this,Oe,_s).call(this,t,z,F,B),q=Y.__staleWhileFetching!==void 0&&n;return T&&(T.fetch=$?"stale":"refresh",q&&$&&(T.returnedStale=!0)),q?Y.__staleWhileFetching:Y.__returned=Y}}async forceFetch(t,r={}){let n=await this.fetch(t,r);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(t,r={}){let n=V(this,ni);if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:a,...s}=r,c=this.get(t,s);if(!a&&c!==void 0)return c;let f=n(t,c,{options:s,context:i});return this.set(t,f,s),f}get(t,r={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:s}=r,c=V(this,i0).get(t);if(c!==void 0){let f=V(this,tt)[c],p=je(this,Oe,Ot).call(this,f);return s&&V(this,An).call(this,s,c),V(this,cr).call(this,c)?(s&&(s.get="stale"),p?(s&&n&&f.__staleWhileFetching!==void 0&&(s.returnedStale=!0),n?f.__staleWhileFetching:void 0):(a||je(this,Oe,oa).call(this,t,"expire"),s&&n&&(s.returnedStale=!0),n?f:void 0)):(s&&(s.get="hit"),p?f.__staleWhileFetching:(je(this,Oe,ku).call(this,c),i&&V(this,xa).call(this,c),f))}else s&&(s.get="miss")}delete(t){return je(this,Oe,oa).call(this,t,"delete")}clear(){return je(this,Oe,z1).call(this,"delete")}},vr=new WeakMap,ur=new WeakMap,Nr=new WeakMap,wa=new WeakMap,_r=new WeakMap,ri=new WeakMap,ni=new WeakMap,zr=new WeakMap,f0=new WeakMap,Ir=new WeakMap,i0=new WeakMap,_t=new WeakMap,tt=new WeakMap,q0=new WeakMap,or=new WeakMap,T0=new WeakMap,A0=new WeakMap,Or=new WeakMap,D0=new WeakMap,Lr=new WeakMap,Rr=new WeakMap,sr=new WeakMap,lr=new WeakMap,Pr=new WeakMap,Xn=new WeakMap,j0=new WeakMap,ai=new WeakMap,Oe=new WeakSet,M1=function(){let t=new Po(V(this,vr)),r=new Po(V(this,vr));Xe(this,sr,t),Xe(this,Rr,r);let n=this.ttlAutopurge?new Array(V(this,vr)):void 0;Xe(this,lr,n),Xe(this,mu,(c,f,p=V(this,zr).now())=>{r[c]=f!==0?p:0,t[c]=f,i(c,f)}),Xe(this,xa,c=>{r[c]=t[c]!==0?V(this,zr).now():0,i(c,t[c])});let i=this.ttlAutopurge?(c,f)=>{if(n!=null&&n[c]&&(clearTimeout(n[c]),n[c]=void 0),f&&f!==0&&n){let p=setTimeout(()=>{V(this,cr).call(this,c)&&je(this,Oe,oa).call(this,V(this,_t)[c],"expire")},f+1);p.unref&&p.unref(),n[c]=p}}:()=>{};Xe(this,An,(c,f)=>{if(t[f]){let p=t[f],g=r[f];if(!p||!g)return;c.ttl=p,c.start=g,c.now=a||s();let m=c.now-g;c.remainingTTL=p-m}});let a=0,s=()=>{let c=V(this,zr).now();if(this.ttlResolution>0){a=c;let f=setTimeout(()=>a=0,this.ttlResolution);f.unref&&f.unref()}return c};this.getRemainingTTL=c=>{let f=V(this,i0).get(c);if(f===void 0)return 0;let p=t[f],g=r[f];if(!p||!g)return 1/0;let m=(a||s())-g;return p-m},Xe(this,cr,c=>{let f=r[c],p=t[c];return!!p&&!!f&&(a||s())-f>p})},xa=new WeakMap,An=new WeakMap,mu=new WeakMap,cr=new WeakMap,lm=function(){let t=new Po(V(this,vr));Xe(this,Ir,0),Xe(this,Lr,t),Xe(this,Aa,r=>{Xe(this,Ir,V(this,Ir)-t[r]),t[r]=0}),Xe(this,pu,(r,n,i,a)=>{if(je(this,Oe,Ot).call(this,n))return 0;if(!$n(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(n,r),!$n(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),Xe(this,ii,(r,n,i)=>{if(t[r]=n,V(this,ur)){let a=V(this,ur)-t[r];for(;V(this,Ir)>a;)je(this,Oe,Ns).call(this,!0)}Xe(this,Ir,V(this,Ir)+t[r]),i&&(i.entrySize=n,i.totalCalculatedSize=V(this,Ir))})},Aa=new WeakMap,ii=new WeakMap,pu=new WeakMap,ia=function*({allowStale:t=this.allowStale}={}){if(V(this,f0))for(let r=V(this,A0);!(!je(this,Oe,N1).call(this,r)||((t||!V(this,cr).call(this,r))&&(yield r),r===V(this,T0)));)r=V(this,or)[r]},ua=function*({allowStale:t=this.allowStale}={}){if(V(this,f0))for(let r=V(this,T0);!(!je(this,Oe,N1).call(this,r)||((t||!V(this,cr).call(this,r))&&(yield r),r===V(this,A0)));)r=V(this,q0)[r]},N1=function(t){return t!==void 0&&V(this,i0).get(V(this,_t)[t])===t},Ns=function(t){var a,s,c;let r=V(this,T0),n=V(this,_t)[r],i=V(this,tt)[r];return V(this,Xn)&&je(this,Oe,Ot).call(this,i)?i.__abortController.abort(new Error("evicted")):(V(this,Pr)||V(this,j0))&&(V(this,Pr)&&((a=V(this,Nr))==null||a.call(this,i,n,"evict")),V(this,j0)&&((s=V(this,D0))==null||s.push([i,n,"evict"]))),V(this,Aa).call(this,r),(c=V(this,lr))!=null&&c[r]&&(clearTimeout(V(this,lr)[r]),V(this,lr)[r]=void 0),t&&(V(this,_t)[r]=void 0,V(this,tt)[r]=void 0,V(this,Or).push(r)),V(this,f0)===1?(Xe(this,T0,Xe(this,A0,0)),V(this,Or).length=0):Xe(this,T0,V(this,q0)[r]),V(this,i0).delete(n),Ms(this,f0)._--,r},_s=function(t,r,n,i){let a=r===void 0?void 0:V(this,tt)[r];if(je(this,Oe,Ot).call(this,a))return a;let s=new Ro,{signal:c}=n;c==null||c.addEventListener("abort",()=>s.abort(c.reason),{signal:s.signal});let f={signal:s.signal,options:n,context:i},p=(B,_=!1)=>{let{aborted:T}=s.signal,S=n.ignoreFetchAbort&&B!==void 0,F=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&B!==void 0);if(n.status&&(T&&!_?(n.status.fetchAborted=!0,n.status.fetchError=s.signal.reason,S&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),T&&!S&&!_)return m(s.signal.reason,F);let z=k,R=V(this,tt)[r];return(R===k||S&&_&&R===void 0)&&(B===void 0?z.__staleWhileFetching!==void 0?V(this,tt)[r]=z.__staleWhileFetching:je(this,Oe,oa).call(this,t,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(t,B,f.options))),B},g=B=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=B),m(B,!1)),m=(B,_)=>{let{aborted:T}=s.signal,S=T&&n.allowStaleOnFetchAbort,F=S||n.allowStaleOnFetchRejection,z=F||n.noDeleteOnFetchRejection,R=k;if(V(this,tt)[r]===k&&(!z||!_&&R.__staleWhileFetching===void 0?je(this,Oe,oa).call(this,t,"fetch"):S||(V(this,tt)[r]=R.__staleWhileFetching)),F)return n.status&&R.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),R.__staleWhileFetching;if(R.__returned===R)throw B},w=(B,_)=>{var S;let T=(S=V(this,ri))==null?void 0:S.call(this,t,a,f);T&&T instanceof Promise&&T.then(F=>B(F===void 0?void 0:F),_),s.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(B(void 0),n.allowStaleOnFetchAbort&&(B=F=>p(F,!0)))})};n.status&&(n.status.fetchDispatched=!0);let k=new Promise(w).then(p,g),C=Object.assign(k,{__abortController:s,__staleWhileFetching:a,__returned:void 0});return r===void 0?(this.set(t,C,{...f.options,status:void 0}),r=V(this,i0).get(t)):V(this,tt)[r]=C,C},Ot=function(t){if(!V(this,Xn))return!1;let r=t;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Ro},_1=function(t,r){V(this,or)[r]=t,V(this,q0)[t]=r},ku=function(t){t!==V(this,A0)&&(t===V(this,T0)?Xe(this,T0,V(this,q0)[t]):je(this,Oe,_1).call(this,V(this,or)[t],V(this,q0)[t]),je(this,Oe,_1).call(this,V(this,A0),t),Xe(this,A0,t))},oa=function(t,r){var i,a,s,c,f,p;let n=!1;if(V(this,f0)!==0){let g=V(this,i0).get(t);if(g!==void 0)if((i=V(this,lr))!=null&&i[g]&&(clearTimeout((a=V(this,lr))==null?void 0:a[g]),V(this,lr)[g]=void 0),n=!0,V(this,f0)===1)je(this,Oe,z1).call(this,r);else{V(this,Aa).call(this,g);let m=V(this,tt)[g];if(je(this,Oe,Ot).call(this,m)?m.__abortController.abort(new Error("deleted")):(V(this,Pr)||V(this,j0))&&(V(this,Pr)&&((s=V(this,Nr))==null||s.call(this,m,t,r)),V(this,j0)&&((c=V(this,D0))==null||c.push([m,t,r]))),V(this,i0).delete(t),V(this,_t)[g]=void 0,V(this,tt)[g]=void 0,g===V(this,A0))Xe(this,A0,V(this,or)[g]);else if(g===V(this,T0))Xe(this,T0,V(this,q0)[g]);else{let w=V(this,or)[g];V(this,q0)[w]=V(this,q0)[g];let k=V(this,q0)[g];V(this,or)[k]=V(this,or)[g]}Ms(this,f0)._--,V(this,Or).push(g)}}if(V(this,j0)&&((f=V(this,D0))!=null&&f.length)){let g=V(this,D0),m;for(;m=g==null?void 0:g.shift();)(p=V(this,_r))==null||p.call(this,...m)}return n},z1=function(t){var r,n,i,a;for(let s of je(this,Oe,ua).call(this,{allowStale:!0})){let c=V(this,tt)[s];if(je(this,Oe,Ot).call(this,c))c.__abortController.abort(new Error("deleted"));else{let f=V(this,_t)[s];V(this,Pr)&&((r=V(this,Nr))==null||r.call(this,c,f,t)),V(this,j0)&&((n=V(this,D0))==null||n.push([c,f,t]))}}if(V(this,i0).clear(),V(this,tt).fill(void 0),V(this,_t).fill(void 0),V(this,sr)&&V(this,Rr)){V(this,sr).fill(0),V(this,Rr).fill(0);for(let s of V(this,lr)??[])s!==void 0&&clearTimeout(s);(i=V(this,lr))==null||i.fill(void 0)}if(V(this,Lr)&&V(this,Lr).fill(0),Xe(this,T0,0),Xe(this,A0,0),V(this,Or).length=0,Xe(this,Ir,0),Xe(this,f0,0),V(this,j0)&&V(this,D0)){let s=V(this,D0),c;for(;c=s==null?void 0:s.shift();)(a=V(this,_r))==null||a.call(this,...c)}},ui);/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */var ga=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo=function(t){return t.tagName==="IMG"},eb=function(t){return NodeList.prototype.isPrototypeOf(t)},Ho=function(t){return t&&t.nodeType===1},Of=function(t){var r=t.currentSrc||t.src;return r.substr(-4).toLowerCase()===".svg"},Lf=function(t){try{return Array.isArray(t)?t.filter(Vo):eb(t)?[].slice.call(t).filter(Vo):Ho(t)?[t].filter(Vo):typeof t=="string"?[].slice.call(document.querySelectorAll(t)).filter(Vo):[]}catch{throw new TypeError(`The provided selector is invalid.
|
|
581
581
|
Expects a CSS selector, a Node element, a NodeList or an array.
|
|
582
|
-
See: https://github.com/francoischalifour/medium-zoom`)}},tb=function(t){var r=document.createElement("div");return r.classList.add("medium-zoom-overlay"),r.style.background=t,r},rb=function(t){var r=t.getBoundingClientRect(),n=r.top,i=r.left,a=r.width,s=r.height,c=t.cloneNode(),f=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,p=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return c.removeAttribute("id"),c.style.position="absolute",c.style.top=n+f+"px",c.style.left=i+p+"px",c.style.width=a+"px",c.style.height=s+"px",c.style.transform="",c},Za=function(t,r){var n=ga({bubbles:!1,cancelable:!1,detail:void 0},r);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),i},nb=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(be){function ae(){}be(ae,ae)},i=function(be){var ae=be.target;if(ae===pe){C();return}F.indexOf(ae)!==-1&&B({target:ae})},a=function(){if(!(R||!q.original)){var be=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs($-be)>Y.scrollOffset&&setTimeout(C,150)}},s=function(be){var ae=be.key||be.keyCode;(ae==="Escape"||ae==="Esc"||ae===27)&&C()},c=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be;if(be.background&&(pe.style.background=be.background),be.container&&be.container instanceof Object&&(ae.container=ga({},Y.container,be.container)),be.template){var xe=Ho(be.template)?be.template:document.querySelector(be.template);ae.template=xe}return Y=ga({},Y,ae),F.forEach(function(Se){Se.dispatchEvent(Za("medium-zoom:update",{detail:{zoom:he}}))}),he},f=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(ga({},Y,be))},p=function(){for(var be=arguments.length,ae=Array(be),xe=0;xe<be;xe++)ae[xe]=arguments[xe];var Se=ae.reduce(function(te,ye){return[].concat(te,Lf(ye))},[]);return Se.filter(function(te){return F.indexOf(te)===-1}).forEach(function(te){F.push(te),te.classList.add("medium-zoom-image")}),z.forEach(function(te){var ye=te.type,ne=te.listener,Ne=te.options;Se.forEach(function(We){We.addEventListener(ye,ne,Ne)})}),he},g=function(){for(var be=arguments.length,ae=Array(be),xe=0;xe<be;xe++)ae[xe]=arguments[xe];q.zoomed&&C();var Se=ae.length>0?ae.reduce(function(te,ye){return[].concat(te,Lf(ye))},[]):F;return Se.forEach(function(te){te.classList.remove("medium-zoom-image"),te.dispatchEvent(Za("medium-zoom:detach",{detail:{zoom:he}}))}),F=F.filter(function(te){return Se.indexOf(te)===-1}),he},m=function(be,ae){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F.forEach(function(Se){Se.addEventListener("medium-zoom:"+be,ae,xe)}),z.push({type:"medium-zoom:"+be,listener:ae,options:xe}),he},w=function(be,ae){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F.forEach(function(Se){Se.removeEventListener("medium-zoom:"+be,ae,xe)}),z=z.filter(function(Se){return!(Se.type==="medium-zoom:"+be&&Se.listener.toString()===ae.toString())}),he},k=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be.target,xe=function(){var te={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},ye=void 0,ne=void 0;if(Y.container)if(Y.container instanceof Object)te=ga({},te,Y.container),ye=te.width-te.left-te.right-Y.margin*2,ne=te.height-te.top-te.bottom-Y.margin*2;else{var Ne=Ho(Y.container)?Y.container:document.querySelector(Y.container),We=Ne.getBoundingClientRect(),X=We.width,Z=We.height,Q=We.left,ue=We.top;te=ga({},te,{width:X,height:Z,left:Q,top:ue})}ye=ye||te.width-Y.margin*2,ne=ne||te.height-Y.margin*2;var fe=q.zoomedHd||q.original,ke=Of(fe)?ye:fe.naturalWidth||ye,ie=Of(fe)?ne:fe.naturalHeight||ne,me=fe.getBoundingClientRect(),ge=me.top,Le=me.left,Ye=me.width,Ke=me.height,ut=Math.min(Math.max(Ye,ke),ye)/Ye,ot=Math.min(Math.max(Ke,ie),ne)/Ke,st=Math.min(ut,ot),Xt=(-Le+(ye-Ye)/2+Y.margin+te.left)/st,$0=(-ge+(ne-Ke)/2+Y.margin+te.top)/st,Jt="scale("+st+") translate3d("+Xt+"px, "+$0+"px, 0)";q.zoomed.style.transform=Jt,q.zoomedHd&&(q.zoomedHd.style.transform=Jt)};return new n(function(Se){if(ae&&F.indexOf(ae)===-1){Se(he);return}var te=function X(){R=!1,q.zoomed.removeEventListener("transitionend",X),q.original.dispatchEvent(Za("medium-zoom:opened",{detail:{zoom:he}})),Se(he)};if(q.zoomed){Se(he);return}if(ae)q.original=ae;else if(F.length>0){var ye=F;q.original=ye[0]}else{Se(he);return}if(q.original.dispatchEvent(Za("medium-zoom:open",{detail:{zoom:he}})),$=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,R=!0,q.zoomed=rb(q.original),document.body.appendChild(pe),Y.template){var ne=Ho(Y.template)?Y.template:document.querySelector(Y.template);q.template=document.createElement("div"),q.template.appendChild(ne.content.cloneNode(!0)),document.body.appendChild(q.template)}if(q.original.parentElement&&q.original.parentElement.tagName==="PICTURE"&&q.original.currentSrc&&(q.zoomed.src=q.original.currentSrc),document.body.appendChild(q.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),q.original.classList.add("medium-zoom-image--hidden"),q.zoomed.classList.add("medium-zoom-image--opened"),q.zoomed.addEventListener("click",C),q.zoomed.addEventListener("transitionend",te),q.original.getAttribute("data-zoom-src")){q.zoomedHd=q.zoomed.cloneNode(),q.zoomedHd.removeAttribute("srcset"),q.zoomedHd.removeAttribute("sizes"),q.zoomedHd.removeAttribute("loading"),q.zoomedHd.src=q.zoomed.getAttribute("data-zoom-src"),q.zoomedHd.onerror=function(){clearInterval(Ne),console.warn("Unable to reach the zoom image target "+q.zoomedHd.src),q.zoomedHd=null,xe()};var Ne=setInterval(function(){q.zoomedHd.complete&&(clearInterval(Ne),q.zoomedHd.classList.add("medium-zoom-image--opened"),q.zoomedHd.addEventListener("click",C),document.body.appendChild(q.zoomedHd),xe())},10)}else if(q.original.hasAttribute("srcset")){q.zoomedHd=q.zoomed.cloneNode(),q.zoomedHd.removeAttribute("sizes"),q.zoomedHd.removeAttribute("loading");var We=q.zoomedHd.addEventListener("load",function(){q.zoomedHd.removeEventListener("load",We),q.zoomedHd.classList.add("medium-zoom-image--opened"),q.zoomedHd.addEventListener("click",C),document.body.appendChild(q.zoomedHd),xe()})}else xe()})},C=function(){return new n(function(be){if(R||!q.original){be(he);return}var ae=function xe(){q.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(q.zoomed),q.zoomedHd&&document.body.removeChild(q.zoomedHd),document.body.removeChild(pe),q.zoomed.classList.remove("medium-zoom-image--opened"),q.template&&document.body.removeChild(q.template),R=!1,q.zoomed.removeEventListener("transitionend",xe),q.original.dispatchEvent(Za("medium-zoom:closed",{detail:{zoom:he}})),q.original=null,q.zoomed=null,q.zoomedHd=null,q.template=null,be(he)};R=!0,document.body.classList.remove("medium-zoom--opened"),q.zoomed.style.transform="",q.zoomedHd&&(q.zoomedHd.style.transform=""),q.template&&(q.template.style.transition="opacity 150ms",q.template.style.opacity=0),q.original.dispatchEvent(Za("medium-zoom:close",{detail:{zoom:he}})),q.zoomed.addEventListener("transitionend",ae)})},B=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be.target;return q.original?C():k({target:ae})},_=function(){return Y},T=function(){return F},S=function(){return q.original},F=[],z=[],R=!1,$=0,Y=r,q={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?Y=t:(t||typeof t=="string")&&p(t),Y=ga({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},Y);var pe=tb(Y.background);document.addEventListener("click",i),document.addEventListener("keyup",s),document.addEventListener("scroll",a),window.addEventListener("resize",C);var he={open:k,close:C,toggle:B,update:c,clone:f,attach:p,detach:g,on:m,off:w,getOptions:_,getImages:T,getZoomedImage:S};return he};function ab(e,t){t===void 0&&(t={});var r=t.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var ib=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";ab(ib);const Un={hljs:`${Re}-hljs`,hlcss:`${Re}-hlCss`,mermaidM:`${Re}-mermaid-m`,mermaid:`${Re}-mermaid`,katexjs:`${Re}-katex`,katexcss:`${Re}-katexCss`,echarts:`${Re}-echarts`},ub=(e,{editorId:t,rootRef:r,setting:n})=>{const i=Br.editorExtensions.highlight,a=Br.editorExtensionsAttrs.highlight;d.provide("editorId",t),d.provide("rootRef",r),d.provide("theme",d.computed(()=>e.theme)),d.provide("language",d.computed(()=>e.language)),d.provide("highlight",d.computed(()=>{const{js:c}=i,f={...Dc,...i.css},{js:p,css:g={}}=a||{},m=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,w=f[e.codeTheme]?f[e.codeTheme][m]:Dc.atom[m],k=f[e.codeTheme]&&g[e.codeTheme]?g[e.codeTheme][m]:g.atom?g.atom[m]:{};return{js:{src:c,...p},css:{href:w,...k}}})),d.provide("showCodeRowNumber",e.showCodeRowNumber);const s=d.computed(()=>{const c={...Df,...Br.editorConfig.languageUserDefined};return xc(Wi(Df["en-US"]),c[e.language]||{})});return d.provide("usedLanguageText",s),d.provide("previewTheme",d.computed(()=>e.previewTheme)),d.provide("customIcon",d.computed(()=>e.customIcon)),d.provide("setting",d.computed(()=>n?{...n}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},ob=e=>{const t=d.useId();return e.id||e.editorId||`${Re}-${t}`},sb=(e,t,r)=>{const n=d.inject("editorId"),i=d.inject("rootRef"),a=d.inject("usedLanguageText"),s=d.inject("setting"),c=()=>{i.value.querySelectorAll(`#${n} .${Re}-preview .${Re}-code`).forEach(g=>{let m=-1;const w=g.querySelector(`.${Re}-copy-button:not([data-processed])`);w&&(w.onclick=k=>{k.preventDefault(),clearTimeout(m);const C=(g.querySelector("input:checked + pre code")||g.querySelector("pre code")).textContent,{text:B,successTips:_,failTips:T}=a.value.copyCode;let S=_;Ff(e.formatCopiedText(C||"")).catch(()=>{S=T}).finally(()=>{w.dataset.isIcon?w.dataset.tips=S:w.innerHTML=S,m=window.setTimeout(()=>{w.dataset.isIcon?w.dataset.tips=B:w.innerHTML=B},1500)})},w.setAttribute("data-processed","true"))})},f=()=>{d.nextTick(c)},p=g=>{g&&d.nextTick(c)};d.watch([t,r],f),d.watch(()=>s.value.preview,p),d.watch(()=>s.value.htmlPreview,p),d.onMounted(c)},lb=e=>{const t=d.inject("editorId"),r=d.inject("theme"),n=d.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:a}=Br;let s=i.echarts.instance;const c=d.shallowRef(-1),f=()=>{!e.noEcharts&&s&&(c.value=c.value+1)};d.watch(()=>r.value,()=>{f()}),d.onMounted(()=>{var B;if(e.noEcharts||s)return;const C=i.echarts.js;jn("script",{...(B=a.echarts)==null?void 0:B.js,src:C,id:Un.echarts,onload(){s=window.echarts,f()}},"echarts")});let p=[],g=[],m=[];const w=(C=!1)=>{if(!p.length){C&&(g.forEach(S=>{var F;(F=S.dispose)==null||F.call(S)}),m.forEach(S=>{var F;(F=S.disconnect)==null||F.call(S)}),g=[],m=[]);return}const B=[],_=[],T=[];p.forEach((S,F)=>{var $,Y;const z=g[F],R=m[F];if(C||!S||!S.isConnected||n!=null&&n.value&&!n.value.contains(S)){($=z==null?void 0:z.dispose)==null||$.call(z),(Y=R==null?void 0:R.disconnect)==null||Y.call(R);return}B.push(S),z&&_.push(z),R&&T.push(R)}),p=B,g=_,m=T},k=()=>{w(),!e.noEcharts&&s&&Array.from(n.value.querySelectorAll(`#${t} div.${Re}-echarts:not([data-processed])`)).forEach(C=>{if(C.dataset.closed==="false")return!1;try{const B=Og.parse(C.innerText),_=s.init(C,r.value);_.setOption(B),C.setAttribute("data-processed",""),p.push(C),g.push(_);const T=new ResizeObserver(()=>{_.resize()});T.observe(C),m.push(T)}catch(B){yr.emit(t,kc,{name:"echarts",message:B==null?void 0:B.message,error:B})}})};return d.onBeforeUnmount(()=>{w(!0)}),{reRenderEcharts:c,replaceEcharts:k}},cb=e=>{const t=d.inject("highlight"),r=d.shallowRef(Br.editorExtensions.highlight.instance);return d.onMounted(()=>{e.noHighlight||r.value||(jn("link",{...t.value.css,rel:"stylesheet",id:Un.hlcss}),jn("script",{...t.value.js,id:Un.hljs,onload(){r.value=window.hljs}},"hljs"))}),d.watch(()=>t.value.css,()=>{e.noHighlight||Br.editorExtensions.highlight.instance||Rg("link",{...t.value.css,rel:"stylesheet",id:Un.hlcss})}),r},db=e=>{const t=d.shallowRef(Br.editorExtensions.katex.instance);return d.onMounted(()=>{var i,a;if(e.noKatex||t.value)return;const{editorExtensions:r,editorExtensionsAttrs:n}=Br;jn("script",{...(i=n.katex)==null?void 0:i.js,src:r.katex.js,id:Un.katexjs,onload(){t.value=window.katex}},"katex"),jn("link",{...(a=n.katex)==null?void 0:a.css,rel:"stylesheet",href:r.katex.css,id:Un.katexcss})}),t},qo=new Jg({max:1e3,ttl:6e5}),fb=e=>{const t=d.inject("editorId"),r=d.inject("theme"),n=d.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:a,mermaidConfig:s}=Br;let c=i.mermaid.instance;const f=d.shallowRef(-1),p=()=>{if(!e.noMermaid&&c){const g=r.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};c.initialize(s(g)),f.value=f.value+1}};return d.watch(()=>r.value,()=>{qo.clear(),p()}),d.onMounted(()=>{var m,w;if(e.noMermaid||c)return;const g=i.mermaid.js;/\.mjs/.test(g)?(jn("link",{...(m=a.mermaid)==null?void 0:m.js,rel:"modulepreload",href:g,id:Un.mermaidM}),import(g).then(k=>{c=k.default,p()}).catch(k=>{yr.emit(t,kc,{name:"mermaid",message:`Failed to load mermaid module: ${k.message}`,error:k})})):jn("script",{...(w=a.mermaid)==null?void 0:w.js,src:g,id:Un.mermaid,onload(){c=window.mermaid,p()}},"mermaid")}),{reRenderRef:f,replaceMermaid:async()=>{if(!e.noMermaid&&c){const g=n.value.querySelectorAll(`div.${Re}-mermaid`),m=document.createElement("div"),w=document.body.offsetWidth>1366?document.body.offsetWidth:1366,k=document.body.offsetHeight>768?document.body.offsetHeight:768;m.style.width=w+"px",m.style.height=k+"px",m.style.position="fixed",m.style.zIndex="-10000",m.style.top="-10000";let C=g.length;C>0&&document.body.appendChild(m),await Promise.allSettled(Array.from(g).map(B=>(async _=>{var F;if(_.dataset.closed==="false")return!1;const T=_.innerText;let S=qo.get(T);if(!S){const z=wc();let R={svg:""};try{R=await c.render(z,T,m),S=await e.sanitizeMermaid(R.svg);const $=document.createElement("p");$.className=`${Re}-mermaid`,$.setAttribute("data-processed",""),$.setAttribute("data-content",T),$.innerHTML=S,(F=$.children[0])==null||F.removeAttribute("height"),qo.set(T,$.innerHTML),_.dataset.line!==void 0&&($.dataset.line=_.dataset.line),_.replaceWith($)}catch($){yr.emit(t,kc,{name:"mermaid",message:$.message,error:$})}--C===0&&m.remove()}})(B)))}}}},hb=(e,t)=>{t=t||{};const r=3,n=t.marker||"!",i=n.charCodeAt(0),a=n.length;let s="",c="";const f=(g,m,w,k,C)=>{const B=g[m];return B.type==="admonition_open"?g[m].attrPush(["class",`${Re}-admonition ${Re}-admonition-${B.info}`]):B.type==="admonition_title_open"&&g[m].attrPush(["class",`${Re}-admonition-title`]),C.renderToken(g,m,w)},p=g=>{const m=g.trim().split(" ",2);c="",s=m[0],m.length>1&&(c=g.substring(s.length+2))};e.block.ruler.before("code","admonition",(g,m,w,k)=>{let C,B,_,T=!1,S=g.bMarks[m]+g.tShift[m],F=g.eMarks[m];if(i!==g.src.charCodeAt(S))return!1;for(C=S+1;C<=F&&n[(C-S)%a]===g.src[C];C++);const z=Math.floor((C-S)/a);if(z!==r)return!1;C-=(C-S)%a;const R=g.src.slice(S,C),$=g.src.slice(C,F);if(p($),k)return!0;for(B=m;B++,!(B>=w||(S=g.bMarks[B]+g.tShift[B],F=g.eMarks[B],S<F&&g.sCount[B]<g.blkIndent));)if(i===g.src.charCodeAt(S)&&!(g.sCount[B]-g.blkIndent>=4)){for(C=S+1;C<=F&&n[(C-S)%a]===g.src[C];C++);if(!(Math.floor((C-S)/a)<z)&&(C-=(C-S)%a,C=g.skipSpaces(C),!(C<F))){T=!0;break}}const Y=g.parentType,q=g.lineMax;return g.parentType="root",g.lineMax=B,_=g.push("admonition_open","div",1),_.markup=R,_.block=!0,_.info=s,_.map=[m,B],c&&(_=g.push("admonition_title_open","p",1),_.markup=R+" "+s,_.map=[m,B],_=g.push("inline","",0),_.content=c,_.map=[m,g.line-1],_.children=[],_=g.push("admonition_title_close","p",-1),_.markup=R+" "+s),g.md.block.tokenize(g,m+1,B),_=g.push("admonition_close","div",-1),_.markup=g.src.slice(S,C),_.block=!0,g.parentType=Y,g.lineMax=q,g.line=B+(T?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=f,e.renderer.rules.admonition_title_open=f,e.renderer.rules.admonition_title_close=f,e.renderer.rules.admonition_close=f},_c=(e,t)=>{const r=e.attrs?e.attrs.slice():[];return t.forEach(n=>{const i=e.attrIndex(n[0]);i<0?r.push(n):(r[i]=r[i].slice(),r[i][1]+=` ${n[1]}`)}),r},mb=(e,t)=>{const r=e.renderer.rules.fence,n=e.utils.unescapeAll,i=/\[(\w*)(?::([\w ]*))?\]/,a=/::(open|close)/,s=m=>m.info?n(m.info).trim():"",c=m=>{const w=s(m),[k=null,C=""]=(i.exec(w)||[]).slice(1);return[k,C]},f=m=>{const w=s(m);return w?w.split(/(\s+)/g)[0]:""},p=m=>{const w=m.info.match(a)||[],k=w[1]==="open"||w[1]!=="close"&&t.codeFoldable&&m.content.trim().split(`
|
|
582
|
+
See: https://github.com/francoischalifour/medium-zoom`)}},tb=function(t){var r=document.createElement("div");return r.classList.add("medium-zoom-overlay"),r.style.background=t,r},rb=function(t){var r=t.getBoundingClientRect(),n=r.top,i=r.left,a=r.width,s=r.height,c=t.cloneNode(),f=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,p=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return c.removeAttribute("id"),c.style.position="absolute",c.style.top=n+f+"px",c.style.left=i+p+"px",c.style.width=a+"px",c.style.height=s+"px",c.style.transform="",c},Za=function(t,r){var n=ga({bubbles:!1,cancelable:!1,detail:void 0},r);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),i},nb=function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(be){function ae(){}be(ae,ae)},i=function(be){var ae=be.target;if(ae===pe){C();return}F.indexOf(ae)!==-1&&B({target:ae})},a=function(){if(!(R||!q.original)){var be=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs($-be)>Y.scrollOffset&&setTimeout(C,150)}},s=function(be){var ae=be.key||be.keyCode;(ae==="Escape"||ae==="Esc"||ae===27)&&C()},c=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be;if(be.background&&(pe.style.background=be.background),be.container&&be.container instanceof Object&&(ae.container=ga({},Y.container,be.container)),be.template){var xe=Ho(be.template)?be.template:document.querySelector(be.template);ae.template=xe}return Y=ga({},Y,ae),F.forEach(function(Se){Se.dispatchEvent(Za("medium-zoom:update",{detail:{zoom:he}}))}),he},f=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(ga({},Y,be))},p=function(){for(var be=arguments.length,ae=Array(be),xe=0;xe<be;xe++)ae[xe]=arguments[xe];var Se=ae.reduce(function(te,ye){return[].concat(te,Lf(ye))},[]);return Se.filter(function(te){return F.indexOf(te)===-1}).forEach(function(te){F.push(te),te.classList.add("medium-zoom-image")}),z.forEach(function(te){var ye=te.type,ne=te.listener,Ne=te.options;Se.forEach(function(We){We.addEventListener(ye,ne,Ne)})}),he},g=function(){for(var be=arguments.length,ae=Array(be),xe=0;xe<be;xe++)ae[xe]=arguments[xe];q.zoomed&&C();var Se=ae.length>0?ae.reduce(function(te,ye){return[].concat(te,Lf(ye))},[]):F;return Se.forEach(function(te){te.classList.remove("medium-zoom-image"),te.dispatchEvent(Za("medium-zoom:detach",{detail:{zoom:he}}))}),F=F.filter(function(te){return Se.indexOf(te)===-1}),he},m=function(be,ae){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F.forEach(function(Se){Se.addEventListener("medium-zoom:"+be,ae,xe)}),z.push({type:"medium-zoom:"+be,listener:ae,options:xe}),he},w=function(be,ae){var xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return F.forEach(function(Se){Se.removeEventListener("medium-zoom:"+be,ae,xe)}),z=z.filter(function(Se){return!(Se.type==="medium-zoom:"+be&&Se.listener.toString()===ae.toString())}),he},k=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be.target,xe=function(){var te={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},ye=void 0,ne=void 0;if(Y.container)if(Y.container instanceof Object)te=ga({},te,Y.container),ye=te.width-te.left-te.right-Y.margin*2,ne=te.height-te.top-te.bottom-Y.margin*2;else{var Ne=Ho(Y.container)?Y.container:document.querySelector(Y.container),We=Ne.getBoundingClientRect(),X=We.width,Z=We.height,Q=We.left,ie=We.top;te=ga({},te,{width:X,height:Z,left:Q,top:ie})}ye=ye||te.width-Y.margin*2,ne=ne||te.height-Y.margin*2;var fe=q.zoomedHd||q.original,ke=Of(fe)?ye:fe.naturalWidth||ye,ue=Of(fe)?ne:fe.naturalHeight||ne,me=fe.getBoundingClientRect(),ge=me.top,Le=me.left,Ye=me.width,Ke=me.height,ut=Math.min(Math.max(Ye,ke),ye)/Ye,ot=Math.min(Math.max(Ke,ue),ne)/Ke,st=Math.min(ut,ot),Xt=(-Le+(ye-Ye)/2+Y.margin+te.left)/st,$0=(-ge+(ne-Ke)/2+Y.margin+te.top)/st,Jt="scale("+st+") translate3d("+Xt+"px, "+$0+"px, 0)";q.zoomed.style.transform=Jt,q.zoomedHd&&(q.zoomedHd.style.transform=Jt)};return new n(function(Se){if(ae&&F.indexOf(ae)===-1){Se(he);return}var te=function X(){R=!1,q.zoomed.removeEventListener("transitionend",X),q.original.dispatchEvent(Za("medium-zoom:opened",{detail:{zoom:he}})),Se(he)};if(q.zoomed){Se(he);return}if(ae)q.original=ae;else if(F.length>0){var ye=F;q.original=ye[0]}else{Se(he);return}if(q.original.dispatchEvent(Za("medium-zoom:open",{detail:{zoom:he}})),$=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,R=!0,q.zoomed=rb(q.original),document.body.appendChild(pe),Y.template){var ne=Ho(Y.template)?Y.template:document.querySelector(Y.template);q.template=document.createElement("div"),q.template.appendChild(ne.content.cloneNode(!0)),document.body.appendChild(q.template)}if(q.original.parentElement&&q.original.parentElement.tagName==="PICTURE"&&q.original.currentSrc&&(q.zoomed.src=q.original.currentSrc),document.body.appendChild(q.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),q.original.classList.add("medium-zoom-image--hidden"),q.zoomed.classList.add("medium-zoom-image--opened"),q.zoomed.addEventListener("click",C),q.zoomed.addEventListener("transitionend",te),q.original.getAttribute("data-zoom-src")){q.zoomedHd=q.zoomed.cloneNode(),q.zoomedHd.removeAttribute("srcset"),q.zoomedHd.removeAttribute("sizes"),q.zoomedHd.removeAttribute("loading"),q.zoomedHd.src=q.zoomed.getAttribute("data-zoom-src"),q.zoomedHd.onerror=function(){clearInterval(Ne),console.warn("Unable to reach the zoom image target "+q.zoomedHd.src),q.zoomedHd=null,xe()};var Ne=setInterval(function(){q.zoomedHd.complete&&(clearInterval(Ne),q.zoomedHd.classList.add("medium-zoom-image--opened"),q.zoomedHd.addEventListener("click",C),document.body.appendChild(q.zoomedHd),xe())},10)}else if(q.original.hasAttribute("srcset")){q.zoomedHd=q.zoomed.cloneNode(),q.zoomedHd.removeAttribute("sizes"),q.zoomedHd.removeAttribute("loading");var We=q.zoomedHd.addEventListener("load",function(){q.zoomedHd.removeEventListener("load",We),q.zoomedHd.classList.add("medium-zoom-image--opened"),q.zoomedHd.addEventListener("click",C),document.body.appendChild(q.zoomedHd),xe()})}else xe()})},C=function(){return new n(function(be){if(R||!q.original){be(he);return}var ae=function xe(){q.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(q.zoomed),q.zoomedHd&&document.body.removeChild(q.zoomedHd),document.body.removeChild(pe),q.zoomed.classList.remove("medium-zoom-image--opened"),q.template&&document.body.removeChild(q.template),R=!1,q.zoomed.removeEventListener("transitionend",xe),q.original.dispatchEvent(Za("medium-zoom:closed",{detail:{zoom:he}})),q.original=null,q.zoomed=null,q.zoomedHd=null,q.template=null,be(he)};R=!0,document.body.classList.remove("medium-zoom--opened"),q.zoomed.style.transform="",q.zoomedHd&&(q.zoomedHd.style.transform=""),q.template&&(q.template.style.transition="opacity 150ms",q.template.style.opacity=0),q.original.dispatchEvent(Za("medium-zoom:close",{detail:{zoom:he}})),q.zoomed.addEventListener("transitionend",ae)})},B=function(){var be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ae=be.target;return q.original?C():k({target:ae})},_=function(){return Y},T=function(){return F},S=function(){return q.original},F=[],z=[],R=!1,$=0,Y=r,q={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?Y=t:(t||typeof t=="string")&&p(t),Y=ga({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},Y);var pe=tb(Y.background);document.addEventListener("click",i),document.addEventListener("keyup",s),document.addEventListener("scroll",a),window.addEventListener("resize",C);var he={open:k,close:C,toggle:B,update:c,clone:f,attach:p,detach:g,on:m,off:w,getOptions:_,getImages:T,getZoomedImage:S};return he};function ab(e,t){t===void 0&&(t={});var r=t.insertAt;if(!(typeof document>"u")){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",r==="top"&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}var ib=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";ab(ib);const Un={hljs:`${Re}-hljs`,hlcss:`${Re}-hlCss`,mermaidM:`${Re}-mermaid-m`,mermaid:`${Re}-mermaid`,katexjs:`${Re}-katex`,katexcss:`${Re}-katexCss`,echarts:`${Re}-echarts`},ub=(e,{editorId:t,rootRef:r,setting:n})=>{const i=Br.editorExtensions.highlight,a=Br.editorExtensionsAttrs.highlight;d.provide("editorId",t),d.provide("rootRef",r),d.provide("theme",d.computed(()=>e.theme)),d.provide("language",d.computed(()=>e.language)),d.provide("highlight",d.computed(()=>{const{js:c}=i,f={...Dc,...i.css},{js:p,css:g={}}=a||{},m=e.codeStyleReverse&&e.codeStyleReverseList.includes(e.previewTheme)?"dark":e.theme,w=f[e.codeTheme]?f[e.codeTheme][m]:Dc.atom[m],k=f[e.codeTheme]&&g[e.codeTheme]?g[e.codeTheme][m]:g.atom?g.atom[m]:{};return{js:{src:c,...p},css:{href:w,...k}}})),d.provide("showCodeRowNumber",e.showCodeRowNumber);const s=d.computed(()=>{const c={...Df,...Br.editorConfig.languageUserDefined};return xc(Wi(Df["en-US"]),c[e.language]||{})});return d.provide("usedLanguageText",s),d.provide("previewTheme",d.computed(()=>e.previewTheme)),d.provide("customIcon",d.computed(()=>e.customIcon)),d.provide("setting",d.computed(()=>n?{...n}:{preview:!0,htmlPreview:!1,previewOnly:!1,pageFullscreen:!1,fullscreen:!1})),{editorId:t}},ob=e=>{const t=d.useId();return e.id||e.editorId||`${Re}-${t}`},sb=(e,t,r)=>{const n=d.inject("editorId"),i=d.inject("rootRef"),a=d.inject("usedLanguageText"),s=d.inject("setting"),c=()=>{i.value.querySelectorAll(`#${n} .${Re}-preview .${Re}-code`).forEach(g=>{let m=-1;const w=g.querySelector(`.${Re}-copy-button:not([data-processed])`);w&&(w.onclick=k=>{k.preventDefault(),clearTimeout(m);const C=(g.querySelector("input:checked + pre code")||g.querySelector("pre code")).textContent,{text:B,successTips:_,failTips:T}=a.value.copyCode;let S=_;Ff(e.formatCopiedText(C||"")).catch(()=>{S=T}).finally(()=>{w.dataset.isIcon?w.dataset.tips=S:w.innerHTML=S,m=window.setTimeout(()=>{w.dataset.isIcon?w.dataset.tips=B:w.innerHTML=B},1500)})},w.setAttribute("data-processed","true"))})},f=()=>{d.nextTick(c)},p=g=>{g&&d.nextTick(c)};d.watch([t,r],f),d.watch(()=>s.value.preview,p),d.watch(()=>s.value.htmlPreview,p),d.onMounted(c)},lb=e=>{const t=d.inject("editorId"),r=d.inject("theme"),n=d.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:a}=Br;let s=i.echarts.instance;const c=d.shallowRef(-1),f=()=>{!e.noEcharts&&s&&(c.value=c.value+1)};d.watch(()=>r.value,()=>{f()}),d.onMounted(()=>{var B;if(e.noEcharts||s)return;const C=i.echarts.js;jn("script",{...(B=a.echarts)==null?void 0:B.js,src:C,id:Un.echarts,onload(){s=window.echarts,f()}},"echarts")});let p=[],g=[],m=[];const w=(C=!1)=>{if(!p.length){C&&(g.forEach(S=>{var F;(F=S.dispose)==null||F.call(S)}),m.forEach(S=>{var F;(F=S.disconnect)==null||F.call(S)}),g=[],m=[]);return}const B=[],_=[],T=[];p.forEach((S,F)=>{var $,Y;const z=g[F],R=m[F];if(C||!S||!S.isConnected||n!=null&&n.value&&!n.value.contains(S)){($=z==null?void 0:z.dispose)==null||$.call(z),(Y=R==null?void 0:R.disconnect)==null||Y.call(R);return}B.push(S),z&&_.push(z),R&&T.push(R)}),p=B,g=_,m=T},k=()=>{w(),!e.noEcharts&&s&&Array.from(n.value.querySelectorAll(`#${t} div.${Re}-echarts:not([data-processed])`)).forEach(C=>{if(C.dataset.closed==="false")return!1;try{const B=Og.parse(C.innerText),_=s.init(C,r.value);_.setOption(B),C.setAttribute("data-processed",""),p.push(C),g.push(_);const T=new ResizeObserver(()=>{_.resize()});T.observe(C),m.push(T)}catch(B){yr.emit(t,kc,{name:"echarts",message:B==null?void 0:B.message,error:B})}})};return d.onBeforeUnmount(()=>{w(!0)}),{reRenderEcharts:c,replaceEcharts:k}},cb=e=>{const t=d.inject("highlight"),r=d.shallowRef(Br.editorExtensions.highlight.instance);return d.onMounted(()=>{e.noHighlight||r.value||(jn("link",{...t.value.css,rel:"stylesheet",id:Un.hlcss}),jn("script",{...t.value.js,id:Un.hljs,onload(){r.value=window.hljs}},"hljs"))}),d.watch(()=>t.value.css,()=>{e.noHighlight||Br.editorExtensions.highlight.instance||Rg("link",{...t.value.css,rel:"stylesheet",id:Un.hlcss})}),r},db=e=>{const t=d.shallowRef(Br.editorExtensions.katex.instance);return d.onMounted(()=>{var i,a;if(e.noKatex||t.value)return;const{editorExtensions:r,editorExtensionsAttrs:n}=Br;jn("script",{...(i=n.katex)==null?void 0:i.js,src:r.katex.js,id:Un.katexjs,onload(){t.value=window.katex}},"katex"),jn("link",{...(a=n.katex)==null?void 0:a.css,rel:"stylesheet",href:r.katex.css,id:Un.katexcss})}),t},qo=new Jg({max:1e3,ttl:6e5}),fb=e=>{const t=d.inject("editorId"),r=d.inject("theme"),n=d.inject("rootRef"),{editorExtensions:i,editorExtensionsAttrs:a,mermaidConfig:s}=Br;let c=i.mermaid.instance;const f=d.shallowRef(-1),p=()=>{if(!e.noMermaid&&c){const g=r.value==="dark"?{startOnLoad:!1,theme:"dark"}:{startOnLoad:!1,theme:"base",themeVariables:{background:"#ffffff",primaryColor:"#ffffff",primaryTextColor:"#1f2329",primaryBorderColor:"#b7c0cc",secondaryColor:"#f7f8fa",tertiaryColor:"#f7f8fa",lineColor:"#596273",edgeLabelBackground:"#ffffff",clusterBkg:"#ffffff",clusterBorder:"#b7c0cc"}};c.initialize(s(g)),f.value=f.value+1}};return d.watch(()=>r.value,()=>{qo.clear(),p()}),d.onMounted(()=>{var m,w;if(e.noMermaid||c)return;const g=i.mermaid.js;/\.mjs/.test(g)?(jn("link",{...(m=a.mermaid)==null?void 0:m.js,rel:"modulepreload",href:g,id:Un.mermaidM}),import(g).then(k=>{c=k.default,p()}).catch(k=>{yr.emit(t,kc,{name:"mermaid",message:`Failed to load mermaid module: ${k.message}`,error:k})})):jn("script",{...(w=a.mermaid)==null?void 0:w.js,src:g,id:Un.mermaid,onload(){c=window.mermaid,p()}},"mermaid")}),{reRenderRef:f,replaceMermaid:async()=>{if(!e.noMermaid&&c){const g=n.value.querySelectorAll(`div.${Re}-mermaid`),m=document.createElement("div"),w=document.body.offsetWidth>1366?document.body.offsetWidth:1366,k=document.body.offsetHeight>768?document.body.offsetHeight:768;m.style.width=w+"px",m.style.height=k+"px",m.style.position="fixed",m.style.zIndex="-10000",m.style.top="-10000";let C=g.length;C>0&&document.body.appendChild(m),await Promise.allSettled(Array.from(g).map(B=>(async _=>{var F;if(_.dataset.closed==="false")return!1;const T=_.innerText;let S=qo.get(T);if(!S){const z=wc();let R={svg:""};try{R=await c.render(z,T,m),S=await e.sanitizeMermaid(R.svg);const $=document.createElement("p");$.className=`${Re}-mermaid`,$.setAttribute("data-processed",""),$.setAttribute("data-content",T),$.innerHTML=S,(F=$.children[0])==null||F.removeAttribute("height"),qo.set(T,$.innerHTML),_.dataset.line!==void 0&&($.dataset.line=_.dataset.line),_.replaceWith($)}catch($){yr.emit(t,kc,{name:"mermaid",message:$.message,error:$})}--C===0&&m.remove()}})(B)))}}}},hb=(e,t)=>{t=t||{};const r=3,n=t.marker||"!",i=n.charCodeAt(0),a=n.length;let s="",c="";const f=(g,m,w,k,C)=>{const B=g[m];return B.type==="admonition_open"?g[m].attrPush(["class",`${Re}-admonition ${Re}-admonition-${B.info}`]):B.type==="admonition_title_open"&&g[m].attrPush(["class",`${Re}-admonition-title`]),C.renderToken(g,m,w)},p=g=>{const m=g.trim().split(" ",2);c="",s=m[0],m.length>1&&(c=g.substring(s.length+2))};e.block.ruler.before("code","admonition",(g,m,w,k)=>{let C,B,_,T=!1,S=g.bMarks[m]+g.tShift[m],F=g.eMarks[m];if(i!==g.src.charCodeAt(S))return!1;for(C=S+1;C<=F&&n[(C-S)%a]===g.src[C];C++);const z=Math.floor((C-S)/a);if(z!==r)return!1;C-=(C-S)%a;const R=g.src.slice(S,C),$=g.src.slice(C,F);if(p($),k)return!0;for(B=m;B++,!(B>=w||(S=g.bMarks[B]+g.tShift[B],F=g.eMarks[B],S<F&&g.sCount[B]<g.blkIndent));)if(i===g.src.charCodeAt(S)&&!(g.sCount[B]-g.blkIndent>=4)){for(C=S+1;C<=F&&n[(C-S)%a]===g.src[C];C++);if(!(Math.floor((C-S)/a)<z)&&(C-=(C-S)%a,C=g.skipSpaces(C),!(C<F))){T=!0;break}}const Y=g.parentType,q=g.lineMax;return g.parentType="root",g.lineMax=B,_=g.push("admonition_open","div",1),_.markup=R,_.block=!0,_.info=s,_.map=[m,B],c&&(_=g.push("admonition_title_open","p",1),_.markup=R+" "+s,_.map=[m,B],_=g.push("inline","",0),_.content=c,_.map=[m,g.line-1],_.children=[],_=g.push("admonition_title_close","p",-1),_.markup=R+" "+s),g.md.block.tokenize(g,m+1,B),_=g.push("admonition_close","div",-1),_.markup=g.src.slice(S,C),_.block=!0,g.parentType=Y,g.lineMax=q,g.line=B+(T?1:0),!0},{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.admonition_open=f,e.renderer.rules.admonition_title_open=f,e.renderer.rules.admonition_title_close=f,e.renderer.rules.admonition_close=f},_c=(e,t)=>{const r=e.attrs?e.attrs.slice():[];return t.forEach(n=>{const i=e.attrIndex(n[0]);i<0?r.push(n):(r[i]=r[i].slice(),r[i][1]+=` ${n[1]}`)}),r},mb=(e,t)=>{const r=e.renderer.rules.fence,n=e.utils.unescapeAll,i=/\[(\w*)(?::([\w ]*))?\]/,a=/::(open|close)/,s=m=>m.info?n(m.info).trim():"",c=m=>{const w=s(m),[k=null,C=""]=(i.exec(w)||[]).slice(1);return[k,C]},f=m=>{const w=s(m);return w?w.split(/(\s+)/g)[0]:""},p=m=>{const w=m.info.match(a)||[],k=w[1]==="open"||w[1]!=="close"&&t.codeFoldable&&m.content.trim().split(`
|
|
583
583
|
`).length<t.autoFoldThreshold,C=w[1]||t.codeFoldable?"details":"div",B=w[1]||t.codeFoldable?"summary":"div";return{open:k,tagContainer:C,tagHeader:B}},g=(m,w,k,C,B)=>{var ye;if(m[w].hidden)return"";const _=(ye=t.usedLanguageTextRef.value)==null?void 0:ye.copyCode.text,T=t.customIconRef.value.copy||_,S=!!t.customIconRef.value.copy,F=`<span class="${Re}-collapse-tips">${nn("collapse-tips",t.customIconRef.value)}</span>`,[z]=c(m[w]);if(z===null){const{open:ne,tagContainer:Ne,tagHeader:We}=p(m[w]),X=[["class",`${Re}-code`]];ne&&X.push(["open",""]);const Z={attrs:_c(m[w],X)};m[w].info=m[w].info.replace(a,"");const Q=r(m,w,k,C,B);return`
|
|
584
584
|
<${Ne} ${B.renderAttrs(Z)}>
|
|
585
585
|
<${We} class="${Re}-code-head">
|
|
@@ -644,7 +644,7 @@ See: https://github.com/francoischalifour/medium-zoom`)}},tb=function(t){var r=d
|
|
|
644
644
|
`)}))},ae=d.computed(()=>(e.noKatex||!!C.value)&&(e.noHighlight||!!k.value));let xe=-1;return d.watch([d.toRef(e,"modelValue"),ae,B,a],()=>{xe=window.setTimeout(()=>{be()},t?0:r.renderDelay)}),d.watch(()=>m.value.preview,()=>{m.value.preview&&d.nextTick(()=>{_().then(he),S(),yr.emit(i,Cc,w.value)})}),d.watch([Y,T],()=>{ce()}),d.onMounted(ce),d.onMounted(()=>{yr.on(i,{name:Ag,callback(){yr.emit(i,Cc,w.value)}}),yr.on(i,{name:kf,callback:()=>{$.value=`_article-key_${wc()}`,be()}})}),d.onBeforeUnmount(()=>{q(),pe(),clearTimeout(xe)}),{html:Y,key:$}},Ib=(e,t)=>{const r=d.inject("editorId"),n=d.inject("setting"),{noImgZoomIn:i}=e,a=dg(()=>{const s=document.querySelectorAll(`#${r}-preview img:not(.not-zoom):not(.medium-zoom-image)`);s.length!==0&&nb(s,{background:"#00000073"})});d.onMounted(async()=>{!i&&n.value.preview&&await a()}),d.watch([t,()=>n.value.preview],async()=>{!i&&n.value.preview&&await a()})},Vf={checked:{regexp:/- \[x\]/,value:"- [ ]"},unChecked:{regexp:/- \[\s\]/,value:"- [x]"}},Ob=(e,t)=>{const r=d.inject("editorId"),n=d.inject("rootRef");let i=()=>{};const a=()=>{if(!n.value)return!1;const s=n.value.querySelectorAll(".task-list-item.enabled"),c=f=>{var C;f.preventDefault();const p=f.target.checked?"unChecked":"checked",g=(C=f.target.parentElement)==null?void 0:C.dataset.line;if(!g)return;const m=Number(g),w=e.modelValue.split(`
|
|
645
645
|
`),k=w[Number(m)].replace(Vf[p].regexp,Vf[p].value);e.previewOnly?(w[Number(m)]=k,e.onChange(w.join(`
|
|
646
646
|
`))):yr.emit(r,Dg,m+1,k)};s.forEach(f=>{f.addEventListener("click",c)}),i=()=>{s.forEach(f=>{f.removeEventListener("click",c)})}};d.onBeforeUnmount(()=>{i()}),d.watch([t],()=>{i(),d.nextTick(a)},{immediate:!0})},Lb=(e,t,r)=>{const n=d.inject("setting"),i=()=>{d.nextTick(()=>{var s;(s=e.onRemount)==null||s.call(e)})},a=s=>{s&&i()};d.watch([t,r],i),d.watch(()=>n.value.preview,a),d.watch(()=>n.value.htmlPreview,a),d.onMounted(i)},Hf={modelValue:{type:String,default:""},onChange:{type:Function,default:()=>{}},onHtmlChanged:{type:Function,default:()=>{}},onGetCatalog:{type:Function,default:()=>{}},mdHeadingId:{type:Function,default:()=>""},noMermaid:{type:Boolean,default:!1},sanitize:{type:Function,default:e=>e},noKatex:{type:Boolean,default:!1},formatCopiedText:{type:Function,default:e=>e},noHighlight:{type:Boolean,default:!1},previewOnly:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean},sanitizeMermaid:{type:Function},codeFoldable:{type:Boolean},autoFoldThreshold:{type:Number},onRemount:{type:Function},noEcharts:{type:Boolean},previewComponent:{type:[Object,Function],default:void 0}};({...Hf});const qf=e=>{const t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.body.childNodes)},Rb=(e,t)=>e.nodeType!==t.nodeType?!1:e.nodeType===Node.TEXT_NODE||e.nodeType===Node.COMMENT_NODE?e.textContent===t.textContent:e.nodeType===Node.ELEMENT_NODE?e.outerHTML===t.outerHTML:e.isEqualNode?e.isEqualNode(t):!1,Pb=d.defineComponent({name:"UpdateOnDemand",props:{id:{type:String,required:!0},class:{type:[String,Array,Object],required:!0},html:{type:String,required:!0}},setup(e){const t=d.ref(),r=e.html,n=(i,a)=>{if(!t.value)return;const s=t.value,c=Array.from(s.childNodes),f=Math.min(i.length,a.length);let p=-1;for(let m=0;m<f;m++)if(!Rb(i[m],a[m])){p=m;break}if(p===-1)if(a.length>i.length)p=i.length;else if(i.length>a.length)p=a.length;else return;const g=Math.min(p,c.length);for(let m=c.length-1;m>=g;m--)c[m].remove();for(let m=p;m<i.length;m++)s.appendChild(i[m].cloneNode(!0))};return d.watch(()=>e.html,(i,a)=>{const s=qf(i),c=qf(a||"");n(s,c)}),()=>d.createVNode("div",{id:e.id,class:e.class,innerHTML:r,ref:t},null)}}),Vb=d.defineComponent({name:"ContentPreview",props:Hf,setup(e){const t=d.inject("editorId"),r=d.inject("setting"),n=d.inject("previewTheme"),i=d.inject("showCodeRowNumber"),{html:a,key:s}=zb(e,e.previewOnly);sb(e,a,s),Ib(e,a),Ob(e,a),Lb(e,a,s);const c=d.computed(()=>[`${Re}-preview`,`${n==null?void 0:n.value}-theme`,i&&`${Re}-scrn`].filter(Boolean)),f=()=>{const p=`${t}-preview`;return e.previewComponent?d.h(e.previewComponent,{key:s.value,html:a.value,id:p,class:c.value}):d.createVNode(Pb,{key:s.value,html:a.value,id:p,class:c.value},null)};return()=>d.createVNode(d.Fragment,null,[r.value.preview&&(e.previewOnly?f():d.createVNode("div",{id:`${t}-preview-wrapper`,class:`${Re}-preview-wrapper`,key:"content-preview-wrapper"},[f()])),r.value.htmlPreview&&d.createVNode("div",{id:`${t}-html-wrapper`,class:`${Re}-preview-wrapper`,key:"html-preview-wrapper"},[d.createVNode("div",{class:`${Re}-html`},[a.value])])])}}),Hb=({text:e})=>e,jf={modelValue:{type:String,default:""},onChange:{type:Function,default:void 0},theme:{type:String,default:"light"},class:{type:String,default:""},language:{type:String,default:"zh-CN"},onHtmlChanged:{type:Function,default:void 0},onGetCatalog:{type:Function,default:void 0},editorId:{type:String,default:void 0},id:{type:String,default:void 0},showCodeRowNumber:{type:Boolean,default:!0},previewTheme:{type:String,default:"default"},style:{type:Object,default:()=>({})},mdHeadingId:{type:Function,default:Hb},sanitize:{type:Function,default:e=>e},noMermaid:{type:Boolean,default:!1},noKatex:{type:Boolean,default:!1},codeTheme:{type:String,default:"atom"},formatCopiedText:{type:Function,default:e=>e},codeStyleReverse:{type:Boolean,default:!0},codeStyleReverseList:{type:Array,default:["default","mk-cute"]},noHighlight:{type:Boolean,default:!1},noImgZoomIn:{type:Boolean,default:!1},customIcon:{type:Object,default:{}},sanitizeMermaid:{type:Function,default:e=>Promise.resolve(e)},codeFoldable:{type:Boolean,default:!0},autoFoldThreshold:{type:Number,default:30},onRemount:{type:Function,default:void 0},noEcharts:{type:Boolean,default:!1},previewComponent:{type:[Object,Function],default:void 0}};({...jf});const $f=["onHtmlChanged","onGetCatalog","onChange","onRemount","update:modelValue"];[...$f];const qb=(e,t,r)=>{const{editorId:n}=r,i={rerender(){yr.emit(n,kf)}};t.expose(i)},jo=d.defineComponent({name:"MdPreview",props:jf,emits:$f,setup(e,t){const{noKatex:r,noMermaid:n,noHighlight:i}=e,a=d.ref(),s=ob(e);ub(e,{rootRef:a,editorId:s}),qb(e,t,{editorId:s}),d.onBeforeUnmount(()=>{yr.clear(s)});const c=m=>{var w;(w=e.onChange)==null||w.call(e,m),t.emit("onChange",m),t.emit("update:modelValue",m)},f=m=>{var w;(w=e.onHtmlChanged)==null||w.call(e,m),t.emit("onHtmlChanged",m)},p=m=>{var w;(w=e.onGetCatalog)==null||w.call(e,m),t.emit("onGetCatalog",m)},g=()=>{var m;(m=e.onRemount)==null||m.call(e),t.emit("onRemount")};return()=>d.createVNode("div",{id:s,class:[Re,e.class,e.theme==="dark"&&`${Re}-dark`,`${Re}-previewOnly`],style:e.style,ref:a},[d.createVNode(Vb,{modelValue:e.modelValue,onChange:c,onHtmlChanged:f,onGetCatalog:p,mdHeadingId:e.mdHeadingId,noMermaid:n,sanitize:e.sanitize,noKatex:r,formatCopiedText:e.formatCopiedText,noHighlight:i,noImgZoomIn:e.noImgZoomIn,previewOnly:!0,sanitizeMermaid:e.sanitizeMermaid,codeFoldable:e.codeFoldable,autoFoldThreshold:e.autoFoldThreshold,onRemount:g,noEcharts:e.noEcharts,previewComponent:e.previewComponent},null)])}});jo.install=e=>(e.component(jo.name,jo),e);const jb={onClick:{type:Function,default:void 0},language:{type:String,default:void 0},theme:{type:String,default:void 0},disabled:{type:Boolean,default:void 0}},zc=d.defineComponent({name:"NormalFooterToolbar",props:jb,emits:["onClick"],setup(e,t){return()=>{const r=wg({props:e,ctx:t});return d.createVNode("div",{class:[`${Re}-footer-item`,e.disabled&&`${Re}-disabled`],onClick:n=>{var i;e.disabled||((i=e.onClick)==null||i.call(e,n),t.emit("onClick",n))}},[r])}}});zc.install=e=>(e.component(zc.name,zc),e);var Ic={exports:{}},Pt={},Oc={exports:{}},ba={},Uf;function Wf(){if(Uf)return ba;Uf=1;function e(){var a={};return a["align-content"]=!1,a["align-items"]=!1,a["align-self"]=!1,a["alignment-adjust"]=!1,a["alignment-baseline"]=!1,a.all=!1,a["anchor-point"]=!1,a.animation=!1,a["animation-delay"]=!1,a["animation-direction"]=!1,a["animation-duration"]=!1,a["animation-fill-mode"]=!1,a["animation-iteration-count"]=!1,a["animation-name"]=!1,a["animation-play-state"]=!1,a["animation-timing-function"]=!1,a.azimuth=!1,a["backface-visibility"]=!1,a.background=!0,a["background-attachment"]=!0,a["background-clip"]=!0,a["background-color"]=!0,a["background-image"]=!0,a["background-origin"]=!0,a["background-position"]=!0,a["background-repeat"]=!0,a["background-size"]=!0,a["baseline-shift"]=!1,a.binding=!1,a.bleed=!1,a["bookmark-label"]=!1,a["bookmark-level"]=!1,a["bookmark-state"]=!1,a.border=!0,a["border-bottom"]=!0,a["border-bottom-color"]=!0,a["border-bottom-left-radius"]=!0,a["border-bottom-right-radius"]=!0,a["border-bottom-style"]=!0,a["border-bottom-width"]=!0,a["border-collapse"]=!0,a["border-color"]=!0,a["border-image"]=!0,a["border-image-outset"]=!0,a["border-image-repeat"]=!0,a["border-image-slice"]=!0,a["border-image-source"]=!0,a["border-image-width"]=!0,a["border-left"]=!0,a["border-left-color"]=!0,a["border-left-style"]=!0,a["border-left-width"]=!0,a["border-radius"]=!0,a["border-right"]=!0,a["border-right-color"]=!0,a["border-right-style"]=!0,a["border-right-width"]=!0,a["border-spacing"]=!0,a["border-style"]=!0,a["border-top"]=!0,a["border-top-color"]=!0,a["border-top-left-radius"]=!0,a["border-top-right-radius"]=!0,a["border-top-style"]=!0,a["border-top-width"]=!0,a["border-width"]=!0,a.bottom=!1,a["box-decoration-break"]=!0,a["box-shadow"]=!0,a["box-sizing"]=!0,a["box-snap"]=!0,a["box-suppress"]=!0,a["break-after"]=!0,a["break-before"]=!0,a["break-inside"]=!0,a["caption-side"]=!1,a.chains=!1,a.clear=!0,a.clip=!1,a["clip-path"]=!1,a["clip-rule"]=!1,a.color=!0,a["color-interpolation-filters"]=!0,a["column-count"]=!1,a["column-fill"]=!1,a["column-gap"]=!1,a["column-rule"]=!1,a["column-rule-color"]=!1,a["column-rule-style"]=!1,a["column-rule-width"]=!1,a["column-span"]=!1,a["column-width"]=!1,a.columns=!1,a.contain=!1,a.content=!1,a["counter-increment"]=!1,a["counter-reset"]=!1,a["counter-set"]=!1,a.crop=!1,a.cue=!1,a["cue-after"]=!1,a["cue-before"]=!1,a.cursor=!1,a.direction=!1,a.display=!0,a["display-inside"]=!0,a["display-list"]=!0,a["display-outside"]=!0,a["dominant-baseline"]=!1,a.elevation=!1,a["empty-cells"]=!1,a.filter=!1,a.flex=!1,a["flex-basis"]=!1,a["flex-direction"]=!1,a["flex-flow"]=!1,a["flex-grow"]=!1,a["flex-shrink"]=!1,a["flex-wrap"]=!1,a.float=!1,a["float-offset"]=!1,a["flood-color"]=!1,a["flood-opacity"]=!1,a["flow-from"]=!1,a["flow-into"]=!1,a.font=!0,a["font-family"]=!0,a["font-feature-settings"]=!0,a["font-kerning"]=!0,a["font-language-override"]=!0,a["font-size"]=!0,a["font-size-adjust"]=!0,a["font-stretch"]=!0,a["font-style"]=!0,a["font-synthesis"]=!0,a["font-variant"]=!0,a["font-variant-alternates"]=!0,a["font-variant-caps"]=!0,a["font-variant-east-asian"]=!0,a["font-variant-ligatures"]=!0,a["font-variant-numeric"]=!0,a["font-variant-position"]=!0,a["font-weight"]=!0,a.grid=!1,a["grid-area"]=!1,a["grid-auto-columns"]=!1,a["grid-auto-flow"]=!1,a["grid-auto-rows"]=!1,a["grid-column"]=!1,a["grid-column-end"]=!1,a["grid-column-start"]=!1,a["grid-row"]=!1,a["grid-row-end"]=!1,a["grid-row-start"]=!1,a["grid-template"]=!1,a["grid-template-areas"]=!1,a["grid-template-columns"]=!1,a["grid-template-rows"]=!1,a["hanging-punctuation"]=!1,a.height=!0,a.hyphens=!1,a.icon=!1,a["image-orientation"]=!1,a["image-resolution"]=!1,a["ime-mode"]=!1,a["initial-letters"]=!1,a["inline-box-align"]=!1,a["justify-content"]=!1,a["justify-items"]=!1,a["justify-self"]=!1,a.left=!1,a["letter-spacing"]=!0,a["lighting-color"]=!0,a["line-box-contain"]=!1,a["line-break"]=!1,a["line-grid"]=!1,a["line-height"]=!1,a["line-snap"]=!1,a["line-stacking"]=!1,a["line-stacking-ruby"]=!1,a["line-stacking-shift"]=!1,a["line-stacking-strategy"]=!1,a["list-style"]=!0,a["list-style-image"]=!0,a["list-style-position"]=!0,a["list-style-type"]=!0,a.margin=!0,a["margin-bottom"]=!0,a["margin-left"]=!0,a["margin-right"]=!0,a["margin-top"]=!0,a["marker-offset"]=!1,a["marker-side"]=!1,a.marks=!1,a.mask=!1,a["mask-box"]=!1,a["mask-box-outset"]=!1,a["mask-box-repeat"]=!1,a["mask-box-slice"]=!1,a["mask-box-source"]=!1,a["mask-box-width"]=!1,a["mask-clip"]=!1,a["mask-image"]=!1,a["mask-origin"]=!1,a["mask-position"]=!1,a["mask-repeat"]=!1,a["mask-size"]=!1,a["mask-source-type"]=!1,a["mask-type"]=!1,a["max-height"]=!0,a["max-lines"]=!1,a["max-width"]=!0,a["min-height"]=!0,a["min-width"]=!0,a["move-to"]=!1,a["nav-down"]=!1,a["nav-index"]=!1,a["nav-left"]=!1,a["nav-right"]=!1,a["nav-up"]=!1,a["object-fit"]=!1,a["object-position"]=!1,a.opacity=!1,a.order=!1,a.orphans=!1,a.outline=!1,a["outline-color"]=!1,a["outline-offset"]=!1,a["outline-style"]=!1,a["outline-width"]=!1,a.overflow=!1,a["overflow-wrap"]=!1,a["overflow-x"]=!1,a["overflow-y"]=!1,a.padding=!0,a["padding-bottom"]=!0,a["padding-left"]=!0,a["padding-right"]=!0,a["padding-top"]=!0,a.page=!1,a["page-break-after"]=!1,a["page-break-before"]=!1,a["page-break-inside"]=!1,a["page-policy"]=!1,a.pause=!1,a["pause-after"]=!1,a["pause-before"]=!1,a.perspective=!1,a["perspective-origin"]=!1,a.pitch=!1,a["pitch-range"]=!1,a["play-during"]=!1,a.position=!1,a["presentation-level"]=!1,a.quotes=!1,a["region-fragment"]=!1,a.resize=!1,a.rest=!1,a["rest-after"]=!1,a["rest-before"]=!1,a.richness=!1,a.right=!1,a.rotation=!1,a["rotation-point"]=!1,a["ruby-align"]=!1,a["ruby-merge"]=!1,a["ruby-position"]=!1,a["shape-image-threshold"]=!1,a["shape-outside"]=!1,a["shape-margin"]=!1,a.size=!1,a.speak=!1,a["speak-as"]=!1,a["speak-header"]=!1,a["speak-numeral"]=!1,a["speak-punctuation"]=!1,a["speech-rate"]=!1,a.stress=!1,a["string-set"]=!1,a["tab-size"]=!1,a["table-layout"]=!1,a["text-align"]=!0,a["text-align-last"]=!0,a["text-combine-upright"]=!0,a["text-decoration"]=!0,a["text-decoration-color"]=!0,a["text-decoration-line"]=!0,a["text-decoration-skip"]=!0,a["text-decoration-style"]=!0,a["text-emphasis"]=!0,a["text-emphasis-color"]=!0,a["text-emphasis-position"]=!0,a["text-emphasis-style"]=!0,a["text-height"]=!0,a["text-indent"]=!0,a["text-justify"]=!0,a["text-orientation"]=!0,a["text-overflow"]=!0,a["text-shadow"]=!0,a["text-space-collapse"]=!0,a["text-transform"]=!0,a["text-underline-position"]=!0,a["text-wrap"]=!0,a.top=!1,a.transform=!1,a["transform-origin"]=!1,a["transform-style"]=!1,a.transition=!1,a["transition-delay"]=!1,a["transition-duration"]=!1,a["transition-property"]=!1,a["transition-timing-function"]=!1,a["unicode-bidi"]=!1,a["vertical-align"]=!1,a.visibility=!1,a["voice-balance"]=!1,a["voice-duration"]=!1,a["voice-family"]=!1,a["voice-pitch"]=!1,a["voice-range"]=!1,a["voice-rate"]=!1,a["voice-stress"]=!1,a["voice-volume"]=!1,a.volume=!1,a["white-space"]=!1,a.widows=!1,a.width=!0,a["will-change"]=!1,a["word-break"]=!0,a["word-spacing"]=!0,a["word-wrap"]=!0,a["wrap-flow"]=!1,a["wrap-through"]=!1,a["writing-mode"]=!1,a["z-index"]=!1,a}function t(a,s,c){}function r(a,s,c){}var n=/javascript\s*\:/img;function i(a,s){return n.test(s)?"":s}return ba.whiteList=e(),ba.getDefaultWhiteList=e,ba.onAttr=t,ba.onIgnoreAttr=r,ba.safeAttrValue=i,ba}var Gf,Xf;function Yf(){return Xf||(Xf=1,Gf={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}),Gf}var Lc,Zf;function $b(){if(Zf)return Lc;Zf=1;var e=Yf();function t(r,n){r=e.trimRight(r),r[r.length-1]!==";"&&(r+=";");var i=r.length,a=!1,s=0,c=0,f="";function p(){if(!a){var w=e.trim(r.slice(s,c)),k=w.indexOf(":");if(k!==-1){var C=e.trim(w.slice(0,k)),B=e.trim(w.slice(k+1));if(C){var _=n(s,f.length,C,B,w);_&&(f+=_+"; ")}}}s=c+1}for(;c<i;c++){var g=r[c];if(g==="/"&&r[c+1]==="*"){var m=r.indexOf("*/",c+2);if(m===-1)break;c=m+1,s=c+1,a=!1}else g==="("?a=!0:g===")"?a=!1:g===";"?a||p():g===`
|
|
647
|
-
`&&p()}return e.trim(f)}return Lc=t,Lc}var Rc,Kf;function Ub(){if(Kf)return Rc;Kf=1;var e=Wf(),t=$b();Yf();function r(a){return a==null}function n(a){var s={};for(var c in a)s[c]=a[c];return s}function i(a){a=n(a||{}),a.whiteList=a.whiteList||e.whiteList,a.onAttr=a.onAttr||e.onAttr,a.onIgnoreAttr=a.onIgnoreAttr||e.onIgnoreAttr,a.safeAttrValue=a.safeAttrValue||e.safeAttrValue,this.options=a}return i.prototype.process=function(a){if(a=a||"",a=a.toString(),!a)return"";var s=this,c=s.options,f=c.whiteList,p=c.onAttr,g=c.onIgnoreAttr,m=c.safeAttrValue,w=t(a,function(k,C,B,_,T){var S=f[B],F=!1;if(S===!0?F=S:typeof S=="function"?F=S(_):S instanceof RegExp&&(F=S.test(_)),F!==!0&&(F=!1),_=m(B,_),!!_){var z={position:C,sourcePosition:k,source:T,isWhite:F};if(F){var R=p(B,_,z);return r(R)?B+":"+_:R}else{var R=g(B,_,z);if(!r(R))return R}}});return w},Rc=i,Rc}var Qf;function Pc(){return Qf||(Qf=1,function(e,t){var r=Wf(),n=Ub();function i(s,c){var f=new n(c);return f.process(s)}t=e.exports=i,t.FilterCSS=n;for(var a in r)t[a]=r[a];typeof window<"u"&&(window.filterCSS=e.exports)}(Oc,Oc.exports)),Oc.exports}var Jf,eh;function Vc(){return eh||(eh=1,Jf={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,r=t.exec(e);return r?r.index:-1}}),Jf}var th;function rh(){if(th)return Pt;th=1;var e=Pc().FilterCSS,t=Pc().getDefaultWhiteList,r=Vc();function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var i=new e;function a(te,ye,ne){}function s(te,ye,ne){}function c(te,ye,ne){}function f(te,ye,ne){}function p(te){return te.replace(m,"<").replace(w,">")}function g(te,ye,ne,Ne){if(ne=he(ne),ye==="href"||ye==="src"){if(ne=r.trim(ne),ne==="#")return"#";if(!(ne.substr(0,7)==="http://"||ne.substr(0,8)==="https://"||ne.substr(0,7)==="mailto:"||ne.substr(0,4)==="tel:"||ne.substr(0,11)==="data:image/"||ne.substr(0,6)==="ftp://"||ne.substr(0,2)==="./"||ne.substr(0,3)==="../"||ne[0]==="#"||ne[0]==="/"))return""}else if(ye==="background"){if(S.lastIndex=0,S.test(ne))return""}else if(ye==="style"){if(F.lastIndex=0,F.test(ne)||(z.lastIndex=0,z.test(ne)&&(S.lastIndex=0,S.test(ne))))return"";Ne!==!1&&(Ne=Ne||i,ne=Ne.process(ne))}return ne=ce(ne),ne}var m=/</g,w=/>/g,k=/"/g,C=/"/g,B=/&#([a-zA-Z0-9]*);?/gim,_=/:?/gim,T=/&newline;?/gim,S=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,F=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,z=/u\s*r\s*l\s*\(.*/gi;function R(te){return te.replace(k,""")}function $(te){return te.replace(C,'"')}function Y(te){return te.replace(B,function(ye,ne){return ne[0]==="x"||ne[0]==="X"?String.fromCharCode(parseInt(ne.substr(1),16)):String.fromCharCode(parseInt(ne,10))})}function q(te){return te.replace(_,":").replace(T," ")}function pe(te){for(var ye="",ne=0,Ne=te.length;ne<Ne;ne++)ye+=te.charCodeAt(ne)<32?" ":te.charAt(ne);return r.trim(ye)}function he(te){return te=$(te),te=Y(te),te=q(te),te=pe(te),te}function ce(te){return te=R(te),te=p(te),te}function be(){return""}function ae(te,ye){typeof ye!="function"&&(ye=function(){});var ne=!Array.isArray(te);function Ne(Z){return ne?!0:r.indexOf(te,Z)!==-1}var We=[],X=!1;return{onIgnoreTag:function(Z,Q,ue){if(Ne(Z))if(ue.isClosing){var fe="[/removed]",ke=ue.position+fe.length;return We.push([X!==!1?X:ue.position,ke]),X=!1,fe}else return X||(X=ue.position),"[removed]";else return ye(Z,Q,ue)},remove:function(Z){var Q="",ue=0;return r.forEach(We,function(fe){Q+=Z.slice(ue,fe[0]),ue=fe[1]}),Q+=Z.slice(ue),Q}}}function xe(te){for(var ye="",ne=0;ne<te.length;){var Ne=te.indexOf("<!--",ne);if(Ne===-1){ye+=te.slice(ne);break}ye+=te.slice(ne,Ne);var We=te.indexOf("-->",Ne);if(We===-1)break;ne=We+3}return ye}function Se(te){var ye=te.split("");return ye=ye.filter(function(ne){var Ne=ne.charCodeAt(0);return Ne===127?!1:Ne<=31?Ne===10||Ne===13:!0}),ye.join("")}return Pt.whiteList=n(),Pt.getDefaultWhiteList=n,Pt.onTag=a,Pt.onIgnoreTag=s,Pt.onTagAttr=c,Pt.onIgnoreTagAttr=f,Pt.safeAttrValue=g,Pt.escapeHtml=p,Pt.escapeQuote=R,Pt.unescapeQuote=$,Pt.escapeHtmlEntities=Y,Pt.escapeDangerHtml5Entities=q,Pt.clearNonPrintableCharacter=pe,Pt.friendlyAttrValue=he,Pt.escapeAttrValue=ce,Pt.onIgnoreTagStripAll=be,Pt.StripTagBody=ae,Pt.stripCommentTag=xe,Pt.stripBlankChar=Se,Pt.attributeWrapSign='"',Pt.cssFilter=i,Pt.getDefaultCSSWhiteList=t,Pt}var $o={},nh;function ah(){if(nh)return $o;nh=1;var e=Vc();function t(m){var w=e.spaceIndex(m),k;return w===-1?k=m.slice(1,-1):k=m.slice(1,w+1),k=e.trim(k).toLowerCase(),k.slice(0,1)==="/"&&(k=k.slice(1)),k.slice(-1)==="/"&&(k=k.slice(0,-1)),k}function r(m){return m.slice(0,2)==="</"}function n(m,w,k){var C="",B=0,_=!1,T=!1,S=0,F=m.length,z="",R="";e:for(S=0;S<F;S++){var $=m.charAt(S);if(_===!1){if($==="<"){_=S;continue}}else if(T===!1){if($==="<"){C+=k(m.slice(B,S)),_=S,B=S;continue}if($===">"||S===F-1){C+=k(m.slice(B,_)),R=m.slice(_,S+1),z=t(R),C+=w(_,C.length,z,R,r(R)),B=S+1,_=!1;continue}if($==='"'||$==="'")for(var Y=1,q=m.charAt(S-Y);q.trim()===""||q==="=";){if(q==="="){T=$;continue e}q=m.charAt(S-++Y)}}else if($===T){T=!1;continue}}return B<F&&(C+=k(m.substr(B))),C}var i=/[^a-zA-Z0-9\\_:.-]/gim;function a(m,w){var k=0,C=0,B=[],_=!1,T=m.length;function S(Y,q){if(Y=e.trim(Y),Y=Y.replace(i,"").toLowerCase(),!(Y.length<1)){var pe=w(Y,q||"");pe&&B.push(pe)}}for(var F=0;F<T;F++){var z=m.charAt(F),R,$;if(_===!1&&z==="="){_=m.slice(k,F),k=F+1,C=m.charAt(k)==='"'||m.charAt(k)==="'"?k:c(m,F+1);continue}if(_!==!1&&F===C){if($=m.indexOf(z,F+1),$===-1)break;R=e.trim(m.slice(C+1,$)),S(_,R),_=!1,F=$,k=F+1;continue}if(/\s|\n|\t/.test(z))if(m=m.replace(/\s|\n|\t/g," "),_===!1)if($=s(m,F),$===-1){R=e.trim(m.slice(k,F)),S(R),_=!1,k=F+1;continue}else{F=$-1;continue}else if($=f(m,F-1),$===-1){R=e.trim(m.slice(k,F)),R=g(R),S(_,R),_=!1,k=F+1;continue}else continue}return k<m.length&&(_===!1?S(m.slice(k)):S(_,g(e.trim(m.slice(k))))),e.trim(B.join(" "))}function s(m,w){for(;w<m.length;w++){var k=m[w];if(k!==" ")return k==="="?w:-1}}function c(m,w){for(;w<m.length;w++){var k=m[w];if(k!==" ")return k==="'"||k==='"'?w:-1}}function f(m,w){for(;w>0;w--){var k=m[w];if(k!==" ")return k==="="?w:-1}}function p(m){return m[0]==='"'&&m[m.length-1]==='"'||m[0]==="'"&&m[m.length-1]==="'"}function g(m){return p(m)?m.substr(1,m.length-2):m}return $o.parseTag=n,$o.parseAttr=a,$o}var Hc,ih;function Wb(){if(ih)return Hc;ih=1;var e=Pc().FilterCSS,t=rh(),r=ah(),n=r.parseTag,i=r.parseAttr,a=Vc();function s(m){return m==null}function c(m){var w=a.spaceIndex(m);if(w===-1)return{html:"",closing:m[m.length-2]==="/"};m=a.trim(m.slice(w+1,-1));var k=m[m.length-1]==="/";return k&&(m=a.trim(m.slice(0,-1))),{html:m,closing:k}}function f(m){var w={};for(var k in m)w[k]=m[k];return w}function p(m){var w={};for(var k in m)Array.isArray(m[k])?w[k.toLowerCase()]=m[k].map(function(C){return C.toLowerCase()}):w[k.toLowerCase()]=m[k];return w}function g(m){m=f(m||{}),m.stripIgnoreTag&&(m.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),m.onIgnoreTag=t.onIgnoreTagStripAll),m.whiteList||m.allowList?m.whiteList=p(m.whiteList||m.allowList):m.whiteList=t.whiteList,this.attributeWrapSign=m.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,m.onTag=m.onTag||t.onTag,m.onTagAttr=m.onTagAttr||t.onTagAttr,m.onIgnoreTag=m.onIgnoreTag||t.onIgnoreTag,m.onIgnoreTagAttr=m.onIgnoreTagAttr||t.onIgnoreTagAttr,m.safeAttrValue=m.safeAttrValue||t.safeAttrValue,m.escapeHtml=m.escapeHtml||t.escapeHtml,this.options=m,m.css===!1?this.cssFilter=!1:(m.css=m.css||{},this.cssFilter=new e(m.css))}return g.prototype.process=function(m){if(m=m||"",m=m.toString(),!m)return"";var w=this,k=w.options,C=k.whiteList,B=k.onTag,_=k.onIgnoreTag,T=k.onTagAttr,S=k.onIgnoreTagAttr,F=k.safeAttrValue,z=k.escapeHtml,R=w.attributeWrapSign,$=w.cssFilter;k.stripBlankChar&&(m=t.stripBlankChar(m)),k.allowCommentTag||(m=t.stripCommentTag(m));var Y=!1;k.stripIgnoreTagBody&&(Y=t.StripTagBody(k.stripIgnoreTagBody,_),_=Y.onIgnoreTag);var q=n(m,function(pe,he,ce,be,ae){var xe={sourcePosition:pe,position:he,isClosing:ae,isWhite:Object.prototype.hasOwnProperty.call(C,ce)},Se=B(ce,be,xe);if(!s(Se))return Se;if(xe.isWhite){if(xe.isClosing)return"</"+ce+">";var te=c(be),ye=C[ce],ne=i(te.html,function(Ne,We){var X=a.indexOf(ye,Ne)!==-1,Z=T(ce,Ne,We,X);return s(Z)?X?(We=F(ce,Ne,We,$),We?Ne+"="+R+We+R:Ne):(Z=S(ce,Ne,We,X),s(Z)?void 0:Z):Z});return be="<"+ce,ne&&(be+=" "+ne),te.closing&&(be+=" /"),be+=">",be}else return Se=_(ce,be,xe),s(Se)?z(be):Se},z);return Y&&(q=Y.remove(q)),q},Hc=g,Hc}var uh;function Gb(){return uh||(uh=1,function(e,t){var r=rh(),n=ah(),i=Wb();function a(c,f){var p=new i(f);return p.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in r)t[c]=r[c];for(var f in n)t[f]=n[f]}(),typeof window<"u"&&(window.filterXSS=e.exports);function s(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=e.exports)}(Ic,Ic.exports)),Ic.exports}Gb();const ya=d.defineComponent({name:"FMarkdownPreview",props:xf,setup(e){return()=>d.createVNode("div",{class:"f-markdown-preview-container"},[d.createVNode(jo,{modelValue:e.content},null)])}});ya.install=e=>{e.component(ya.name,ya)};const qc="farris-x-preview-bridge",jc=1,$c="assistant.message";function oh(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function sh(e){return e!==null&&typeof e=="object"}function lh(e){if(!sh(e)||e.source!==qc||e.v!==jc||e.type!==$c)return!1;const t=e.payload;return!(!sh(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function Xb(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function ch(e,t,r){const n=oh(r);try{return e.postMessage({source:qc,v:jc,type:$c,payload:n},t),!0}catch{return!1}}function dh(e){const t=e.allowTopAsSource!==!1,r=n=>{var i;Xb(n,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(n.origin)||lh(n.data)&&((i=e.onAssistantMessage)==null||i.call(e,n.data.payload)))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}const Yb="/platform/common/web/renderer/index.html#/preview",Zb="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",Kb="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",Qb="67441dbb-0219-46f2-b247-51555c317995";function fh(e){if(e.url)return e.url;const t=e.baseUri??Yb,r=e.metadataPath??Zb,n=e.projectPath??Kb,i=e.baseMetadataId??Qb;return`${t}?metadataPath=${encodeURIComponent(r)}&projectPath=${encodeURIComponent(n)}&baseMetadataId=${encodeURIComponent(i)}`}function Jb(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=fh(e),r=new URL(t,window.location.href).origin;return r==="null"||r===""?window.location.origin:r}catch{return null}}const Yi=d.defineComponent({name:"ChatPreview",props:wf,setup(e,{expose:t}){const r=d.ref(null),n=d.ref(null),i=d.ref(!1),a=d.ref(!1),s=d.computed(()=>fh(e.previewConfig??{})),c=d.computed(()=>{var te;return((te=e.previewConfig)==null?void 0:te.contentType)==="markdown"}),f=d.computed(()=>{var te;return Object.keys(((te=e.previewConfig)==null?void 0:te.contentMap)??{})}),p=d.computed(()=>f.value.filter(te=>te).length>0),g=d.ref(),m=d.ref(),w=d.ref(!1);let k=null;d.onBeforeUnmount(()=>{k==null||k(),k=null,be()}),d.watch(()=>[s.value,r.value,c.value],()=>{if(k==null||k(),k=null,c.value)return;const te=r.value;if(!te)return;w.value=!1,i.value=!1,a.value=!1;const ye=Date.now(),ne=200,Ne=300,We=1e4;let X=!1,Z=null,Q=null;Q=window.setTimeout(()=>{Q=null,X||(a.value=!0)},ne);const ue=()=>{if(X)return;if(X=!0,Z&&(window.clearTimeout(Z),Z=null),Q&&(window.clearTimeout(Q),Q=null),w.value=!0,ae(te),a.value){const ie=Date.now()-ye,me=Math.max(0,Ne-ie);setTimeout(()=>{i.value=!0},me)}else i.value=!0;const ke=()=>{var ie;return(ie=e.onIframeLoad)==null?void 0:ie.call(e)};ke(),window.setTimeout(ke,0),window.setTimeout(ke,120)},fe=()=>{var ke;X||(X=!0,Q&&(window.clearTimeout(Q),Q=null),console.warn("ChatPreview: iframe load timeout"),w.value=!0,i.value=!0,(ke=e.onIframeLoad)==null||ke.call(e))};te.addEventListener("load",ue,{once:!0}),Z=window.setTimeout(fe,We),k=()=>{te.removeEventListener("load",ue),Z&&(window.clearTimeout(Z),Z=null),Q&&(window.clearTimeout(Q),Q=null)}},{flush:"post"}),d.watch([c,()=>{var te;return(te=e.previewConfig)==null?void 0:te.contentMap}],()=>{be(),c.value&&d.nextTick(()=>ce())},{flush:"post"}),d.watch(()=>{var te;return(te=e.previewConfig)==null?void 0:te.contentMap},te=>{if(te){const ye=Object.keys(te);g.value=ye[0]??""}else g.value="";C()},{immediate:!0});function C(te){var ye,ne;te&&(g.value=te),p.value&&g.value?m.value=((ne=(ye=e.previewConfig)==null?void 0:ye.contentMap)==null?void 0:ne[g.value])||"":m.value=""}function B(te){var Ne;if(c.value||!w.value)return!1;const ye=(Ne=r.value)==null?void 0:Ne.contentWindow;if(!ye)return!1;const ne=Jb(e.previewConfig??{});return ne?ch(ye,ne,te):!1}t({postAssistantPayload:B});const _=d.ref(!1);let T=null;const S=800;function F(){_.value=!0,he(!0),T!=null&&(window.clearTimeout(T),T=null)}function z(){T!=null&&window.clearTimeout(T),T=window.setTimeout(()=>{_.value=!1,he(!1),T=null},S)}function R(){F(),z()}function $(){F()}function Y(){z()}let q=[];function pe(){const te=n.value;if(!te)return[];const ye=[],ne=te.querySelectorAll(".f-markdown-preview-container");return ne.length>0&&ne.forEach(Ne=>ye.push(Ne)),ye.length===0&&te.scrollHeight>te.clientHeight&&ye.push(te),ye}function he(te){const ye=n.value;ye&&ye.querySelectorAll(".f-markdown-preview-container").forEach(ne=>{ne.classList.toggle("f-chat-preview-scrollbar-visible",te)})}function ce(){const te=pe();q=te,te.forEach(ye=>{ye.addEventListener("scroll",R,{passive:!0}),ye.addEventListener("mouseenter",$),ye.addEventListener("mouseleave",Y)})}function be(){q.forEach(te=>{te.removeEventListener("scroll",R),te.removeEventListener("mouseenter",$),te.removeEventListener("mouseleave",Y)}),q=[]}function ae(te){try{const ye=te.contentDocument;if(!ye)return;const ne="f-chat-preview-injected-scrollbar-style";if(ye.getElementById(ne))return;const Ne=ye.createElement("style");Ne.id=ne,Ne.textContent=`
|
|
647
|
+
`&&p()}return e.trim(f)}return Lc=t,Lc}var Rc,Kf;function Ub(){if(Kf)return Rc;Kf=1;var e=Wf(),t=$b();Yf();function r(a){return a==null}function n(a){var s={};for(var c in a)s[c]=a[c];return s}function i(a){a=n(a||{}),a.whiteList=a.whiteList||e.whiteList,a.onAttr=a.onAttr||e.onAttr,a.onIgnoreAttr=a.onIgnoreAttr||e.onIgnoreAttr,a.safeAttrValue=a.safeAttrValue||e.safeAttrValue,this.options=a}return i.prototype.process=function(a){if(a=a||"",a=a.toString(),!a)return"";var s=this,c=s.options,f=c.whiteList,p=c.onAttr,g=c.onIgnoreAttr,m=c.safeAttrValue,w=t(a,function(k,C,B,_,T){var S=f[B],F=!1;if(S===!0?F=S:typeof S=="function"?F=S(_):S instanceof RegExp&&(F=S.test(_)),F!==!0&&(F=!1),_=m(B,_),!!_){var z={position:C,sourcePosition:k,source:T,isWhite:F};if(F){var R=p(B,_,z);return r(R)?B+":"+_:R}else{var R=g(B,_,z);if(!r(R))return R}}});return w},Rc=i,Rc}var Qf;function Pc(){return Qf||(Qf=1,function(e,t){var r=Wf(),n=Ub();function i(s,c){var f=new n(c);return f.process(s)}t=e.exports=i,t.FilterCSS=n;for(var a in r)t[a]=r[a];typeof window<"u"&&(window.filterCSS=e.exports)}(Oc,Oc.exports)),Oc.exports}var Jf,eh;function Vc(){return eh||(eh=1,Jf={indexOf:function(e,t){var r,n;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var n,i;if(Array.prototype.forEach)return e.forEach(t,r);for(n=0,i=e.length;n<i;n++)t.call(r,e[n],n,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,r=t.exec(e);return r?r.index:-1}}),Jf}var th;function rh(){if(th)return Pt;th=1;var e=Pc().FilterCSS,t=Pc().getDefaultWhiteList,r=Vc();function n(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var i=new e;function a(te,ye,ne){}function s(te,ye,ne){}function c(te,ye,ne){}function f(te,ye,ne){}function p(te){return te.replace(m,"<").replace(w,">")}function g(te,ye,ne,Ne){if(ne=he(ne),ye==="href"||ye==="src"){if(ne=r.trim(ne),ne==="#")return"#";if(!(ne.substr(0,7)==="http://"||ne.substr(0,8)==="https://"||ne.substr(0,7)==="mailto:"||ne.substr(0,4)==="tel:"||ne.substr(0,11)==="data:image/"||ne.substr(0,6)==="ftp://"||ne.substr(0,2)==="./"||ne.substr(0,3)==="../"||ne[0]==="#"||ne[0]==="/"))return""}else if(ye==="background"){if(S.lastIndex=0,S.test(ne))return""}else if(ye==="style"){if(F.lastIndex=0,F.test(ne)||(z.lastIndex=0,z.test(ne)&&(S.lastIndex=0,S.test(ne))))return"";Ne!==!1&&(Ne=Ne||i,ne=Ne.process(ne))}return ne=ce(ne),ne}var m=/</g,w=/>/g,k=/"/g,C=/"/g,B=/&#([a-zA-Z0-9]*);?/gim,_=/:?/gim,T=/&newline;?/gim,S=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,F=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,z=/u\s*r\s*l\s*\(.*/gi;function R(te){return te.replace(k,""")}function $(te){return te.replace(C,'"')}function Y(te){return te.replace(B,function(ye,ne){return ne[0]==="x"||ne[0]==="X"?String.fromCharCode(parseInt(ne.substr(1),16)):String.fromCharCode(parseInt(ne,10))})}function q(te){return te.replace(_,":").replace(T," ")}function pe(te){for(var ye="",ne=0,Ne=te.length;ne<Ne;ne++)ye+=te.charCodeAt(ne)<32?" ":te.charAt(ne);return r.trim(ye)}function he(te){return te=$(te),te=Y(te),te=q(te),te=pe(te),te}function ce(te){return te=R(te),te=p(te),te}function be(){return""}function ae(te,ye){typeof ye!="function"&&(ye=function(){});var ne=!Array.isArray(te);function Ne(Z){return ne?!0:r.indexOf(te,Z)!==-1}var We=[],X=!1;return{onIgnoreTag:function(Z,Q,ie){if(Ne(Z))if(ie.isClosing){var fe="[/removed]",ke=ie.position+fe.length;return We.push([X!==!1?X:ie.position,ke]),X=!1,fe}else return X||(X=ie.position),"[removed]";else return ye(Z,Q,ie)},remove:function(Z){var Q="",ie=0;return r.forEach(We,function(fe){Q+=Z.slice(ie,fe[0]),ie=fe[1]}),Q+=Z.slice(ie),Q}}}function xe(te){for(var ye="",ne=0;ne<te.length;){var Ne=te.indexOf("<!--",ne);if(Ne===-1){ye+=te.slice(ne);break}ye+=te.slice(ne,Ne);var We=te.indexOf("-->",Ne);if(We===-1)break;ne=We+3}return ye}function Se(te){var ye=te.split("");return ye=ye.filter(function(ne){var Ne=ne.charCodeAt(0);return Ne===127?!1:Ne<=31?Ne===10||Ne===13:!0}),ye.join("")}return Pt.whiteList=n(),Pt.getDefaultWhiteList=n,Pt.onTag=a,Pt.onIgnoreTag=s,Pt.onTagAttr=c,Pt.onIgnoreTagAttr=f,Pt.safeAttrValue=g,Pt.escapeHtml=p,Pt.escapeQuote=R,Pt.unescapeQuote=$,Pt.escapeHtmlEntities=Y,Pt.escapeDangerHtml5Entities=q,Pt.clearNonPrintableCharacter=pe,Pt.friendlyAttrValue=he,Pt.escapeAttrValue=ce,Pt.onIgnoreTagStripAll=be,Pt.StripTagBody=ae,Pt.stripCommentTag=xe,Pt.stripBlankChar=Se,Pt.attributeWrapSign='"',Pt.cssFilter=i,Pt.getDefaultCSSWhiteList=t,Pt}var $o={},nh;function ah(){if(nh)return $o;nh=1;var e=Vc();function t(m){var w=e.spaceIndex(m),k;return w===-1?k=m.slice(1,-1):k=m.slice(1,w+1),k=e.trim(k).toLowerCase(),k.slice(0,1)==="/"&&(k=k.slice(1)),k.slice(-1)==="/"&&(k=k.slice(0,-1)),k}function r(m){return m.slice(0,2)==="</"}function n(m,w,k){var C="",B=0,_=!1,T=!1,S=0,F=m.length,z="",R="";e:for(S=0;S<F;S++){var $=m.charAt(S);if(_===!1){if($==="<"){_=S;continue}}else if(T===!1){if($==="<"){C+=k(m.slice(B,S)),_=S,B=S;continue}if($===">"||S===F-1){C+=k(m.slice(B,_)),R=m.slice(_,S+1),z=t(R),C+=w(_,C.length,z,R,r(R)),B=S+1,_=!1;continue}if($==='"'||$==="'")for(var Y=1,q=m.charAt(S-Y);q.trim()===""||q==="=";){if(q==="="){T=$;continue e}q=m.charAt(S-++Y)}}else if($===T){T=!1;continue}}return B<F&&(C+=k(m.substr(B))),C}var i=/[^a-zA-Z0-9\\_:.-]/gim;function a(m,w){var k=0,C=0,B=[],_=!1,T=m.length;function S(Y,q){if(Y=e.trim(Y),Y=Y.replace(i,"").toLowerCase(),!(Y.length<1)){var pe=w(Y,q||"");pe&&B.push(pe)}}for(var F=0;F<T;F++){var z=m.charAt(F),R,$;if(_===!1&&z==="="){_=m.slice(k,F),k=F+1,C=m.charAt(k)==='"'||m.charAt(k)==="'"?k:c(m,F+1);continue}if(_!==!1&&F===C){if($=m.indexOf(z,F+1),$===-1)break;R=e.trim(m.slice(C+1,$)),S(_,R),_=!1,F=$,k=F+1;continue}if(/\s|\n|\t/.test(z))if(m=m.replace(/\s|\n|\t/g," "),_===!1)if($=s(m,F),$===-1){R=e.trim(m.slice(k,F)),S(R),_=!1,k=F+1;continue}else{F=$-1;continue}else if($=f(m,F-1),$===-1){R=e.trim(m.slice(k,F)),R=g(R),S(_,R),_=!1,k=F+1;continue}else continue}return k<m.length&&(_===!1?S(m.slice(k)):S(_,g(e.trim(m.slice(k))))),e.trim(B.join(" "))}function s(m,w){for(;w<m.length;w++){var k=m[w];if(k!==" ")return k==="="?w:-1}}function c(m,w){for(;w<m.length;w++){var k=m[w];if(k!==" ")return k==="'"||k==='"'?w:-1}}function f(m,w){for(;w>0;w--){var k=m[w];if(k!==" ")return k==="="?w:-1}}function p(m){return m[0]==='"'&&m[m.length-1]==='"'||m[0]==="'"&&m[m.length-1]==="'"}function g(m){return p(m)?m.substr(1,m.length-2):m}return $o.parseTag=n,$o.parseAttr=a,$o}var Hc,ih;function Wb(){if(ih)return Hc;ih=1;var e=Pc().FilterCSS,t=rh(),r=ah(),n=r.parseTag,i=r.parseAttr,a=Vc();function s(m){return m==null}function c(m){var w=a.spaceIndex(m);if(w===-1)return{html:"",closing:m[m.length-2]==="/"};m=a.trim(m.slice(w+1,-1));var k=m[m.length-1]==="/";return k&&(m=a.trim(m.slice(0,-1))),{html:m,closing:k}}function f(m){var w={};for(var k in m)w[k]=m[k];return w}function p(m){var w={};for(var k in m)Array.isArray(m[k])?w[k.toLowerCase()]=m[k].map(function(C){return C.toLowerCase()}):w[k.toLowerCase()]=m[k];return w}function g(m){m=f(m||{}),m.stripIgnoreTag&&(m.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),m.onIgnoreTag=t.onIgnoreTagStripAll),m.whiteList||m.allowList?m.whiteList=p(m.whiteList||m.allowList):m.whiteList=t.whiteList,this.attributeWrapSign=m.singleQuotedAttributeValue===!0?"'":t.attributeWrapSign,m.onTag=m.onTag||t.onTag,m.onTagAttr=m.onTagAttr||t.onTagAttr,m.onIgnoreTag=m.onIgnoreTag||t.onIgnoreTag,m.onIgnoreTagAttr=m.onIgnoreTagAttr||t.onIgnoreTagAttr,m.safeAttrValue=m.safeAttrValue||t.safeAttrValue,m.escapeHtml=m.escapeHtml||t.escapeHtml,this.options=m,m.css===!1?this.cssFilter=!1:(m.css=m.css||{},this.cssFilter=new e(m.css))}return g.prototype.process=function(m){if(m=m||"",m=m.toString(),!m)return"";var w=this,k=w.options,C=k.whiteList,B=k.onTag,_=k.onIgnoreTag,T=k.onTagAttr,S=k.onIgnoreTagAttr,F=k.safeAttrValue,z=k.escapeHtml,R=w.attributeWrapSign,$=w.cssFilter;k.stripBlankChar&&(m=t.stripBlankChar(m)),k.allowCommentTag||(m=t.stripCommentTag(m));var Y=!1;k.stripIgnoreTagBody&&(Y=t.StripTagBody(k.stripIgnoreTagBody,_),_=Y.onIgnoreTag);var q=n(m,function(pe,he,ce,be,ae){var xe={sourcePosition:pe,position:he,isClosing:ae,isWhite:Object.prototype.hasOwnProperty.call(C,ce)},Se=B(ce,be,xe);if(!s(Se))return Se;if(xe.isWhite){if(xe.isClosing)return"</"+ce+">";var te=c(be),ye=C[ce],ne=i(te.html,function(Ne,We){var X=a.indexOf(ye,Ne)!==-1,Z=T(ce,Ne,We,X);return s(Z)?X?(We=F(ce,Ne,We,$),We?Ne+"="+R+We+R:Ne):(Z=S(ce,Ne,We,X),s(Z)?void 0:Z):Z});return be="<"+ce,ne&&(be+=" "+ne),te.closing&&(be+=" /"),be+=">",be}else return Se=_(ce,be,xe),s(Se)?z(be):Se},z);return Y&&(q=Y.remove(q)),q},Hc=g,Hc}var uh;function Gb(){return uh||(uh=1,function(e,t){var r=rh(),n=ah(),i=Wb();function a(c,f){var p=new i(f);return p.process(c)}t=e.exports=a,t.filterXSS=a,t.FilterXSS=i,function(){for(var c in r)t[c]=r[c];for(var f in n)t[f]=n[f]}(),typeof window<"u"&&(window.filterXSS=e.exports);function s(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=e.exports)}(Ic,Ic.exports)),Ic.exports}Gb();const ya=d.defineComponent({name:"FMarkdownPreview",props:xf,setup(e){return()=>d.createVNode("div",{class:"f-markdown-preview-container"},[d.createVNode(jo,{modelValue:e.content},null)])}});ya.install=e=>{e.component(ya.name,ya)};const qc="farris-x-preview-bridge",jc=1,$c="assistant.message";function oh(e){try{return JSON.parse(JSON.stringify(e))}catch{return{...e,content:e.content}}}function sh(e){return e!==null&&typeof e=="object"}function lh(e){if(!sh(e)||e.source!==qc||e.v!==jc||e.type!==$c)return!1;const t=e.payload;return!(!sh(t)||typeof t.messageId!="string"||t.messageId.length===0||t.role!=="user"&&t.role!=="assistant")}function Xb(e,t){return!!(e.source===window.parent||t&&e.source===window.top||e.source===window)}function ch(e,t,r){const n=oh(r);try{return e.postMessage({source:qc,v:jc,type:$c,payload:n},t),!0}catch{return!1}}function dh(e){const t=e.allowTopAsSource!==!1,r=n=>{var i;Xb(n,t)&&(e.allowedParentOrigins&&e.allowedParentOrigins.length>0&&!e.allowedParentOrigins.includes(n.origin)||lh(n.data)&&((i=e.onAssistantMessage)==null||i.call(e,n.data.payload)))};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)}const Yb="/platform/common/web/renderer/index.html#/preview",Zb="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components/Contacts.frm",Kb="Cases/ApplicationTemplates/Contacts/bo-contacts-front/metadata/components",Qb="67441dbb-0219-46f2-b247-51555c317995";function fh(e){if(e.url)return e.url;const t=e.baseUri??Yb,r=e.metadataPath??Zb,n=e.projectPath??Kb,i=e.baseMetadataId??Qb;return`${t}?metadataPath=${encodeURIComponent(r)}&projectPath=${encodeURIComponent(n)}&baseMetadataId=${encodeURIComponent(i)}`}function Jb(e){if(typeof window>"u")return null;if(e.postMessageTargetOrigin)return e.postMessageTargetOrigin;try{const t=fh(e),r=new URL(t,window.location.href).origin;return r==="null"||r===""?window.location.origin:r}catch{return null}}const Yi=d.defineComponent({name:"ChatPreview",props:wf,setup(e,{expose:t}){const r=d.ref(null),n=d.ref(null),i=d.ref(!1),a=d.ref(!1),s=d.computed(()=>fh(e.previewConfig??{})),c=d.computed(()=>{var te;return((te=e.previewConfig)==null?void 0:te.contentType)==="markdown"}),f=d.computed(()=>{var te;return Object.keys(((te=e.previewConfig)==null?void 0:te.contentMap)??{})}),p=d.computed(()=>f.value.filter(te=>te).length>0),g=d.ref(),m=d.ref(),w=d.ref(!1);let k=null;d.onBeforeUnmount(()=>{k==null||k(),k=null,be()}),d.watch(()=>[s.value,r.value,c.value],()=>{if(k==null||k(),k=null,c.value)return;const te=r.value;if(!te)return;w.value=!1,i.value=!1,a.value=!1;const ye=Date.now(),ne=200,Ne=300,We=1e4;let X=!1,Z=null,Q=null;Q=window.setTimeout(()=>{Q=null,X||(a.value=!0)},ne);const ie=()=>{if(X)return;if(X=!0,Z&&(window.clearTimeout(Z),Z=null),Q&&(window.clearTimeout(Q),Q=null),w.value=!0,ae(te),a.value){const ue=Date.now()-ye,me=Math.max(0,Ne-ue);setTimeout(()=>{i.value=!0},me)}else i.value=!0;const ke=()=>{var ue;return(ue=e.onIframeLoad)==null?void 0:ue.call(e)};ke(),window.setTimeout(ke,0),window.setTimeout(ke,120)},fe=()=>{var ke;X||(X=!0,Q&&(window.clearTimeout(Q),Q=null),console.warn("ChatPreview: iframe load timeout"),w.value=!0,i.value=!0,(ke=e.onIframeLoad)==null||ke.call(e))};te.addEventListener("load",ie,{once:!0}),Z=window.setTimeout(fe,We),k=()=>{te.removeEventListener("load",ie),Z&&(window.clearTimeout(Z),Z=null),Q&&(window.clearTimeout(Q),Q=null)}},{flush:"post"}),d.watch([c,()=>{var te;return(te=e.previewConfig)==null?void 0:te.contentMap}],()=>{be(),c.value&&d.nextTick(()=>ce())},{flush:"post"}),d.watch(()=>{var te;return(te=e.previewConfig)==null?void 0:te.contentMap},te=>{if(te){const ye=Object.keys(te);g.value=ye[0]??""}else g.value="";C()},{immediate:!0});function C(te){var ye,ne;te&&(g.value=te),p.value&&g.value?m.value=((ne=(ye=e.previewConfig)==null?void 0:ye.contentMap)==null?void 0:ne[g.value])||"":m.value=""}function B(te){var Ne;if(c.value||!w.value)return!1;const ye=(Ne=r.value)==null?void 0:Ne.contentWindow;if(!ye)return!1;const ne=Jb(e.previewConfig??{});return ne?ch(ye,ne,te):!1}t({postAssistantPayload:B});const _=d.ref(!1);let T=null;const S=800;function F(){_.value=!0,he(!0),T!=null&&(window.clearTimeout(T),T=null)}function z(){T!=null&&window.clearTimeout(T),T=window.setTimeout(()=>{_.value=!1,he(!1),T=null},S)}function R(){F(),z()}function $(){F()}function Y(){z()}let q=[];function pe(){const te=n.value;if(!te)return[];const ye=[],ne=te.querySelectorAll(".f-markdown-preview-container");return ne.length>0&&ne.forEach(Ne=>ye.push(Ne)),ye.length===0&&te.scrollHeight>te.clientHeight&&ye.push(te),ye}function he(te){const ye=n.value;ye&&ye.querySelectorAll(".f-markdown-preview-container").forEach(ne=>{ne.classList.toggle("f-chat-preview-scrollbar-visible",te)})}function ce(){const te=pe();q=te,te.forEach(ye=>{ye.addEventListener("scroll",R,{passive:!0}),ye.addEventListener("mouseenter",$),ye.addEventListener("mouseleave",Y)})}function be(){q.forEach(te=>{te.removeEventListener("scroll",R),te.removeEventListener("mouseenter",$),te.removeEventListener("mouseleave",Y)}),q=[]}function ae(te){try{const ye=te.contentDocument;if(!ye)return;const ne="f-chat-preview-injected-scrollbar-style";if(ye.getElementById(ne))return;const Ne=ye.createElement("style");Ne.id=ne,Ne.textContent=`
|
|
648
648
|
html, body {
|
|
649
649
|
scrollbar-width: thin;
|
|
650
650
|
scrollbar-color: transparent transparent;
|
|
@@ -703,4 +703,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
703
703
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
704
704
|
`},wh=Ly(Hy)(vh),qy={config:Py},jy=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return function(i){return r.reduceRight(function(a,s){return s(a)},i)}};function xh(e,t){return Object.keys(t).forEach(function(r){t[r]instanceof Object&&e[r]&&Object.assign(t[r],xh(e[r],t[r]))}),gh(gh({},e),t)}var $y={type:"cancelation",msg:"operation is manually canceled"};function Wc(e){var t=!1,r=new Promise(function(n,i){e.then(function(a){return t?i($y):n(a)}),e.catch(i)});return r.cancel=function(){return t=!0},r}var Uy=["monaco"],Wy=Iy.create({config:Oy,isInitialized:!1,resolve:null,reject:null,monaco:null}),Ah=by(Wy,2),eu=Ah[0],Xo=Ah[1];function Gy(e){var t=qy.config(e),r=t.monaco,n=py(t,Uy);Xo(function(i){return{config:xh(i.config,n),monaco:r}})}function Xy(){var e=eu(function(t){var r=t.monaco,n=t.isInitialized,i=t.resolve;return{monaco:r,isInitialized:n,resolve:i}});if(!e.isInitialized){if(Xo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Wc(Gc);if(window.monaco&&window.monaco.editor)return Dh(window.monaco),e.resolve(window.monaco),Wc(Gc);jy(Yy,Ky)(Qy)}return Wc(Gc)}function Yy(e){return document.body.appendChild(e)}function Zy(e){var t=document.createElement("script");return e&&(t.src=e),t}function Ky(e){var t=eu(function(n){var i=n.config,a=n.reject;return{config:i,reject:a}}),r=Zy("".concat(t.config.paths.vs,"/loader.js"));return r.onload=function(){return e()},r.onerror=t.reject,r}function Qy(){var e=eu(function(r){var n=r.config,i=r.resolve,a=r.reject;return{config:n,resolve:i,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(r){var n=r.m||r;Dh(n),e.resolve(n)},function(r){e.reject(r)})}function Dh(e){eu().monaco||Xo({monaco:e})}function Jy(){return eu(function(e){var t=e.monaco;return t})}var Gc=new Promise(function(e,t){return Xo({resolve:e,reject:t})}),ev={config:Gy,init:Xy,__getMonacoInstance:Jy};const kh={content:{type:Object,required:!0}},Ch=20,tv=16,Qa=180;function rv(e){typeof requestIdleCallback<"u"?requestIdleCallback(e,{timeout:500}):setTimeout(e,0)}const tu=d.defineComponent({name:"FXCodingMessage",props:kh,setup(e){const t=d.ref(!0),r=d.ref(!1),n=d.ref(null),i=d.ref(null),a=d.ref(Qa),s=d.ref(!1);function c(){t.value=!t.value}function f(){var S,F,z,R;const C=(S=e.content)==null?void 0:S.code;if(!C)return Qa;const _=i.value;let T;if(_!=null&&_.getOriginalEditor&&(_!=null&&_.getModifiedEditor)){const $=((F=_.getOriginalEditor().getModel())==null?void 0:F.getLineCount())??0,Y=((z=_.getModifiedEditor().getModel())==null?void 0:z.getLineCount())??0;T=$+Y}else if(_!=null&&_.getModel)T=((R=_.getModel())==null?void 0:R.getLineCount())??0;else{const{value:$,originalValue:Y}=C,q=($||"").split(`
|
|
705
705
|
`).length,pe=Y?Y.split(`
|
|
706
|
-
`).length:0;T=Y?pe+q:q}return tv+T*Ch}const p=d.computed(()=>(i.value,f()>Qa));function g(){r.value=!r.value,a.value=r.value?f():Qa,w()}function m(){if(!i.value)return;i.value=null;const B=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(B,{timeout:100}):setTimeout(B,0)}function w(){if(s.value)return;const C=n.value,B=i.value;if(!C||!(B!=null&&B.layout))return;const _=C.clientWidth||C.offsetWidth,T=a.value;requestAnimationFrame(()=>{var S,F;s.value||!i.value||(F=(S=i.value)==null?void 0:S.layout)==null||F.call(S,{width:_,height:T})})}function k(){var C;s.value||!n.value||!((C=e.content)!=null&&C.code)||ev.init().then(B=>{var z;if(s.value||!n.value||!((z=e.content)!=null&&z.code))return;const{value:_,originalValue:T,language:S="typescript"}=e.content.code,F={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:Ch,padding:{top:8,bottom:8}};if(T){const R=B.editor.createDiffEditor(n.value,{...F,renderSideBySide:!1,renderOverviewRuler:!1});R.setModel({original:B.editor.createModel(T,S),modified:B.editor.createModel(_,S)}),R.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),R.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),d.nextTick(()=>{var Y;if(s.value)return;const $=(Y=R.getContainerDomNode)==null?void 0:Y.call(R);if($){const q=$.querySelector('.diff-editor-cell.original, [class*="original"]');q&&(q.style.display="none")}}),i.value=R}else{const R=B.editor.create(n.value,{value:_,language:S,...F});i.value=R}a.value=Qa,d.nextTick(()=>w())})}return d.onMounted(()=>{rv(()=>{s.value||!n.value||k()})}),d.watch(t,C=>{C&&!s.value&&d.nextTick(()=>w())}),d.onBeforeUnmount(()=>{s.value=!0,m()}),d.watch(()=>{var C,B;return(B=(C=e.content)==null?void 0:C.code)==null?void 0:B.value},()=>{s.value||(r.value?a.value=f():a.value=Qa,w())}),()=>{const C=e.content;if(!C)return null;const{message:B,fileIcon:_,fileName:T,code:S}=C;return d.createVNode("div",{class:"f-chat-message-coding"},[d.createVNode("div",{class:"f-chat-coding-message"},[B]),d.createVNode("div",{class:"f-chat-coding-card"},[d.createVNode("div",{class:"f-chat-coding-header",onClick:c,role:"button",tabindex:0,onKeydown:F=>F.key==="Enter"&&c()},[d.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[d.createVNode("span",{class:"f-chat-coding-header-icon"},[d.createVNode("img",{src:_,alt:"",onError:F=>{var z;F.target.style.display="none",(z=F.target.parentElement)==null||z.classList.add("icon-error")}},null),d.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[d.createTextVNode("📄")])]),d.createVNode("span",{class:"f-chat-coding-header-expand"},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),d.createVNode("span",{class:"f-chat-coding-header-filename"},[T]),d.createVNode("span",{class:"f-chat-coding-header-stats"},[d.createVNode("span",{class:"f-chat-coding-stat-add"},[d.createTextVNode("+"),S.addedLines]),d.createVNode("span",{class:"f-chat-coding-stat-del"},[d.createTextVNode("-"),S.deletedLines])])]),d.createVNode("div",{style:{display:t.value?"block":"none"}},[d.createVNode("div",{ref:n,class:"f-chat-coding-editor",style:{height:`${a.value}px`}},null),p.value&&d.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:g,"aria-label":r.value?"收起代码":"展开代码",title:r.value?"收起代码":"展开代码"},[d.createVNode("i",{class:["fx-icon fx-icon-expanddown",r.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});tu.install=e=>{e.component(tu.name,tu)};const Sh={content:{type:Object,required:!0}};function nv(e){return"file"in e&&"path"in e}const ru=d.defineComponent({name:"FileOperationMessage",props:Sh,setup(e){const t=d.ref(!0),r=d.ref({}),n=d.computed(()=>{var f;return!!((f=e.content)!=null&&f.summary)}),i=d.computed(()=>{var p;const f=(p=e.content)==null?void 0:p.summary;return f?`浏览了 ${f.explored} 个文件并查询了 ${f.searched} 个文件`:""});function a(){t.value=!t.value}function s(f){r.value={...r.value,[f]:!r.value[f]}}function c(f){return r.value[f]??!1}return()=>{const f=e.content;if(!f)return null;const{summary:p,operations:g}=f,m=!n.value||t.value;return d.createVNode("div",{class:"f-chat-message-file-operation"},[p&&d.createVNode("div",{class:"f-chat-file-op-summary",onClick:a,role:"button",tabindex:0,onKeydown:w=>w.key==="Enter"&&a()},[d.createVNode("span",{class:"f-chat-file-op-summary-inner"},[d.createVNode("span",{class:"f-chat-file-op-summary-text"},[i.value]),d.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])])]),m&&d.createVNode("div",{class:"f-chat-file-op-operations"},[g.map((w,k)=>{var C,B,_,T;return d.createVNode("div",{key:k,class:"f-chat-file-op-operation"},[d.createVNode("div",d.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":w.type==="Read","has-details":!!((C=w.details)!=null&&C.length)}],onClick:()=>{var S;return((S=w.details)==null?void 0:S.length)&&s(k)}},(B=w.details)!=null&&B.length?{role:"button",tabIndex:0}:{},{onKeydown:S=>{var F;return((F=w.details)==null?void 0:F.length)&&S.key==="Enter"&&s(k)}}),[d.createVNode("span",{class:"f-chat-file-op-type"},[w.type]),d.createVNode("span",{class:"f-chat-file-op-message-wrap"},[d.createVNode("span",{class:"f-chat-file-op-message"},[w.message]),(_=w.details)!=null&&_.length?d.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:c(k)}]},[d.createVNode("i",{class:c(k)?"fx-icon fx-icon-foldu":"fx-icon pfx-icon-expanddown"},null)]):null])]),((T=w.details)==null?void 0:T.length)&&c(k)&&d.createVNode("div",{class:"f-chat-file-op-details"},[w.details.map((S,F)=>nv(S)?d.createVNode("div",{key:F,class:"f-chat-file-op-detail-file"},[d.createVNode("span",{class:"f-chat-file-op-file-icon"},[d.createVNode("img",{src:S.icon,alt:"",onError:z=>{const R=z.target;R.style.display="none";const $=R.parentElement;$&&$.classList.add("icon-error")}},null),d.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[d.createTextVNode("📄")])]),d.createVNode("span",{class:"f-chat-file-op-file-name"},[S.file]),d.createVNode("span",{class:"f-chat-file-op-file-path",title:S.path},[S.path])]):d.createVNode("div",{key:F,class:"f-chat-file-op-detail-text"},[d.createVNode("div",{class:"f-chat-file-op-detail-title"},[S.title]),d.createVNode("div",{class:"f-chat-file-op-detail-content"},[S.text])]))])])})])])}}});ru.install=e=>{e.component(ru.name,ru)};const Eh={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},av="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nu=d.defineComponent({name:"FXGenerateProcess",props:Eh,emits:["closed"],setup(e,t){const r=d.computed(()=>{const p={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return Kt(p,e.customClass)}),n=d.computed(()=>c0({},e.customStyle));function i(){var p,g;return t.slots.icon?t.slots.icon():d.createVNode("div",{class:["fx-generate-process--icon",(p=e.classNames)==null?void 0:p.icon],style:(g=e.styles)==null?void 0:g.icon},[e.icon?Eu(e.icon):d.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:av},null)])}function a(){var p,g;return e.description&&d.createVNode("p",{class:["fx-generate-process--description",(p=e.classNames)==null?void 0:p.description],style:(g=e.styles)==null?void 0:g.description},[e.description])}function s(){var p,g;return e.progress>0&&d.createVNode("div",{class:["fx-generate-process--progress-text",(p=e.classNames)==null?void 0:p["progress-text"]],style:(g=e.styles)==null?void 0:g["progress-text"]},[e.progress,d.createTextVNode("%")])}function c(){return d.createVNode("div",{class:"fx-generate-process--mask",onClick:p=>{p.stopPropagation()}},null)}function f(p=()=>{}){t.emit("closed",{callback:p})}return d.watch(()=>e.visible,p=>{p||f()}),t.expose({close:f}),()=>{var p,g;return d.createVNode(d.Fragment,null,[e.visible&&c(),e.visible&&d.createVNode("div",{class:r.value,style:n.value},[i(),!e.showProgress&&a(),e.showProgress&&d.createVNode("div",{class:["fx-generate-process--progress-bar",(p=e.classNames)==null?void 0:p["progress-bar"]],style:(g=e.styles)==null?void 0:g["progress-bar"]},[d.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&s()]),e.description&&e.progress>0&&d.createVNode("div",{class:"fx-generate-process--progress"},[a(),d.createTextVNode(" "),s()])])])}}});nu.install=e=>{e.component(nu.name,nu)};const Fh={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},iv=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],au=d.defineComponent({name:"FXChatHistory",props:Fh,emits:["itemClick"],setup(e,{emit:t}){const r=s=>{const c=new Date(s),f=new Date;return c.getDate()===f.getDate()&&c.getMonth()===f.getMonth()&&c.getFullYear()===f.getFullYear()},n=s=>{const c=new Date(s),f=new Date;return f.setDate(f.getDate()-7),c>=f&&!r(s)},i=d.computed(()=>{var f;const s={today:[],week:[],older:[]};(f=e.items)==null||f.forEach(p=>{r(p.timestamp)?s.today.push(p):n(p.timestamp)?s.week.push(p):s.older.push(p)});const c=(p,g)=>g.timestamp-p.timestamp;return s.today.sort(c).length||s.week.sort(c).length||s.older.sort(c).length?{today:s.today.sort(c),week:s.week.sort(c),older:s.older.sort(c)}:null}),a=(s,c)=>c.length>0&&d.createVNode("div",{class:"f-chat-history-section"},[d.createVNode("span",{class:"f-chat-history-section-header"},[s]),d.createVNode("div",{class:"d-flex flex-column"},[c.map(f=>d.createVNode("div",{key:f.id,class:"f-chat-history-item",onClick:()=>t("itemClick",f)},[d.createVNode("span",{class:"f-chat-history-item-title"},[f.title])]))])]);return()=>d.createVNode("div",{class:"f-chat-history-manager"},[d.createVNode("div",{class:"f-chat-history-manager-scroll"},[i.value&&iv.map(s=>a(s.label,i.value[s.key]))])])}});au.install=e=>{e.component(au.name,au)};const Th={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var Bh=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(Bh||{});const Mh={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:Bh.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},Yo=d.defineComponent({name:"FPrompt",props:Mh,setup(e){const t=d.computed(()=>!e.id&&e.children&&e.children.length>0),r=d.computed(()=>{var w;let m={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return m=Kt(m,(w=e.classNames)==null?void 0:w.item),Kt(m,e.customClass)}),n=d.computed(()=>{let m={"fx-prompt--item":!0};return m[`fx-prompt--${e.showType||"none"}`]=!0,m}),i=d.computed(()=>{var w;const m=c0({},(w=e.styles)==null?void 0:w.item);return c0(m,e.customStyle)}),a=()=>{var m,w;return e.icon?d.createVNode("div",{class:["fx-prompt--item-icon",(m=e.classNames)==null?void 0:m.icon],style:(w=e.styles)==null?void 0:w.icon},[Eu(e.icon)]):null},s=()=>{var m,w;return e.label?d.createVNode("h6",{class:["fx-prompt--item-label",(m=e.classNames)==null?void 0:m.label],style:(w=e.styles)==null?void 0:w.label},[pi(e.label)]):null};function c(){var w;const m={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(m["badge-default"]=!0),Kt(m,(w=e.classNames)==null?void 0:w.badge)}const f=()=>{var m;return e.badge?d.createVNode("span",{class:c(),style:(m=e.styles)==null?void 0:m.badge},[pi(e.badge)]):null},p=()=>{var m,w;return e.description?d.createVNode("p",{class:["fx-prompt--item-description",(m=e.classNames)==null?void 0:m.description],style:(w=e.styles)==null?void 0:w.description},[pi(e.description)]):null},g=()=>{var m,w,k,C;return!e.children||e.children.length===0?null:d.createVNode(Ja,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(m=e.classNames)==null?void 0:m.subItems,customStyle:(w=e.styles)==null?void 0:w.subItems,styles:{item:((k=e.styles)==null?void 0:k.subItem)??{}},classNames:{item:((C=e.classNames)==null?void 0:C.subItem)??""}},null)};return()=>{var m,w;return d.createVNode("div",{class:r.value,style:i.value,onClick:e.onClick},[t.value?g():d.createVNode("div",{class:n.value},[a(),f(),d.createVNode("div",{class:["fx-prompt--item-content",(m=e.classNames)==null?void 0:m.itemContent],style:(w=e.styles)==null?void 0:w.itemContent},[s(),p(),g()])])])}}}),Ja=d.defineComponent({name:"FXPrompts",props:Th,emits:["item-click"],setup(e,t){const r=d.computed(()=>{var g;let p={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return p=Kt(p,e.customClass),p=Kt(p,(g=e.classNames)==null?void 0:g.root),p});function n(p=null){var m;let g={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return g=Kt(g,(m=e.classNames)==null?void 0:m.items),g=Kt(g,p==null?void 0:p.customClass),g}function i(p=null){var m;let g={};return(e.gap||e.gap===0)&&(g.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),g=c0(g,(m=e.styles)==null?void 0:m.items),g=c0(g,p==null?void 0:p.customStyle),g}const a=(p,g)=>{g.disabled||g.children&&g.children.length>0||t.emit("item-click",p,g)},s=p=>{var g,m;return p!=null&&p.title?d.createVNode("h5",{class:["fx-prompts--title",(g=e.classNames)==null?void 0:g.title],style:(m=e.styles)==null?void 0:m.title},[pi(p==null?void 0:p.title)]):null};function c(p){return!p.items||p.items.length===0?null:d.createVNode("div",{class:n(p),style:i(p)},[p.items.map((g,m)=>d.createVNode(Yo,{key:g.id||`key_${m}`,id:g.id,icon:g.icon,label:g.label,description:g.description,disabled:g.disabled,children:g.children,styles:g.styles||e.styles,classNames:g.classNames||e.classNames,showType:g.showType,customClass:g.customClass,customStyle:g.customStyle,gap:g.gap,badge:g.badge,onClick:w=>a(w,g)},null))])}function f(){return t.slots.footer?t.slots.footer():null}return()=>{var p;return d.createVNode("div",{class:r.value,style:(p=e.styles)==null?void 0:p.root},[t.slots.title&&t.slots.title(),s(e),t.slots.default&&t.slots.default(),c(e),f()])}}});Ja.install=e=>{e.component(Ja.name,Ja),e.component(Yo.name,Yo)};const Nh={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},iu=d.defineComponent({name:"FXSuggestion",props:Nh,setup(e,t){const r=d.ref(null),n=d.ref(!1),i=d.ref(!1),a=d.ref({top:0,left:0,height:0}),s=d.ref(-1),c=d.ref(""),f=d.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),p=d.computed(()=>{var T;return(((T=e.items)==null?void 0:T.length)??0)===0}),g=()=>{var pe;if(!r.value||p.value)return;if((((pe=r.value.textContent)==null?void 0:pe.trim())||"")===""){r.value.textContent="",r.value.innerHTML="",B();return}const S=window.getSelection();if(!S||S.rangeCount===0)return;const F=S.getRangeAt(0),z=F.cloneRange();z.selectNodeContents(r.value),z.setEnd(F.endContainer,F.endOffset);const R=z.toString(),$=R.lastIndexOf(e.promptChar);if(c.value=r.value.textContent||"",$!==-1&&R.substring($+1).trim()===""&&(r.value.textContent=R.replace(/@$/,`@${e.promptAgentName} `),c.value=r.value.textContent,n.value=!0,F.selectNodeContents(r.value),F.collapse(!1),S.removeAllRanges(),S.addRange(F)),n.value===!1){i.value=!1,s.value=-1;return}if((r.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const he=document.createRange();he.setStart(r.value,0),he.setEnd(F.endContainer,F.endOffset);const{top:ce,right:be}=he.getBoundingClientRect(),ae=m();a.value={top:ce-ae-5,left:be+5,height:ae},s.value===-1&&(s.value=0),i.value=!0}else i.value=!1,s.value=-1},m=()=>{const S=e.items.length*38-6;return Math.min(S+28+20,e.height)},w=T=>{var R;if(!r.value)return;const S=window.getSelection();if(!S||S.rangeCount===0)return;const F=((R=r.value.textContent)==null?void 0:R.replace(/\s*$/,""))||"";r.value.textContent=`${F} ${T.label}`;const z=S.getRangeAt(0);z.selectNodeContents(r.value),z.collapse(!1),S.removeAllRanges(),S.addRange(z),B()},k=async T=>{if(!i.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(T.key)&&T.preventDefault(),T.key){case"ArrowDown":s.value++,s.value>=e.items.length&&(s.value=0);break;case"ArrowUp":s.value--,s.value<0&&(s.value=e.items.length-1);break;case"Enter":s.value!==-1&&w(e.items[s.value]);break;case"Escape":B();break}await d.nextTick();const S=s.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",F=document.querySelector(S);F==null||F.scrollIntoView({block:"nearest",behavior:"smooth"})},C=T=>{r.value&&!r.value.contains(T.target)&&B()},B=()=>{n.value=!1,i.value=!1,s.value=-1};d.onMounted(()=>{document.addEventListener("click",C)}),d.onUnmounted(()=>{document.removeEventListener("click",C)});const _=T=>{const S=T.iconUrl||"",F=T.icon||"fx-icon fx-icon-sender_task";return d.createVNode(d.Fragment,null,[S?d.createVNode("img",{alt:"suggestion item icon",src:S},null):d.createVNode("i",{class:F},null),d.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[T.label])])};return()=>{var T;return d.createVNode("div",{class:"f-chat-suggestion-container"},[d.createVNode("div",{ref:r,class:"f-chat-suggestion-input",contenteditable:"true",onInput:g,onKeyup:g,onKeydown:k,"data-placeholder":f.value},null),i.value&&d.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${a.value.top}px`,left:`${a.value.left}px`,height:`${a.value.height}px`}},[d.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),d.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(T=e.items)==null?void 0:T.map((S,F)=>d.createVNode("div",{key:F,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":F===s.value}],onClick:()=>w(S),onMouseenter:()=>s.value===F},[_(S)]))])])])}}});iu.install=e=>{e.component(iu.name,iu)};const _h={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},uu=d.defineComponent({name:"Todo",props:_h,setup(e){const t=d.ref(!0),r=d.computed(()=>{var i;return(i=e.items)==null?void 0:i.length});function n(){t.value=!t.value}return()=>d.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[d.createVNode("div",{class:"f-chat-todo-message"},[e.message]),d.createVNode("div",{class:"f-chat-todo-list"},[d.createVNode("div",{class:"f-chat-todo-header",onClick:n,role:"button",tabindex:0,onKeydown:i=>i.key==="Enter"&&n()},[d.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[d.createVNode("span",{class:"f-chat-todo-header-icon"},[d.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),d.createVNode("span",{class:"f-chat-todo-header-expand"},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),d.createVNode("span",{class:"f-chat-todo-header-label"},[d.createTextVNode("待办任务")]),d.createVNode("span",{class:"f-chat-todo-header-count"},[r.value])]),t.value&&d.createVNode("div",{class:"f-chat-todo-content"},[d.createVNode(Hi,{items:e.items},null)])])])}});uu.install=e=>{e.component(uu.name,uu),e.component(Hi.name,Hi),e.component(No.name,No),e.directive("overflow-tooltip",q1)};function ei(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const ou=d.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>{const m=e.content.toolCalls;return!m||m.length===0?!0:m.every(ei)}),{getToolIconClass:r}=Ls(),n=d.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),i=d.ref(!t.value),a=()=>{i.value=!i.value};d.watch(t,m=>{m&&(i.value=!1)});const s=m=>{ei(m)&&(m._expanded=!m._expanded)},c=m=>{const w=ei(m),k=m.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":w&&!k,"is-error":k,"is-run":!w&&!k}},f=m=>{const w=ei(m);return m.success===!1?"执行完成":w?"执行成功":"调用中"},p=m=>{const w=ei(m);return m.success===!1?"Error":w?"Done":"Working"},g=m=>m.toolDescription?m.toolDescription:m.command?`{ command: ${m.command} }`:m.toolName??"tool";return()=>d.createVNode("div",{class:"f-chat-tool-use-batch"},[d.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:a},[d.createVNode("span",{class:"f-chat-tool-use-batch-title"},[n.value]),d.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:i.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),i.value&&d.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(m=>{const w=ei(m),k=m.success===!1,C=w||k,B=!!m._expanded;return d.createVNode("div",{class:c(m)},[d.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>s(m)},[d.createVNode("i",{class:"fx-icon fx-icon-"+r(m.toolName)+" tool-icon"},null),d.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[g(m)]),d.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[d.createVNode(sa,{status:p(m),variant:"tool-use"},null),d.createVNode("span",null,[f(m)])]),C&&d.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:B?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),B&&C&&d.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[m.errorMessage||m.result])])})])])}});ou.install=e=>{e.component(ou.name,ou)};const zh={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},su=d.defineComponent({name:"FXWelcome",props:zh,emits:[],setup(e,t){const r=d.computed(()=>{const s={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(s["fx-welcome--no-description"]=!0),Kt(s,e.customClass)}),n=d.computed(()=>c0({},e.customStyle));function i(){var s,c;return t.slots.icon?t.slots.icon():e.icon?d.createVNode("div",{class:["fx-welcome--icon",(s=e.classNames)==null?void 0:s.icon],style:(c=e.styles)==null?void 0:c.icon},[Eu(e.icon)]):null}function a(){var s,c,f,p,g,m;return t.slots.content?d.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&d.createVNode("div",{class:["fx-welcome--content",(s=e.classNames)==null?void 0:s.content],style:(c=e.styles)==null?void 0:c.content},[e.title&&d.createVNode("h4",{class:["fx-welcome--title",(f=e.classNames)==null?void 0:f.title],style:(p=e.styles)==null?void 0:p.title},[e.title]),e.description&&d.createVNode("p",{class:["fx-welcome--description",(g=e.classNames)==null?void 0:g.description],style:(m=e.styles)==null?void 0:m.description},[e.description])])}return()=>d.createVNode("div",{class:r.value,style:n.value},[i(),a()])}});su.install=e=>{e.component(su.name,su)};const Ih={content:{type:Object,required:!0},onOpen:{type:Function}},uv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",sv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",Oh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",lv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",lu=d.defineComponent({name:"FChatAttachmentPreview",props:Ih,emits:[],setup(e){function t(c){switch(c.toLowerCase()){case"doc":case"docx":return uv;case"xlsx":case"xls":return ov;case"ppt":case"mobi":return sv;case"txt":return Oh;case"png":case"jpg":case"jpeg":case"gif":return lv;default:return Oh}}function r(c){return c.icon?c.icon:t(c.type||"")}function n(c){if(c===0)return"0 B";const f=1024,p=["B","KB","MB","GB"],g=Math.floor(Math.log(c)/Math.log(f));return parseFloat((c/Math.pow(f,g)).toFixed(2))+" "+p[g]}async function i(c){var f;(f=e.onOpen)==null||f.call(e,c)}async function a(c,f){c.stopPropagation(),c.preventDefault();const p=Ea(f);p&&await Su(p,f.name)}function s(c,f){const p=n(c.size||0),g=r(c),m=Ea(c);return d.createVNode("div",{key:f,class:"f-chat-attachment-preview-card"},[d.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[d.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>i(c),onKeydown:w=>w.key==="Enter"&&i(c)},[d.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[d.createVNode("img",{src:g,alt:""},null)]),d.createVNode("div",{class:"f-chat-attachment-preview-info"},[d.createVNode("div",{class:"f-chat-attachment-preview-name",title:c.name},[c.name]),d.createVNode("div",{class:"f-chat-attachment-preview-meta"},[p&&d.createVNode("span",null,[p])])])]),m?d.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:w=>a(w,c)},[d.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const c=e.content;if(!c)return null;const{message:f,attachments:p}=c;return d.createVNode("div",{class:"f-chat-attachment-preview"},[f&&d.createVNode("div",{class:"f-chat-attachment-preview-message"},[f]),d.createVNode("div",{class:"f-chat-attachment-preview-list"},[p.map((g,m)=>s(g,m))])])}}});lu.install=e=>{e.component(lu.name,lu)},Wa.install=e=>{e.component(Wa.name,Wa)},Ga.install=e=>{e.component(Ga.name,Ga)};const Lh={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},cu=d.defineComponent({name:"FXNav",props:Lh,emits:["nav","update:activeNavId"],setup(e,t){const r=d.ref(e.activeNavId),n=d.ref(e.navData);function i(g){if(n.value&&n.value.length){let m=n.value.find(w=>w[e.idField]===g&&w[e.disableField]!==!0);m||(m=n.value.find(w=>w[e.disableField]!==!0)),m&&r.value!==m.id&&(r.value=m.id,t.emit("nav",m))}}d.watch([()=>e.activeNavId,()=>e.navData],([g,m])=>{n.value=m,i(g)});const a=d.computed(()=>e.visible&&n.value.length>0);function s(g){g.disable||g.id===r.value||Promise.resolve().then(()=>{const m=e.navPicking;return m&&typeof m=="function"?m(g):!0}).then(m=>{let w=!0;typeof m=="object"?m.canContinue||(w=!1,m.message&&console.error({message:m.message,position:"top-center"})):w=m,w&&(r.value=g.id,t.emit("update:activeNavId",g.id),t.emit("nav",g))})}const c=d.computed(()=>{const g={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return Kt(g,e.customClass)}),f=d.computed(()=>c0({},e.customStyle));function p(g){n.value=g,i(r.value)}return t.expose({updateNavData:p}),()=>{var g;return a.value&&d.createVNode("div",{class:c.value,style:f.value},[(g=n.value)==null?void 0:g.map(m=>d.createVNode("div",{class:["farris-nav-item",{active:m[e.idField]===r.value},{disabled:m[e.disableField]}],onClick:()=>s(m)},[d.createVNode("div",{class:"farris-nav-item-link pt-3"},[d.createVNode("span",{class:"farris-nav-item-link-text"},[typeof m[e.displayField]=="function"?m[e.displayField]():m[e.displayField],m[e.valueField]&&d.createVNode("div",{class:"farris-nav-item-tag"},[m[e.valueField]<=e.maxNum&&d.createVNode("span",{class:"tag-text"},[m[e.valueField]]),m[e.valueField]>e.maxNum&&d.createVNode("span",{class:"tag-text"},[e.maxNum,d.createTextVNode("+")])])]),d.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});cu.install=e=>{e.component(cu.name,cu)};const Rh={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0},itemClass:{type:String,default:""},dropdownClass:{type:String,default:""}},Ph={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},enableHighlight:{type:Boolean,default:!0},itemClass:{type:String,default:""}},Zo=d.defineComponent({name:"FXSearchBoxContainer",props:Ph,emits:["confirmResult","searchedValue"],setup(e,t){const r=d.ref(e.data),n=d.ref(""),i=d.computed(()=>{if(!n.value)return r.value;const g=n.value.toLowerCase();return r.value.filter(m=>String(m[e.textField]??"").toLowerCase().includes(g))});function a(g){n.value=g}function s(g){t.emit("confirmResult",g[e.textField]),t.emit("searchedValue",[g])}function c(g,m){if(!m)return[g];const w=m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),k=new RegExp(`(${w})`,"gi");return g.split(k).map(B=>B.toLowerCase()===m.toLowerCase()?d.createVNode("span",{class:"search-box-highlight"},[B]):B)}function f(g){const m=String(g[e.textField]??"");return t.slots.default?t.slots.default({item:g,searchValue:n.value,highlight:c}):c(m,n.value)}const p=d.computed(()=>{const g={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(g.maxHeight=`${e.maxHeight}px`),g});return d.watch(()=>e.data,g=>{g!==r.value&&(r.value=g)}),t.expose({search:a}),()=>d.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:p.value},[e.loading&&d.createVNode("div",{class:"search-box-loading"},[d.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),d.createVNode("ul",{class:"search-box-list"},[i.value.map(g=>d.createVNode("li",{class:["search-box-item dropdown-item",e.itemClass],key:g[e.idField],onClick:()=>s(g)},[f(g)])),!e.loading&&i.value.length===0&&d.createVNode("li",{class:"search-box-empty"},[d.createTextVNode("无匹配结果")])])])}}),du=d.defineComponent({name:"FXSearchBox",props:Rh,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const r=d.ref(),n=d.ref(),i=d.ref(),a=d.ref(e.modelValue),s=d.ref(!1),c='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',f=d.computed(()=>e.loading?c:e.buttonContent);d.watch(a,z=>{var R;(R=i.value)==null||R.search(z),t.emit("update:modelValue",z)}),d.watch(()=>e.modelValue,z=>{a.value=z});function p(z){a.value=z,C()}function g(z){const R=a.value;t.emit("change",z,{oldValue:R,newValue:z})}function m(z){t.emit("selectedValue",z)}function w(){t.emit("clickButton",{})}async function k(){var z;s.value=!0,await d.nextTick(),(z=n.value)==null||z.show(r.value)}function C(){var z;(z=n.value)==null||z.hide(),s.value=!1}function B(){s.value?C():k()}function _(z){const R=z.target.value;a.value=R,g(R),e.showDropdown&&R&&k()}function T(){e.showDropdown&&a.value&&k()}function S(){a.value="",t.emit("update:modelValue",""),C()}t.expose({togglePopup:B,hidePopup:C,showPopup:k});const F=d.computed(()=>{const z=Kt({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof z=="string"?[z]:Array.isArray(z)?z:[]]});return()=>d.createVNode("div",{class:F.value},[d.createVNode("div",{class:"f-search-box-input-group",ref:r},[t.slots.prefix&&d.createVNode("span",{class:"f-search-box-prefix"},[t.slots.prefix()]),d.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:a.value,disabled:e.disable,onInput:_,onFocus:T},null),a.value&&!e.disable&&d.createVNode("span",{class:"f-search-box-clear",onClick:S},[d.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),t.slots.suffix?d.createVNode("span",{class:"f-search-box-suffix",onClick:w},[t.slots.suffix()]):f.value&&d.createVNode("span",{class:"f-search-box-button",onClick:w,innerHTML:f.value},null)]),e.showDropdown&&d.createVNode(fa,{ref:n,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost,class:"f-search-box--dropdown "+e.dropdownClass},{default:()=>[t.slots.dropdown?t.slots.dropdown({data:e.data,searchValue:a.value,loading:e.loading}):d.createVNode(Zo,{ref:i,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:p,onSearchedValue:z=>m(z),loading:e.loading,maxHeight:e.maxHeight,itemClass:e.itemClass},t.slots)]})])}});du.install=e=>{e.component(du.name,du),e.component(Zo.name,Zo)};const Xc={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function cv(e){const t=d.ref([...e.data]),r=d.ref([]),n=d.ref(""),i=d.computed(()=>{var w;const m=e.group;return m!=null&&m.enable&&((w=m.groupFields)!=null&&w.length)?a(t.value,m):t.value.map((k,C)=>({type:0,data:k,originalIndex:C}))});function a(m,w){const k=[],C=w.groupFields[0],B=new Map;m.forEach(T=>{const S=String(T[C]??"");B.has(S)||B.set(S,[]),B.get(S).push(T)});let _=0;return B.forEach((T,S)=>{k.push({type:1,data:{[C]:S},groupField:C,groupValue:S,originalIndex:_++}),T.forEach(F=>{k.push({type:0,data:F,groupField:C,groupValue:S,originalIndex:_++})})}),k}function s(m){t.value=[...m],r.value=[],n.value=""}function c(m){n.value=m;const w=t.value.find(k=>k[e.idField]===m);w&&!r.value.includes(w)&&(r.value=[w])}function f(){r.value=[],n.value=""}function p(m){const w=r.value.indexOf(m);w>=0?r.value.splice(w,1):r.value=[m],n.value=m[e.idField]}function g(m){return r.value.includes(m)}return{data:t,visualData:i,selectedItems:r,activeItemId:n,updateDataSource:s,activeRowById:c,clearSelection:f,toggleSelection:p,isSelected:g}}const dv=d.defineComponent({name:"FXListViewItem",props:{...Xc,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const r=d.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>d.createVNode("li",{class:[r.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):d.createVNode("span",null,[e.item[e.textField]])])}}),fv=d.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>d.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):d.createVNode("div",{class:"f-list-view-group-header"},[d.createVNode("i",{class:"fx-icon f-accordion-expand"},null),d.createVNode("span",null,[e.groupValue])])])}}),fu=d.defineComponent({name:"FXListView",props:Xc,emits:["clickItem"],setup(e,t){const{visualData:r,activeItemId:n,updateDataSource:i,activeRowById:a,clearSelection:s,toggleSelection:c,isSelected:f}=cv({data:e.data,idField:e.idField,group:e.group}),p=d.computed(()=>Kt({"f-list-view":!0},e.customClass));function g(m,w){c(m),t.emit("clickItem",m,w)}return t.expose({updateDataSource:i,activeRowById:a,clearSelection:s}),()=>d.createVNode("div",{class:p.value},[d.createVNode("div",{class:"f-list-view-content"},[d.createVNode("ul",{class:"f-listview-items"},[r.value.map((m,w)=>m.type===1?d.createVNode(fv,{key:`group_${m.groupValue}_${w}`,groupData:m.data,groupField:m.groupField,groupValue:m.groupValue,index:w},{default:t.slots.group}):d.createVNode(dv,{key:`${m.data[e.idField]}_${w}`,item:m.data,index:m.originalIndex,isActive:m.data[e.idField]===n.value,isSelected:f(m.data),itemClass:e.itemClass,textField:e.textField,onClickItem:g},{default:t.slots.content}))])])])}});fu.install=e=>{e.component(fu.name,fu)};const Vh={content:{type:Object,required:!0},defaultExpanded:{type:Boolean,default:!0}},Ko=d.defineComponent({name:"FXAgentThinkingMessage",props:Vh,setup(e){const t=d.ref(e.defaultExpanded),r=d.ref({}),n=d.computed(()=>{var k;const w=(k=e.content)==null?void 0:k.streamStatus;return w==="end"||w===void 0}),i=d.computed(()=>{var k;const w=(k=e.content)==null?void 0:k.title;return w||(n.value?"思考过程":"正在思考...")}),a=d.computed(()=>{var w;return((w=e.content)==null?void 0:w.steps)??[]}),s=d.computed(()=>{var w,k;return a.value.length>0?"":((k=(w=e.content)==null?void 0:w.text)==null?void 0:k.trim())??""}),c=d.computed(()=>{var w,k;return a.value.length>0||!!s.value||(((k=(w=e.content)==null?void 0:w.sources)==null?void 0:k.length)??0)>0});d.watch(a,w=>{const k={};w.forEach((C,B)=>{k[B]=r.value[B]??!!C.detail}),r.value=k},{immediate:!0}),d.watch(n,w=>{w&&(t.value=!1)});const f=()=>{t.value=!t.value},p=w=>{r.value={...r.value,[w]:!r.value[w]}},g=w=>d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:w?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null),m=(w,k)=>{var _;const C=!!((_=w.detail)!=null&&_.trim()),B=r.value[k]??C;return d.createVNode("div",{class:"f-x-thinking-step",key:k},[d.createVNode("div",{class:"f-x-thinking-step-header",onClick:()=>C&&p(k)},[d.createVNode("span",{class:"f-x-thinking-step-dot","aria-hidden":!0},null),d.createVNode("span",{class:"f-x-thinking-step-summary"},[w.summary]),C?g(B):null]),C&&B?d.createVNode("div",{class:"f-x-thinking-step-detail"},[w.detail]):null])};return()=>{const w=e.content;if(!w)return null;const k={"f-x-thinking":!0,"is-pending":!n.value,"is-completed":n.value};return d.createVNode("div",{class:k},[d.createVNode("div",{class:"f-x-thinking-header",onClick:f},[n.value?null:d.createVNode(sa,{status:"Working",variant:"thinking"},null),d.createVNode("span",{class:"f-x-thinking-title"},[i.value]),c.value?g(t.value):null]),t.value&&c.value?d.createVNode("div",{class:"f-x-thinking-body"},[s.value?d.createVNode("div",{class:"f-x-thinking-text"},[s.value]):null,a.value.map(m),w.sources&&w.sources.length>0?d.createVNode("ul",{class:"f-x-thinking-sources"},[w.sources.map((C,B)=>d.createVNode("li",{key:B},[C]))]):null]):null])}}});Ko.install=e=>{e.component(Ko.name,Ko)};function hv(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function mv(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function pv(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Qo=d.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>mv(e.content.media)),r=d.computed(()=>Ea(pv(e.content.media)));async function n(i){i.preventDefault(),i.stopPropagation();const a=r.value;a&&await Su(a,e.content.name)}return()=>{const i=!!r.value;return d.createVNode("div",{class:"f-ec-attach-row"},[d.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[d.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[d.createTextVNode("📎")]),d.createVNode("span",{class:"f-ec-attach-body"},[d.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),d.createVNode("span",{class:"f-ec-attach-meta"},[d.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),d.createVNode("span",{class:"f-ec-attach-size"},[hv(e.content.size)])])])]),i?d.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:n},[d.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});Qo.install=e=>{e.component(Qo.name,Qo)};const gv={0:"高",1:"中",2:"低"},Jo=d.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return d.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[d.createVNode("div",{class:"f-ec-error-head"},[d.createVNode("span",{class:"f-ec-error-badge"},[gv[t]]),d.createVNode("span",{class:"f-ec-error-label"},[d.createTextVNode("错误提醒")])]),d.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?d.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[d.createTextVNode("查看详情")]):null])}}});Jo.install=e=>{e.component(Jo.name,Jo)};function bv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!d.isVNode(e)}const Hh=".f-chat-content-input-section";function yv(e,t){const r=(t??"").trim();return r||`Agent请求使用【${e.trim()||"该系统"}】凭证访问该系统,是否授权?`}const hu=d.defineComponent({name:"FXCredentialAuthDialog",props:{visible:{type:Boolean,default:!1},title:{type:String,default:"凭证授权请求"},question:{type:String,default:""},systemName:{type:String,default:""},disabled:{type:Boolean,default:!1},onSelect:{type:Function,required:!0},onClose:{type:Function,default:void 0},teleportTo:{type:[String,Object],default:Hh}},setup(e){const t=d.computed(()=>yv(e.systemName,e.question));function r(i){e.disabled||e.onSelect(i)}const n=d.computed(()=>e.teleportTo??Hh);return()=>{if(!e.visible)return null;const i=d.createVNode("div",{class:"f-credential-auth-anchor f-credential-auth-anchor--overlay-input",role:"dialog","aria-modal":"true","aria-labelledby":"f-credential-auth-title"},[d.createVNode("div",{class:"f-credential-auth-dialog"},[d.createVNode("div",{id:"f-credential-auth-title",class:"f-credential-auth-dialog__title"},[e.title]),d.createVNode("div",{class:"f-credential-auth-dialog__body"},[t.value]),d.createVNode("div",{class:"f-credential-auth-dialog__actions"},[d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--primary","data-testid":"auth-per-access",disabled:e.disabled,onClick:()=>r("PER_ACCESS_YES")},[d.createTextVNode("临时授权一次")]),d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--outline","data-testid":"auth-session",disabled:e.disabled,onClick:()=>r("SESSION_YES")},[d.createTextVNode("授权整个会话")]),d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--outline","data-testid":"auth-no",disabled:e.disabled,onClick:()=>r("NO")},[d.createTextVNode("拒绝")])])])]);return n.value?d.createVNode(d.Teleport,{to:n.value},bv(i)?i:{default:()=>[i]}):i}}});hu.install=e=>{e.component(hu.name,hu)};function vv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!d.isVNode(e)}const xn="__hitl_other__";function Yc(e,t=120){return e?e.length>t?e.slice(0,t)+"...":e:""}function Gn(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"||t==="authorize"?t:"text"}function qh(e){return e==="PER_ACCESS_YES"?"是(本次授权)":e==="SESSION_YES"?"是,当前会话后续不再询问":e==="NO"?"否":String(e??"")}const es=d.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!0},pinned:{type:Boolean,default:!1},pinnedWidth:{type:String,default:void 0},pinnedInputHeight:{type:Number,default:0},pinnedBottom:{type:Number,default:36},teleportTo:{type:[String,Object],default:void 0},onSubmitAnswers:{type:Function,default:void 0},onSubmitAuthAnswer:{type:Function,default:void 0}},setup(e){const t=d.ref(!1),r=d.ref(0),n=d.ref({}),i=d.ref({}),a=d.computed(()=>t.value||e.disabled),s=d.computed(()=>{var X;return e.content.questions.length===1&&Gn((X=e.content.questions[0])==null?void 0:X.ui_type)==="authorize"&&!!e.content.credentialAuth}),c=d.ref(!1);d.watch(()=>[s.value,t.value,e.disabled],([X,Z,Q])=>{c.value=X&&!Z&&!Q},{immediate:!0});function f(X){var Q;const Z=e.content.questions[0];Z&&(n.value={[Z.id]:X},t.value=!0,c.value=!1,(Q=e.onSubmitAuthAnswer)==null||Q.call(e,{questionId:Z.id,answer:X}))}function p(X){const Z={},Q={};for(const ue of X){const fe=Gn(ue.ui_type);if(fe==="confirm")Z[ue.id]=void 0;else if(fe==="authorize")Z[ue.id]=void 0;else if(fe==="text"||fe==="select")Z[ue.id]=ue.default_value??"";else if(fe==="multi_select")Z[ue.id]=ue.default_value?JSON.parse(ue.default_value):[];else if(fe==="form"){const ke={};if(Array.isArray(ue.fields))for(const ie of ue.fields)ke[ie.name]=ie.default_value??"";Z[ue.id]=ke}else Z[ue.id]=ue.default_value??"";Q[ue.id]={active:!1,text:""}}n.value=Z,i.value=Q,r.value=0}d.watch(()=>e.content.questions,X=>{Array.isArray(X)&&X.length&&p(X)},{immediate:!0}),d.watch(()=>e.content.answers,X=>{if(!Array.isArray(X)||X.length===0)return;const Z={...n.value},Q={...i.value};for(const ue of X){Z[ue.id]=ue.answer;const fe=e.content.questions.find(ke=>ke.id===ue.id);fe&&Gn(fe.ui_type)==="select"&&typeof ue.answer=="string"&&!(fe.options??[]).some(me=>me.label===ue.answer)&&ue.answer!==""&&(Q[ue.id]={active:!0,text:ue.answer},Z[ue.id]=xn)}n.value=Z,i.value=Q,t.value=!0},{immediate:!0});const g=d.computed(()=>e.content.questions.length),m=d.computed(()=>{const X=e.content.questions;if(X.length===0)return null;const Z=Math.max(0,Math.min(r.value,X.length-1));return X[Z]}),w=d.computed(()=>r.value<=0),k=d.computed(()=>r.value>=g.value-1),C=d.computed(()=>{const X=m.value;return X?T(X):!0});function B(){e.required&&!C.value||k.value||(r.value+=1)}function _(){w.value||(r.value-=1)}function T(X){var ue,fe;const Z=Gn(X.ui_type),Q=n.value[X.id];if(Z==="text"&&(typeof Q!="string"||Q.trim()==="")||Z==="select"&&(typeof Q!="string"||Q.trim()===""||Q===xn&&(((fe=(ue=i.value[X.id])==null?void 0:ue.text)==null?void 0:fe.trim())??"")==="")||Z==="confirm"&&typeof Q!="boolean"||Z==="multi_select"&&(!Array.isArray(Q)||Q.length===0))return!1;if(Z==="form"){const ke=X.fields??[],ie=Q;for(const me of ke)if(me.required){const ge=ie[me.name];if(typeof ge!="string"||ge.trim()==="")return!1}}return!((Z==="date"||Z==="number")&&(typeof Q!="string"||Q.trim()===""))}const S=d.computed(()=>a.value?!1:e.content.questions.every(X=>T(X)));function F(X,Z){n.value={...n.value,[X]:Z}}function z(X,Z,Q){const ue=n.value[X]??{};F(X,{...ue,[Z]:Q})}function R(X){const Z=Gn(X.ui_type);return Z==="select"||Z==="multi_select"}function $(X,Z){var Q;Z===xn?(i.value={...i.value,[X.id]:{...i.value[X.id],active:!0,text:((Q=i.value[X.id])==null?void 0:Q.text)??""}},F(X.id,xn)):(i.value={...i.value,[X.id]:{active:!1,text:""}},F(X.id,Z))}function Y(X,Z){const Q=n.value[X.id]??[];Q.includes(Z)?F(X.id,Q.filter(ue=>ue!==Z)):F(X.id,[...Q,Z])}function q(){var Z,Q,ue;if(!S.value)return;const X=[];for(const fe of e.content.questions){const ke=Gn(fe.ui_type);let ie=n.value[fe.id];ke==="select"&&ie===xn&&(ie=((Q=(Z=i.value[fe.id])==null?void 0:Z.text)==null?void 0:Q.trim())??""),ke==="number"&&(ie=Number(ie)),X.push({id:fe.id,answer:ie})}t.value=!0,(ue=e.onSubmitAnswers)==null||ue.call(e,X)}function pe(X,Z,Q){return d.createVNode("div",{class:"f-hitl-date-wrap"},[d.createVNode("input",{class:"f-hitl-input",type:"date",value:X,disabled:Z,onInput:ue=>Q(ue.target.value)},null)])}function he(X,Z,Q,ue,fe){const ke=ge=>{let Le=Number(X)||0;Le+=ge,ue!==void 0&&(Le=Math.max(ue,Le)),fe!==void 0&&(Le=Math.min(fe,Le)),Q(String(Le))},ie=fe!==void 0&&Number(X||0)>=fe,me=ue!==void 0&&Number(X||0)<=ue;return d.createVNode("div",{class:"f-hitl-num-wrap"},[d.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:X,min:ue,max:fe,disabled:Z,onInput:ge=>Q(ge.target.value)},null),d.createVNode("div",{class:"f-hitl-num-btns"},[d.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:Z||ie,onClick:()=>ke(1)},[d.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),d.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:Z||me,onClick:()=>ke(-1)},[d.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function ce(X,Z,Q,ue){return d.createVNode("div",{key:X.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":Q}],onClick:ue},[d.createVNode("span",{class:"f-hitl-opt-row__index"},[Z+1]),d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[X.label]),X.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:X.description},[Yc(X.description)]):null]),d.createVNode("span",{class:"f-hitl-opt-row__check"},[Q?d.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}function be(X,Z){return d.createVNode("div",{class:"f-hitl-form-item",key:X.name},[d.createVNode("div",{class:"f-hitl-form-item__label"},[X.label]),Z])}function ae(X,Z,Q){const ue=n.value[X.id]??"",fe=n.value[X.id]??[],ke=i.value[X.id]??{active:!1,text:""},ie=Q==="single",me=ie&&ue===xn||ke.active,ge=X.allow_other&&me,Le=ot=>ie?ue===ot.label&&!ke.active:fe.includes(ot.label),Ye=ot=>()=>{a.value||(ie?$(X,ot.label):Y(X,ot.label))},Ke=()=>{if(!a.value)if(ie)$(X,xn);else{const ot=ke.text;ke.active?(F(X.id,fe.filter(st=>st!==ot)),i.value={...i.value,[X.id]:{active:!1,text:""}}):(i.value={...i.value,[X.id]:{active:!0,text:ke.text}},ke.text&&!fe.includes(ke.text)&&F(X.id,[...fe,ke.text]))}},ut=ot=>{const st=ot.target.value;i.value={...i.value,[X.id]:{active:!0,text:st}},ie?F(X.id,xn):F(X.id,[...fe.filter(Xt=>Xt!==ke.text),st])};return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[Z.map((ot,st)=>ce(ot,st,Le(ot),Ye(ot))),X.allow_other?d.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":me}],onClick:Ke},[d.createVNode("span",{class:"f-hitl-opt-row__index"},[d.createTextVNode("...")]),d.createVNode("span",{class:"f-hitl-opt-row__label"},[d.createTextVNode("其他")]),d.createVNode("span",{class:"f-hitl-opt-row__check"},[me?d.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),ge?d.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:ke.text,placeholder:"请输入自定义内容",disabled:a.value,onInput:ut},null):null])}function xe(X){const Z=n.value[X.id]??{},Q=X.fields??[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-form-group"},[Q.map(ue=>{const fe=Z[ue.name]??"";return ue.type==="select"?be(ue,d.createVNode("div",{class:"f-hitl-select-group"},[(ue.options??[]).map(ke=>{const ie=typeof ke=="string"?ke:ke.label??"";return d.createVNode("button",{key:ie,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":fe===ie}],disabled:a.value,onClick:()=>z(X.id,ue.name,ie)},[ie])})])):ue.type==="number"?be(ue,he(fe,a.value,ke=>z(X.id,ue.name,ke),ue.min,ue.max)):ue.type==="date"?be(ue,pe(fe,a.value,ke=>z(X.id,ue.name,ke))):be(ue,d.createVNode("input",{class:"f-hitl-input",type:"text",value:fe,placeholder:ue.default_value??"请输入",disabled:a.value,onInput:ke=>z(X.id,ue.name,ke.target.value)},null))})])])}function Se(X){const Z=Gn(X.ui_type);if(Z==="text"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("input",{class:"f-hitl-input",type:"text",value:Q,placeholder:X.placeholder??"请输入",disabled:a.value,onInput:ue=>F(X.id,ue.target.value)},null)])}if(Z==="multi_select"){const Q=Array.isArray(X.options)?X.options:[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[ae(X,Q,"multi")])}if(Z==="form")return xe(X);if(Z==="select"){let Q=Array.isArray(X.options)?X.options:[];return Q.length===0&&(Q=[{label:"暂无"}]),d.createVNode("div",{class:"f-hitl-field",key:X.id},[ae(X,Q,"single")])}if(Z==="confirm"){const Q=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-confirm"},[d.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":Q===!0}],disabled:a.value,onClick:()=>F(X.id,!0)},[d.createTextVNode("是")]),d.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":Q===!1}],disabled:a.value,onClick:()=>F(X.id,!1)},[d.createTextVNode("否")])])])}if(Z==="authorize")return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[qh(n.value[X.id])])]);if(Z==="date"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[pe(Q,a.value,ue=>F(X.id,ue))])}if(Z==="number"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[he(Q,a.value,ue=>F(X.id,ue),X.min,X.max)])}return d.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:X.id},[d.createVNode("div",{class:"f-hitl-unsupported"},[d.createTextVNode("暂不支持 ui_type「"),String(X.ui_type),d.createTextVNode("」,请升级前端。")])])}function te(X){const Z=Gn(X.ui_type),Q=(fe,ke,ie)=>d.createVNode("input",{class:"f-hitl-input",type:fe,value:ke,readonly:!0,min:ie==null?void 0:ie.min,max:ie==null?void 0:ie.max},null);if(Z==="text"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("text",fe)])}if(Z==="multi_select"){const fe=n.value[X.id]??[],ke=Array.isArray(X.options)?X.options:[],ie=new Set(ke.map(ge=>ge.label)),me=fe.filter(ge=>!ie.has(ge));return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[ke.filter(ge=>fe.includes(ge.label)).map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge.label},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge.label]),ge.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:ge.description},[Yc(ge.description)]):null])])),me.map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge])])]))])])}if(Z==="select"){const fe=n.value[X.id]??"",ke=i.value[X.id]??{active:!1,text:""},ie=Array.isArray(X.options)?X.options:[],me=fe===xn||ke.active;return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[me?d.createVNode("div",{class:"f-hitl-opt-row"},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ke.text||"其他"])])]):ie.filter(ge=>ge.label===fe).map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge.label},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge.label]),ge.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:ge.description},[Yc(ge.description)]):null])]))])])}if(Z==="confirm"){const fe=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-confirm"},[d.createVNode("button",{type:"button",class:["f-hitl-cbtn","f-hitl-cbtn--readonly"]},[fe===!0?"是":"否"])])])}if(Z==="authorize")return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[qh(n.value[X.id])])]);if(Z==="form"){const fe=n.value[X.id]??{},ke=X.fields??[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-form-group"},[ke.map(ie=>{const me=fe[ie.name]??"";let ge;return ie.type==="number"?ge=Q("number",me,{min:ie.min,max:ie.max}):ie.type==="date"?ge=Q("date",me):ge=Q("text",me),be(ie,ge)})])])}if(Z==="date"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("date",fe)])}if(Z==="number"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("number",fe)])}const ue=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[String(ue??"")])])}function ye(X){return d.createVNode("div",{class:"f-hitl-card__title-wrap"},[d.createVNode("span",{class:"f-hitl-card__title"},[X.question]),d.createVNode("span",{class:"f-hitl-card__subtitle"},[X.header])])}function ne(){return g.value<=1?null:d.createVNode("div",{class:"f-hitl-pagination"},[d.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:w.value,onClick:_},[d.createVNode("span",{class:"fx-icon fx-icon-arrow-left"},null)]),d.createVNode("span",{class:"f-hitl-pagination__text"},[r.value+1,d.createTextVNode("/"),g.value]),d.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:k.value,onClick:B},[d.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}function Ne(){const X=e.pinnedWidth?{width:`calc(${e.pinnedWidth} * 0.8)`,minWidth:"343px",maxWidth:"800px"}:void 0;return d.createVNode("div",{class:"f-hitl-card",style:X},[d.createVNode("div",{class:"f-hitl-submitted-flat"},[e.content.questions.map(Z=>d.createVNode("div",{class:"f-hitl-submitted-item",key:Z.id},[d.createVNode("div",{class:"f-hitl-card__header"},[ye(Z)]),d.createVNode("div",{class:["f-hitl-card__body",{"f-hitl-card__body--option":R(Z)}]},[te(Z)])]))])])}function We(){const X=m.value;if(!X)return null;const Z=e.pinned?"f-hitl-card--pinned":"",Q=e.pinned&&e.pinnedWidth?{width:e.pinnedWidth}:void 0,ue=e.pinnedInputHeight??0,fe=e.pinnedBottom??36,ke=()=>d.createVNode(d.Fragment,null,[d.createVNode("div",{class:"f-hitl-card__header"},[ye(X),ne()]),d.createVNode("div",{class:["f-hitl-card__body",{"f-hitl-card__body--option":R(X)}]},[Se(X)]),!a.value&&d.createVNode("div",{class:"f-hitl-card__footer"},[g.value>1&&!k.value&&d.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:e.required&&!C.value,onClick:B},[d.createTextVNode("下一条")]),k.value&&d.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:!S.value,onClick:q},[d.createTextVNode("提交")])])]);if(e.pinned){const ie=d.createVNode("div",{class:"f-hitl-pinned-spacer","aria-hidden":"true"},[d.createVNode("div",{class:"f-hitl-card",style:{...Q,marginBottom:`-${ue}px`}},[ke()])]);if(e.teleportTo){const ge={...Q,bottom:`${fe}px`},Le=d.createVNode("div",{class:["f-hitl-card",Z],style:ge},[ke()]);return d.createVNode(d.Fragment,null,[ie,d.createVNode(d.Teleport,{to:e.teleportTo},vv(Le)?Le:{default:()=>[Le]})])}const me=d.createVNode("div",{class:["f-hitl-card",Z],style:Q},[ke()]);return d.createVNode(d.Fragment,null,[ie,me])}return d.createVNode("div",{class:["f-hitl-card",Z],style:Q},[ke()])}return()=>{var X;if(s.value){const Z=e.content.questions[0];return Z?d.createVNode(d.Fragment,null,[d.createVNode(hu,{visible:c.value,title:Z.header??"凭证授权请求",question:Z.question,systemName:((X=e.content.credentialAuth)==null?void 0:X.systemName)??"",disabled:a.value,teleportTo:".f-chat-content-input-section",onSelect:f},null)]):null}return a.value?Ne():We()}}});es.install=e=>{e.component(es.name,es)};function wv(e,t){var n;const r=(n=e.pickActions)==null?void 0:n[t];return r||e.pickActionDefault}const ts=d.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(r,n)=>{var i;wv(e.content,n),(i=e.onPick)==null||i.call(e,r)};return()=>d.createVNode("div",{class:"f-ec-recommend"},[e.content.title?d.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,d.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((r,n)=>d.createVNode("button",{key:n,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(r,n)},[r]))])])}});ts.install=e=>{e.component(ts.name,ts)};const rs=d.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return d.createVNode("div",{class:"f-ec-linkcard"},[t.poster?d.createVNode("div",{class:"f-ec-linkcard-poster"},[d.createVNode("img",{src:t.poster,alt:""},null)]):null,d.createVNode("div",{class:"f-ec-linkcard-body"},[d.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?d.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?d.createVNode("div",{class:"f-ec-linkcard-related"},[d.createVNode("div",{class:"f-ec-linkcard-related-label"},[d.createTextVNode("相关阅读")]),d.createVNode("ul",null,[t.relatedLinks.map((r,n)=>d.createVNode("li",{key:n},[d.createVNode("a",{href:r.url,target:"_blank",rel:"noopener noreferrer"},[r.title])]))])]):null])])}}});rs.install=e=>{e.component(rs.name,rs)};const ns=d.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-sources"},[d.createVNode("div",{class:"f-ec-sources-title"},[d.createTextVNode("引用来源")]),d.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,r)=>d.createVNode("li",{key:r},[d.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});ns.install=e=>{e.component(ns.name,ns)};function jh(e){const t=new Map;for(const r of e){const n=t.get(r.docId),i=typeof r.url=="string"&&r.url.trim()!==""?r.url.trim():void 0;n?(n.chunkCount+=1,n.contentIds.push(r.contentId),!n.url&&i&&(n.url=i)):t.set(r.docId,{key:r.docId,docName:r.docName,chunkCount:1,contentIds:[r.contentId],...i?{url:i}:{}})}return[...t.values()]}const as=d.defineComponent({name:"FXKnowledgeTraceStrip",props:{content:{type:Object,required:!0}},emits:["open"],setup(e,{emit:t}){const r=d.ref(!1),n=d.computed(()=>jh(e.content.chunks??[])),i=d.computed(()=>{var f;return((f=e.content.chunks)==null?void 0:f.length)??0}),a=()=>{t("open")},s=f=>{f.stopPropagation(),r.value=!r.value},c=(f,p)=>{f.stopPropagation();const g=typeof p=="string"?p.trim():"";!g||typeof window>"u"||window.open(g,"_blank","noopener,noreferrer")};return()=>i.value?d.createVNode("div",{class:"f-ec-knowledge-trace"},[d.createVNode("div",{class:"f-ec-knowledge-trace__header",onClick:a},[d.createVNode("span",{class:"f-ec-knowledge-trace__main"},[d.createVNode("svg",{class:"f-ec-knowledge-trace__icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("circle",{cx:"12",cy:"12",r:"10"},null),d.createVNode("path",{d:"M12 16v-4M12 8h.01"},null)]),d.createVNode("span",null,[d.createTextVNode("知识溯源 · "),i.value,d.createTextVNode(" 条参考来源")])]),d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace__toggle","aria-label":r.value?"收起原始文档":"展开原始文档",title:r.value?"收起原始文档":"展开原始文档","data-testid":"knowledge-trace-files-toggle",onClick:s},[d.createVNode("span",{class:["f-ec-knowledge-trace__toggle-icon",r.value&&"f-ec-knowledge-trace__toggle-icon--open"]},[d.createTextVNode("▼")])])]),r.value&&n.value.length>0?d.createVNode("div",{class:"f-ec-knowledge-trace__files"},[n.value.map(f=>d.createVNode("div",{key:f.key,class:"f-ec-knowledge-trace__file","data-testid":"knowledge-trace-source-file"},[d.createVNode("button",{type:"button",class:["f-ec-knowledge-trace__file-name",!f.url&&"f-ec-knowledge-trace__file-name--disabled"],title:f.docName,disabled:!f.url,"data-testid":"knowledge-trace-source-file-preview",onClick:p=>c(p,f.url)},[f.docName]),d.createVNode("span",{class:"f-ec-knowledge-trace__file-meta"},[f.chunkCount,d.createTextVNode(" 条切片")])]))]):null]):null}});function xv(e){return Number.isFinite(e)?Number(e).toFixed(4):""}const Zc=d.defineComponent({name:"FXKnowledgeTracePanel",props:{chunks:{type:Array,default:()=>[]},isShow:{type:Boolean,default:!1},selectedContentId:{type:String,default:void 0}},emits:["update:isShow","close"],setup(e,{emit:t}){const r=d.ref({}),n=d.ref(null),i=()=>{t("update:isShow",!1),t("close")},a=f=>{r.value={...r.value,[f]:!r.value[f]}},s=f=>{const p=typeof f=="string"?f.trim():"";!p||typeof window>"u"||window.open(p,"_blank","noopener,noreferrer")},c=()=>{if(!e.isShow||!e.selectedContentId||!n.value)return;const f=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e.selectedContentId):e.selectedContentId.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),p=n.value.querySelector(`[data-knowledge-trace-content-id="${f}"]`);p instanceof HTMLElement&&p.scrollIntoView({block:"nearest",behavior:"smooth"})};return d.watch(()=>[e.isShow,e.selectedContentId,e.chunks],()=>{!e.isShow||!e.selectedContentId||d.nextTick(()=>{c()})},{immediate:!0}),()=>{if(!e.isShow)return null;const f=e.chunks??[];return d.createVNode("aside",{class:"f-ec-knowledge-trace-panel","data-testid":"knowledge-trace-panel","aria-label":"参考来源"},[d.createVNode("div",{class:"f-ec-knowledge-trace-panel__header"},[d.createVNode("span",{class:"f-ec-knowledge-trace-panel__title"},[d.createTextVNode("参考来源 · "),f.length]),d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace-panel__close","aria-label":"关闭",title:"关闭","data-testid":"knowledge-trace-panel-close",onClick:i},[d.createTextVNode("×")])]),d.createVNode("div",{class:"f-ec-knowledge-trace-panel__body",ref:n},[f.length===0?d.createVNode("div",{class:"f-ec-knowledge-trace-panel__empty"},[d.createTextVNode("暂无参考来源")]):f.map((p,g)=>{const m=p.contentId===e.selectedContentId,w=!!r.value[p.contentId],k=typeof p.score=="number"?xv(p.score):"",C=String(g+1),B=typeof p.url=="string"&&p.url.trim()!==""?p.url.trim():"";return d.createVNode("div",{key:p.contentId,class:["f-ec-knowledge-trace-panel__card",m&&"f-ec-knowledge-trace-panel__card--selected",w&&"f-ec-knowledge-trace-panel__card--expanded"],"data-knowledge-trace-content-id":p.contentId,"data-testid":"knowledge-trace-panel-card"},[d.createVNode("div",{class:["f-ec-knowledge-trace-panel__card-title",B&&"f-ec-knowledge-trace-panel__card-title--link"],title:p.docName,role:B?"link":void 0,tabindex:B?0:void 0,onClick:()=>s(B),onKeydown:_=>{B&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),s(B))}},[p.docName]),k?d.createVNode("div",{class:"f-ec-knowledge-trace-panel__card-meta"},[d.createVNode("span",null,null),d.createVNode("span",null,[k])]):null,d.createVNode("div",{class:["f-ec-knowledge-trace-panel__card-content",w&&"f-ec-knowledge-trace-panel__card-content--expanded"]},[p.content]),d.createVNode("div",{class:"f-ec-knowledge-trace-panel__card-footer"},[d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace-panel__toggle",onClick:()=>a(p.contentId)},[w?"收起":"展开"]),d.createVNode("span",{class:"f-ec-knowledge-trace-panel__mark"},[C])])])})])])}}});as.install=e=>{e.component(as.name,as),e.component(Zc.name,Zc)};const is=d.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-unknown"},[d.createVNode("div",{class:"f-ec-unknown-title"},[d.createTextVNode("未知类型消息")]),e.content.wireType?d.createVNode("div",{class:"f-ec-unknown-wire"},[d.createTextVNode("wire type: "),e.content.wireType]):null,d.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});is.install=e=>{e.component(is.name,is)},qi.install=e=>{e.component(qi.name,qi)};const Av={install(e){e.use(Cr).use(ji).use($i).use(Yi).use(Ka).use(tu).use(ru).use(nu).use(au).use(qa).use(ya).use(Ja).use(ha).use(iu).use(uu).use(ou).use(su).use(lu).use(Wa).use(Ga).use(fa).use(Ya).use(cu).use(du).use(fu)}};le.FXAgentThinking=Ko,le.FXAppPreview=Cr,le.FXAttachmentFile=Qo,le.FXAttachmentPreview=lu,le.FXBubble=ji,le.FXBubbleAction=vc,le.FXCarousel=$i,le.FXCarouselItem=_o,le.FXChatPreview=Yi,le.FXCoding=tu,le.FXConfirmDialog=Ka,le.FXCredentialAuthDialog=hu,le.FXDynamicComponent=Ga,le.FXErrorReminder=Jo,le.FXFileEmbeddedContent=W1,le.FXFileOperation=ru,le.FXGenerateProcess=nu,le.FXHistory=au,le.FXHitlQuestion=es,le.FXInputRecommend=ts,le.FXKnowledgeTracePanel=Zc,le.FXKnowledgeTraceStrip=as,le.FXLinkCard=rs,le.FXListView=fu,le.FXMarkdown=qa,le.FXMarkdownPreview=ya,le.FXNav=cu,le.FXPopover=fa,le.FXPopoverDirective=ff,le.FXPrompt=Yo,le.FXPrompts=Ja,le.FXReferenceSources=ns,le.FXSearchBox=du,le.FXSearchBoxContainer=Zo,le.FXSplitter=Ya,le.FXSplitterPane=Ui,le.FXStartedTodo=ha,le.FXSuggestion=iu,le.FXTodo=uu,le.FXTodoListItemView=No,le.FXTodoListView=Hi,le.FXToolUse=Xa,le.FXToolUseBatch=ou,le.FXUnknownEnterprise=is,le.FXUserAuth=qi,le.FXWelcome=su,le.FXWidgetContainer=Wa,le.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=$c,le.PREVIEW_BRIDGE_SOURCE=qc,le.PREVIEW_BRIDGE_VERSION=jc,le.agentThinkingProps=Vh,le.aggregateKnowledgeTraceByDoc=jh,le.appPreviewMessageProps=Wt,le.attachmentPreviewProps=Ih,le.bubbleActionProps=gf,le.bubbleProps=Cu,le.carouselItemProps=yf,le.carouselProps=bf,le.chatHistoryProps=Fh,le.chatPreviewProps=wf,le.clonePreviewPayloadForPostMessage=oh,le.closeFXConfirmDialog=cy,le.codingMessageProps=kh,le.confirmDialogProps=hh,le.createPreviewIframeSdk=ty,le.default=Av,le.extractFileIdFromRuntimeDownloadUrl=I1,le.fileEmbeddedContentProps=j1,le.fileOperationMessageProps=Sh,le.generateProcessProps=Eh,le.getCustomClass=Kt,le.getCustomStyle=c0,le.getDynamicCompState=V9,le.getDynamicComponentRegistryDebugSnapshot=gc,le.invokeAgentWorkbenchSdkApi=ey,le.isImageUrl=R1,le.isPreviewBridgeAssistantMessage=lh,le.listViewProps=Xc,le.loadDynamicComponent=uf,le.markdownMessageProps=z4,le.markdownPreviewProps=xf,le.navProps=Lh,le.normalizeDynamicComponentRegisterClaim=w0,le.openFXConfirmDialog=ly,le.overflowTooltipDirective=q1,le.peekDynamicComponentRegisterBootstrapId=L9,le.popoverProps=lf,le.postAssistantToPreviewIframe=ch,le.postDynamicComponentAssistantMessage=j9,le.previewLayoutBridge=ay,le.promptProps=Mh,le.promptsProps=Th,le.registerPreviewChromeSdk=ny,le.renderIconNode=Eu,le.renderNode=pi,le.resolveHrefForAttachmentDownload=Ea,le.resolveRuntimeAttachmentDownloadUrl=Is,le.searchBoxContainerProps=Ph,le.searchBoxProps=Rh,le.splitterProps=vf,le.startedTodoProps=hf,le.subscribeAssistantInPreviewIframe=dh,le.suggestionProps=Nh,le.todoListItemProps=pf,le.todoListViewProps=mf,le.todoProps=_h,le.triggerAttachmentDownload=Su,le.unloadDynamicComponent=of,le.useAttachment=$1,le.useSequentialStreaming=Fu,le.useStreamingOutput=P1,le.useTimer=Os,le.useToolIcon=Ls,le.welcomeProps=zh,le.widgetContainerProps=J4,Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
706
|
+
`).length:0;T=Y?pe+q:q}return tv+T*Ch}const p=d.computed(()=>(i.value,f()>Qa));function g(){r.value=!r.value,a.value=r.value?f():Qa,w()}function m(){if(!i.value)return;i.value=null;const B=()=>{};typeof requestIdleCallback<"u"?requestIdleCallback(B,{timeout:100}):setTimeout(B,0)}function w(){if(s.value)return;const C=n.value,B=i.value;if(!C||!(B!=null&&B.layout))return;const _=C.clientWidth||C.offsetWidth,T=a.value;requestAnimationFrame(()=>{var S,F;s.value||!i.value||(F=(S=i.value)==null?void 0:S.layout)==null||F.call(S,{width:_,height:T})})}function k(){var C;s.value||!n.value||!((C=e.content)!=null&&C.code)||ev.init().then(B=>{var z;if(s.value||!n.value||!((z=e.content)!=null&&z.code))return;const{value:_,originalValue:T,language:S="typescript"}=e.content.code,F={readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",glyphMargin:!1,lineDecorationsWidth:0,folding:!1,renderLineHighlight:"none",fontSize:12,lineHeight:Ch,padding:{top:8,bottom:8}};if(T){const R=B.editor.createDiffEditor(n.value,{...F,renderSideBySide:!1,renderOverviewRuler:!1});R.setModel({original:B.editor.createModel(T,S),modified:B.editor.createModel(_,S)}),R.getOriginalEditor().updateOptions({minimap:{enabled:!1}}),R.getModifiedEditor().updateOptions({minimap:{enabled:!1}}),d.nextTick(()=>{var Y;if(s.value)return;const $=(Y=R.getContainerDomNode)==null?void 0:Y.call(R);if($){const q=$.querySelector('.diff-editor-cell.original, [class*="original"]');q&&(q.style.display="none")}}),i.value=R}else{const R=B.editor.create(n.value,{value:_,language:S,...F});i.value=R}a.value=Qa,d.nextTick(()=>w())})}return d.onMounted(()=>{rv(()=>{s.value||!n.value||k()})}),d.watch(t,C=>{C&&!s.value&&d.nextTick(()=>w())}),d.onBeforeUnmount(()=>{s.value=!0,m()}),d.watch(()=>{var C,B;return(B=(C=e.content)==null?void 0:C.code)==null?void 0:B.value},()=>{s.value||(r.value?a.value=f():a.value=Qa,w())}),()=>{const C=e.content;if(!C)return null;const{message:B,fileIcon:_,fileName:T,code:S}=C;return d.createVNode("div",{class:"f-chat-message-coding"},[d.createVNode("div",{class:"f-chat-coding-message"},[B]),d.createVNode("div",{class:"f-chat-coding-card"},[d.createVNode("div",{class:"f-chat-coding-header",onClick:c,role:"button",tabindex:0,onKeydown:F=>F.key==="Enter"&&c()},[d.createVNode("span",{class:"f-chat-coding-header-icon-slot"},[d.createVNode("span",{class:"f-chat-coding-header-icon"},[d.createVNode("img",{src:_,alt:"",onError:F=>{var z;F.target.style.display="none",(z=F.target.parentElement)==null||z.classList.add("icon-error")}},null),d.createVNode("span",{class:"f-chat-coding-header-icon-fallback"},[d.createTextVNode("📄")])]),d.createVNode("span",{class:"f-chat-coding-header-expand"},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),d.createVNode("span",{class:"f-chat-coding-header-filename"},[T]),d.createVNode("span",{class:"f-chat-coding-header-stats"},[d.createVNode("span",{class:"f-chat-coding-stat-add"},[d.createTextVNode("+"),S.addedLines]),d.createVNode("span",{class:"f-chat-coding-stat-del"},[d.createTextVNode("-"),S.deletedLines])])]),d.createVNode("div",{style:{display:t.value?"block":"none"}},[d.createVNode("div",{ref:n,class:"f-chat-coding-editor",style:{height:`${a.value}px`}},null),p.value&&d.createVNode("button",{type:"button",class:"f-chat-coding-expand-btn",onClick:g,"aria-label":r.value?"收起代码":"展开代码",title:r.value?"收起代码":"展开代码"},[d.createVNode("i",{class:["fx-icon fx-icon-expanddown",r.value&&"f-chat-coding-expand-icon-up"]},null)])])])])}}});tu.install=e=>{e.component(tu.name,tu)};const Sh={content:{type:Object,required:!0}};function nv(e){return"file"in e&&"path"in e}const ru=d.defineComponent({name:"FileOperationMessage",props:Sh,setup(e){const t=d.ref(!0),r=d.ref({}),n=d.computed(()=>{var f;return!!((f=e.content)!=null&&f.summary)}),i=d.computed(()=>{var p;const f=(p=e.content)==null?void 0:p.summary;return f?`浏览了 ${f.explored} 个文件并查询了 ${f.searched} 个文件`:""});function a(){t.value=!t.value}function s(f){r.value={...r.value,[f]:!r.value[f]}}function c(f){return r.value[f]??!1}return()=>{const f=e.content;if(!f)return null;const{summary:p,operations:g}=f,m=!n.value||t.value;return d.createVNode("div",{class:"f-chat-message-file-operation"},[p&&d.createVNode("div",{class:"f-chat-file-op-summary",onClick:a,role:"button",tabindex:0,onKeydown:w=>w.key==="Enter"&&a()},[d.createVNode("span",{class:"f-chat-file-op-summary-inner"},[d.createVNode("span",{class:"f-chat-file-op-summary-text"},[i.value]),d.createVNode("span",{class:["f-chat-file-op-expand-btn",{expanded:t.value}]},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])])]),m&&d.createVNode("div",{class:"f-chat-file-op-operations"},[g.map((w,k)=>{var C,B,_,T;return d.createVNode("div",{key:k,class:"f-chat-file-op-operation"},[d.createVNode("div",d.mergeProps({class:["f-chat-file-op-operation-row",{"op-read":w.type==="Read","has-details":!!((C=w.details)!=null&&C.length)}],onClick:()=>{var S;return((S=w.details)==null?void 0:S.length)&&s(k)}},(B=w.details)!=null&&B.length?{role:"button",tabIndex:0}:{},{onKeydown:S=>{var F;return((F=w.details)==null?void 0:F.length)&&S.key==="Enter"&&s(k)}}),[d.createVNode("span",{class:"f-chat-file-op-type"},[w.type]),d.createVNode("span",{class:"f-chat-file-op-message-wrap"},[d.createVNode("span",{class:"f-chat-file-op-message"},[w.message]),(_=w.details)!=null&&_.length?d.createVNode("span",{class:["f-chat-file-op-expand-btn","sm",{expanded:c(k)}]},[d.createVNode("i",{class:c(k)?"fx-icon fx-icon-foldu":"fx-icon pfx-icon-expanddown"},null)]):null])]),((T=w.details)==null?void 0:T.length)&&c(k)&&d.createVNode("div",{class:"f-chat-file-op-details"},[w.details.map((S,F)=>nv(S)?d.createVNode("div",{key:F,class:"f-chat-file-op-detail-file"},[d.createVNode("span",{class:"f-chat-file-op-file-icon"},[d.createVNode("img",{src:S.icon,alt:"",onError:z=>{const R=z.target;R.style.display="none";const $=R.parentElement;$&&$.classList.add("icon-error")}},null),d.createVNode("span",{class:"f-chat-file-op-file-icon-fallback"},[d.createTextVNode("📄")])]),d.createVNode("span",{class:"f-chat-file-op-file-name"},[S.file]),d.createVNode("span",{class:"f-chat-file-op-file-path",title:S.path},[S.path])]):d.createVNode("div",{key:F,class:"f-chat-file-op-detail-text"},[d.createVNode("div",{class:"f-chat-file-op-detail-title"},[S.title]),d.createVNode("div",{class:"f-chat-file-op-detail-content"},[S.text])]))])])})])])}}});ru.install=e=>{e.component(ru.name,ru)};const Eh={visible:{type:Boolean,default:!0},description:[String,Object],progress:{type:Number,default:0},showProgress:{type:Boolean,default:!0},icon:{type:[String,Object],default:""},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},av="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='60px'%20height='60px'%20viewBox='0%200%2060%2060'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e智能logo60px%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%231EBBC6'%20offset='58.0673923%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cpath%20d='M25.1971977,0%20L45.8523137,11.3712178%20L45.8523137,37.6155801%20L44.4946453,38.9692599%20L24.623,28.022%20L24.6233274,49.9395377%20L21.4535582,49.9395377%20L2.72549351,39.5965647%20L0,34.4406135%20L0,12.8076673%20L3.70534859,10.5019677%20L20.556,20.546%20L20.5567534,0.161454345%20L25.1971977,0%20Z%20M20.7578212,28.1498874%20L5.81325199,36.7628182%20L20.7578212,45.0027895%20L20.7578212,28.1498874%20Z%20M41.8027832,15.9256338%20L26.7716137,24.6706076%20L41.8027832,32.9879669%20L41.8027832,15.9256338%20Z%20M4.06159924,15.4742393%20L4.06159924,32.9879669%20L19.1488772,24.4568004%20L4.06159924,15.4742393%20Z%20M24.6233274,4.32908173%20L24.6233274,21.2862528%20L39.8727429,12.4882393%20L24.6233274,4.32908173%20Z'%20id='path-2'%3e%3c/path%3e%3clinearGradient%20x1='81.0966666%25'%20y1='38.5584607%25'%20x2='28.8545509%25'%20y2='61.9626707%25'%20id='linearGradient-4'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-5'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='44.8152906%25'%20y1='77.6521765%25'%20x2='44.8152906%25'%20y2='3.26462903%25'%20id='linearGradient-6'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-7'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='3.93796935%25'%20y1='32.607826%25'%20x2='78.9687461%25'%20y2='60.0462823%25'%20id='linearGradient-8'%3e%3cstop%20stop-color='%23FFFFFF'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3cfilter%20x='0.0%25'%20y='0.0%25'%20width='100.0%25'%20height='100.0%25'%20filterUnits='objectBoundingBox'%20id='filter-9'%3e%3cfeGaussianBlur%20stdDeviation='0'%20in='SourceGraphic'%3e%3c/feGaussianBlur%3e%3c/filter%3e%3clinearGradient%20x1='56.0769337%25'%20y1='45.0797149%25'%20x2='24.9463054%25'%20y2='71.1433818%25'%20id='linearGradient-10'%3e%3cstop%20stop-color='%23159BD7'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='10.434388%25'%20y1='68.063656%25'%20x2='86.6988821%25'%20y2='30.8651063%25'%20id='linearGradient-11'%3e%3cstop%20stop-color='%2321C6C1'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23FFFFFF'%20stop-opacity='0'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3clinearGradient%20x1='50%25'%20y1='0%25'%20x2='50%25'%20y2='100%25'%20id='linearGradient-12'%3e%3cstop%20stop-color='%230D7FE6'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%232AE7AF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='生成过程'%20transform='translate(-766,%20-1268)'%3e%3cg%20id='编组-7'%20transform='translate(321,%20699)'%3e%3cg%20id='编组-5'%20transform='translate(247,%20488)'%3e%3cg%20id='智能logo60px'%20transform='translate(198,%2081)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='60'%20height='60'%3e%3c/rect%3e%3cg%20id='编组-35'%20transform='translate(0.8571,%200.8571)'%3e%3crect%20id='矩形'%20x='0'%20y='0'%20width='58.2857143'%20height='58.2857143'%3e%3c/rect%3e%3cg%20id='编组-19备份-17'%20transform='translate(3.4286,%201.7143)'%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L27.3406238,30.8038254%20L27.3409512,52.7213631%20L24.171182,52.7213631%20L5.44311735,42.3783901%20L2.71762384,37.2224388%20L2.71762384,15.5894926%20L6.42297243,13.283793%20L23.2736238,23.3278254%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M23.4754451,30.9317128%20L8.53087583,39.5446435%20L23.4754451,47.7846148%20L23.4754451,30.9317128%20Z%20M44.520407,18.7074592%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.520407,18.7074592%20Z%20M6.77922307,18.2560647%20L6.77922307,35.7697922%20L21.866501,27.2386257%20L6.77922307,18.2560647%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3cg%20id='路径-2-+-路径-3-+-路径-4蒙版'%20transform='translate(2.7176,%202.7818)'%3e%3cmask%20id='mask-3'%20fill='white'%3e%3cuse%20xlink:href='%23path-2'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='蒙版'%20fill='url(%23linearGradient-1)'%20xlink:href='%23path-2'%3e%3c/use%3e%3cpolygon%20id='路径-2'%20fill='url(%23linearGradient-4)'%20filter='url(%23filter-5)'%20mask='url(%23mask-3)'%20points='14.177196%2023.2632694%2022.5796859%2023.2632694%2023.4218687%2027.5957059%209.52757789%2036.9780352%203.7254788%2029.0812693'%3e%3c/polygon%3e%3cpolygon%20id='路径-3'%20fill='url(%23linearGradient-6)'%20filter='url(%23filter-7)'%20mask='url(%23mask-3)'%20points='23.4218687%2022.4125055%2027.1161878%2015.1091341%2027.8042533%206.35665145%2018.1506617%205.88610282%2018.8417696%2016.8706238%2022.5796859%2022.4125055'%3e%3c/polygon%3e%3cpolygon%20id='路径-4'%20fill='url(%23linearGradient-8)'%20filter='url(%23filter-9)'%20mask='url(%23mask-3)'%20points='33.5501273%2024.6706076%2024.403058%2024.9983902%2024.403058%2027.5289361%2028.4733448%2033.3539069%2036.4355638%2036.3335669%2041.6970622%2028.387534'%3e%3c/polygon%3e%3c/g%3e%3cpath%20d='M27.9148216,2.78182535%20L48.5699376,14.1530432%20L48.5699376,40.3974054%20L47.2122691,41.7510852%20L23.2743772,28.5628437%20L23.2743772,2.9432797%20L27.9148216,2.78182535%20Z%20M27.3409512,7.11090709%20L27.3409512,24.0680782%20L28.3053772,23.5108254%20L28.3061985,25.7112082%20L30.1053772,27.0928254%20L29.4892375,27.452433%20L44.520407,35.7697922%20L44.5203772,18.7198254%20L45.4350062,17.1793767%20L42.5903667,15.2700646%20L27.3409512,7.11090709%20Z'%20id='形状结合'%20fill='url(%23linearGradient-10)'%20fill-rule='nonzero'%3e%3c/path%3e%3cpolygon%20id='路径'%20fill='url(%23linearGradient-11)'%20fill-rule='nonzero'%20points='22.5927693%2026.8440709%2023.6315003%2030.8033921%208.53087583%2039.5446435%207.30516741%2035.4601402'%3e%3c/polygon%3e%3cg%20id='编组-21'%20fill='url(%23linearGradient-12)'%3e%3cpath%20d='M25.4312165,33.1398658%20C28.857043,33.1398658%2031.634224,30.3626848%2031.634224,26.9368583%20C31.634224,23.5110318%2028.857043,20.7338508%2025.4312165,20.7338508%20C22.00539,20.7338508%2019.228209,23.5110318%2019.228209,26.9368583%20C19.228209,30.3626848%2022.00539,33.1398658%2025.4312165,33.1398658%20Z%20M46.5950591,20.103577%20C49.2645342,20.103577%2051.4285714,17.9395398%2051.4285714,15.2700646%20C51.4285714,12.6005895%2049.2645342,10.4365523%2046.5950591,10.4365523%20C43.9255839,10.4365523%2041.7615467,12.6005895%2041.7615467,15.2700646%20C41.7615467,17.9395398%2043.9255839,20.103577%2046.5950591,20.103577%20Z%20M25.4312165,54.9048659%20C28.1006917,54.9048659%2030.2647289,52.7408287%2030.2647289,50.0713536%20C30.2647289,47.4018784%2028.1006917,45.2378412%2025.4312165,45.2378412%20C22.7617413,45.2378412%2020.5977042,47.4018784%2020.5977042,50.0713536%20C20.5977042,52.7408287%2022.7617413,54.9048659%2025.4312165,54.9048659%20Z%20M4.83351235,43.462539%20C7.50298751,43.462539%209.6670247,41.2985018%209.6670247,38.6290267%20C9.6670247,35.9595515%207.50298751,33.7955143%204.83351235,33.7955143%20C2.16403719,33.7955143%200,35.9595515%200,38.6290267%20C0,41.2985018%202.16403719,43.462539%204.83351235,43.462539%20Z%20M25.4312165,8.37808808%20C27.7447616,8.37808808%2029.6202605,6.50258918%2029.6202605,4.18904404%20C29.6202605,1.8754989%2027.7447616,0%2025.4312165,0%20C23.1176714,0%2021.2421725,1.8754989%2021.2421725,4.18904404%20C21.2421725,6.50258918%2023.1176714,8.37808808%2025.4312165,8.37808808%20Z%20M46.5950591,43.3044363%20C48.9086042,43.3044363%2050.7841031,41.4289374%2050.7841031,39.1153922%20C50.7841031,36.8018471%2048.9086042,34.9263482%2046.5950591,34.9263482%20C44.2815139,34.9263482%2042.406015,36.8018471%2042.406015,39.1153922%20C42.406015,41.4289374%2044.2815139,43.3044363%2046.5950591,43.3044363%20Z%20M4.83351235,18.3420872%20C7.14705749,18.3420872%209.02255639,16.4665883%209.02255639,14.1530432%20C9.02255639,11.8394981%207.14705749,9.96399915%204.83351235,9.96399915%20C2.51996721,9.96399915%200.644468314,11.8394981%200.644468314,14.1530432%20C0.644468314,16.4665883%202.51996721,18.3420872%204.83351235,18.3420872%20Z'%20id='形状结合'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",nu=d.defineComponent({name:"FXGenerateProcess",props:Eh,emits:["closed"],setup(e,t){const r=d.computed(()=>{const p={"fx-generate-process":!0,"fx-generate-process--no-progress":!e.showProgress};return Kt(p,e.customClass)}),n=d.computed(()=>c0({},e.customStyle));function i(){var p,g;return t.slots.icon?t.slots.icon():d.createVNode("div",{class:["fx-generate-process--icon",(p=e.classNames)==null?void 0:p.icon],style:(g=e.styles)==null?void 0:g.icon},[e.icon?Eu(e.icon):d.createVNode("img",{alt:"ai logo",class:"fx-generate-process--icon-default",src:av},null)])}function a(){var p,g;return e.description&&d.createVNode("p",{class:["fx-generate-process--description",(p=e.classNames)==null?void 0:p.description],style:(g=e.styles)==null?void 0:g.description},[e.description])}function s(){var p,g;return e.progress>0&&d.createVNode("div",{class:["fx-generate-process--progress-text",(p=e.classNames)==null?void 0:p["progress-text"]],style:(g=e.styles)==null?void 0:g["progress-text"]},[e.progress,d.createTextVNode("%")])}function c(){return d.createVNode("div",{class:"fx-generate-process--mask",onClick:p=>{p.stopPropagation()}},null)}function f(p=()=>{}){t.emit("closed",{callback:p})}return d.watch(()=>e.visible,p=>{p||f()}),t.expose({close:f}),()=>{var p,g;return d.createVNode(d.Fragment,null,[e.visible&&c(),e.visible&&d.createVNode("div",{class:r.value,style:n.value},[i(),!e.showProgress&&a(),e.showProgress&&d.createVNode("div",{class:["fx-generate-process--progress-bar",(p=e.classNames)==null?void 0:p["progress-bar"]],style:(g=e.styles)==null?void 0:g["progress-bar"]},[d.createVNode("div",{class:"fx-generate-process--progress-fill",style:{width:`${e.progress}%`}},null),!e.description&&s()]),e.description&&e.progress>0&&d.createVNode("div",{class:"fx-generate-process--progress"},[a(),d.createTextVNode(" "),s()])])])}}});nu.install=e=>{e.component(nu.name,nu)};const Fh={title:{type:String,default:"历史对话"},items:{type:Array,default:()=>[]}},iv=[{key:"today",label:"今天"},{key:"week",label:"近7天"},{key:"older",label:"更早"}],au=d.defineComponent({name:"FXChatHistory",props:Fh,emits:["itemClick"],setup(e,{emit:t}){const r=s=>{const c=new Date(s),f=new Date;return c.getDate()===f.getDate()&&c.getMonth()===f.getMonth()&&c.getFullYear()===f.getFullYear()},n=s=>{const c=new Date(s),f=new Date;return f.setDate(f.getDate()-7),c>=f&&!r(s)},i=d.computed(()=>{var f;const s={today:[],week:[],older:[]};(f=e.items)==null||f.forEach(p=>{r(p.timestamp)?s.today.push(p):n(p.timestamp)?s.week.push(p):s.older.push(p)});const c=(p,g)=>g.timestamp-p.timestamp;return s.today.sort(c).length||s.week.sort(c).length||s.older.sort(c).length?{today:s.today.sort(c),week:s.week.sort(c),older:s.older.sort(c)}:null}),a=(s,c)=>c.length>0&&d.createVNode("div",{class:"f-chat-history-section"},[d.createVNode("span",{class:"f-chat-history-section-header"},[s]),d.createVNode("div",{class:"d-flex flex-column"},[c.map(f=>d.createVNode("div",{key:f.id,class:"f-chat-history-item",onClick:()=>t("itemClick",f)},[d.createVNode("span",{class:"f-chat-history-item-title"},[f.title])]))])]);return()=>d.createVNode("div",{class:"f-chat-history-manager"},[d.createVNode("div",{class:"f-chat-history-manager-scroll"},[i.value&&iv.map(s=>a(s.label,i.value[s.key]))])])}});au.install=e=>{e.component(au.name,au)};const Th={items:{type:Array,default:()=>[]},title:{type:[String,Object],default:""},vertical:{type:Boolean,default:!1},wrap:{type:Boolean,default:!1},gap:{type:[String,Number],default:12},fadeIn:{type:Boolean,default:!1},fadeInLeft:{type:Boolean,default:!1},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""}};var Bh=(e=>(e.standardFeatureCard="standard-feature-card",e.primaryFeatureCard="primary-feature-card",e.compactFeatureCard="compact-feature-card",e.standardQuestionItem="standard-question-item",e.functionEntryItem="function-entry-item",e.defaultTextItem="default-text-item",e.hasNestEntryItem="has-nest-entry-item",e.likeButtonEntryItem="like-button-entry-item",e.none="",e))(Bh||{});const Mh={id:{type:[String,Number],default:""},icon:{type:[String,Object],default:""},label:{type:[String,Object],default:""},description:{type:[String,Object],default:""},badge:{type:[String,Object],default:""},disabled:{type:Boolean,default:!1},children:{type:Array,default:()=>[]},styles:{type:Object},classNames:{type:Object},customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},showType:{type:String,default:Bh.defaultTextItem},gap:{type:[String,Number]},onClick:{type:Function,required:!1}},Yo=d.defineComponent({name:"FPrompt",props:Mh,setup(e){const t=d.computed(()=>!e.id&&e.children&&e.children.length>0),r=d.computed(()=>{var w;let m={"fx-prompt--item-wrapper":!0,"fx-prompt--item-disabled":e.disabled,"fx-prompt--item-has-nest":e.id&&e.children&&e.children.length>0};return m=Kt(m,(w=e.classNames)==null?void 0:w.item),Kt(m,e.customClass)}),n=d.computed(()=>{let m={"fx-prompt--item":!0};return m[`fx-prompt--${e.showType||"none"}`]=!0,m}),i=d.computed(()=>{var w;const m=c0({},(w=e.styles)==null?void 0:w.item);return c0(m,e.customStyle)}),a=()=>{var m,w;return e.icon?d.createVNode("div",{class:["fx-prompt--item-icon",(m=e.classNames)==null?void 0:m.icon],style:(w=e.styles)==null?void 0:w.icon},[Eu(e.icon)]):null},s=()=>{var m,w;return e.label?d.createVNode("h6",{class:["fx-prompt--item-label",(m=e.classNames)==null?void 0:m.label],style:(w=e.styles)==null?void 0:w.label},[pi(e.label)]):null};function c(){var w;const m={"fx-prompt--item-badge":!0};return typeof e.badge=="string"&&(m["badge-default"]=!0),Kt(m,(w=e.classNames)==null?void 0:w.badge)}const f=()=>{var m;return e.badge?d.createVNode("span",{class:c(),style:(m=e.styles)==null?void 0:m.badge},[pi(e.badge)]):null},p=()=>{var m,w;return e.description?d.createVNode("p",{class:["fx-prompt--item-description",(m=e.classNames)==null?void 0:m.description],style:(w=e.styles)==null?void 0:w.description},[pi(e.description)]):null},g=()=>{var m,w,k,C;return!e.children||e.children.length===0?null:d.createVNode(Ja,{class:{"fx-prompt--only-children":!e.id,"fx-prompt--item-nested":e.id},gap:e.gap,items:e.children,vertical:!0,customClass:(m=e.classNames)==null?void 0:m.subItems,customStyle:(w=e.styles)==null?void 0:w.subItems,styles:{item:((k=e.styles)==null?void 0:k.subItem)??{}},classNames:{item:((C=e.classNames)==null?void 0:C.subItem)??""}},null)};return()=>{var m,w;return d.createVNode("div",{class:r.value,style:i.value,onClick:e.onClick},[t.value?g():d.createVNode("div",{class:n.value},[a(),f(),d.createVNode("div",{class:["fx-prompt--item-content",(m=e.classNames)==null?void 0:m.itemContent],style:(w=e.styles)==null?void 0:w.itemContent},[s(),p(),g()])])])}}}),Ja=d.defineComponent({name:"FXPrompts",props:Th,emits:["item-click"],setup(e,t){const r=d.computed(()=>{var g;let p={"fx-prompts":!0,"fx-prompts--fade-in":e.fadeIn,"fx-prompts--fade-in-left":e.fadeInLeft};return p=Kt(p,e.customClass),p=Kt(p,(g=e.classNames)==null?void 0:g.root),p});function n(p=null){var m;let g={"fx-prompts--items":!0,"fx-prompt":!0,"fx-prompts--items-wrap":e.wrap,"fx-prompts--items-vertical":e.vertical};return g=Kt(g,(m=e.classNames)==null?void 0:m.items),g=Kt(g,p==null?void 0:p.customClass),g}function i(p=null){var m;let g={};return(e.gap||e.gap===0)&&(g.gap=typeof e.gap=="number"?`${e.gap}px`:e.gap),g=c0(g,(m=e.styles)==null?void 0:m.items),g=c0(g,p==null?void 0:p.customStyle),g}const a=(p,g)=>{g.disabled||g.children&&g.children.length>0||t.emit("item-click",p,g)},s=p=>{var g,m;return p!=null&&p.title?d.createVNode("h5",{class:["fx-prompts--title",(g=e.classNames)==null?void 0:g.title],style:(m=e.styles)==null?void 0:m.title},[pi(p==null?void 0:p.title)]):null};function c(p){return!p.items||p.items.length===0?null:d.createVNode("div",{class:n(p),style:i(p)},[p.items.map((g,m)=>d.createVNode(Yo,{key:g.id||`key_${m}`,id:g.id,icon:g.icon,label:g.label,description:g.description,disabled:g.disabled,children:g.children,styles:g.styles||e.styles,classNames:g.classNames||e.classNames,showType:g.showType,customClass:g.customClass,customStyle:g.customStyle,gap:g.gap,badge:g.badge,onClick:w=>a(w,g)},null))])}function f(){return t.slots.footer?t.slots.footer():null}return()=>{var p;return d.createVNode("div",{class:r.value,style:(p=e.styles)==null?void 0:p.root},[t.slots.title&&t.slots.title(),s(e),t.slots.default&&t.slots.default(),c(e),f()])}}});Ja.install=e=>{e.component(Ja.name,Ja),e.component(Yo.name,Yo)};const Nh={items:{type:Array,default:()=>[]},height:{type:Number,default:200},title:{type:[String,Object],default:"推荐操作"},prompt:{type:[String,Object],default:"输入@获取推荐操作"},promptChar:{type:String,default:"@"},promptAgentName:{type:String,default:"AI助理"}},iu=d.defineComponent({name:"FXSuggestion",props:Nh,setup(e,t){const r=d.ref(null),n=d.ref(!1),i=d.ref(!1),a=d.ref({top:0,left:0,height:0}),s=d.ref(-1),c=d.ref(""),f=d.computed(()=>typeof e.prompt=="string"?e.prompt:"输入“@”获取推荐操作"),p=d.computed(()=>{var T;return(((T=e.items)==null?void 0:T.length)??0)===0}),g=()=>{var pe;if(!r.value||p.value)return;if((((pe=r.value.textContent)==null?void 0:pe.trim())||"")===""){r.value.textContent="",r.value.innerHTML="",B();return}const S=window.getSelection();if(!S||S.rangeCount===0)return;const F=S.getRangeAt(0),z=F.cloneRange();z.selectNodeContents(r.value),z.setEnd(F.endContainer,F.endOffset);const R=z.toString(),$=R.lastIndexOf(e.promptChar);if(c.value=r.value.textContent||"",$!==-1&&R.substring($+1).trim()===""&&(r.value.textContent=R.replace(/@$/,`@${e.promptAgentName} `),c.value=r.value.textContent,n.value=!0,F.selectNodeContents(r.value),F.collapse(!1),S.removeAllRanges(),S.addRange(F)),n.value===!1){i.value=!1,s.value=-1;return}if((r.value.textContent||"").lastIndexOf(`@${e.promptAgentName} `)!==-1){const he=document.createRange();he.setStart(r.value,0),he.setEnd(F.endContainer,F.endOffset);const{top:ce,right:be}=he.getBoundingClientRect(),ae=m();a.value={top:ce-ae-5,left:be+5,height:ae},s.value===-1&&(s.value=0),i.value=!0}else i.value=!1,s.value=-1},m=()=>{const S=e.items.length*38-6;return Math.min(S+28+20,e.height)},w=T=>{var R;if(!r.value)return;const S=window.getSelection();if(!S||S.rangeCount===0)return;const F=((R=r.value.textContent)==null?void 0:R.replace(/\s*$/,""))||"";r.value.textContent=`${F} ${T.label}`;const z=S.getRangeAt(0);z.selectNodeContents(r.value),z.collapse(!1),S.removeAllRanges(),S.addRange(z),B()},k=async T=>{if(!i.value||!e.items||e.items.length===0)return;switch(["ArrowUp","ArrowDown","Enter","Escape"].includes(T.key)&&T.preventDefault(),T.key){case"ArrowDown":s.value++,s.value>=e.items.length&&(s.value=0);break;case"ArrowUp":s.value--,s.value<0&&(s.value=e.items.length-1);break;case"Enter":s.value!==-1&&w(e.items[s.value]);break;case"Escape":B();break}await d.nextTick();const S=s.value>0?".f-chat-suggestion-panel-item--current":".f-chat-suggestion-panel-header",F=document.querySelector(S);F==null||F.scrollIntoView({block:"nearest",behavior:"smooth"})},C=T=>{r.value&&!r.value.contains(T.target)&&B()},B=()=>{n.value=!1,i.value=!1,s.value=-1};d.onMounted(()=>{document.addEventListener("click",C)}),d.onUnmounted(()=>{document.removeEventListener("click",C)});const _=T=>{const S=T.iconUrl||"",F=T.icon||"fx-icon fx-icon-sender_task";return d.createVNode(d.Fragment,null,[S?d.createVNode("img",{alt:"suggestion item icon",src:S},null):d.createVNode("i",{class:F},null),d.createVNode("span",{class:"f-chat-suggestion-panel-item-label"},[T.label])])};return()=>{var T;return d.createVNode("div",{class:"f-chat-suggestion-container"},[d.createVNode("div",{ref:r,class:"f-chat-suggestion-input",contenteditable:"true",onInput:g,onKeyup:g,onKeydown:k,"data-placeholder":f.value},null),i.value&&d.createVNode("div",{class:"f-chat-suggestion-panel",style:{top:`${a.value.top}px`,left:`${a.value.left}px`,height:`${a.value.height}px`}},[d.createVNode("div",{class:"f-chat-suggestion-panel-header"},[e.title]),d.createVNode("div",{class:"f-chat-suggestion-panel-container"},[(T=e.items)==null?void 0:T.map((S,F)=>d.createVNode("div",{key:F,class:["f-chat-suggestion-panel-item",{"f-chat-suggestion-panel-item--current":F===s.value}],onClick:()=>w(S),onMouseenter:()=>s.value===F},[_(S)]))])])])}}});iu.install=e=>{e.component(iu.name,iu)};const _h={type:{type:String,default:"Todo"},message:{type:String,default:""},items:{type:Array,default:[]},customClass:{type:String,default:""}},uu=d.defineComponent({name:"Todo",props:_h,setup(e){const t=d.ref(!0),r=d.computed(()=>{var i;return(i=e.items)==null?void 0:i.length});function n(){t.value=!t.value}return()=>d.createVNode("div",{class:["f-chat-message-todo",e.customClass]},[d.createVNode("div",{class:"f-chat-todo-message"},[e.message]),d.createVNode("div",{class:"f-chat-todo-list"},[d.createVNode("div",{class:"f-chat-todo-header",onClick:n,role:"button",tabindex:0,onKeydown:i=>i.key==="Enter"&&n()},[d.createVNode("span",{class:"f-chat-todo-header-icon-slot"},[d.createVNode("span",{class:"f-chat-todo-header-icon"},[d.createVNode("i",{class:"fx-icon fx-icon-task-record"},null)]),d.createVNode("span",{class:"f-chat-todo-header-expand"},[d.createVNode("i",{class:t.value?"fx-icon fx-icon-foldup":"fx-icon fx-icon-expanddown"},null)])]),d.createVNode("span",{class:"f-chat-todo-header-label"},[d.createTextVNode("待办任务")]),d.createVNode("span",{class:"f-chat-todo-header-count"},[r.value])]),t.value&&d.createVNode("div",{class:"f-chat-todo-content"},[d.createVNode(Hi,{items:e.items},null)])])])}});uu.install=e=>{e.component(uu.name,uu),e.component(Hi.name,Hi),e.component(No.name,No),e.directive("overflow-tooltip",q1)};function ei(e){return e.toolResultApplied===!0||String(e.result??"").trim().length>0}const ou=d.defineComponent({name:"FXToolUseBatch",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>{const m=e.content.toolCalls;return!m||m.length===0?!0:m.every(ei)}),{getToolIconClass:r}=Ls(),n=d.computed(()=>t.value?`共调用 ${e.content.totalCount??e.content.toolCalls.length} 个工具`:"正在调用工具"),i=d.ref(!t.value),a=()=>{i.value=!i.value};d.watch(t,m=>{m&&(i.value=!1)});const s=m=>{ei(m)&&(m._expanded=!m._expanded)},c=m=>{const w=ei(m),k=m.success===!1;return{"f-chat-tool-use-batch-item":!0,"is-done":w&&!k,"is-error":k,"is-run":!w&&!k}},f=m=>{const w=ei(m);return m.success===!1?"执行完成":w?"执行成功":"调用中"},p=m=>{const w=ei(m);return m.success===!1?"Error":w?"Done":"Working"},g=m=>m.toolDescription?m.toolDescription:m.command?`{ command: ${m.command} }`:m.toolName??"tool";return()=>d.createVNode("div",{class:"f-chat-tool-use-batch"},[d.createVNode("div",{class:"f-chat-tool-use-batch-header",onClick:a},[d.createVNode("span",{class:"f-chat-tool-use-batch-title"},[n.value]),d.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:i.value?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),i.value&&d.createVNode("div",{class:"f-chat-tool-use-batch-body"},[e.content.toolCalls.map(m=>{const w=ei(m),k=m.success===!1,C=w||k,B=!!m._expanded;return d.createVNode("div",{class:c(m)},[d.createVNode("div",{class:"f-chat-tool-use-batch-item-header",onClick:()=>s(m)},[d.createVNode("i",{class:"fx-icon fx-icon-"+r(m.toolName)+" tool-icon"},null),d.createVNode("span",{class:"f-chat-tool-use-batch-item-text"},[g(m)]),d.createVNode("div",{class:"f-chat-tool-use-batch-item-status"},[d.createVNode(sa,{status:p(m),variant:"tool-use"},null),d.createVNode("span",null,[f(m)])]),C&&d.createVNode("i",{class:"fx-icon fx-icon-arrow-right",style:{transform:B?"rotate(-90deg)":"rotate(90deg)",transition:"transform 0.2s ease"}},null)]),B&&C&&d.createVNode("div",{class:"f-chat-tool-use-batch-item-result"},[m.errorMessage||m.result])])})])])}});ou.install=e=>{e.component(ou.name,ou)};const zh={icon:[String,Object],title:[String,Object],description:[String,Object],customClass:{type:[Object,String,Array],default:""},customStyle:{type:[Object,String],default:""},styles:{type:Object,default:()=>({})},classNames:{type:Object,default:()=>({})}},su=d.defineComponent({name:"FXWelcome",props:zh,emits:[],setup(e,t){const r=d.computed(()=>{const s={"fx-welcome":!0};return!e.description&&(e.icon||t.slots.icon)&&(s["fx-welcome--no-description"]=!0),Kt(s,e.customClass)}),n=d.computed(()=>c0({},e.customStyle));function i(){var s,c;return t.slots.icon?t.slots.icon():e.icon?d.createVNode("div",{class:["fx-welcome--icon",(s=e.classNames)==null?void 0:s.icon],style:(c=e.styles)==null?void 0:c.icon},[Eu(e.icon)]):null}function a(){var s,c,f,p,g,m;return t.slots.content?d.createVNode("div",{class:"fx-welcome--content"},[t.slots.content()]):(e.title||e.description)&&d.createVNode("div",{class:["fx-welcome--content",(s=e.classNames)==null?void 0:s.content],style:(c=e.styles)==null?void 0:c.content},[e.title&&d.createVNode("h4",{class:["fx-welcome--title",(f=e.classNames)==null?void 0:f.title],style:(p=e.styles)==null?void 0:p.title},[e.title]),e.description&&d.createVNode("p",{class:["fx-welcome--description",(g=e.classNames)==null?void 0:g.description],style:(m=e.styles)==null?void 0:m.description},[e.description])])}return()=>d.createVNode("div",{class:r.value,style:n.value},[i(),a()])}});su.install=e=>{e.component(su.name,su)};const Ih={content:{type:Object,required:!0},onOpen:{type:Function}},uv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHHUlEQVRYCV2XSY8VVRTHT9UbgAbpZpSmaRNMxIiGqZVEE1csXBoNboyJ23ahfgI/gQuXdiRx6UY2utKNEUJjQLrBEEwUmQcBBZuphzdU+fufc+tVw61Xde894/+ce+6tepml9uKhpYMbVpWTuWUTpZUjQc7oSnvUMZvvVZJO8om4ZjzLUmK2bqVZO4g+r3hLfbMHi5plc1lZztBPnftkxeGkbfbCocUvW5lNrl+ZYQdLaurCv3UKs7mlNIHuo9RXsqJtHuKZwFRmxH+4ZLbYq3mS5Z76/dOVH2WKvCjLb1e3zHQPHEszIZDNfxY0AyAT9QNHSaoJaf0KV4qHApAcBu8+NisqwBUdO3mevZcT8aRE27mEaamLCdJShEaGknM4QkQLIJqbrWgsUwy2M3osnYtDS2qDQVlkkwDIJjKYrUbSSp0bDy96ugPJeYbUsyyRjbDXwpK31HkkjDusv5rsPa1PPUzkWBlpKX+VosKleS1Aq6IcOAgmWUkQkaFwo/jcRpUJJvy6/WR7kDU37/oEMNLUtC30lV64dilhKVg8sdo5DxeLQlX0mqs1PbQYV8Qq3Uu90Bc3xJQJKYZ+U327kdREdyDuWTpJSfzMmoDo9pNBtxFG2hSvU0WTjowUhXVZfzmVyQoGBe9zZU3UZo5RGXaypBEYbhf24SvaEj617/7s2/UH1AF8AnLi2zsatnNTwwvrxv3CfryoonAVr43NQ2bv7GxaL9XAVyd7NqedpKVzN3gEQ9NT63pQPd2lPUDwrecbNsK5oHZ3vrBvzvasJbTaT4D8eH/TxoeZ0249KuyH84vExCWriOwfy+yDPb7C9t98aZ//zGkmvtTpXZNxrvRHktTDJJBOr7AT1+ujb9dmEobjFtpav7E15cC5dLasyW3rMwGs7PdN9+4tAU786Su9VEsR0OA5AKB1KQO5ouuQ56MoVW3Xs9osIGNdm1lhb4zXxiuZfTgs4Eu/pN896pE5e/qibAUddjT5ZMRhVM1FEDdj7wLgcjcYPIdX5rZ9GK6ywAHw+rbaeCU0sbVBlqIOtpCh0bU1yGMXOp45mfcdIDcOREuBjjAEDp4g61I4tx4WduleqiD4SmlZ9NnvAHgu1vbOoz4vGQzQ9o5BA0Ch9C+L/o87Pfv3Md7k3CXlI40JKGAO0s82S4Ake/yqCieajGoZdmzMbf1QqJ240rHZ6yGzcXVu4yMqw9J2bw2A0jx2kUwqWhWnOr986I9YgbQeEuz1ZZwbUEcu1XWwZ1QRlvbqWJ3+GQCeWgZyAl7J8u1dDuACAOScZKrO/ABTLgSKGwC6YqIt5Gc3DI1PXusBSJK8atc0bHSN2Wvb4nwQ7QzRz16rs7RvrGV8U9j4ugC50C3tFDbcg0DoR68dJefymwsRP5+oDNmBPGGBdr6b2ZmbdRYmWOc9Kbq/H/TZ/yV1Utg9zgm1feMt27etTv+vV7opo7XNquZcAb9UVjhX3wWxg0lIxTl+uY7w/b1DNpROLqVeQHVVWRhZldu7u/ksSu0Y6dfBIzeKVnc0tETnTjUgchYFqFRVRQntiIoote0b6uh+IzNZpnrJbOZaLbNrrF2J2zS6pVLuzlSegktTlDQth2dASETUue08pPKcfU1/7nZh99NWc630OI1TmROIGVL9dLt5v28X7xbhEpnMqw2n4RtH/HwbOkHVqTddSpYy4Kigo3ziKQe3fP0jAmXgBi+qOw/rM0NgpnX4EF8u57KmMlnmXDTdsaHhqPgcFUjE0DJ4wlCavvRkhLMpeqm7AxRmrz4pc+yvqP5Iu1ty+/WRH/4Gi9qJ49oRxfkkRJHin8537aVN8yknZkdVXIqM24mA/v7skt3m9PQlRPMXP0NYRkWttcSWotWu8wD9yfjNrxcpfT67F7QFGegnJQlyFyoMjuC1rYLXcbWmGMvBrtczsnoH9Fk/vbZDGX6G80YTG7hLYONLCNtq0qPzLyJN9KXjRMlzDT65VMU40odIW2PdHgtPjDtYKN0Sh7p8UWWau3IufxLk58lQclPzJdCHI6aCJDlFL0nGWmMZ0orm+nil8T5yUHKifVzC71JleUObCl1fPRWfLtfwPsemA5ENLo35GsvmOl3+isk/tytorObRIshC9gs49J5SMIXhJEYX7xCVpYxINkkQQGw3mYc38KFKy+aajzvlDP/dDohRmYtsYACEypybwuC8/z2rnBMDNEXBHwzeU8qaeCkLFUTqSvpuQw4qP7KbZTPNhW42hZEDtQAcF4peS6qzQEgW2CmSEyjRfUDnDlLE4g3cMXaenjDE03yQhaycyuNfag6IYIivFoppDFMOdWvt3HmScbDUgLab7louOUOuXvfQh6RsTZ3+bMVhByTCy18sHWStJim6Cb7t+LSgCRRNY0c/mEfqB5HIeSWjkUcjAjetskX9zFFPM3nWxHnT/57/Dzj0fqfCZcLZAAAAAElFTkSuQmCC",ov="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAHeklEQVRYCV1XW2hcVRTd985MZjKxNaVa6cNqnwbaftSIiuiPilh8NC2tWh+lXyFFbMEKgvgABQUfIGoxWqGioFLjR0GQlqooGhptjNU+9EPaarT2IUySZt73Xtfa+5w7o3dyc885+5y91l57nzN3AnHXjoOPbJAgGEhEegNJugUNCURqzbrUk5ok6GcklK6OLrTRwc2PxPhLYkniCAswEqPtbXiWGxekEdUkxniQSCmReDSO4sGP+vYPERoQIjtGtr2JRQOB9tQ3Rh0DPMvNCnAi6cwUJROEBk4QvQluoCkBR6QR1UFgqkVYiWKufmRwT9+BrYFFLh/Dl7sSCAEN0PeEIgA044bkM3mNlkYFR9R8sq8qEIB9AMRRU6brUxiPNHol5whwfsK2yMYsZaeRYFzrwVM6GMuEoYRBBxxRZkgOQubEOeJCOFQHrl1uTEsEcKpDGwFjZ0sVC5KBLJb26kJkw0iADDPjCBHQR8n1BgRnKQknqToHIZCsRVWJoJgBeQJGUpXD3ITkEunN4n93GjXm+LaVAxGJadIyCq5ScOaRkVFIgpMQKoWSVxtlDBkZGHW+X6trdK6u6876PPsU0F+rzdwagDkkCPueEOGtr+BwPF2fNGKOnE8BSbZI2BrWTbaOSs2FHQwUFwzUni0YdRGj54dPFxX7nGVzGLXZKoi8qYWJPqNsA9X6cX3vm4Fka0ogp9ITnCBRxEi53smNZ7sz2ii1H0tirEHO682qI0pCppbVSosMx9vVRBHGUsE+78wWzaGqwJRiEe55nfPkmjnX6SICY5J8PX5AzpfPKohGipytWbROsmGWZp0zdnpEfj47iq4D5w6iAvyoShYUVgQ4YiLRVAQZBdK8AzyKIvlzelw2dW+WK2Yuome9rpy5WF75/llETZKR3L74bll/1f3eLGenT8ueI7uVIGX2kht4q88gQxYcG9VmGYBNnUyGXrqo2ZBdP+3E1qqlAMtm9cjNl6/Rw+ay4nxZu3xTaouw9tXh5+wQgl+Cp4cUI9fbpxYEfJW2y8IcKXMewHBwhhEdfz8FYWPd8vtkftdC6V+93aR31qFj78nRc2P/CcQK2MhYDaCt5BIJWZ0EzId5rWztY4ys/RaERvLlqX3y45lDKYlcJidP3Pi8LLy4lZpfzx+VDw7vgjIOQKNFmjTvLVAGS5/ECgkeJgG+6Zh/xxILtJpgCzDGYuS8d8bekMnaREqikC2kbW7Bl755CqSbEoSabdvRDIRE6Bt+VFn4sjawYZECvmQ8S/Y9EQPGInyPkvFktSS7Dr2WgrY33v1hp/w9OY61zjlJo4ipJH16EnySBGtMFcjzENIgwRIfLgiwgOAKrG0qgWrF3+Ez3+kWbAevN2sy9teIFN1W1mCcigyGvnxQJOjJkBh2bgagzAmJsvgYgZfMnvSFI0od9fVskkuKc9rxpSObl4FrH8O7QgZf2QyIcy16KzZ3BpCI+jaVVQGViOCMmEbIZiTIGo5oY8GgvWTWUlnbc6+O/f/f1fOvl1uX3ikdIMBvU42camqxEdj8+XEM6BwtQisIG9A0YDKJ8YiNQYj2HKLr730U7waZFPuXc0fSNhsPrt4qc7sW4FTt1DXMsx5Wqir90RdTwDYCxjiK0Bvw9G08qbgu0OgjuWfFFpk7Y0EKOD5xUp7et10OnvoqHctjVzx8w5OSxSefMRIE0mDgp1UHLEDe3IZkQpH5guBYKUP0yZ57evmsFXLLojtSIJ52r3/7Aux1eevgi7o7vHHJ7B5Zv2oLDqdc6/0R872SFqRhtilgcnh5aCAJFAW2aEGl54uKv/Ye+1B+++e4vjdM1Ery9sjL3qTPvpUPybLZK/UlNuGhxBTwo8q2lLYiZJQuN5zAYgO8Rs7FD6zql9nFS1OAP0onZM/h3Qoe4HzAmSPDJ76Q4ZOfp3NYJ9tuekby2JYF1gP9Akefrqb8jgv6P9tIRDUaAccwSvANWZOpyoQrSCuoAo7sPLYd1eFrCXeN5pkAmmcd1fcL3boYLVcnpR5XsYS+tbjUJzqsAZOG4HYrG2VcqV/AcvQ5B855LNci/EaIcdziYGKfKoAHLvpBm/N5saboE6CdObxrtOF4NWjHNvTA/mkHSLU5bUB0CBBGg7dzfdJG7fXEZBSwaTpABFMwh/WDC6A6B/bOnP2i8niMXmsAVEu6AxxbRtHAz7Ea3pL0Ql8dgoeXL4ICjUYFbkmOMXOOkSMRlR6RS2BBMWK+LeWwM/wpS3CsKVGBUVBRqQgQoF3B7zl1C1IwENkiJKDesf7mM5uzY1yjZ0qUNJ7wpWeAC66AoiRRrmNqiB1i+SCBLToUDPIeRw2VR5VROWF3zuAVTi2/F/DVzHGO8dYi1G1nwPY+YQQJyruYnQHfNoayHgx337V3CO4H6YhvtTW+2TICd3MRZfMONDrY2G9ilzSQKhajRqSOPSB9WFvzToLo82ceT0w4GBx+vDKkiqAnmz+5bcNUtTSQxM1enIDduih1QAUYNZWCU8SaAqJ3UcdMyI9KgTLMkNrcXKpC0owatVGCj1HUyeCn237Xn+f/Avavy/P8wtVMAAAAAElFTkSuQmCC",sv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGCklEQVRYCYVXPY8cRRCtnt29s/EhW0KAEAkxmXUBIkBkRERwdoqFHNiW/AMwPwCJECTYEDKEnYJk4+ASIwQ6WSIjwJKNQBjO8t6Xb3dvZ5r3XlXPjIzX7rub7qmuqvfqo3v3ksXIH53fsJQvmOV1y3aqyJ8055x74sZyAys8EqS+hX2pcC9b3t6xPD/i/gSPrWxpvPrNjWt0QhvLV85/CU2AP3sQXEDmwEIiXkuKLw4sb5DnBgz/nWju9NL42Lc3LyZFbs3VZ0O7RusATrnmj0ceURMMg3JfYEVC+4dme4ctUe5Xls4MlfbQdYvHnnQ4m4N9KKVkmYiDyqzCX+C6VYArG65PcI3jq5Z3D7QsQYDEhSE8rLvGkudRbfZwDzwZSZAo69WR2ck1EAlbYLU6EAmcMrIk8dHAjP60R3+2XmHvqQ1XlBuC8ifA4Q+ZObL8cBcLuGGz4afoQ63LGl+wn4aM131I0fIpSJ42oNws6KmtMyEEVRzNa8vTmVUrgyBHfwhbme+DwY6s3YF7gY+lBErtqM9RIpQ8hCUbNkePDFHjICp96DBJjNgnMKoSEiFmkvHxRAKljllHDdGfPWeDd8+0RssWeTbFmf/b6p82rdn8TuDMVhKZx7LBkoBhaR/5FDAYo10QMY5O3VgNxoXQMuAiT6vHrHr1NRu9f85GF68QGqWAPQJp2CN1NKCOqhP6XwZ0aZAAvCpbWLAB0b/taHYnciwBw1AoONUnnsdSibfB66dt8cbb1vx40xKzTjHLESWhLUsmAoxQ+2DmelQEa8gpqXjme2Pn40uWD3CrjnAMkV8RxX56bs1OfHDZVk6/Ke3hW+/Y9NYPOsIJfhrcJ06A0bvD1rNH3kPhkjwGoLQCoP7ApZJWcIeJrQensu3v2v7Xn7Wa1YuvWLPAKSEYH0cLTA7u5UYPtHWRGSJGOK5EdNaMNaSH/tA1ipgSSoM/MEEBRCjv7VhzsOfKo5Wwhd99NGiEzblk2nuATUFmBBJWmXHBoBFd1hEgGOOuAMwf/ja4L3hbVmtrVqEXOOr7f8q0gY90iM+CdngW6HjoeHp2QCwqu5YdHKxbWy38pCR8KPiJAYfB0KqXXrbjGx+2qvOtW/CJXto9tLRoeA20/tyvLiIHLxdPP1rGKVbBr3g++elXZbl0rrfv2+x7fOTvPrJqhtuU4KHdD2qo1DPKsqvLhykqvcAz1G4uBexvzH/9xfa++MTyPw+swtnnFayysczhqs1Ax4ZpB1TR6Hnswy/u/W6HiEwnAGWKFpBdgzov7t2x+u5ddPxR15xQA7TK1XMrG2SgE1GJgyTaDOAY0VkZ9YNtm25e14VT0XGDCNnEPG6oM4n51VuuWQBTCJ+8V9Q1ESTXOAVINSPhoMPY1CvXIoAalkGwR1O9hTvZUVChy0icgH5SQEbY1ORgy/pwHJ4C+HNWWGBQsdGxxCLI9DhRRTo8+z4IFsThvUp4Q0CciOZazChe9FUqdMN6qGMUtHQSxIMGodEu/J0OSdhnX+s6jjRTKzETEWubXVhQ1hGCInwPWRfX7ZWCXiR3Im5EIQbUieWXkIv4ZN0LZ+nrhZBcADxwhNeZoQek6OmXPIBdB67guf7rD5vf/lmixZ3fPAr2Db+UoocIXgaBCihTTncdtaIIDd+wNL981lUk6BQadXe2xXRuNb731XErVgBNAGfDMQuBIIziVJBsLrgrMp/df5FxH1dxVxdFQSLBjjPTqT+ACZDvWFOmjpfPSLFkFEiIp8/+HutuW/b0OSmMSsNo1tEEKCJlivmFpCIhrKt+zltQEnIQzvKh1y7dkjMzpObBTfBxl7dEVMa8fl2BEYo5P8kierJl1RU/HQDAQQsIEZ0ErQuQXIe4aIiMpS1WdOyKYYLInSkB4mZzNnINDkSNElBXOP7AmpEX+5IFN4GcWQ0dylLK42r4+dVriHBs0XSQx5CKrwXooCFwYL3AMeYCGiJXgwvulqwK3bWZxvELN25fI4rG7NJ7G/jywf+Q13Ou9d+SosHnQDPZb69rAtFIgHSmX1JwmfaYBRdQypX0sTfB2xayKHDK/wNolX2UI+Wo7QAAAABJRU5ErkJggg==",Oh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGLUlEQVRYCW1XTY9UVRCt19M9MwyiAxojRI1REImJRAfQhcSVGmJINMG9G5LRH+DOxJ0JP0BnpYlbMCYqGBciJmqIZiAsSARUUDQoYGjmo2emP97znFNVr3vUm+n76ladqjpV9973oLAYcyf6hwZlOVtVNmNWTVcQDH9lPLnGcr1Oa9cTRoD8KEoerstS3m1g5pe71dw7h6eP0b3g9O7x7ntwnKUsR4AzoQIymGzUU/DAFDlS53Il0qlTnABSJpHOGnzKau7IG1teL7zywVE6OJjoQnIGB1gEmEk4JQ0yAqWvP9PPn8DV/obkpQ1K4pClarzaZNs9OuEcnlyVY1UBzDEk586upUF/9ZJCFkM5Wi9df1B58iRkg9kmwDNKFoFSromMZmBzMPRYR4w6D+BEA5d4PJHTVteEkr/jihkQKKcVFEwC7wePieg10pG0J5BrVsuhp+SR7ZO/GStfQXKC3IczcDjszdpZQQiihlgXSu5BqKXhxDWDSRHY/9Ex/1qvtH5fIT00fWpsZc0S7KTjlEMALGSIR9hFbAQ7gD8H9byyVVVgnyskxY+x0y+6kddaPpianS69PcmGcQ9UHzw3iQcdkhDFPFxsrcf2ZNhSkTEQ4chO1nLk8u0FgayITFOJ7amvTlbAUlLO5PLRNPLCUtqiPkfJ3rsjY52Hrs2sHuFlzRZxlQmFcXOty+SRX77ug7nGupBFEkQ5zJKbXGTlmXy8ZfbwVp3PCJbtrez6rYHduxm84fjz731bXoGAxe5HWtr728ulbb6jIUI5sWM9HMRzP63VuZI43wNiNMpy01RhLz09kf7rnp9+t2J7do7b1rvHbP5C1z76umP7do3by/un7OT8ij32YMtmdv7Xd7FT2rlLIMBo4kypwBmI0yklbdAvLFV2/PSq5AP7JmxsrLCvzq4Zg1y93reb7YG9dmCjPbmjZafPN+z5PZN2a3FgX55ZtW1bxuzCr13b8UDL9u6atD9u9O3UmRXr4lZkh1UscnGNLXAm2ps4uWs9s/NXBqL64l4QgHTxas/+XvDXX3uxtLOXevbUo+N2+OAmG28VdvTzRet2K7v8Z99+uVbZxHgBAmbtpdJ++JFfH4XD5KKvK2uocnSh0tF3q5PxL5c8wond4X4y1klUxXvO5Feu9ez85R46Bgv/COCPI3R8oaW/Y/xcNWpsbIWS00/ew0lBY8lte+i+pjWxNRzb7mnaXTg3HCLBp1Y+1cRCqyIC0BDBTB6OTKDfaBTaAKa+iQvywt4NuAGlXfitqy4cfHZK4enivu6stdjzGxHvi4hFIg2COTJ4rl0nkybZASV6/xOTdufGhrbh41PL2ord2yds+zZcz4g39GRsj18zDCNj6sIqOJR8cngy7pGvQ6n1lk0Ne+bxCfsL74MzF7t2Ewfzm3Orgrzy3EYrsBN52t1P80jMOEcKzWuIJEoUCrYlB/Wf4d4z6GIHOBhaOHSffNuxazd6/j2A8ovvO7pu9JvCK2CxY9iann14YsFuLQ08OWxej8fPPMVb7y9Iw9ZNTfo+8YPCl0SCRBLp64aIpH/3l/Bu4A0qS7+iDJbb4P6O80JhHLEzXvx7wFkNQXCKTnhyuqENwcAZx+cXFrWcJGjHj3aHZnL6pw7PkBm76Szp6AB3pByB5Ip1EsKTATTok2v5cwoTA6UOqnXdFMavLTrgrfWlV5nJGYryuqAef0hIoBoiaJJ1/3BAhxRXb1vkxJZx6/xjFExjG+EBMEP9K7nI0FZXTfL8ZXCW5qW4PgqAVqE4YYx2Qy8iad2mgOTGEXjpXB5JBMjwuolu+DipoT99kojLDnRdA1esTUZM6RX6s24jnWFXQ4gbxbJy+KkiCIpDaMh08k5QiT/4JibIt/EmtPkaSBKkpwkPRNJHRCpXpt3JMoHDk3ztzK2iDVONYWwO6fEoivkGPmhzDgybql3PXD5wykoVFEpWUXeHQairq/QYo8Xw4HGt6oEtkLtxZBb/SxWJCAaDQmmKKpJU2JTL80HjeOpEUBrows6Htg2C5HSwau6Dt+8/5kcWyjfn2oemWgP8D7kxMygH00QziLd25E3HKBiqHvIy3oTkJ10IddsVIBK73AZ0vrBCyenzD7OyHHaTkJSSAAAAAElFTkSuQmCC",lv="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAIKADAAQAAAABAAAAIAAAAACshmLzAAAGkElEQVRYCZVXS2udRRh+Z+Y7zTFtk5iml7S1XpBW3HhJdVER0YUKikhtRNCFF5TYheLWjX/AlRuzcOnO/AXXIpiFG0URoUWq0KJpLb2eb8bned6ZcxLaCP1O5szMe33ey8z5Eqw+5czyKSt5Bdsli3vnRB6dB+k6lgV/2SVLsYJ1IE108pw23jf6plk6pWyEYOuhhNXwyPdrNBj4Vc689qXlQudm3QGoJS2t9GbX/8B6hOEgCpzROeexQ4EjHRTSsZ/IEXjjYV31ILuaHl3/MHjk/TdEaHEPxvTYkBzlq2Y3zrkzOWD0XNBJM+h7OmqOmyPOkmsgMvRDDaDYcoShFQqFMJRz2a4oIYbtFOgzQq40ykmLUNL0zoVkVJrmtM4OGNbgXCAzs0SdvBLxtUTDJd1dIyPD0+xC2HezKFa0QKXxqBmAtNEwsyFwVR9eW5kcOAWd53KSX4pANRfibjA7qgMEnXiEboB6oIYZ8R0A00iDeOi4OQM4lY00Aa3louaY5mup5zIXA1WQYndMJlHSMI1x8shCYhlEqWwH6ptJXb0Hqh6BKTuTyEGRXdqn7a6EnbCBVqiIZZBfAjJRFKw0a2V0ofJcxh1WueGDFhc/RtvcZ+HKT5bPfV5PEfjVXusDZQBgOjUYFkSmR7ItddUJJqWWWRj9gx2OpTLjdOmCF+//wkLnV4jNPm1xeK/1Py+jd27QEP5q9DLrPtBZ6MPKbChZ32JMPUd1rgzBCPulloV8zxzoO5+YOJcW9KaOmO1+EjtPdyvn5pm5B5+jatE4hqoNWpATp8EM+mWXDMpoPVa+ZpS3PgH3inULEJnUXmv6Aw3h07l2mDxiORKtRegArFu0MjyGXpweN1cDGP79zsqNP7cgKFd+Mbv2O474rLJD+5ujp++uaZChk1AJbhhQMq5jgCmocTr8KUpwl+WzV61c/FZZyrhUvD+GuNI/s7BwysKOQ1au/WblwtrYoXV7LfTXcLtfZujj0bErme7mvNWUWfBaUzxb3PeuhcT7ArIHTlu+hIjzZb+cEk4SLjLrL1r56ysWzUEBuHe727DBfrQNrvZ8E1Y8814CbPSppWjN5bTeytRRi7sel3N+xanDFuZfrWWAicE+2GuAGRBLWTPK7OkukCb6ASAkWwGo2SRMAUfejJUesUA5LbxB5pYnLryOfbIyWJA4v5Q90FgW+sjQLfhFVXZrf/HHjld76wdlwDveETnD1wSk6KePbnHOTZxaNNtzEg05lKPMIA68b/HY1xbnXxTNywobygiUiIo2cSpCGKg8AtDq3hQQNl4PMNCAac8r9HfbJy2chBxKhBH3v2Np/gVcKwNLix9Y2H3CecyCDhe/HEzARVMGe5WFSOfNMaPPPVFSFgqoV9z1mO9v852QmTL1gIWZpwD05S0S3eGPoI9jiw9tFf4EMxPVfEi4T9DUuoi8duRUMIicYOL880hV6+Mt9sebwf43bXDo9HjfFiENLR35pDomDHwULPGwN1CyHQhQkFgbDU5g6tNZmn2m2dt27maO43jyB+3WJ+18GC9ZL7kzOpSIl4L+GK5fxUI3YbCucebEtoZvdbU9pTv4tmVcYq2nVIoGBnHXDPAi4rHBrRdYJ9zRc89tb/UOOMxOd/A9aHhe+T6oNTMOmpqQDjWUCQji7k7TD92Bm/8XTeilsuMgfKC8uFvgRs656ASoOm73QRldsv7SDxaG90DQz8ikFblqg4aIna/tfJw+6dsql684T3XHEgBcBl0w+vUtvWixRkKI+rMU/egm5lE957xKUB798NChQnBL1OOzmcaoMhoM/nmKYoy4H/HyVyLWLi4A0MGbKH8YIKgLhYrsVl6faETPFZigwU+gRUWhN0kH4imEBYJinWkLkYHOtTsmSOjw5cfFuIU+3gnj9bMb6Po5Jlo/GrwsACJiUDoydtRtQIN0LjpYtERjmimLlcCTyHPODtcLBznIBkBRBU5rHORvENI6BciQIISYnqj3ZUaDCw1rvLspmoQoEgT4z1uCnA9Pd4IcR4QMdSjHwLCUHdpX6jETJIjrAFZWBZdMDAFhrZlGiFGZhqIG1jLMmUB0jjXzzabTnv9ZMnK3x5rTTguyZZq0kPNq5H+psA0QkgFCjwaT0FJwclVj0wSZ47bGTOBbmhNcOVYw7CsPSCo0A5/ds3+vSYb78uPxU31/cwUAlnLf490aDqqThppyPClthltlajyD54C9nNKvNggQvA3Q1lFOOD+/Rjv/AYfYvIrlGomFAAAAAElFTkSuQmCC",lu=d.defineComponent({name:"FChatAttachmentPreview",props:Ih,emits:[],setup(e){function t(c){switch(c.toLowerCase()){case"doc":case"docx":return uv;case"xlsx":case"xls":return ov;case"ppt":case"mobi":return sv;case"txt":return Oh;case"png":case"jpg":case"jpeg":case"gif":return lv;default:return Oh}}function r(c){return c.icon?c.icon:t(c.type||"")}function n(c){if(c===0)return"0 B";const f=1024,p=["B","KB","MB","GB"],g=Math.floor(Math.log(c)/Math.log(f));return parseFloat((c/Math.pow(f,g)).toFixed(2))+" "+p[g]}async function i(c){var f;(f=e.onOpen)==null||f.call(e,c)}async function a(c,f){c.stopPropagation(),c.preventDefault();const p=Ea(f);p&&await Su(p,f.name)}function s(c,f){const p=n(c.size||0),g=r(c),m=Ea(c);return d.createVNode("div",{key:f,class:"f-chat-attachment-preview-card"},[d.createVNode("div",{class:"f-chat-attachment-preview-card-inner"},[d.createVNode("div",{class:"f-chat-attachment-preview-main",role:"button",tabindex:0,onClick:()=>i(c),onKeydown:w=>w.key==="Enter"&&i(c)},[d.createVNode("div",{class:"f-chat-attachment-preview-icon-wrapper"},[d.createVNode("img",{src:g,alt:""},null)]),d.createVNode("div",{class:"f-chat-attachment-preview-info"},[d.createVNode("div",{class:"f-chat-attachment-preview-name",title:c.name},[c.name]),d.createVNode("div",{class:"f-chat-attachment-preview-meta"},[p&&d.createVNode("span",null,[p])])])]),m?d.createVNode("button",{type:"button",class:"f-chat-attachment-preview-download-btn","aria-label":"下载附件",title:"下载",onClick:w=>a(w,c)},[d.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])])}return()=>{const c=e.content;if(!c)return null;const{message:f,attachments:p}=c;return d.createVNode("div",{class:"f-chat-attachment-preview"},[f&&d.createVNode("div",{class:"f-chat-attachment-preview-message"},[f]),d.createVNode("div",{class:"f-chat-attachment-preview-list"},[p.map((g,m)=>s(g,m))])])}}});lu.install=e=>{e.component(lu.name,lu)},Wa.install=e=>{e.component(Wa.name,Wa)},Ga.install=e=>{e.component(Ga.name,Ga)};const Lh={activeNavId:{type:String,default:""},displayField:{type:String,default:"text"},disableField:{type:String,default:"disable"},horizontal:{type:Boolean,default:!0},idField:{type:String,default:"id"},maxNum:{type:Number,default:99},navData:{type:Array,default:()=>[]},navPicking:{type:Function,default:null},valueField:{type:String,default:"num"},visible:{type:Boolean,default:!0},customClass:{type:String,default:""},customStyle:{type:String,default:""}},cu=d.defineComponent({name:"FXNav",props:Lh,emits:["nav","update:activeNavId"],setup(e,t){const r=d.ref(e.activeNavId),n=d.ref(e.navData);function i(g){if(n.value&&n.value.length){let m=n.value.find(w=>w[e.idField]===g&&w[e.disableField]!==!0);m||(m=n.value.find(w=>w[e.disableField]!==!0)),m&&r.value!==m.id&&(r.value=m.id,t.emit("nav",m))}}d.watch([()=>e.activeNavId,()=>e.navData],([g,m])=>{n.value=m,i(g)});const a=d.computed(()=>e.visible&&n.value.length>0);function s(g){g.disable||g.id===r.value||Promise.resolve().then(()=>{const m=e.navPicking;return m&&typeof m=="function"?m(g):!0}).then(m=>{let w=!0;typeof m=="object"?m.canContinue||(w=!1,m.message&&console.error({message:m.message,position:"top-center"})):w=m,w&&(r.value=g.id,t.emit("update:activeNavId",g.id),t.emit("nav",g))})}const c=d.computed(()=>{const g={"farris-nav":!0,"farris-nav-vertical":!e.horizontal};return Kt(g,e.customClass)}),f=d.computed(()=>c0({},e.customStyle));function p(g){n.value=g,i(r.value)}return t.expose({updateNavData:p}),()=>{var g;return a.value&&d.createVNode("div",{class:c.value,style:f.value},[(g=n.value)==null?void 0:g.map(m=>d.createVNode("div",{class:["farris-nav-item",{active:m[e.idField]===r.value},{disabled:m[e.disableField]}],onClick:()=>s(m)},[d.createVNode("div",{class:"farris-nav-item-link pt-3"},[d.createVNode("span",{class:"farris-nav-item-link-text"},[typeof m[e.displayField]=="function"?m[e.displayField]():m[e.displayField],m[e.valueField]&&d.createVNode("div",{class:"farris-nav-item-tag"},[m[e.valueField]<=e.maxNum&&d.createVNode("span",{class:"tag-text"},[m[e.valueField]]),m[e.valueField]>e.maxNum&&d.createVNode("span",{class:"tag-text"},[e.maxNum,d.createTextVNode("+")])])]),d.createVNode("div",{class:"farris-nav-item-bottom-line"},null)])]))])}}});cu.install=e=>{e.component(cu.name,cu)};const Rh={buttonContent:{type:String,default:'<i class="fx-icon fx-icon-search"></i>'},customClass:{type:String,default:""},modelValue:{type:String,default:""},popupHost:{type:Object},data:{type:Array,default:()=>[]},placeholder:{type:String,default:"请输入关键词"},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},disable:{type:Boolean,default:!1},showDropdown:{type:Boolean,default:!0},itemClass:{type:String,default:""},dropdownClass:{type:String,default:""}},Ph={data:{type:Array,default:()=>[]},onConfirmResult:{type:Function,default:void 0},onSearchedValue:{type:Function,default:void 0},idField:{type:String,default:"id"},textField:{type:String,default:"name"},maxHeight:{type:Number,default:350},loading:{type:Boolean,default:!1},enableHighlight:{type:Boolean,default:!0},itemClass:{type:String,default:""}},Zo=d.defineComponent({name:"FXSearchBoxContainer",props:Ph,emits:["confirmResult","searchedValue"],setup(e,t){const r=d.ref(e.data),n=d.ref(""),i=d.computed(()=>{if(!n.value)return r.value;const g=n.value.toLowerCase();return r.value.filter(m=>String(m[e.textField]??"").toLowerCase().includes(g))});function a(g){n.value=g}function s(g){t.emit("confirmResult",g[e.textField]),t.emit("searchedValue",[g])}function c(g,m){if(!m)return[g];const w=m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),k=new RegExp(`(${w})`,"gi");return g.split(k).map(B=>B.toLowerCase()===m.toLowerCase()?d.createVNode("span",{class:"search-box-highlight"},[B]):B)}function f(g){const m=String(g[e.textField]??"");return t.slots.default?t.slots.default({item:g,searchValue:n.value,highlight:c}):c(m,n.value)}const p=d.computed(()=>{const g={padding:"8px"};return e.maxHeight!==void 0&&e.maxHeight>0&&(g.maxHeight=`${e.maxHeight}px`),g});return d.watch(()=>e.data,g=>{g!==r.value&&(r.value=g)}),t.expose({search:a}),()=>d.createVNode("div",{class:"search-box-container f-utils-overflow-xhya position-relative",style:p.value},[e.loading&&d.createVNode("div",{class:"search-box-loading"},[d.createVNode("i",{class:"fx-icon fx-icon-bubble_step_loading fx-icon-spin"},null)]),d.createVNode("ul",{class:"search-box-list"},[i.value.map(g=>d.createVNode("li",{class:["search-box-item dropdown-item",e.itemClass],key:g[e.idField],onClick:()=>s(g)},[f(g)])),!e.loading&&i.value.length===0&&d.createVNode("li",{class:"search-box-empty"},[d.createTextVNode("无匹配结果")])])])}}),du=d.defineComponent({name:"FXSearchBox",props:Rh,emits:["update:modelValue","change","selectedValue","clickButton"],setup(e,t){const r=d.ref(),n=d.ref(),i=d.ref(),a=d.ref(e.modelValue),s=d.ref(!1),c='<i class="fx-icon fx-icon-clockwise fx-icon-spin"></i>',f=d.computed(()=>e.loading?c:e.buttonContent);d.watch(a,z=>{var R;(R=i.value)==null||R.search(z),t.emit("update:modelValue",z)}),d.watch(()=>e.modelValue,z=>{a.value=z});function p(z){a.value=z,C()}function g(z){const R=a.value;t.emit("change",z,{oldValue:R,newValue:z})}function m(z){t.emit("selectedValue",z)}function w(){t.emit("clickButton",{})}async function k(){var z;s.value=!0,await d.nextTick(),(z=n.value)==null||z.show(r.value)}function C(){var z;(z=n.value)==null||z.hide(),s.value=!1}function B(){s.value?C():k()}function _(z){const R=z.target.value;a.value=R,g(R),e.showDropdown&&R&&k()}function T(){e.showDropdown&&a.value&&k()}function S(){a.value="",t.emit("update:modelValue",""),C()}t.expose({togglePopup:B,hidePopup:C,showPopup:k});const F=d.computed(()=>{const z=Kt({},e.customClass);return["f-search-box",{"f-search-box-disabled":e.disable},...typeof z=="string"?[z]:Array.isArray(z)?z:[]]});return()=>d.createVNode("div",{class:F.value},[d.createVNode("div",{class:"f-search-box-input-group",ref:r},[t.slots.prefix&&d.createVNode("span",{class:"f-search-box-prefix"},[t.slots.prefix()]),d.createVNode("input",{class:"f-search-box-input form-control",type:"text",placeholder:e.placeholder,value:a.value,disabled:e.disable,onInput:_,onFocus:T},null),a.value&&!e.disable&&d.createVNode("span",{class:"f-search-box-clear",onClick:S},[d.createVNode("i",{class:"fx-icon fx-icon-close"},null)]),t.slots.suffix?d.createVNode("span",{class:"f-search-box-suffix",onClick:w},[t.slots.suffix()]):f.value&&d.createVNode("span",{class:"f-search-box-button",onClick:w,innerHTML:f.value},null)]),e.showDropdown&&d.createVNode(fa,{ref:n,placement:"bottom-left",keepWidthWithReference:!0,showArrow:!1,fitContent:!0,limitContentBySpace:!0,host:e.popupHost,class:"f-search-box--dropdown "+e.dropdownClass},{default:()=>[t.slots.dropdown?t.slots.dropdown({data:e.data,searchValue:a.value,loading:e.loading}):d.createVNode(Zo,{ref:i,data:e.data,idField:e.idField,textField:e.textField,onConfirmResult:p,onSearchedValue:z=>m(z),loading:e.loading,maxHeight:e.maxHeight,itemClass:e.itemClass},t.slots)]})])}});du.install=e=>{e.component(du.name,du),e.component(Zo.name,Zo)};const Xc={data:{type:Array,default:()=>[]},view:{type:String,default:"ContentView"},customClass:{type:String,default:""},itemClass:{type:[String,Function],default:""},idField:{type:String,default:"id"},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},valueField:{type:String,default:"id"},group:{type:Object,default:void 0}};function cv(e){const t=d.ref([...e.data]),r=d.ref([]),n=d.ref(""),i=d.computed(()=>{var w;const m=e.group;return m!=null&&m.enable&&((w=m.groupFields)!=null&&w.length)?a(t.value,m):t.value.map((k,C)=>({type:0,data:k,originalIndex:C}))});function a(m,w){const k=[],C=w.groupFields[0],B=new Map;m.forEach(T=>{const S=String(T[C]??"");B.has(S)||B.set(S,[]),B.get(S).push(T)});let _=0;return B.forEach((T,S)=>{k.push({type:1,data:{[C]:S},groupField:C,groupValue:S,originalIndex:_++}),T.forEach(F=>{k.push({type:0,data:F,groupField:C,groupValue:S,originalIndex:_++})})}),k}function s(m){t.value=[...m],r.value=[],n.value=""}function c(m){n.value=m;const w=t.value.find(k=>k[e.idField]===m);w&&!r.value.includes(w)&&(r.value=[w])}function f(){r.value=[],n.value=""}function p(m){const w=r.value.indexOf(m);w>=0?r.value.splice(w,1):r.value=[m],n.value=m[e.idField]}function g(m){return r.value.includes(m)}return{data:t,visualData:i,selectedItems:r,activeItemId:n,updateDataSource:s,activeRowById:c,clearSelection:f,toggleSelection:p,isSelected:g}}const dv=d.defineComponent({name:"FXListViewItem",props:{...Xc,item:{type:Object,default:()=>({})},index:{type:Number,default:0},isActive:{type:Boolean,default:!1},isSelected:{type:Boolean,default:!1}},emits:["clickItem"],setup(e,t){const r=d.computed(()=>({"f-list-view-item":!0,"f-list-view-item-active":e.isActive}));return()=>d.createVNode("li",{class:[r.value,typeof e.itemClass=="function"?e.itemClass(e.item,e.index):e.itemClass],onClick:()=>t.emit("clickItem",e.item,e.index)},[t.slots.default?t.slots.default({item:e.item,index:e.index,selectedItem:e.isSelected?e.item:null}):d.createVNode("span",null,[e.item[e.textField]])])}}),fv=d.defineComponent({name:"FXListGroupItem",props:{groupData:{type:Object,default:()=>({})},groupField:{type:String,default:""},groupValue:{type:String,default:""},index:{type:Number,default:0}},setup(e,t){return()=>d.createVNode("li",{class:"f-list-view-group-item"},[t.slots.default?t.slots.default({item:e.groupData,index:e.index}):d.createVNode("div",{class:"f-list-view-group-header"},[d.createVNode("i",{class:"fx-icon f-accordion-expand"},null),d.createVNode("span",null,[e.groupValue])])])}}),fu=d.defineComponent({name:"FXListView",props:Xc,emits:["clickItem"],setup(e,t){const{visualData:r,activeItemId:n,updateDataSource:i,activeRowById:a,clearSelection:s,toggleSelection:c,isSelected:f}=cv({data:e.data,idField:e.idField,group:e.group}),p=d.computed(()=>Kt({"f-list-view":!0},e.customClass));function g(m,w){c(m),t.emit("clickItem",m,w)}return t.expose({updateDataSource:i,activeRowById:a,clearSelection:s}),()=>d.createVNode("div",{class:p.value},[d.createVNode("div",{class:"f-list-view-content"},[d.createVNode("ul",{class:"f-listview-items"},[r.value.map((m,w)=>m.type===1?d.createVNode(fv,{key:`group_${m.groupValue}_${w}`,groupData:m.data,groupField:m.groupField,groupValue:m.groupValue,index:w},{default:t.slots.group}):d.createVNode(dv,{key:`${m.data[e.idField]}_${w}`,item:m.data,index:m.originalIndex,isActive:m.data[e.idField]===n.value,isSelected:f(m.data),itemClass:e.itemClass,textField:e.textField,onClickItem:g},{default:t.slots.content}))])])])}});fu.install=e=>{e.component(fu.name,fu)};const Vh={content:{type:Object,required:!0},defaultExpanded:{type:Boolean,default:!0}},Ko=d.defineComponent({name:"FXAgentThinkingMessage",props:Vh,setup(e){const t=d.ref(e.defaultExpanded),r=d.ref({}),n=d.computed(()=>{var k;const w=(k=e.content)==null?void 0:k.streamStatus;return w==="end"||w===void 0}),i=d.computed(()=>{var k;const w=(k=e.content)==null?void 0:k.title;return w||(n.value?"思考过程":"正在思考...")}),a=d.computed(()=>{var w;return((w=e.content)==null?void 0:w.steps)??[]}),s=d.computed(()=>{var w,k;return a.value.length>0?"":((k=(w=e.content)==null?void 0:w.text)==null?void 0:k.trim())??""}),c=d.computed(()=>{var w,k;return a.value.length>0||!!s.value||(((k=(w=e.content)==null?void 0:w.sources)==null?void 0:k.length)??0)>0});d.watch(a,w=>{const k={};w.forEach((C,B)=>{k[B]=r.value[B]??!!C.detail}),r.value=k},{immediate:!0}),d.watch(n,w=>{w&&(t.value=!1)});const f=()=>{t.value=!t.value},p=w=>{r.value={...r.value,[w]:!r.value[w]}},g=w=>d.createVNode("i",{class:"fx-icon fx-icon-foldup",style:{transform:w?"rotate(0deg)":"rotate(180deg)",transition:"all 0.3s ease-in-out"}},null),m=(w,k)=>{var _;const C=!!((_=w.detail)!=null&&_.trim()),B=r.value[k]??C;return d.createVNode("div",{class:"f-x-thinking-step",key:k},[d.createVNode("div",{class:"f-x-thinking-step-header",onClick:()=>C&&p(k)},[d.createVNode("span",{class:"f-x-thinking-step-dot","aria-hidden":!0},null),d.createVNode("span",{class:"f-x-thinking-step-summary"},[w.summary]),C?g(B):null]),C&&B?d.createVNode("div",{class:"f-x-thinking-step-detail"},[w.detail]):null])};return()=>{const w=e.content;if(!w)return null;const k={"f-x-thinking":!0,"is-pending":!n.value,"is-completed":n.value};return d.createVNode("div",{class:k},[d.createVNode("div",{class:"f-x-thinking-header",onClick:f},[n.value?null:d.createVNode(sa,{status:"Working",variant:"thinking"},null),d.createVNode("span",{class:"f-x-thinking-title"},[i.value]),c.value?g(t.value):null]),t.value&&c.value?d.createVNode("div",{class:"f-x-thinking-body"},[s.value?d.createVNode("div",{class:"f-x-thinking-text"},[s.value]):null,a.value.map(m),w.sources&&w.sources.length>0?d.createVNode("ul",{class:"f-x-thinking-sources"},[w.sources.map((C,B)=>d.createVNode("li",{key:B},[C]))]):null]):null])}}});Ko.install=e=>{e.component(Ko.name,Ko)};function hv(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function mv(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?t:`#attachment:${encodeURIComponent(t)}`}function pv(e){const t=e.trim();return t.startsWith("http://")||t.startsWith("https://")?{url:t}:{fileId:t}}const Qo=d.defineComponent({name:"FXAttachmentFileMessage",props:{content:{type:Object,required:!0}},setup(e){const t=d.computed(()=>mv(e.content.media)),r=d.computed(()=>Ea(pv(e.content.media)));async function n(i){i.preventDefault(),i.stopPropagation();const a=r.value;a&&await Su(a,e.content.name)}return()=>{const i=!!r.value;return d.createVNode("div",{class:"f-ec-attach-row"},[d.createVNode("a",{class:"f-ec-attach f-ec-attach--stretch",href:t.value,target:"_blank",rel:"noopener noreferrer"},[d.createVNode("span",{class:"f-ec-attach-icon","aria-hidden":!0},[d.createTextVNode("📎")]),d.createVNode("span",{class:"f-ec-attach-body"},[d.createVNode("span",{class:"f-ec-attach-name"},[e.content.name]),d.createVNode("span",{class:"f-ec-attach-meta"},[d.createVNode("span",{class:"f-ec-attach-cat"},[e.content.category]),d.createVNode("span",{class:"f-ec-attach-size"},[hv(e.content.size)])])])]),i?d.createVNode("button",{type:"button",class:"f-ec-attach-download-btn","aria-label":"下载附件",title:"下载",onClick:n},[d.createVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("polyline",{points:"7 10 12 15 17 10","stroke-linecap":"round","stroke-linejoin":"round"},null),d.createVNode("line",{x1:"12",y1:"15",x2:"12",y2:"3","stroke-linecap":"round","stroke-linejoin":"round"},null)])]):null])}}});Qo.install=e=>{e.component(Qo.name,Qo)};const gv={0:"高",1:"中",2:"低"},Jo=d.defineComponent({name:"ErrorReminderMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content.errorLevel;return d.createVNode("div",{class:["f-ec-error",`f-ec-error--lvl-${t}`]},[d.createVNode("div",{class:"f-ec-error-head"},[d.createVNode("span",{class:"f-ec-error-badge"},[gv[t]]),d.createVNode("span",{class:"f-ec-error-label"},[d.createTextVNode("错误提醒")])]),d.createVNode("div",{class:"f-ec-error-text"},[e.content.errorText]),e.content.errorLink?d.createVNode("a",{class:"f-ec-error-link",href:e.content.errorLink,target:"_blank",rel:"noopener noreferrer"},[d.createTextVNode("查看详情")]):null])}}});Jo.install=e=>{e.component(Jo.name,Jo)};function bv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!d.isVNode(e)}const Hh=".f-chat-content-input-section";function yv(e,t){const r=(t??"").trim();return r||`Agent请求使用【${e.trim()||"该系统"}】凭证访问该系统,是否授权?`}const hu=d.defineComponent({name:"FXCredentialAuthDialog",props:{visible:{type:Boolean,default:!1},title:{type:String,default:"凭证授权请求"},question:{type:String,default:""},systemName:{type:String,default:""},disabled:{type:Boolean,default:!1},onSelect:{type:Function,required:!0},onClose:{type:Function,default:void 0},teleportTo:{type:[String,Object],default:Hh}},setup(e){const t=d.computed(()=>yv(e.systemName,e.question));function r(i){e.disabled||e.onSelect(i)}const n=d.computed(()=>e.teleportTo??Hh);return()=>{if(!e.visible)return null;const i=d.createVNode("div",{class:"f-credential-auth-anchor f-credential-auth-anchor--overlay-input",role:"dialog","aria-modal":"true","aria-labelledby":"f-credential-auth-title"},[d.createVNode("div",{class:"f-credential-auth-dialog"},[d.createVNode("div",{id:"f-credential-auth-title",class:"f-credential-auth-dialog__title"},[e.title]),d.createVNode("div",{class:"f-credential-auth-dialog__body"},[t.value]),d.createVNode("div",{class:"f-credential-auth-dialog__actions"},[d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--primary","data-testid":"auth-per-access",disabled:e.disabled,onClick:()=>r("PER_ACCESS_YES")},[d.createTextVNode("临时授权一次")]),d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--outline","data-testid":"auth-session",disabled:e.disabled,onClick:()=>r("SESSION_YES")},[d.createTextVNode("授权整个会话")]),d.createVNode("button",{type:"button",class:"f-credential-auth-dialog__btn f-credential-auth-dialog__btn--outline","data-testid":"auth-no",disabled:e.disabled,onClick:()=>r("NO")},[d.createTextVNode("拒绝")])])])]);return n.value?d.createVNode(d.Teleport,{to:n.value},bv(i)?i:{default:()=>[i]}):i}}});hu.install=e=>{e.component(hu.name,hu)};function vv(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!d.isVNode(e)}const xn="__hitl_other__";function Yc(e,t=120){return e?e.length>t?e.slice(0,t)+"...":e:""}function Gn(e){const t=e??"text";return t==="text"||t==="select"||t==="multi_select"||t==="confirm"||t==="form"||t==="date"||t==="number"||t==="authorize"?t:"text"}function qh(e){return e==="PER_ACCESS_YES"?"是(本次授权)":e==="SESSION_YES"?"是,当前会话后续不再询问":e==="NO"?"否":String(e??"")}const es=d.defineComponent({name:"FXHitlQuestion",props:{content:{type:Object,required:!0},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!0},pinned:{type:Boolean,default:!1},pinnedWidth:{type:String,default:void 0},pinnedInputHeight:{type:Number,default:0},pinnedBottom:{type:Number,default:36},teleportTo:{type:[String,Object],default:void 0},onSubmitAnswers:{type:Function,default:void 0},onSubmitAuthAnswer:{type:Function,default:void 0}},setup(e){const t=d.ref(!1),r=d.ref(0),n=d.ref({}),i=d.ref({}),a=d.computed(()=>t.value||e.disabled),s=d.computed(()=>{var X;return e.content.questions.length===1&&Gn((X=e.content.questions[0])==null?void 0:X.ui_type)==="authorize"&&!!e.content.credentialAuth}),c=d.ref(!1);d.watch(()=>[s.value,t.value],([X,Z])=>{c.value=X&&!Z},{immediate:!0});function f(X){var Q;const Z=e.content.questions[0];Z&&(n.value={[Z.id]:X},t.value=!0,c.value=!1,(Q=e.onSubmitAuthAnswer)==null||Q.call(e,{questionId:Z.id,answer:X}))}function p(X){const Z={},Q={};for(const ie of X){const fe=Gn(ie.ui_type);if(fe==="confirm")Z[ie.id]=void 0;else if(fe==="authorize")Z[ie.id]=void 0;else if(fe==="text"||fe==="select")Z[ie.id]=ie.default_value??"";else if(fe==="multi_select")Z[ie.id]=ie.default_value?JSON.parse(ie.default_value):[];else if(fe==="form"){const ke={};if(Array.isArray(ie.fields))for(const ue of ie.fields)ke[ue.name]=ue.default_value??"";Z[ie.id]=ke}else Z[ie.id]=ie.default_value??"";Q[ie.id]={active:!1,text:""}}n.value=Z,i.value=Q,r.value=0}d.watch(()=>e.content.questions,X=>{Array.isArray(X)&&X.length&&p(X)},{immediate:!0}),d.watch(()=>e.content.answers,X=>{if(!Array.isArray(X)||X.length===0)return;const Z={...n.value},Q={...i.value};for(const ie of X){Z[ie.id]=ie.answer;const fe=e.content.questions.find(ke=>ke.id===ie.id);fe&&Gn(fe.ui_type)==="select"&&typeof ie.answer=="string"&&!(fe.options??[]).some(me=>me.label===ie.answer)&&ie.answer!==""&&(Q[ie.id]={active:!0,text:ie.answer},Z[ie.id]=xn)}n.value=Z,i.value=Q,t.value=!0},{immediate:!0});const g=d.computed(()=>e.content.questions.length),m=d.computed(()=>{const X=e.content.questions;if(X.length===0)return null;const Z=Math.max(0,Math.min(r.value,X.length-1));return X[Z]}),w=d.computed(()=>r.value<=0),k=d.computed(()=>r.value>=g.value-1),C=d.computed(()=>{const X=m.value;return X?T(X):!0});function B(){e.required&&!C.value||k.value||(r.value+=1)}function _(){w.value||(r.value-=1)}function T(X){var ie,fe;const Z=Gn(X.ui_type),Q=n.value[X.id];if(Z==="text"&&(typeof Q!="string"||Q.trim()==="")||Z==="select"&&(typeof Q!="string"||Q.trim()===""||Q===xn&&(((fe=(ie=i.value[X.id])==null?void 0:ie.text)==null?void 0:fe.trim())??"")==="")||Z==="confirm"&&typeof Q!="boolean"||Z==="multi_select"&&(!Array.isArray(Q)||Q.length===0))return!1;if(Z==="form"){const ke=X.fields??[],ue=Q;for(const me of ke)if(me.required){const ge=ue[me.name];if(typeof ge!="string"||ge.trim()==="")return!1}}return!((Z==="date"||Z==="number")&&(typeof Q!="string"||Q.trim()===""))}const S=d.computed(()=>a.value?!1:e.content.questions.every(X=>T(X)));function F(X,Z){n.value={...n.value,[X]:Z}}function z(X,Z,Q){const ie=n.value[X]??{};F(X,{...ie,[Z]:Q})}function R(X){const Z=Gn(X.ui_type);return Z==="select"||Z==="multi_select"}function $(X,Z){var Q;Z===xn?(i.value={...i.value,[X.id]:{...i.value[X.id],active:!0,text:((Q=i.value[X.id])==null?void 0:Q.text)??""}},F(X.id,xn)):(i.value={...i.value,[X.id]:{active:!1,text:""}},F(X.id,Z))}function Y(X,Z){const Q=n.value[X.id]??[];Q.includes(Z)?F(X.id,Q.filter(ie=>ie!==Z)):F(X.id,[...Q,Z])}function q(){var Z,Q,ie;if(!S.value)return;const X=[];for(const fe of e.content.questions){const ke=Gn(fe.ui_type);let ue=n.value[fe.id];ke==="select"&&ue===xn&&(ue=((Q=(Z=i.value[fe.id])==null?void 0:Z.text)==null?void 0:Q.trim())??""),ke==="number"&&(ue=Number(ue)),X.push({id:fe.id,answer:ue})}t.value=!0,(ie=e.onSubmitAnswers)==null||ie.call(e,X)}function pe(X,Z,Q){return d.createVNode("div",{class:"f-hitl-date-wrap"},[d.createVNode("input",{class:"f-hitl-input",type:"date",value:X,disabled:Z,onInput:ie=>Q(ie.target.value)},null)])}function he(X,Z,Q,ie,fe){const ke=ge=>{let Le=Number(X)||0;Le+=ge,ie!==void 0&&(Le=Math.max(ie,Le)),fe!==void 0&&(Le=Math.min(fe,Le)),Q(String(Le))},ue=fe!==void 0&&Number(X||0)>=fe,me=ie!==void 0&&Number(X||0)<=ie;return d.createVNode("div",{class:"f-hitl-num-wrap"},[d.createVNode("input",{class:"f-hitl-input f-hitl-num-input",type:"number",value:X,min:ie,max:fe,disabled:Z,onInput:ge=>Q(ge.target.value)},null),d.createVNode("div",{class:"f-hitl-num-btns"},[d.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:Z||ue,onClick:()=>ke(1)},[d.createVNode("span",{class:"fx-icon fx-icon-foldup"},null)]),d.createVNode("button",{type:"button",class:"f-hitl-num-btn",disabled:Z||me,onClick:()=>ke(-1)},[d.createVNode("span",{class:"fx-icon fx-icon-expanddown"},null)])])])}function ce(X,Z,Q,ie){return d.createVNode("div",{key:X.label,class:["f-hitl-opt-row",{"f-hitl-opt-row--active":Q}],onClick:ie},[d.createVNode("span",{class:"f-hitl-opt-row__index"},[Z+1]),d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[X.label]),X.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:X.description},[Yc(X.description)]):null]),d.createVNode("span",{class:"f-hitl-opt-row__check"},[Q?d.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])])}function be(X,Z){return d.createVNode("div",{class:"f-hitl-form-item",key:X.name},[d.createVNode("div",{class:"f-hitl-form-item__label"},[X.label]),Z])}function ae(X,Z,Q){const ie=n.value[X.id]??"",fe=n.value[X.id]??[],ke=i.value[X.id]??{active:!1,text:""},ue=Q==="single",me=ue&&ie===xn||ke.active,ge=X.allow_other&&me,Le=ot=>ue?ie===ot.label&&!ke.active:fe.includes(ot.label),Ye=ot=>()=>{a.value||(ue?$(X,ot.label):Y(X,ot.label))},Ke=()=>{if(!a.value)if(ue)$(X,xn);else{const ot=ke.text;ke.active?(F(X.id,fe.filter(st=>st!==ot)),i.value={...i.value,[X.id]:{active:!1,text:""}}):(i.value={...i.value,[X.id]:{active:!0,text:ke.text}},ke.text&&!fe.includes(ke.text)&&F(X.id,[...fe,ke.text]))}},ut=ot=>{const st=ot.target.value;i.value={...i.value,[X.id]:{active:!0,text:st}},ue?F(X.id,xn):F(X.id,[...fe.filter(Xt=>Xt!==ke.text),st])};return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[Z.map((ot,st)=>ce(ot,st,Le(ot),Ye(ot))),X.allow_other?d.createVNode("div",{class:["f-hitl-opt-row f-hitl-opt-row--other",{"f-hitl-opt-row--active":me}],onClick:Ke},[d.createVNode("span",{class:"f-hitl-opt-row__index"},[d.createTextVNode("...")]),d.createVNode("span",{class:"f-hitl-opt-row__label"},[d.createTextVNode("其他")]),d.createVNode("span",{class:"f-hitl-opt-row__check"},[me?d.createVNode("span",{class:"fx-icon fx-icon-sender_choose",style:"font-size: 20px;"},null):null])]):null]),ge?d.createVNode("input",{class:"f-hitl-input f-hitl-input--other",type:"text",value:ke.text,placeholder:"请输入自定义内容",disabled:a.value,onInput:ut},null):null])}function xe(X){const Z=n.value[X.id]??{},Q=X.fields??[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-form-group"},[Q.map(ie=>{const fe=Z[ie.name]??"";return ie.type==="select"?be(ie,d.createVNode("div",{class:"f-hitl-select-group"},[(ie.options??[]).map(ke=>{const ue=typeof ke=="string"?ke:ke.label??"";return d.createVNode("button",{key:ue,type:"button",class:["f-hitl-opt",{"f-hitl-opt--active":fe===ue}],disabled:a.value,onClick:()=>z(X.id,ie.name,ue)},[ue])})])):ie.type==="number"?be(ie,he(fe,a.value,ke=>z(X.id,ie.name,ke),ie.min,ie.max)):ie.type==="date"?be(ie,pe(fe,a.value,ke=>z(X.id,ie.name,ke))):be(ie,d.createVNode("input",{class:"f-hitl-input",type:"text",value:fe,placeholder:ie.default_value??"请输入",disabled:a.value,onInput:ke=>z(X.id,ie.name,ke.target.value)},null))})])])}function Se(X){const Z=Gn(X.ui_type);if(Z==="text"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("input",{class:"f-hitl-input",type:"text",value:Q,placeholder:X.placeholder??"请输入",disabled:a.value,onInput:ie=>F(X.id,ie.target.value)},null)])}if(Z==="multi_select"){const Q=Array.isArray(X.options)?X.options:[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[ae(X,Q,"multi")])}if(Z==="form")return xe(X);if(Z==="select"){let Q=Array.isArray(X.options)?X.options:[];return Q.length===0&&(Q=[{label:"暂无"}]),d.createVNode("div",{class:"f-hitl-field",key:X.id},[ae(X,Q,"single")])}if(Z==="confirm"){const Q=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-confirm"},[d.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":Q===!0}],disabled:a.value,onClick:()=>F(X.id,!0)},[d.createTextVNode("是")]),d.createVNode("button",{type:"button",class:["f-hitl-cbtn",{"f-hitl-cbtn--primary":Q===!1}],disabled:a.value,onClick:()=>F(X.id,!1)},[d.createTextVNode("否")])])])}if(Z==="authorize")return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[qh(n.value[X.id])])]);if(Z==="date"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[pe(Q,a.value,ie=>F(X.id,ie))])}if(Z==="number"){const Q=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[he(Q,a.value,ie=>F(X.id,ie),X.min,X.max)])}return d.createVNode("div",{class:"f-hitl-field f-hitl-field--unsupported",key:X.id},[d.createVNode("div",{class:"f-hitl-unsupported"},[d.createTextVNode("暂不支持 ui_type「"),String(X.ui_type),d.createTextVNode("」,请升级前端。")])])}function te(X){const Z=Gn(X.ui_type),Q=(fe,ke,ue)=>d.createVNode("input",{class:"f-hitl-input",type:fe,value:ke,readonly:!0,min:ue==null?void 0:ue.min,max:ue==null?void 0:ue.max},null);if(Z==="text"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("text",fe)])}if(Z==="multi_select"){const fe=n.value[X.id]??[],ke=Array.isArray(X.options)?X.options:[],ue=new Set(ke.map(ge=>ge.label)),me=fe.filter(ge=>!ue.has(ge));return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[ke.filter(ge=>fe.includes(ge.label)).map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge.label},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge.label]),ge.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:ge.description},[Yc(ge.description)]):null])])),me.map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge])])]))])])}if(Z==="select"){const fe=n.value[X.id]??"",ke=i.value[X.id]??{active:!1,text:""},ue=Array.isArray(X.options)?X.options:[],me=fe===xn||ke.active;return d.createVNode("div",{key:X.id},[d.createVNode("div",{class:"f-hitl-option-list"},[me?d.createVNode("div",{class:"f-hitl-opt-row"},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ke.text||"其他"])])]):ue.filter(ge=>ge.label===fe).map(ge=>d.createVNode("div",{class:"f-hitl-opt-row",key:ge.label},[d.createVNode("div",{class:"f-hitl-opt-row__label"},[d.createVNode("span",null,[ge.label]),ge.description?d.createVNode("span",{class:"f-hitl-opt-row__desc",title:ge.description},[Yc(ge.description)]):null])]))])])}if(Z==="confirm"){const fe=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-confirm"},[d.createVNode("button",{type:"button",class:["f-hitl-cbtn","f-hitl-cbtn--readonly"]},[fe===!0?"是":"否"])])])}if(Z==="authorize")return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[qh(n.value[X.id])])]);if(Z==="form"){const fe=n.value[X.id]??{},ke=X.fields??[];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("div",{class:"f-hitl-form-group"},[ke.map(ue=>{const me=fe[ue.name]??"";let ge;return ue.type==="number"?ge=Q("number",me,{min:ue.min,max:ue.max}):ue.type==="date"?ge=Q("date",me):ge=Q("text",me),be(ue,ge)})])])}if(Z==="date"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("date",fe)])}if(Z==="number"){const fe=n.value[X.id]??"";return d.createVNode("div",{class:"f-hitl-field",key:X.id},[Q("number",fe)])}const ie=n.value[X.id];return d.createVNode("div",{class:"f-hitl-field",key:X.id},[d.createVNode("span",{class:"f-hitl-submitted-value"},[String(ie??"")])])}function ye(X){return d.createVNode("div",{class:"f-hitl-card__title-wrap"},[d.createVNode("span",{class:"f-hitl-card__title"},[X.question]),d.createVNode("span",{class:"f-hitl-card__subtitle"},[X.header])])}function ne(){return g.value<=1?null:d.createVNode("div",{class:"f-hitl-pagination"},[d.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:w.value,onClick:_},[d.createVNode("span",{class:"fx-icon fx-icon-arrow-left"},null)]),d.createVNode("span",{class:"f-hitl-pagination__text"},[r.value+1,d.createTextVNode("/"),g.value]),d.createVNode("button",{type:"button",class:"f-hitl-pagination__btn",disabled:k.value,onClick:B},[d.createVNode("span",{class:"fx-icon fx-icon-arrow-right"},null)])])}function Ne(){const X=e.pinnedWidth?{width:`calc(${e.pinnedWidth} * 0.8)`,minWidth:"343px",maxWidth:"800px"}:void 0;return d.createVNode("div",{class:"f-hitl-card",style:X},[d.createVNode("div",{class:"f-hitl-submitted-flat"},[e.content.questions.map(Z=>d.createVNode("div",{class:"f-hitl-submitted-item",key:Z.id},[d.createVNode("div",{class:"f-hitl-card__header"},[ye(Z)]),d.createVNode("div",{class:["f-hitl-card__body",{"f-hitl-card__body--option":R(Z)}]},[te(Z)])]))])])}function We(){const X=m.value;if(!X)return null;const Z=e.pinned?"f-hitl-card--pinned":"",Q=e.pinned&&e.pinnedWidth?{width:e.pinnedWidth}:void 0,ie=e.pinnedInputHeight??0,fe=e.pinnedBottom??36,ke=()=>d.createVNode(d.Fragment,null,[d.createVNode("div",{class:"f-hitl-card__header"},[ye(X),ne()]),d.createVNode("div",{class:["f-hitl-card__body",{"f-hitl-card__body--option":R(X)}]},[Se(X)]),!a.value&&d.createVNode("div",{class:"f-hitl-card__footer"},[g.value>1&&!k.value&&d.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:e.required&&!C.value,onClick:B},[d.createTextVNode("下一条")]),k.value&&d.createVNode("button",{type:"button",class:"f-hitl-btn",disabled:!S.value,onClick:q},[d.createTextVNode("提交")])])]);if(e.pinned){const ue=d.createVNode("div",{class:"f-hitl-pinned-spacer","aria-hidden":"true"},[d.createVNode("div",{class:"f-hitl-card",style:{...Q,marginBottom:`-${ie}px`}},[ke()])]);if(e.teleportTo){const ge={...Q,bottom:`${fe}px`},Le=d.createVNode("div",{class:["f-hitl-card",Z],style:ge},[ke()]);return d.createVNode(d.Fragment,null,[ue,d.createVNode(d.Teleport,{to:e.teleportTo},vv(Le)?Le:{default:()=>[Le]})])}const me=d.createVNode("div",{class:["f-hitl-card",Z],style:Q},[ke()]);return d.createVNode(d.Fragment,null,[ue,me])}return d.createVNode("div",{class:["f-hitl-card",Z],style:Q},[ke()])}return()=>{var X;if(s.value){const Z=e.content.questions[0];if(!Z)return null;const ie=`${e.teleportTo??".f-chat-panel-chat"} .f-chat-content-input-section`;return d.createVNode(d.Fragment,null,[d.createVNode(hu,{visible:c.value,title:Z.header??"凭证授权请求",question:Z.question,systemName:((X=e.content.credentialAuth)==null?void 0:X.systemName)??"",disabled:a.value,teleportTo:ie,onSelect:f},null)])}return a.value?Ne():We()}}});es.install=e=>{e.component(es.name,es)};function wv(e,t){var n;const r=(n=e.pickActions)==null?void 0:n[t];return r||e.pickActionDefault}const ts=d.defineComponent({name:"InputRecommendMessage",props:{content:{type:Object,required:!0},onPick:{type:Function,default:void 0}},setup(e){const t=(r,n)=>{var i;wv(e.content,n),(i=e.onPick)==null||i.call(e,r)};return()=>d.createVNode("div",{class:"f-ec-recommend"},[e.content.title?d.createVNode("div",{class:"f-ec-recommend-title"},[e.content.title]):null,d.createVNode("div",{class:"f-ec-recommend-chips"},[e.content.suggestions.map((r,n)=>d.createVNode("button",{key:n,type:"button",class:"f-ec-recommend-chip",onClick:()=>t(r,n)},[r]))])])}});ts.install=e=>{e.component(ts.name,ts)};const rs=d.defineComponent({name:"LinkCardMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>{const t=e.content;return d.createVNode("div",{class:"f-ec-linkcard"},[t.poster?d.createVNode("div",{class:"f-ec-linkcard-poster"},[d.createVNode("img",{src:t.poster,alt:""},null)]):null,d.createVNode("div",{class:"f-ec-linkcard-body"},[d.createVNode("a",{class:"f-ec-linkcard-title",href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title]),t.subtitle?d.createVNode("div",{class:"f-ec-linkcard-sub"},[t.subtitle]):null,t.relatedLinks&&t.relatedLinks.length>0?d.createVNode("div",{class:"f-ec-linkcard-related"},[d.createVNode("div",{class:"f-ec-linkcard-related-label"},[d.createTextVNode("相关阅读")]),d.createVNode("ul",null,[t.relatedLinks.map((r,n)=>d.createVNode("li",{key:n},[d.createVNode("a",{href:r.url,target:"_blank",rel:"noopener noreferrer"},[r.title])]))])]):null])])}}});rs.install=e=>{e.component(rs.name,rs)};const ns=d.defineComponent({name:"ReferenceSourcesMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-sources"},[d.createVNode("div",{class:"f-ec-sources-title"},[d.createTextVNode("引用来源")]),d.createVNode("ul",{class:"f-ec-sources-list"},[e.content.items.map((t,r)=>d.createVNode("li",{key:r},[d.createVNode("a",{href:t.url,target:"_blank",rel:"noopener noreferrer"},[t.title])]))])])}});ns.install=e=>{e.component(ns.name,ns)};function jh(e){const t=new Map;for(const r of e){const n=t.get(r.docId),i=typeof r.url=="string"&&r.url.trim()!==""?r.url.trim():void 0;n?(n.chunkCount+=1,n.contentIds.push(r.contentId),!n.url&&i&&(n.url=i)):t.set(r.docId,{key:r.docId,docName:r.docName,chunkCount:1,contentIds:[r.contentId],...i?{url:i}:{}})}return[...t.values()]}const as=d.defineComponent({name:"FXKnowledgeTraceStrip",props:{content:{type:Object,required:!0}},emits:["open"],setup(e,{emit:t}){const r=d.ref(!1),n=d.computed(()=>jh(e.content.chunks??[])),i=d.computed(()=>{var f;return((f=e.content.chunks)==null?void 0:f.length)??0}),a=()=>{t("open")},s=f=>{f.stopPropagation(),r.value=!r.value},c=(f,p)=>{f.stopPropagation();const g=typeof p=="string"?p.trim():"";!g||typeof window>"u"||window.open(g,"_blank","noopener,noreferrer")};return()=>i.value?d.createVNode("div",{class:"f-ec-knowledge-trace"},[d.createVNode("div",{class:"f-ec-knowledge-trace__header",onClick:a},[d.createVNode("span",{class:"f-ec-knowledge-trace__main"},[d.createVNode("svg",{class:"f-ec-knowledge-trace__icon",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","aria-hidden":"true"},[d.createVNode("circle",{cx:"12",cy:"12",r:"10"},null),d.createVNode("path",{d:"M12 16v-4M12 8h.01"},null)]),d.createVNode("span",null,[d.createTextVNode("知识溯源 · "),i.value,d.createTextVNode(" 条参考来源")])]),d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace__toggle","aria-label":r.value?"收起原始文档":"展开原始文档",title:r.value?"收起原始文档":"展开原始文档","data-testid":"knowledge-trace-files-toggle",onClick:s},[d.createVNode("span",{class:["f-ec-knowledge-trace__toggle-icon",r.value&&"f-ec-knowledge-trace__toggle-icon--open"]},[d.createTextVNode("▼")])])]),r.value&&n.value.length>0?d.createVNode("div",{class:"f-ec-knowledge-trace__files"},[n.value.map(f=>d.createVNode("div",{key:f.key,class:"f-ec-knowledge-trace__file","data-testid":"knowledge-trace-source-file"},[d.createVNode("button",{type:"button",class:["f-ec-knowledge-trace__file-name",!f.url&&"f-ec-knowledge-trace__file-name--disabled"],title:f.docName,disabled:!f.url,"data-testid":"knowledge-trace-source-file-preview",onClick:p=>c(p,f.url)},[f.docName]),d.createVNode("span",{class:"f-ec-knowledge-trace__file-meta"},[f.chunkCount,d.createTextVNode(" 条切片")])]))]):null]):null}});function xv(e){return Number.isFinite(e)?Number(e).toFixed(4):""}const Zc=d.defineComponent({name:"FXKnowledgeTracePanel",props:{chunks:{type:Array,default:()=>[]},isShow:{type:Boolean,default:!1},selectedContentId:{type:String,default:void 0}},emits:["update:isShow","close"],setup(e,{emit:t}){const r=d.ref({}),n=d.ref(null),i=()=>{t("update:isShow",!1),t("close")},a=f=>{r.value={...r.value,[f]:!r.value[f]}},s=f=>{const p=typeof f=="string"?f.trim():"";!p||typeof window>"u"||window.open(p,"_blank","noopener,noreferrer")},c=()=>{if(!e.isShow||!e.selectedContentId||!n.value)return;const f=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e.selectedContentId):e.selectedContentId.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),p=n.value.querySelector(`[data-knowledge-trace-content-id="${f}"]`);p instanceof HTMLElement&&p.scrollIntoView({block:"nearest",behavior:"smooth"})};return d.watch(()=>[e.isShow,e.selectedContentId,e.chunks],()=>{!e.isShow||!e.selectedContentId||d.nextTick(()=>{c()})},{immediate:!0}),()=>{if(!e.isShow)return null;const f=e.chunks??[];return d.createVNode("aside",{class:"f-ec-knowledge-trace-panel","data-testid":"knowledge-trace-panel","aria-label":"参考来源"},[d.createVNode("div",{class:"f-ec-knowledge-trace-panel__header"},[d.createVNode("span",{class:"f-ec-knowledge-trace-panel__title"},[d.createTextVNode("参考来源 · "),f.length]),d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace-panel__close","aria-label":"关闭",title:"关闭","data-testid":"knowledge-trace-panel-close",onClick:i},[d.createTextVNode("×")])]),d.createVNode("div",{class:"f-ec-knowledge-trace-panel__body",ref:n},[f.length===0?d.createVNode("div",{class:"f-ec-knowledge-trace-panel__empty"},[d.createTextVNode("暂无参考来源")]):f.map((p,g)=>{const m=p.contentId===e.selectedContentId,w=!!r.value[p.contentId],k=typeof p.score=="number"?xv(p.score):"",C=String(g+1),B=typeof p.url=="string"&&p.url.trim()!==""?p.url.trim():"";return d.createVNode("div",{key:p.contentId,class:["f-ec-knowledge-trace-panel__card",m&&"f-ec-knowledge-trace-panel__card--selected",w&&"f-ec-knowledge-trace-panel__card--expanded"],"data-knowledge-trace-content-id":p.contentId,"data-testid":"knowledge-trace-panel-card"},[d.createVNode("div",{class:["f-ec-knowledge-trace-panel__card-title",B&&"f-ec-knowledge-trace-panel__card-title--link"],title:p.docName,role:B?"link":void 0,tabindex:B?0:void 0,onClick:()=>s(B),onKeydown:_=>{B&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),s(B))}},[p.docName]),k?d.createVNode("div",{class:"f-ec-knowledge-trace-panel__card-meta"},[d.createVNode("span",null,null),d.createVNode("span",null,[k])]):null,d.createVNode("div",{class:["f-ec-knowledge-trace-panel__card-content",w&&"f-ec-knowledge-trace-panel__card-content--expanded"]},[p.content]),d.createVNode("div",{class:"f-ec-knowledge-trace-panel__card-footer"},[d.createVNode("button",{type:"button",class:"f-ec-knowledge-trace-panel__toggle",onClick:()=>a(p.contentId)},[w?"收起":"展开"]),d.createVNode("span",{class:"f-ec-knowledge-trace-panel__mark"},[C])])])})])])}}});as.install=e=>{e.component(as.name,as),e.component(Zc.name,Zc)};const is=d.defineComponent({name:"UnknownEnterpriseMessage",props:{content:{type:Object,required:!0}},setup(e){return()=>d.createVNode("div",{class:"f-ec-unknown"},[d.createVNode("div",{class:"f-ec-unknown-title"},[d.createTextVNode("未知类型消息")]),e.content.wireType?d.createVNode("div",{class:"f-ec-unknown-wire"},[d.createTextVNode("wire type: "),e.content.wireType]):null,d.createVNode("div",{class:"f-ec-unknown-desc"},[e.content.hint??"客户端无法识别此消息类型,已按占位展示。"])])}});is.install=e=>{e.component(is.name,is)},qi.install=e=>{e.component(qi.name,qi)};const Av={install(e){e.use(Cr).use(ji).use($i).use(Yi).use(Ka).use(tu).use(ru).use(nu).use(au).use(qa).use(ya).use(Ja).use(ha).use(iu).use(uu).use(ou).use(su).use(lu).use(Wa).use(Ga).use(fa).use(Ya).use(cu).use(du).use(fu)}};le.FXAgentThinking=Ko,le.FXAppPreview=Cr,le.FXAttachmentFile=Qo,le.FXAttachmentPreview=lu,le.FXBubble=ji,le.FXBubbleAction=vc,le.FXCarousel=$i,le.FXCarouselItem=_o,le.FXChatPreview=Yi,le.FXCoding=tu,le.FXConfirmDialog=Ka,le.FXCredentialAuthDialog=hu,le.FXDynamicComponent=Ga,le.FXErrorReminder=Jo,le.FXFileEmbeddedContent=W1,le.FXFileOperation=ru,le.FXGenerateProcess=nu,le.FXHistory=au,le.FXHitlQuestion=es,le.FXInputRecommend=ts,le.FXKnowledgeTracePanel=Zc,le.FXKnowledgeTraceStrip=as,le.FXLinkCard=rs,le.FXListView=fu,le.FXMarkdown=qa,le.FXMarkdownPreview=ya,le.FXNav=cu,le.FXPopover=fa,le.FXPopoverDirective=ff,le.FXPrompt=Yo,le.FXPrompts=Ja,le.FXReferenceSources=ns,le.FXSearchBox=du,le.FXSearchBoxContainer=Zo,le.FXSplitter=Ya,le.FXSplitterPane=Ui,le.FXStartedTodo=ha,le.FXSuggestion=iu,le.FXTodo=uu,le.FXTodoListItemView=No,le.FXTodoListView=Hi,le.FXToolUse=Xa,le.FXToolUseBatch=ou,le.FXUnknownEnterprise=is,le.FXUserAuth=qi,le.FXWelcome=su,le.FXWidgetContainer=Wa,le.PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT=$c,le.PREVIEW_BRIDGE_SOURCE=qc,le.PREVIEW_BRIDGE_VERSION=jc,le.agentThinkingProps=Vh,le.aggregateKnowledgeTraceByDoc=jh,le.appPreviewMessageProps=Wt,le.attachmentPreviewProps=Ih,le.bubbleActionProps=gf,le.bubbleProps=Cu,le.carouselItemProps=yf,le.carouselProps=bf,le.chatHistoryProps=Fh,le.chatPreviewProps=wf,le.clonePreviewPayloadForPostMessage=oh,le.closeFXConfirmDialog=cy,le.codingMessageProps=kh,le.confirmDialogProps=hh,le.createPreviewIframeSdk=ty,le.default=Av,le.extractFileIdFromRuntimeDownloadUrl=I1,le.fileEmbeddedContentProps=j1,le.fileOperationMessageProps=Sh,le.generateProcessProps=Eh,le.getCustomClass=Kt,le.getCustomStyle=c0,le.getDynamicCompState=V9,le.getDynamicComponentRegistryDebugSnapshot=gc,le.invokeAgentWorkbenchSdkApi=ey,le.isImageUrl=R1,le.isPreviewBridgeAssistantMessage=lh,le.listViewProps=Xc,le.loadDynamicComponent=uf,le.markdownMessageProps=z4,le.markdownPreviewProps=xf,le.navProps=Lh,le.normalizeDynamicComponentRegisterClaim=w0,le.openFXConfirmDialog=ly,le.overflowTooltipDirective=q1,le.peekDynamicComponentRegisterBootstrapId=L9,le.popoverProps=lf,le.postAssistantToPreviewIframe=ch,le.postDynamicComponentAssistantMessage=j9,le.previewLayoutBridge=ay,le.promptProps=Mh,le.promptsProps=Th,le.registerPreviewChromeSdk=ny,le.renderIconNode=Eu,le.renderNode=pi,le.resolveHrefForAttachmentDownload=Ea,le.resolveRuntimeAttachmentDownloadUrl=Is,le.searchBoxContainerProps=Ph,le.searchBoxProps=Rh,le.splitterProps=vf,le.startedTodoProps=hf,le.subscribeAssistantInPreviewIframe=dh,le.suggestionProps=Nh,le.todoListItemProps=pf,le.todoListViewProps=mf,le.todoProps=_h,le.triggerAttachmentDownload=Su,le.unloadDynamicComponent=of,le.useAttachment=$1,le.useSequentialStreaming=Fu,le.useStreamingOutput=P1,le.useTimer=Os,le.useToolIcon=Ls,le.welcomeProps=zh,le.widgetContainerProps=J4,Object.defineProperties(le,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|