bi-components-library 1.3.2-next.2 → 1.3.2-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bi-components-library.css +1 -1
- package/dist/index.es.js +83 -79
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +8 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(we,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("react"),require("antd"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","antd","@ant-design/icons","react-dom"],$):(we=typeof globalThis<"u"?globalThis:we||self,$(we.SealSeekBIComponents={},we.React,we.React,we.antd,we.AntdIcons,we.ReactDOM))})(this,function(we,$,w,Ee,Ct,dt){"use strict";const Br=({variant:e="primary",loading:t=!1,children:a,...l})=>{const n=r=>{switch(r){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return $.jsx(Ee.Button,{...l,type:n(e),loading:t,ghost:e==="ghost",children:a})};Br.__docgenInfo={displayName:"Button",description:"基础按钮,用于触发操作",props:{variant:{name:"variant",required:!1,description:"视觉风格",type:{name:"ButtonVariant",raw:'"primary" | "ghost" | "dashed" | "link" | "text"'},defaultValue:{value:'"primary"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: MouseEvent) => void"}}}};const Fr=({title:e,children:t,bordered:a=!0,hoverable:l=!1,size:n="default",...r})=>$.jsx(Ee.Card,{...r,title:e,bordered:a,hoverable:l,size:n,children:t});Fr.__docgenInfo={displayName:"Card",description:"卡片容器,用于分组内容",props:{title:{name:"title",required:!1,description:"标题",type:{name:"ReactNode",raw:"React.ReactNode"}},children:{name:"children",required:!1,description:"内容区域",type:{name:"ReactNode",raw:"React.ReactNode"}},bordered:{name:"bordered",required:!1,description:"是否显示边框",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},hoverable:{name:"hoverable",required:!1,description:"是否可悬停",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},size:{name:"size",required:!1,description:"卡片大小",type:{name:"CardSize",raw:'"default" | "small"'},defaultValue:{value:'"default"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},actions:{name:"actions",required:!1,description:"卡片操作组",type:{name:"ReactNode[]",raw:"React.ReactNode[]"}}}};const Hr=({showDefaultFooter:e=!0,...t})=>{const a=t.footer!==void 0?t.footer:e?(l,{OkBtn:n,CancelBtn:r})=>$.jsxs($.Fragment,{children:[$.jsx(n,{}),$.jsx(r,{})]}):null;return $.jsx(Ee.Modal,{...t,footer:a})};Hr.__docgenInfo={displayName:"AppModal",description:"应用级模态框组件,基于 Ant Design Modal 封装",props:{showDefaultFooter:{name:"showDefaultFooter",required:!1,description:"是否显示默认的确定和取消按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},title:{name:"title",required:!1,description:"模态框标题",type:{name:"ReactNode",raw:"React.ReactNode"}},open:{name:"open",required:!1,description:"是否显示模态框",type:{name:"boolean",raw:"boolean"}},onCancel:{name:"onCancel",required:!1,description:"取消按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},onOk:{name:"onOk",required:!1,description:"确定按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},children:{name:"children",required:!1,description:"模态框内容",type:{name:"ReactNode",raw:"React.ReactNode"}},width:{name:"width",required:!1,description:"模态框宽度",type:{name:"string | number",raw:"string | number"}},centered:{name:"centered",required:!1,description:"是否居中显示",type:{name:"boolean",raw:"boolean"}},maskClosable:{name:"maskClosable",required:!1,description:"点击蒙层是否允许关闭",type:{name:"boolean",raw:"boolean"}}}};const $r=({scrollX:e,showPagination:t=!0,defaultPageSize:a=10,...l})=>$.jsx(Ee.Table,{...l,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:a,...l.pagination}:!1});$r.__docgenInfo={displayName:"PageTable",description:"页面级表格组件,高度铺满容器,自动滚动",props:{scrollX:{name:"scrollX",required:!1,description:"水平滚动宽度",type:{name:"number",raw:"number"}},showPagination:{name:"showPagination",required:!1,description:"是否显示分页器",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},columns:{name:"columns",required:!1,description:"表格列配置",type:{name:"ColumnType[]",raw:"ColumnType<any>[]"}},dataSource:{name:"dataSource",required:!1,description:"数据源",type:{name:"any[]",raw:"any[]"}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},rowKey:{name:"rowKey",required:!1,description:"行数据的 Key",type:{name:"string | function",raw:"string | ((record: any) => string)"}}}};const ac=Ct.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),Rr=({name:e,size:t,color:a,style:l,...n})=>{const r={fontSize:t,color:a,...l};return $.jsx(ac,{...n,type:e,style:r})};Rr.__docgenInfo={displayName:"XcIcon",description:"自定义图标组件,基于 iconfont",props:{name:{name:"name",required:!0,description:"图标名称",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"图标大小",type:{name:"number | string",raw:"number | string"}},color:{name:"color",required:!1,description:"图标颜色",type:{name:"string",raw:"string"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Ur=({loading:e,description:t="暂无数据",className:a,emptyChildren:l,loadingText:n,emptyImage:r})=>e?$.jsxs(Ee.Flex,{className:`pt-10 w-full ${a||""}`,align:"center",justify:"center",vertical:!0,children:[$.jsx(Ee.Spin,{size:"large"}),n&&$.jsx("div",{className:"mt-4 text-gray-500",children:n})]}):$.jsx(Ee.Flex,{className:`pt-10 w-full ${a||""}`,align:"center",justify:"center",children:$.jsx(Ee.Empty,{image:r,description:t,imageStyle:{height:180},children:l})});Ur.__docgenInfo={displayName:"EmptyAndSpin",description:"空状态和加载状态组合组件",props:{loading:{name:"loading",required:!0,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},description:{name:"description",required:!1,description:"空状态描述",type:{name:"ReactNode",raw:"React.ReactNode"},defaultValue:{value:'"暂无数据"'}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},emptyChildren:{name:"emptyChildren",required:!1,description:"空状态额外内容",type:{name:"ReactNode",raw:"React.ReactNode"}},loadingText:{name:"loadingText",required:!1,description:"加载中提示文字",type:{name:"string",raw:"string"}},emptyImage:{name:"emptyImage",required:!1,description:"空状态图片",type:{name:"string",raw:"string"}}}};const qr=({onClick:e,showText:t=!1,className:a,size:l="small",type:n="default"})=>$.jsx(Ee.Button,{size:l,type:n,icon:$.jsx(Ct.LeftOutlined,{}),className:`cursor-pointer ${a||""}`,onClick:e,children:t&&"返回"});qr.__docgenInfo={displayName:"BackButton",description:"返回按钮组件",props:{onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"() => void"}},showText:{name:"showText",required:!1,description:"是否显示文字",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'},defaultValue:{value:'"small"'}},type:{name:"type",required:!1,description:"按钮类型",type:{name:"ButtonType",raw:'"primary" | "default" | "dashed" | "link" | "text"'},defaultValue:{value:'"default"'}}}};const zr=({removePadding:e=!0,className:t,...a})=>{const l=e?`px-0 h-auto ${t||""}`:t;return $.jsx(Ee.Button,{type:"link",...a,className:l,children:a.children})};zr.__docgenInfo={displayName:"LinkButton",description:"链接样式按钮组件,适用于表格操作列",props:{removePadding:{name:"removePadding",required:!1,description:"是否去除默认内边距",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLButtonElement>) => void"}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}}}};const{Option:lc}=Ee.Select,Vr=({columns:e,request:t,searchFields:a=[],showSearch:l=!0,showRefresh:n=!0,defaultPageSize:r=10,pageSizeOptions:i=["10","20","50","100"],autoLoad:s=!0,externalParams:u={},...o})=>{const[c,d]=w.useState([]),[h,f]=w.useState(!1),[y,E]=w.useState({current:1,pageSize:r,total:0}),[g,v]=w.useState({}),[m,b]=w.useState({}),[T]=Ee.Form.useForm(),C=w.useRef(y);C.current=y;const A=w.useRef(u);A.current=u;const N=w.useRef(!1),k=w.useMemo(()=>e.map(I=>{const{sortable:x,render:P,...z}=I;return{...z,sorter:x?!0:void 0,render:P||(U=>U)}}),[e]),S=w.useCallback(async(I={})=>{if(t){f(!0);try{const x={page:C.current.current,pageSize:C.current.pageSize,sortField:m.field,sortOrder:m.order,searchParams:{...g,...A.current},...I},P=await t(x);P.success&&(d(P.data),E(z=>({...z,total:P.total,current:x.page||z.current})))}catch(x){console.error("加载数据失败:",x)}finally{f(!1)}}},[t,m,g]),L=w.useCallback(I=>{v(I),E(x=>({...x,current:1}))},[]),D=w.useCallback(()=>{T.resetFields(),v({}),E(I=>({...I,current:1}))},[T]),F=w.useCallback(()=>{S()},[S]),M=w.useCallback((I,x,P)=>{const z={current:I.current||1,pageSize:I.pageSize||r,total:I.total||0},U={field:P?.field,order:P?.order};E(z),b(U)},[r]);return w.useEffect(()=>{const I=Object.keys(u).length>0;(s&&!N.current||I)&&(S(),N.current=!0)},[s,u,S]),$.jsxs("div",{children:[l&&a.length>0&&$.jsx(Ee.Card,{size:"small",style:{marginBottom:16},children:$.jsxs(Ee.Form,{form:T,layout:"inline",onFinish:L,initialValues:a.reduce((I,x)=>(x.defaultValue!==void 0&&(I[x.key]=x.defaultValue),I),{}),children:[a.map(I=>$.jsx(Ee.Form.Item,{name:I.key,label:I.label,children:I.type==="input"?$.jsx(Ee.Input,{placeholder:I.placeholder||`请输入${I.label}`,style:{width:200}}):$.jsx(Ee.Select,{placeholder:I.placeholder||`请选择${I.label}`,style:{width:200},allowClear:!0,children:I.options?.map(x=>$.jsx(lc,{value:x.value,children:x.label},x.value))})},I.key)),$.jsx(Ee.Form.Item,{children:$.jsxs(Ee.Space,{children:[$.jsx(Ee.Button,{type:"primary",htmlType:"submit",icon:$.jsx(Ct.SearchOutlined,{}),children:"查询"}),$.jsx(Ee.Button,{onClick:D,children:"重置"}),n&&$.jsx(Ee.Button,{icon:$.jsx(Ct.ReloadOutlined,{}),onClick:F,children:"刷新"})]})})]})}),$.jsx(Ee.Table,{...o,columns:k,dataSource:c,loading:h,pagination:{...y,showSizeChanger:!0,showQuickJumper:!0,showTotal:(I,x)=>`第 ${x[0]}-${x[1]} 条/共 ${I} 条`,pageSizeOptions:i},onChange:M,scroll:{x:"max-content",y:"50vh"}})]})};Vr.__docgenInfo={displayName:"AdvancedTable",description:"高阶表格组件,支持异步请求、搜索、排序等功能",props:{columns:{name:"columns",required:!0,description:"列配置",type:{name:"AdvancedColumnType[]",raw:"AdvancedColumnType<any>[]"}},request:{name:"request",required:!1,description:"异步请求函数",type:{name:"function",raw:"(params: RequestParams) => Promise<RequestResponse>"}},searchFields:{name:"searchFields",required:!1,description:"搜索字段配置",type:{name:"SearchFieldConfig[]",raw:"SearchFieldConfig[]"},defaultValue:{value:"[]"}},showSearch:{name:"showSearch",required:!1,description:"是否显示搜索区域",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},showRefresh:{name:"showRefresh",required:!1,description:"是否显示刷新按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},pageSizeOptions:{name:"pageSizeOptions",required:!1,description:"页面大小选项",type:{name:"string[]",raw:"string[]"},defaultValue:{value:'["10", "20", "50", "100"]'}},autoLoad:{name:"autoLoad",required:!1,description:"是否自动加载",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},externalParams:{name:"externalParams",required:!1,description:"外部请求参数",type:{name:"Record<string, any>",raw:"Record<string, any>"},defaultValue:{value:"{}"}}}};const Ye=e=>e==="multi-variable"||e==="multi-variable-select",nc=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.required==="true",i=e.dataset.value||"",s=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),[u,o]=w.useState(i||void 0),[c,d]=w.useState(64),h=w.useRef(null),f=g=>{o(g),e.setAttribute("data-value",g),t(a,g)};w.useEffect(()=>{o(i||void 0)},[i]);const y=w.useCallback(()=>{if(u!=null&&u!==""){const g=s.find(v=>String(v.value)===String(u));return g?typeof g.label=="string"?g.label:String(g.label??u):String(u)}return l||"请选择"},[u,s,l]),E=w.useCallback(()=>{const g=h.current;if(!g)return;const v=g.querySelector(".ant-select-selection-item"),m=g.querySelector(".ant-select-selection-placeholder"),b=v||m,T=(b?.textContent||"").trim()||y(),C=g.querySelector(".ant-select-selector"),A=b||C||g,N=window.getComputedStyle(A),k=b?N.fontSize:"16px",S=N.fontFamily||"sans-serif",L=N.fontWeight||"400",F=`${N.fontStyle||"normal"} ${L} ${k} ${S}`,I=document.createElement("canvas").getContext("2d"),x=I?Math.ceil((I.font=F,I.measureText(T).width||0)):0;let P=0;if(C){const Y=window.getComputedStyle(C);P=(Number.parseFloat(Y.paddingLeft)||0)+(Number.parseFloat(Y.paddingRight)||0)}const z=g.querySelector(".ant-select-arrow"),U=z?Math.ceil(z.getBoundingClientRect().width):12,V=g.querySelector(".ant-select-clear");let _=0;if(V){const Y=window.getComputedStyle(V);Y.display!=="none"&&Y.visibility!=="hidden"&&(_=Math.ceil(V.getBoundingClientRect().width))}const G=Math.max(36,x+P+U+_+6);d(Y=>Y===G?Y:G)},[y]);return w.useLayoutEffect(()=>{const g=window.requestAnimationFrame(()=>{E()}),v=window.setTimeout(()=>{E()},60);return()=>{window.cancelAnimationFrame(g),window.clearTimeout(v)}},[E]),w.useEffect(()=>{if(!("fonts"in document))return;let g=!1;const v=document.fonts;if(v?.ready)return v.ready.then(()=>{g||E()}),()=>{g=!0}},[E]),dt.createPortal($.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:h,style:{display:"inline-block",width:c},children:$.jsx(Ee.Select,{value:u,onChange:f,placeholder:l||"请选择",style:{width:"100%"},options:s,allowClear:!r,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},rc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-select-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(nc,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`select-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-select-host")||d.querySelector?.(".rte-select-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-select-host")||d.querySelector?.(".rte-select-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},ic=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.required==="true",i=e.dataset.value||"",s=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),[u,o]=w.useState(i||void 0),[c,d]=w.useState(""),[h,f]=w.useState(null),[y,E]=w.useState(64),g=w.useRef(null),v=w.useMemo(()=>{const S=[...s];return h&&!s.some(L=>L.value===h)&&S.unshift({label:h,value:h}),S},[s,h]),m=w.useMemo(()=>{const S=c.trim();if(!S)return v;const L=S.toLowerCase(),D=v.filter(M=>M.label.toLowerCase().includes(L)||M.value.toLowerCase().includes(L));return v.some(M=>M.label===S||M.value===S)?D:[{label:S,value:S,isCustom:!0},...D]},[v,c]),b=S=>{if(S==null)return;s.some(D=>D.value===S)?h&&f(null):f(S),o(S),d(""),e.setAttribute("data-value",S),t(a,S)},T=S=>{d(S)},C=S=>{if(S.key==="Enter"&&c.trim()){S.preventDefault(),S.stopPropagation();const L=c.trim(),D=s.find(F=>F.label===L||F.value===L);D?b(D.value):(f(L),o(L),d(""),e.setAttribute("data-value",L),t(a,L))}},A=()=>{f(null),o(void 0),d(""),e.setAttribute("data-value",""),t(a,"")};w.useEffect(()=>{o(i||void 0)},[i]);const N=w.useCallback(()=>{if(u!=null&&u!==""){const S=v.find(L=>String(L.value)===String(u));return S?typeof S.label=="string"?S.label:String(S.label??u):String(u)}return l||"请选择"},[u,v,l]),k=w.useCallback(()=>{const S=g.current;if(!S)return;const L=S.querySelector(".ant-select-selection-item"),D=S.querySelector(".ant-select-selection-placeholder"),F=L||D,M=(F?.textContent||"").trim()||N(),I=S.querySelector(".ant-select-selector"),x=F||I||S,P=window.getComputedStyle(x),z=F?P.fontSize:"16px",U=P.fontFamily||"sans-serif",V=P.fontWeight||"400",G=`${P.fontStyle||"normal"} ${V} ${z} ${U}`,O=document.createElement("canvas").getContext("2d"),R=O?Math.ceil((O.font=G,O.measureText(M).width||0)):0;let K=0;if(I){const me=window.getComputedStyle(I);K=(Number.parseFloat(me.paddingLeft)||0)+(Number.parseFloat(me.paddingRight)||0)}const X=S.querySelector(".ant-select-arrow"),W=X?Math.ceil(X.getBoundingClientRect().width):12,ee=S.querySelector(".ant-select-clear");let ie=0;if(ee){const me=window.getComputedStyle(ee);me.display!=="none"&&me.visibility!=="hidden"&&(ie=Math.ceil(ee.getBoundingClientRect().width))}const ce=Math.min(240,Math.max(80,R+K+W+ie+4));E(me=>me===ce?me:ce)},[N]);return w.useLayoutEffect(()=>{const S=window.requestAnimationFrame(()=>{k()}),L=window.setTimeout(()=>{k()},60);return()=>{window.cancelAnimationFrame(S),window.clearTimeout(L)}},[k]),w.useEffect(()=>{if(!("fonts"in document))return;let S=!1;const L=document.fonts;if(L?.ready)return L.ready.then(()=>{S||k()}),()=>{S=!0}},[k]),dt.createPortal($.jsx("div",{className:`rte-searchable-select-wrapper ${u?"rte-searchable-has-value":""}`,contentEditable:!1,ref:g,style:{display:"inline-block",width:y},children:$.jsx(Ee.Select,{showSearch:!0,value:u,searchValue:c,onChange:b,onSearch:T,onClear:A,onInputKeyDown:C,filterOption:!1,placeholder:l||"搜索或输入",style:{width:"100%"},options:m,allowClear:!r,size:"small",popupClassName:"rte-searchable-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,notFoundContent:$.jsx("span",{style:{color:"#999",fontSize:13},children:"暂无数据"}),suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},sc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-searchable-select-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(ic,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`searchable-select-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-searchable-select-host")||d.querySelector?.(".rte-searchable-select-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-searchable-select-host")||d.querySelector?.(".rte-searchable-select-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},uc=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.value||"",i=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),s=w.useCallback(A=>A?A.split("-"):[],[]),[u,o]=w.useState(()=>s(r)),[c,d]=w.useState(100),[h,f]=w.useState(0),y=w.useRef(s(r)),E=w.useRef(null),g=u.length>=2,v=A=>{o(A),y.current=A;const N=A.join("-");e.setAttribute("data-value",N),t(a,N)},m=A=>{if(!A||A.length===0){v([]);return}A.length<2||v(A.map(String))},b=A=>{A||(o(y.current),f(N=>N+1))};w.useEffect(()=>{o(s(r))},[r,s]);const T=w.useCallback(()=>u.length>=2?u.join("-"):l||"请选择省市区",[u,l]),C=w.useCallback(()=>{const A=E.current;if(!A)return;const N=T(),k=A.querySelector(".ant-select-selector"),S=A.querySelector(".ant-select-selection-item")||A.querySelector(".ant-select-selection-placeholder"),L=S||k||A,D=window.getComputedStyle(L),F=S?D.fontSize:"16px",M=D.fontFamily||"sans-serif",I=D.fontWeight||"400",P=`${D.fontStyle||"normal"} ${I} ${F} ${M}`,U=document.createElement("canvas").getContext("2d"),V=U?Math.ceil((U.font=P,U.measureText(N).width||0)):0;let _=0;if(k){const O=window.getComputedStyle(k);_=(Number.parseFloat(O.paddingLeft)||0)+(Number.parseFloat(O.paddingRight)||0)}const Y=Math.max(80,V+_+16+10);d(O=>O===Y?O:Y)},[T]);return w.useLayoutEffect(()=>{const A=window.requestAnimationFrame(()=>{C()}),N=window.setTimeout(()=>{C()},60);return()=>{window.cancelAnimationFrame(A),window.clearTimeout(N)}},[C]),w.useEffect(()=>{if(!("fonts"in document))return;let A=!1;const N=document.fonts;if(N?.ready)return N.ready.then(()=>{A||C()}),()=>{A=!0}},[C]),dt.createPortal($.jsx("div",{className:"rte-cascader-wrapper",contentEditable:!1,ref:E,"data-has-value":g?"true":"false",style:{display:"inline-block",width:c},children:$.jsx(Ee.Cascader,{value:g?u:void 0,onChange:m,onDropdownVisibleChange:b,options:i,placeholder:l||"请选择省市区",style:{width:"100%"},size:"small",allowClear:!0,changeOnSelect:!0,showSearch:{filter:(A,N)=>N.some(k=>k.label.toLowerCase().includes(A.toLowerCase()))},popupClassName:"rte-cascader-dropdown",getPopupContainer:()=>document.body,displayRender:A=>A.join("-"),suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})},h)}),e)},oc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-cascader-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(uc,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`cascader-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-cascader-host")||d.querySelector?.(".rte-cascader-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-cascader-host")||d.querySelector?.(".rte-cascader-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t};function cc(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function dc(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function fc(e,t,a,l,n){const i=document.createElement("canvas").getContext("2d");if(!i)return 0;i.font=t;const s=e.split(`
|
|
1
|
+
(function(we,$){typeof exports=="object"&&typeof module<"u"?$(exports,require("react/jsx-runtime"),require("react"),require("antd"),require("@ant-design/icons"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","antd","@ant-design/icons","react-dom"],$):(we=typeof globalThis<"u"?globalThis:we||self,$(we.SealSeekBIComponents={},we.React,we.React,we.antd,we.AntdIcons,we.ReactDOM))})(this,(function(we,$,w,Ee,Ct,dt){"use strict";const Br=({variant:e="primary",loading:t=!1,children:a,...l})=>{const n=r=>{switch(r){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return $.jsx(Ee.Button,{...l,type:n(e),loading:t,ghost:e==="ghost",children:a})};Br.__docgenInfo={displayName:"Button",description:"基础按钮,用于触发操作",props:{variant:{name:"variant",required:!1,description:"视觉风格",type:{name:"ButtonVariant",raw:'"primary" | "ghost" | "dashed" | "link" | "text"'},defaultValue:{value:'"primary"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: MouseEvent) => void"}}}};const Fr=({title:e,children:t,bordered:a=!0,hoverable:l=!1,size:n="default",...r})=>$.jsx(Ee.Card,{...r,title:e,bordered:a,hoverable:l,size:n,children:t});Fr.__docgenInfo={displayName:"Card",description:"卡片容器,用于分组内容",props:{title:{name:"title",required:!1,description:"标题",type:{name:"ReactNode",raw:"React.ReactNode"}},children:{name:"children",required:!1,description:"内容区域",type:{name:"ReactNode",raw:"React.ReactNode"}},bordered:{name:"bordered",required:!1,description:"是否显示边框",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},hoverable:{name:"hoverable",required:!1,description:"是否可悬停",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},size:{name:"size",required:!1,description:"卡片大小",type:{name:"CardSize",raw:'"default" | "small"'},defaultValue:{value:'"default"'}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},actions:{name:"actions",required:!1,description:"卡片操作组",type:{name:"ReactNode[]",raw:"React.ReactNode[]"}}}};const Hr=({showDefaultFooter:e=!0,...t})=>{const a=t.footer!==void 0?t.footer:e?(l,{OkBtn:n,CancelBtn:r})=>$.jsxs($.Fragment,{children:[$.jsx(n,{}),$.jsx(r,{})]}):null;return $.jsx(Ee.Modal,{...t,footer:a})};Hr.__docgenInfo={displayName:"AppModal",description:"应用级模态框组件,基于 Ant Design Modal 封装",props:{showDefaultFooter:{name:"showDefaultFooter",required:!1,description:"是否显示默认的确定和取消按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},title:{name:"title",required:!1,description:"模态框标题",type:{name:"ReactNode",raw:"React.ReactNode"}},open:{name:"open",required:!1,description:"是否显示模态框",type:{name:"boolean",raw:"boolean"}},onCancel:{name:"onCancel",required:!1,description:"取消按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},onOk:{name:"onOk",required:!1,description:"确定按钮点击事件",type:{name:"function",raw:"(e: React.MouseEvent<HTMLElement>) => void"}},children:{name:"children",required:!1,description:"模态框内容",type:{name:"ReactNode",raw:"React.ReactNode"}},width:{name:"width",required:!1,description:"模态框宽度",type:{name:"string | number",raw:"string | number"}},centered:{name:"centered",required:!1,description:"是否居中显示",type:{name:"boolean",raw:"boolean"}},maskClosable:{name:"maskClosable",required:!1,description:"点击蒙层是否允许关闭",type:{name:"boolean",raw:"boolean"}}}};const $r=({scrollX:e,showPagination:t=!0,defaultPageSize:a=10,...l})=>$.jsx(Ee.Table,{...l,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:a,...l.pagination}:!1});$r.__docgenInfo={displayName:"PageTable",description:"页面级表格组件,高度铺满容器,自动滚动",props:{scrollX:{name:"scrollX",required:!1,description:"水平滚动宽度",type:{name:"number",raw:"number"}},showPagination:{name:"showPagination",required:!1,description:"是否显示分页器",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},columns:{name:"columns",required:!1,description:"表格列配置",type:{name:"ColumnType[]",raw:"ColumnType<any>[]"}},dataSource:{name:"dataSource",required:!1,description:"数据源",type:{name:"any[]",raw:"any[]"}},loading:{name:"loading",required:!1,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},rowKey:{name:"rowKey",required:!1,description:"行数据的 Key",type:{name:"string | function",raw:"string | ((record: any) => string)"}}}};const ac=Ct.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),Rr=({name:e,size:t,color:a,style:l,...n})=>{const r={fontSize:t,color:a,...l};return $.jsx(ac,{...n,type:e,style:r})};Rr.__docgenInfo={displayName:"XcIcon",description:"自定义图标组件,基于 iconfont",props:{name:{name:"name",required:!0,description:"图标名称",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"图标大小",type:{name:"number | string",raw:"number | string"}},color:{name:"color",required:!1,description:"图标颜色",type:{name:"string",raw:"string"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const Ur=({loading:e,description:t="暂无数据",className:a,emptyChildren:l,loadingText:n,emptyImage:r})=>e?$.jsxs(Ee.Flex,{className:`pt-10 w-full ${a||""}`,align:"center",justify:"center",vertical:!0,children:[$.jsx(Ee.Spin,{size:"large"}),n&&$.jsx("div",{className:"mt-4 text-gray-500",children:n})]}):$.jsx(Ee.Flex,{className:`pt-10 w-full ${a||""}`,align:"center",justify:"center",children:$.jsx(Ee.Empty,{image:r,description:t,imageStyle:{height:180},children:l})});Ur.__docgenInfo={displayName:"EmptyAndSpin",description:"空状态和加载状态组合组件",props:{loading:{name:"loading",required:!0,description:"是否加载中",type:{name:"boolean",raw:"boolean"}},description:{name:"description",required:!1,description:"空状态描述",type:{name:"ReactNode",raw:"React.ReactNode"},defaultValue:{value:'"暂无数据"'}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},emptyChildren:{name:"emptyChildren",required:!1,description:"空状态额外内容",type:{name:"ReactNode",raw:"React.ReactNode"}},loadingText:{name:"loadingText",required:!1,description:"加载中提示文字",type:{name:"string",raw:"string"}},emptyImage:{name:"emptyImage",required:!1,description:"空状态图片",type:{name:"string",raw:"string"}}}};const qr=({onClick:e,showText:t=!1,className:a,size:l="small",type:n="default"})=>$.jsx(Ee.Button,{size:l,type:n,icon:$.jsx(Ct.LeftOutlined,{}),className:`cursor-pointer ${a||""}`,onClick:e,children:t&&"返回"});qr.__docgenInfo={displayName:"BackButton",description:"返回按钮组件",props:{onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"() => void"}},showText:{name:"showText",required:!1,description:"是否显示文字",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},size:{name:"size",required:!1,description:"按钮大小",type:{name:"ButtonSize",raw:'"small" | "middle" | "large"'},defaultValue:{value:'"small"'}},type:{name:"type",required:!1,description:"按钮类型",type:{name:"ButtonType",raw:'"primary" | "default" | "dashed" | "link" | "text"'},defaultValue:{value:'"default"'}}}};const zr=({removePadding:e=!0,className:t,...a})=>{const l=e?`px-0 h-auto ${t||""}`:t;return $.jsx(Ee.Button,{type:"link",...a,className:l,children:a.children})};zr.__docgenInfo={displayName:"LinkButton",description:"链接样式按钮组件,适用于表格操作列",props:{removePadding:{name:"removePadding",required:!1,description:"是否去除默认内边距",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},children:{name:"children",required:!1,description:"按钮内容",type:{name:"ReactNode",raw:"React.ReactNode"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLButtonElement>) => void"}},disabled:{name:"disabled",required:!1,description:"是否禁用",type:{name:"boolean",raw:"boolean"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}}}};const{Option:lc}=Ee.Select,Vr=({columns:e,request:t,searchFields:a=[],showSearch:l=!0,showRefresh:n=!0,defaultPageSize:r=10,pageSizeOptions:i=["10","20","50","100"],autoLoad:s=!0,externalParams:u={},...o})=>{const[c,d]=w.useState([]),[h,f]=w.useState(!1),[y,E]=w.useState({current:1,pageSize:r,total:0}),[g,v]=w.useState({}),[m,b]=w.useState({}),[T]=Ee.Form.useForm(),C=w.useRef(y);C.current=y;const A=w.useRef(u);A.current=u;const N=w.useRef(!1),k=w.useMemo(()=>e.map(I=>{const{sortable:x,render:P,...z}=I;return{...z,sorter:x?!0:void 0,render:P||(U=>U)}}),[e]),S=w.useCallback(async(I={})=>{if(t){f(!0);try{const x={page:C.current.current,pageSize:C.current.pageSize,sortField:m.field,sortOrder:m.order,searchParams:{...g,...A.current},...I},P=await t(x);P.success&&(d(P.data),E(z=>({...z,total:P.total,current:x.page||z.current})))}catch(x){console.error("加载数据失败:",x)}finally{f(!1)}}},[t,m,g]),L=w.useCallback(I=>{v(I),E(x=>({...x,current:1}))},[]),D=w.useCallback(()=>{T.resetFields(),v({}),E(I=>({...I,current:1}))},[T]),F=w.useCallback(()=>{S()},[S]),M=w.useCallback((I,x,P)=>{const z={current:I.current||1,pageSize:I.pageSize||r,total:I.total||0},U={field:P?.field,order:P?.order};E(z),b(U)},[r]);return w.useEffect(()=>{const I=Object.keys(u).length>0;(s&&!N.current||I)&&(S(),N.current=!0)},[s,u,S]),$.jsxs("div",{children:[l&&a.length>0&&$.jsx(Ee.Card,{size:"small",style:{marginBottom:16},children:$.jsxs(Ee.Form,{form:T,layout:"inline",onFinish:L,initialValues:a.reduce((I,x)=>(x.defaultValue!==void 0&&(I[x.key]=x.defaultValue),I),{}),children:[a.map(I=>$.jsx(Ee.Form.Item,{name:I.key,label:I.label,children:I.type==="input"?$.jsx(Ee.Input,{placeholder:I.placeholder||`请输入${I.label}`,style:{width:200}}):$.jsx(Ee.Select,{placeholder:I.placeholder||`请选择${I.label}`,style:{width:200},allowClear:!0,children:I.options?.map(x=>$.jsx(lc,{value:x.value,children:x.label},x.value))})},I.key)),$.jsx(Ee.Form.Item,{children:$.jsxs(Ee.Space,{children:[$.jsx(Ee.Button,{type:"primary",htmlType:"submit",icon:$.jsx(Ct.SearchOutlined,{}),children:"查询"}),$.jsx(Ee.Button,{onClick:D,children:"重置"}),n&&$.jsx(Ee.Button,{icon:$.jsx(Ct.ReloadOutlined,{}),onClick:F,children:"刷新"})]})})]})}),$.jsx(Ee.Table,{...o,columns:k,dataSource:c,loading:h,pagination:{...y,showSizeChanger:!0,showQuickJumper:!0,showTotal:(I,x)=>`第 ${x[0]}-${x[1]} 条/共 ${I} 条`,pageSizeOptions:i},onChange:M,scroll:{x:"max-content",y:"50vh"}})]})};Vr.__docgenInfo={displayName:"AdvancedTable",description:"高阶表格组件,支持异步请求、搜索、排序等功能",props:{columns:{name:"columns",required:!0,description:"列配置",type:{name:"AdvancedColumnType[]",raw:"AdvancedColumnType<any>[]"}},request:{name:"request",required:!1,description:"异步请求函数",type:{name:"function",raw:"(params: RequestParams) => Promise<RequestResponse>"}},searchFields:{name:"searchFields",required:!1,description:"搜索字段配置",type:{name:"SearchFieldConfig[]",raw:"SearchFieldConfig[]"},defaultValue:{value:"[]"}},showSearch:{name:"showSearch",required:!1,description:"是否显示搜索区域",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},showRefresh:{name:"showRefresh",required:!1,description:"是否显示刷新按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},defaultPageSize:{name:"defaultPageSize",required:!1,description:"默认页面大小",type:{name:"number",raw:"number"},defaultValue:{value:"10"}},pageSizeOptions:{name:"pageSizeOptions",required:!1,description:"页面大小选项",type:{name:"string[]",raw:"string[]"},defaultValue:{value:'["10", "20", "50", "100"]'}},autoLoad:{name:"autoLoad",required:!1,description:"是否自动加载",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},externalParams:{name:"externalParams",required:!1,description:"外部请求参数",type:{name:"Record<string, any>",raw:"Record<string, any>"},defaultValue:{value:"{}"}}}};const Ye=e=>e==="multi-variable"||e==="multi-variable-select",nc=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.required==="true",i=e.dataset.value||"",s=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),[u,o]=w.useState(i||void 0),[c,d]=w.useState(64),h=w.useRef(null),f=g=>{o(g),e.setAttribute("data-value",g),t(a,g)};w.useEffect(()=>{o(i||void 0)},[i]);const y=w.useCallback(()=>{if(u!=null&&u!==""){const g=s.find(v=>String(v.value)===String(u));return g?typeof g.label=="string"?g.label:String(g.label??u):String(u)}return l||"请选择"},[u,s,l]),E=w.useCallback(()=>{const g=h.current;if(!g)return;const v=g.querySelector(".ant-select-selection-item"),m=g.querySelector(".ant-select-selection-placeholder"),b=v||m,T=(b?.textContent||"").trim()||y(),C=g.querySelector(".ant-select-selector"),A=b||C||g,N=window.getComputedStyle(A),k=b?N.fontSize:"16px",S=N.fontFamily||"sans-serif",L=N.fontWeight||"400",F=`${N.fontStyle||"normal"} ${L} ${k} ${S}`,I=document.createElement("canvas").getContext("2d"),x=I?Math.ceil((I.font=F,I.measureText(T).width||0)):0;let P=0;if(C){const Y=window.getComputedStyle(C);P=(Number.parseFloat(Y.paddingLeft)||0)+(Number.parseFloat(Y.paddingRight)||0)}const z=g.querySelector(".ant-select-arrow"),U=z?Math.ceil(z.getBoundingClientRect().width):12,V=g.querySelector(".ant-select-clear");let _=0;if(V){const Y=window.getComputedStyle(V);Y.display!=="none"&&Y.visibility!=="hidden"&&(_=Math.ceil(V.getBoundingClientRect().width))}const G=Math.max(36,x+P+U+_+6);d(Y=>Y===G?Y:G)},[y]);return w.useLayoutEffect(()=>{const g=window.requestAnimationFrame(()=>{E()}),v=window.setTimeout(()=>{E()},60);return()=>{window.cancelAnimationFrame(g),window.clearTimeout(v)}},[E]),w.useEffect(()=>{if(!("fonts"in document))return;let g=!1;const v=document.fonts;if(v?.ready)return v.ready.then(()=>{g||E()}),()=>{g=!0}},[E]),dt.createPortal($.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:h,style:{display:"inline-block",width:c},children:$.jsx(Ee.Select,{value:u,onChange:f,placeholder:l||"请选择",style:{width:"100%"},options:s,allowClear:!r,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},rc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-select-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(nc,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`select-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-select-host")||d.querySelector?.(".rte-select-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-select-host")||d.querySelector?.(".rte-select-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},ic=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.required==="true",i=e.dataset.value||"",s=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),[u,o]=w.useState(i||void 0),[c,d]=w.useState(""),[h,f]=w.useState(null),[y,E]=w.useState(64),g=w.useRef(null),v=w.useMemo(()=>{const S=[...s];return h&&!s.some(L=>L.value===h)&&S.unshift({label:h,value:h}),S},[s,h]),m=w.useMemo(()=>{const S=c.trim();if(!S)return v;const L=S.toLowerCase(),D=v.filter(M=>M.label.toLowerCase().includes(L)||M.value.toLowerCase().includes(L));return v.some(M=>M.label===S||M.value===S)?D:[{label:S,value:S,isCustom:!0},...D]},[v,c]),b=S=>{if(S==null)return;s.some(D=>D.value===S)?h&&f(null):f(S),o(S),d(""),e.setAttribute("data-value",S),t(a,S)},T=S=>{d(S)},C=S=>{if(S.key==="Enter"&&c.trim()){S.preventDefault(),S.stopPropagation();const L=c.trim(),D=s.find(F=>F.label===L||F.value===L);D?b(D.value):(f(L),o(L),d(""),e.setAttribute("data-value",L),t(a,L))}},A=()=>{f(null),o(void 0),d(""),e.setAttribute("data-value",""),t(a,"")};w.useEffect(()=>{o(i||void 0)},[i]);const N=w.useCallback(()=>{if(u!=null&&u!==""){const S=v.find(L=>String(L.value)===String(u));return S?typeof S.label=="string"?S.label:String(S.label??u):String(u)}return l||"请选择"},[u,v,l]),k=w.useCallback(()=>{const S=g.current;if(!S)return;const L=S.querySelector(".ant-select-selection-item"),D=S.querySelector(".ant-select-selection-placeholder"),F=L||D,M=(F?.textContent||"").trim()||N(),I=S.querySelector(".ant-select-selector"),x=F||I||S,P=window.getComputedStyle(x),z=F?P.fontSize:"16px",U=P.fontFamily||"sans-serif",V=P.fontWeight||"400",G=`${P.fontStyle||"normal"} ${V} ${z} ${U}`,O=document.createElement("canvas").getContext("2d"),R=O?Math.ceil((O.font=G,O.measureText(M).width||0)):0;let K=0;if(I){const me=window.getComputedStyle(I);K=(Number.parseFloat(me.paddingLeft)||0)+(Number.parseFloat(me.paddingRight)||0)}const X=S.querySelector(".ant-select-arrow"),W=X?Math.ceil(X.getBoundingClientRect().width):12,ee=S.querySelector(".ant-select-clear");let ie=0;if(ee){const me=window.getComputedStyle(ee);me.display!=="none"&&me.visibility!=="hidden"&&(ie=Math.ceil(ee.getBoundingClientRect().width))}const ce=Math.min(240,Math.max(80,R+K+W+ie+4));E(me=>me===ce?me:ce)},[N]);return w.useLayoutEffect(()=>{const S=window.requestAnimationFrame(()=>{k()}),L=window.setTimeout(()=>{k()},60);return()=>{window.cancelAnimationFrame(S),window.clearTimeout(L)}},[k]),w.useEffect(()=>{if(!("fonts"in document))return;let S=!1;const L=document.fonts;if(L?.ready)return L.ready.then(()=>{S||k()}),()=>{S=!0}},[k]),dt.createPortal($.jsx("div",{className:`rte-searchable-select-wrapper ${u?"rte-searchable-has-value":""}`,contentEditable:!1,ref:g,style:{display:"inline-block",width:y},children:$.jsx(Ee.Select,{showSearch:!0,value:u,searchValue:c,onChange:b,onSearch:T,onClear:A,onInputKeyDown:C,filterOption:!1,placeholder:l||"搜索或输入",style:{width:"100%"},options:m,allowClear:!r,size:"small",popupClassName:"rte-searchable-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,notFoundContent:$.jsx("span",{style:{color:"#999",fontSize:13},children:"暂无数据"}),suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},sc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-searchable-select-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(ic,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`searchable-select-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-searchable-select-host")||d.querySelector?.(".rte-searchable-select-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-searchable-select-host")||d.querySelector?.(".rte-searchable-select-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},uc=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.placeholder,n=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",r=e.dataset.value||"",i=w.useMemo(()=>{try{return JSON.parse(n)}catch{return[]}},[n]),s=w.useCallback(A=>A?A.split("-"):[],[]),[u,o]=w.useState(()=>s(r)),[c,d]=w.useState(100),[h,f]=w.useState(0),y=w.useRef(s(r)),E=w.useRef(null),g=u.length>=2,v=A=>{o(A),y.current=A;const N=A.join("-");e.setAttribute("data-value",N),t(a,N)},m=A=>{if(!A||A.length===0){v([]);return}A.length<2||v(A.map(String))},b=A=>{A||(o(y.current),f(N=>N+1))};w.useEffect(()=>{o(s(r))},[r,s]);const T=w.useCallback(()=>u.length>=2?u.join("-"):l||"请选择省市区",[u,l]),C=w.useCallback(()=>{const A=E.current;if(!A)return;const N=T(),k=A.querySelector(".ant-select-selector"),S=A.querySelector(".ant-select-selection-item")||A.querySelector(".ant-select-selection-placeholder"),L=S||k||A,D=window.getComputedStyle(L),F=S?D.fontSize:"16px",M=D.fontFamily||"sans-serif",I=D.fontWeight||"400",P=`${D.fontStyle||"normal"} ${I} ${F} ${M}`,U=document.createElement("canvas").getContext("2d"),V=U?Math.ceil((U.font=P,U.measureText(N).width||0)):0;let _=0;if(k){const O=window.getComputedStyle(k);_=(Number.parseFloat(O.paddingLeft)||0)+(Number.parseFloat(O.paddingRight)||0)}const Y=Math.max(80,V+_+16+10);d(O=>O===Y?O:Y)},[T]);return w.useLayoutEffect(()=>{const A=window.requestAnimationFrame(()=>{C()}),N=window.setTimeout(()=>{C()},60);return()=>{window.cancelAnimationFrame(A),window.clearTimeout(N)}},[C]),w.useEffect(()=>{if(!("fonts"in document))return;let A=!1;const N=document.fonts;if(N?.ready)return N.ready.then(()=>{A||C()}),()=>{A=!0}},[C]),dt.createPortal($.jsx("div",{className:"rte-cascader-wrapper",contentEditable:!1,ref:E,"data-has-value":g?"true":"false",style:{display:"inline-block",width:c},children:$.jsx(Ee.Cascader,{value:g?u:void 0,onChange:m,onDropdownVisibleChange:b,options:i,placeholder:l||"请选择省市区",style:{width:"100%"},size:"small",allowClear:!0,changeOnSelect:!0,showSearch:{filter:(A,N)=>N.some(k=>k.label.toLowerCase().includes(A.toLowerCase()))},popupClassName:"rte-cascader-dropdown",getPopupContainer:()=>document.body,displayRender:A=>A.join("-"),suffixIcon:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})},h)}),e)},oc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-cascader-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(uc,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`cascader-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-cascader-host")||d.querySelector?.(".rte-cascader-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-cascader-host")||d.querySelector?.(".rte-cascader-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t};function cc(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function dc(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function fc(e,t,a,l,n){const i=document.createElement("canvas").getContext("2d");if(!i)return 0;i.font=t;const s=e.split(`
|
|
2
2
|
`);let u=0;for(const f of s){const y=i.measureText(f||" ").width||0;u=Math.max(u,y)}const o=Number.parseFloat(a),c=Number.isFinite(o)?o:0,d=s.reduce((f,y)=>f.length>=y.length?f:y,""),h=c>0?c*Math.max(0,(d||"").length-1):0;return Math.ceil(u+h+l+n)}const pc=({host:e,onChange:t})=>{const a=e.dataset.key||"",l=e.dataset.placeholder||"",n=e.dataset.tooltip||"",r=e.dataset.tooltipSteps==="1",i=e.dataset.allowNewline!=="0",s=w.useMemo(()=>cc(e.dataset.value||""),[e]),[u,o]=w.useState(s),c=w.useRef(s),d=w.useMemo(()=>{const A=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(A)&&A>0?A:64},[e]),[h,f]=w.useState(d),y=w.useRef(null),E=(u||"").trim().length>0,g=!!n&&!E&&!r,[v,m]=w.useState(!1);w.useEffect(()=>{o(s),c.current=s},[s]),w.useEffect(()=>{c.current=u},[u]),w.useEffect(()=>{e.classList.toggle("rte-variable-multiline",v)},[e,v]);const b=w.useCallback(()=>{const A=y.current;if(!A)return;const N=A.querySelector("textarea");if(!N)return;const k=window.getComputedStyle(N),S=k.fontStyle||"normal",L=k.fontWeight||"400",D=k.fontSize||"16px",F=k.fontFamily||"sans-serif",M=`${S} ${L} ${D} ${F}`,I=Number.parseFloat(k.paddingLeft)||0,x=Number.parseFloat(k.paddingRight)||0,P=(u&&u.length>0?u:l)||" ",z=fc(P,M,k.letterSpacing||"0",I,x),V=Math.max(24,Math.min(600,z+2)),_=e.closest(".rte-editor"),G=_?window.getComputedStyle(_):null,Y=G&&Number.parseFloat(G.paddingLeft)||0,O=G&&Number.parseFloat(G.paddingRight)||0,R=_?Math.max(0,_.clientWidth-Y-O):1/0,X=(u||"").includes(`
|
|
3
3
|
`)||V>R;m(ee=>ee===X?ee:X);const W=X&&Number.isFinite(R)?Math.max(24,R):V;f(ee=>ee===W?ee:W)},[e,l,u]);w.useEffect(()=>{const A=y.current;if(!A||typeof ResizeObserver>"u")return;let N=0;const k=new ResizeObserver(()=>{N&&window.cancelAnimationFrame(N),N=window.requestAnimationFrame(()=>{t(a,c.current)})});return k.observe(A),()=>{N&&window.cancelAnimationFrame(N),k.disconnect()}},[a,t]),w.useLayoutEffect(()=>{const A=window.requestAnimationFrame(()=>{b()});return()=>{window.cancelAnimationFrame(A)}},[b]),w.useEffect(()=>{if(typeof ResizeObserver>"u")return;const A=e.closest(".rte-editor");if(!A)return;let N=0;const k=new ResizeObserver(()=>{N&&window.cancelAnimationFrame(N),N=window.requestAnimationFrame(()=>b())});return k.observe(A),()=>{N&&window.cancelAnimationFrame(N),k.disconnect()}},[e,b]),w.useEffect(()=>{if(!("fonts"in document))return;let A=!1;const N=document.fonts;if(N?.ready)return N.ready.then(()=>{A||b()}),()=>{A=!0}},[b]);const T=A=>{const N=A.target.value??"";o(N),e.setAttribute("data-value",dc(N)),t(a,N)},C=A=>{A.key==="Enter"&&!i&&A.preventDefault()};return dt.createPortal($.jsxs("div",{className:`rte-variable-v2-wrapper ${g?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:y,"data-placeholder":l,"data-has-value":E?"1":"0",style:{verticalAlign:"middle",width:v?"100%":h,lineHeight:"30px"},children:[$.jsx(Ee.Input.TextArea,{value:u,onChange:T,onKeyDown:C,placeholder:l,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),n&&!r?$.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${g?"":"hidden"}`,"data-variable-key":a,"data-tooltip":n}):null]}),e)},hc=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll('[data-variable-render="antd-textarea"]'),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(pc,{host:u,onChange:()=>{const c=()=>{if(!e.current)return;const d=new Event("input",{bubbles:!0});e.current.dispatchEvent(d)};c(),window.requestAnimationFrame(c)}},`variable-v2-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i){if(u.type!=="childList")continue;const o=c=>{c.forEach(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return;const h=d;(h.matches?.('[data-variable-render="antd-textarea"]')||h.querySelector?.('[data-variable-render="antd-textarea"]'))&&(s=!0)})};if(o(u.addedNodes),o(u.removedNodes),s)break}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},fe=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),st=e=>e?typeof e=="string"?e:JSON.stringify(e):"",bc=e=>{const t=(e?.name||"").toLowerCase(),a=/\.(png|jpe?g|gif|webp|bmp|svg)$/.test(t),l=(e?.type||"").toLowerCase();return a||(l==="image/png"||l==="image/jpeg"||l==="image/gif"||l==="image/webp"||l==="image/bmp"||l==="image/svg+xml")},dl=e=>{const t=(e||"").trim()||" ";let a=0;for(let l=0;l<t.length;l++){const n=t.charCodeAt(l);n>19968||n>=65280&&n<=65519?a+=16:a+=8}return Math.max(24,Math.min(600,a+22))};function mc(e,t){const l=document.createElement("canvas").getContext("2d");if(!l)return 0;const n=window.getComputedStyle(t),r=n.fontStyle||"normal",i=n.fontWeight||"400",s=n.fontSize||"16px",u=n.fontFamily||"sans-serif";l.font=`${r} ${i} ${s} ${u}`;const c=(e||"").replace(/\r\n/g,`
|
|
4
4
|
`).split(`
|
|
@@ -20,7 +20,7 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
20
20
|
`).trim(),a=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return a?`<pre><code>${fe(a[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${fe(t)}</div>`},Wr=e=>{const t=e.trim();if(!t)return{url:""};let a=null;try{a=new URL(t)}catch{try{a=new URL(`https://${t}`)}catch{return{url:t}}}const l=a.pathname.split("/").filter(Boolean),n=l.findIndex(u=>u==="report"),r=n>=0?l[n+1]:void 0,i=l[0]&&l[0].length<=5?l[0]:void 0,s=a.searchParams.get("agentId")||void 0;return{url:t,reportId:r,agentId:s,lang:i}},yc=e=>(e?.modules||[]).map((t,a)=>{const l=(t?.title||`模块${a+1}`).trim()||`模块${a+1}`,n=(t?.content||"").trim();return{title:l,content:n.length>0?n:`请补充:${l}`}}),Kl=e=>(e?.modules||[]).map((t,a)=>{const l=(t?.title||`模块${a+1}`).trim()||`模块${a+1}`,n=(t?.markdown||"").trim(),r=(t?.content||"").trim()||(n?Yr(n):"");return{title:l,content:r.length>0?r:`请补充:${l}`,markdown:n}}),Tc="https://sealseek-public-read.oss-cn-hangzhou.aliyuncs.com/file/website/kongzhuangtai.svg",xc=({host:e,reportListFetch:t,onSelect:a,onGoGenerate:l,onViewReport:n,hideCurrentSessionReport:r})=>{const i=e.dataset.key||"",s=e.dataset.nodeType||"report-url",[u,o]=w.useState(!1),[c,d]=w.useState(!1),[h,f]=w.useState(null),[y,E]=w.useState(""),[g,v]=w.useState("bottomLeft"),[m,b]=w.useState(0),T=w.useRef(0),C=w.useCallback(()=>e.closest('[data-type="variable"]'),[e]),A=w.useCallback(()=>{const R=C();if(!R)return{mode:"all",rawValue:"",signature:"all:"};const K=R.getAttribute("data-report-url")?.trim();if(K)return{mode:"all",rawValue:"",signature:`resolved:${K}`};const X=(R.innerText||"").replace(/[\u200B\n]/g,"").trim();return/^https?:\/\//i.test(X)?{mode:"precise",rawValue:X,signature:`precise:${X}`}:{mode:"all",rawValue:X,signature:`all:${X}`}},[C]),[N,k]=w.useState(()=>A()),S=w.useCallback(()=>{const R=A();k(K=>K.signature===R.signature?K:R)},[A]),L=w.useCallback(R=>{const K=R.trim();if(!K)return"";const X=Wr(K);return X.reportId?`report:${X.reportId}`:`url:${K}`},[]),D=N.mode==="precise"?L(N.rawValue):"",F=w.useCallback(R=>D?R.filter(K=>L(K.url)===D):R,[L,D]),M=w.useCallback(()=>{if(!document.body.contains(e))return!1;const R=C();if(!R||!document.body.contains(R))return!1;const K=R.getBoundingClientRect();if(K.width===0&&K.height===0)return!1;const X=e.getBoundingClientRect();if(X.width===0&&X.height===0)return!1;const W=K.left-X.left;b(W);const ee=240,ie=window.innerHeight-K.bottom;return v(ie<ee?"topLeft":"bottomLeft"),!0},[C,e,u]),I=w.useCallback(async()=>{if(!(Date.now()-T.current>200)&&M()){document.dispatchEvent(new CustomEvent("rte-report-dropdown-opening",{detail:e})),o(!0),d(!0);try{const R=await t({nodeKey:i,nodeType:s}),K=r?R.tabs.filter(W=>W.key!=="currentConversationReports"):R.tabs,X={...R,tabs:K};f(X),K.length>0&&E(K[0].key)}catch{}finally{d(!1)}}},[r,i,s,t,M]);w.useEffect(()=>{const R=C();if(!R)return;if(R.getAttribute("data-report-url")){e.classList.remove("hidden");return}const K=(R.innerText||"").replace(/[\u200B\n]/g,"").trim().length>0;e.classList.toggle("hidden",K)},[C,e,u,N.signature]),w.useEffect(()=>{S();const R=C();if(!R)return;const K=new MutationObserver(()=>{S()});return K.observe(R,{attributes:!0,attributeFilter:["data-report-url","data-report-name"],childList:!0,characterData:!0,subtree:!0}),R.addEventListener("input",S),()=>{K.disconnect(),R.removeEventListener("input",S)}},[C,e,S]),w.useEffect(()=>{const R=C();if(!R)return;const K=X=>{X.target.closest(".rte-report-chip-clear-host")||(R.getAttribute("data-report-url")&&(X.preventDefault(),X.stopPropagation(),window.getSelection()?.removeAllRanges()),!u&&(T.current=Date.now(),I()))};return R.addEventListener("mousedown",K,!0),()=>{R.removeEventListener("mousedown",K,!0)}},[C,e,u,I,i]),w.useEffect(()=>{const R=K=>{K.detail!==e&&o(!1)};return document.addEventListener("rte-report-dropdown-opening",R),()=>document.removeEventListener("rte-report-dropdown-opening",R)},[e]),w.useEffect(()=>{if(!u)return;const R=()=>{document.body.contains(e)||o(!1)};R();const K=window.setInterval(R,200);return()=>window.clearInterval(K)},[u,e]),w.useEffect(()=>{const R=K=>{const X=K.detail;X?.exceptKey!==i&&(!X||!X.key||X.key===i)&&o(!1)};return document.addEventListener("rte-report-dropdown-force-close",R),()=>document.removeEventListener("rte-report-dropdown-force-close",R)},[i]),w.useLayoutEffect(()=>{u&&M()},[u,e,N.signature,M]),w.useEffect(()=>{if(!u)return;const R=C();if(!R)return;const K=new ResizeObserver(()=>{dt.flushSync(()=>{M()})});return K.observe(R),()=>{K.disconnect()}},[u,C,M]),w.useEffect(()=>{if(!u)return;const R=K=>{const X=K.target;e.closest('[data-type="variable"]')?.contains(X)||X.closest(".rte-report-dropdown-overlay")||o(!1)};return document.addEventListener("mousedown",R),()=>document.removeEventListener("mousedown",R)},[u,e]);const x=w.useCallback(R=>{a(i,s,R),o(!1)},[i,s,a]),P=w.useCallback((R,K)=>{R.stopPropagation(),n?(n(K),o(!1)):window.open(K.viewUrl||K.url,"_blank")},[n]),z=D&&h&&h.tabs.find(R=>F(R.items).length>0)?.key||"";w.useEffect(()=>{!u||!z||E(R=>R===z?R:z)},[u,z,N.signature]);const U=h?.tabs.find(R=>R.key===y),V=U?F(U.items):[],_=w.useRef(null),G=w.useCallback(R=>{const K=R.currentTarget;K.classList.add("is-scrolling"),_.current&&window.clearTimeout(_.current),_.current=window.setTimeout(()=>{K.classList.remove("is-scrolling"),_.current=null},300)},[]),Y=w.useMemo(()=>({offset:[m,g==="bottomLeft"?4:-4],overflow:{adjustX:!1,adjustY:!1}}),[m,g]),O=$.jsx("div",{className:"rte-report-dropdown-panel",onMouseDown:R=>R.preventDefault(),children:c?$.jsx("div",{className:"rte-report-dropdown-loading",children:$.jsx(Ee.Spin,{size:"small"})}):h?$.jsxs($.Fragment,{children:[h.tabs.length>1&&$.jsx("div",{className:"rte-report-dropdown-tab-outer",children:$.jsx("div",{className:"rte-report-dropdown-tab-inner",children:h.tabs.map(R=>$.jsx("div",{className:`rte-report-dropdown-tab-item${y===R.key?" active":""}`,onMouseDown:()=>E(R.key),children:R.label},R.key))})}),$.jsx("div",{className:"rte-report-dropdown-list",onScroll:G,children:!U||V.length===0?$.jsxs("div",{className:"rte-report-dropdown-empty",children:[$.jsx("img",{className:"rte-report-dropdown-empty-img",src:Tc,alt:""}),$.jsxs("div",{className:"rte-report-dropdown-empty-text",children:[$.jsx("span",{className:"rte-report-dropdown-empty-label",children:D?"未找到匹配的报告":"暂无生成的报告"}),U?.agentType!=null&&l&&$.jsx("span",{className:"rte-report-dropdown-empty-link",onMouseDown:()=>{l(U.agentType),o(!1)},children:"去生成"})]})]}):V.map((R,K)=>$.jsxs("div",{className:"rte-report-dropdown-item",onMouseDown:()=>x(R),children:[$.jsx("span",{className:"rte-report-dropdown-item-name",title:R.name,children:R.name}),$.jsxs("span",{className:"rte-report-dropdown-item-action",onMouseDown:X=>{X.stopPropagation(),P(X,R)},children:[$.jsx("i",{className:"iconfont icon-chakanbaogao"}),"查看报告"]})]},`${R.url}-${K}`))})]}):null});return dt.createPortal($.jsx("div",{className:"rte-report-dropdown-trigger-wrapper",contentEditable:!1,onClick:R=>{R.preventDefault(),R.stopPropagation()},children:$.jsx(Ee.Popover,{content:O,trigger:[],open:u,placement:g,align:Y,autoAdjustOverflow:!1,getPopupContainer:()=>document.body,overlayClassName:"rte-report-dropdown-overlay",arrow:!1,children:$.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang rte-report-dropdown-icon "})})}),e)},Cc=(e,t,a,l,n,r,i)=>{const[s,u]=w.useState([]),o=w.useRef(t),c=w.useRef(a),d=w.useRef(l),h=w.useRef(n),f=w.useRef(i);o.current=t,c.current=a,d.current=l,h.current=n,f.current=i;const y=w.useRef(new WeakSet),E=w.useCallback(()=>{const g=e.current;if(!g||!o.current){u([]);return}const v=g.querySelectorAll(".rte-report-dropdown-host"),m=[];v.forEach(b=>{const T=b,C=T.getAttribute("data-key");if(C){if(!y.current.has(T)){for(;T.firstChild;)T.removeChild(T.firstChild);y.current.add(T)}m.push($.jsx(xc,{host:T,reportListFetch:o.current,onSelect:c.current,onGoGenerate:d.current,onViewReport:h.current,hideCurrentSessionReport:f.current},`report-dropdown-${C}-${T.getAttribute("data-node-type")}`))}}),u(m)},[e]);return w.useEffect(()=>{if(!t)return;const g=e.current;if(!g)return;const v=new MutationObserver(m=>{let b=!1;for(const T of m)if(T.type==="childList"){let C=!1;if(T.addedNodes.forEach(A=>{if(A.nodeType===Node.ELEMENT_NODE){const N=A;(N.classList?.contains("rte-report-dropdown-host")||N.querySelector?.(".rte-report-dropdown-host"))&&(C=!0)}}),T.removedNodes.forEach(A=>{if(A.nodeType===Node.ELEMENT_NODE){const N=A;(N.classList?.contains("rte-report-dropdown-host")||N.querySelector?.(".rte-report-dropdown-host"))&&(C=!0)}}),C){b=!0;break}}b&&E()});return v.observe(g,{childList:!0,subtree:!0}),()=>v.disconnect()},[e,t,E]),w.useEffect(()=>{if(!t)return;const g=requestAnimationFrame(()=>{E()});return()=>cancelAnimationFrame(g)},[t,E,r]),s},Sc=({host:e,onClear:t})=>{const a=w.useCallback(l=>{l.preventDefault(),l.stopPropagation();const n=e.closest('[data-type="variable"]');n&&t(n)},[e,t]);return dt.createPortal($.jsx("span",{className:"rte-report-chip-clear-icon",contentEditable:!1,onMouseDown:a,title:"清除",children:$.jsx(Ct.CloseCircleFilled,{})}),e)},Ac=(e,t,a)=>{const[l,n]=w.useState([]),r=w.useRef(t);r.current=t;const i=w.useCallback(o=>{r.current(o)},[]),s=w.useRef(new WeakSet),u=w.useCallback(()=>{const o=e.current;if(!o){n([]);return}const c=o.querySelectorAll(".rte-report-chip-clear-host"),d=[];c.forEach(h=>{const f=h;if(!s.current.has(f)){for(;f.firstChild;)f.removeChild(f.firstChild);s.current.add(f)}const y=f.getAttribute("data-key")||"",E=f.getAttribute("data-node-type")||"",g=f.getAttribute("data-multi-key")||"";d.push($.jsx(Sc,{host:f,onClear:i},`report-clear-${g?`${g}:`:""}${y}-${E}`))}),n(d)},[e,i]);return w.useEffect(()=>{const o=e.current;if(!o)return;const c=new MutationObserver(d=>{let h=!1;for(const f of d){if(f.type!=="childList")continue;const y=E=>{if(E.nodeType!==Node.ELEMENT_NODE)return!1;const g=E;return g.classList?.contains("rte-report-chip-clear-host")||!!g.querySelector?.(".rte-report-chip-clear-host")};if(f.addedNodes.forEach(E=>{y(E)&&(h=!0)}),f.removedNodes.forEach(E=>{y(E)&&(h=!0)}),h)break}h&&u()});return c.observe(o,{childList:!0,subtree:!0}),()=>c.disconnect()},[e,u]),w.useEffect(()=>{const o=requestAnimationFrame(()=>{u()});return()=>cancelAnimationFrame(o)},[u,a]),l};function wc(e){const t=e.dataset.key||"",a=e.getAttribute("data-node-type")||"",l=e.dataset.multiKey||"";e.removeAttribute("data-report-url"),e.removeAttribute("data-report-name"),e.classList.remove("rte-report-name-chip"),e.contentEditable="true";const n=e.querySelector(".rte-report-dropdown-host");n?.parentNode&&n.parentNode.removeChild(n);const r=e.querySelector(".rte-report-chip-clear-host");for(r?.parentNode&&r.parentNode.removeChild(r);e.firstChild;)e.removeChild(e.firstChild);if(e.appendChild(document.createTextNode("")),e.classList.add("show-placeholder"),n)n.classList.remove("hidden","rte-report-dropdown-host-quiet"),n.style.display="",n.style.visibility="",e.appendChild(n);else{const i=document.createElement("span");i.contentEditable="false",i.className="rte-report-dropdown-host",i.dataset.key=t,i.dataset.nodeType=a,l&&(i.dataset.multiKey=l),e.appendChild(i)}return e.classList.add("rte-variable-with-icon"),{nodeKey:t,nodeType:a,multiKey:l}}function Xl(e){if(e.querySelector(".rte-report-chip-clear-host"))return;const t=document.createElement("span");t.contentEditable="false",t.className="rte-report-chip-clear-host";const a=e.dataset.key||"",l=e.getAttribute("data-node-type")||"",n=e.dataset.multiKey||"";t.dataset.key=a,l&&(t.dataset.nodeType=l),n&&(t.dataset.multiKey=n),e.appendChild(t)}const Ql="rte-resolve-tokens-invalidate";function Ea(e){document.dispatchEvent(new CustomEvent(Ql,{detail:e}))}function kc(e,t,a=[]){const l=w.useRef(t);w.useEffect(()=>{l.current=t},[t]),w.useEffect(()=>{const n=e.current;if(!n)return;const r=i=>{const s=i.target?.closest?.('[data-type="variable"][data-node-type="markdown-name"]');if(!s||!n.contains(s))return;const u=s.dataset.key;if(!u)return;const o=s.innerText.replace(/[\u200B\n]/g,"").trim();requestAnimationFrame(()=>{s.isConnected&&l.current(u,o)})};return n.addEventListener("focusout",r,!1),()=>{n.removeEventListener("focusout",r,!1)}},[e])}function _c(e,t,a=[]){w.useLayoutEffect(()=>{if(!e.current)return;const l=new Map,n=window.setTimeout(()=>{if(!e.current)return;l.forEach((s,u)=>u.removeEventListener("blur",s,!1)),l.clear();const r=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),i=s=>{s.stopPropagation(),s.stopImmediatePropagation();const u=s.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!u||!e.current||!e.current.contains(u))return;const o=u.dataset.key;if(!o)return;const c=u.innerText.replace(/[\u200B\n]/g,"").trim();t(o,c)};r.forEach(s=>{s.addEventListener("blur",i,!1),l.set(s,i)})},0);return()=>{window.clearTimeout(n),l.forEach((r,i)=>i.removeEventListener("blur",r,!1)),l.clear()}},[e,t,...a])}const Nc=10*1024*1024,fl=e=>e.size>Nc,jr="文件大小不能超过 10MB",Ic="rte-upload-file-size-limit",Lc=1e3;let Kr=0;const Xr=(e,t=Date.now())=>{if(!(t-Kr<Lc)){if(Kr=t,e.open){e.open({type:"error",content:jr,key:Ic});return}e.error(jr)}},Oc=(e,t,a)=>{const l=[];for(let n=0;n<a;n++){const r=`${t}-${n}`,i=e[r];i!=null&&l.push(i)}for(let n=0;n<a;n++)delete e[`${t}-${n}`];l.forEach((n,r)=>{e[`${t}-${r}`]=n})},Dc=({config:e,messageApi:t,activeBatchKey:a,activeFileKey:l,activeBatchStartIndex:n,setActiveFileKey:r,setActiveBatchKey:i,setActiveBatchStartIndex:s,setFiles:u})=>{const o=w.useCallback(d=>{if(!d.target.files){d.target&&(d.target.value=""),r(null),i(null),s(null);return}if(a&&d.target.files&&d.target.files.length>0){const h=a,f=e.find(v=>v.type==="upload"&&v.key===h),y=Array.from(d.target.files),E=y.filter(v=>!fl(v));if(y.length-E.length>0&&Xr(t),f&&typeof f.maxCount=="number"&&typeof f.minCount=="number"){const v=f.maxCount,m=typeof n=="number"?n:0;u(b=>{const T={...b};let C=Math.min(Math.max(m,0),v-1);for(const A of E){for(;C<v&&T[`${h}-${C}`]!=null;)C+=1;if(C>=v)break;T[`${h}-${C}`]=A,C+=1}return Oc(T,h,v),T})}}else if(l&&d.target.files[0]){const h=d.target.files[0],f=l;fl(h)?Xr(t):u(y=>({...y,[f]:h}))}d.target&&(d.target.value=""),r(null),i(null),s(null)},[a,n,l,e,t,i,s,r,u]),c=w.useCallback(d=>{u(h=>{const f={...h};return delete f[d],f})},[u]);return{handleFileChange:o,handleRemoveFile:c}};function Pc(e){const t=e.trim();try{const l=new URL(t);if(l.protocol==="http:"||l.protocol==="https:")return t}catch{}const a=t.match(/https?:\/\/[^\s\u4e00-\u9fff\u3000-\u303f\uff00-\uffef]+/);return a?a[0]:t}function Mc(e){return new Promise((t,a)=>{const l=document.createElement("video"),n=URL.createObjectURL(e);l.preload="auto",l.muted=!0,l.src=n,l.onloadeddata=()=>{l.currentTime=0},l.onseeked=()=>{try{const r=document.createElement("canvas");r.width=l.videoWidth,r.height=l.videoHeight;const i=r.getContext("2d");if(!i)return URL.revokeObjectURL(n),a(new Error("canvas context unavailable"));i.drawImage(l,0,0,r.width,r.height);const s=r.toDataURL("image/jpeg",.7);URL.revokeObjectURL(n),t(s)}catch(r){URL.revokeObjectURL(n),a(r)}},l.onerror=()=>{URL.revokeObjectURL(n),a(new Error("video load error"))}})}function Bc(e){return new Promise(t=>{const a=document.createElement("video");a.crossOrigin="anonymous",a.preload="auto",a.muted=!0,a.playsInline=!0,a.src=e;const l=setTimeout(()=>{n(),t("")},1e4),n=()=>{clearTimeout(l),a.onloadeddata=null,a.onseeked=null,a.onerror=null};a.onloadeddata=()=>{a.currentTime=0},a.onseeked=()=>{try{const r=document.createElement("canvas");r.width=a.videoWidth||320,r.height=a.videoHeight||180;const i=r.getContext("2d");if(i){i.drawImage(a,0,0,r.width,r.height);const s=r.toDataURL("image/jpeg",.7);n(),t(s)}else n(),t("")}catch{n(),t("")}},a.onerror=()=>{n(),t("")}})}function Fc(e,t,a,l,n=[]){const r=w.useRef(a);r.current=a;const i=w.useCallback(async(s,u)=>{if(!t||!u.trim())return;const o=Pc(u);l(f=>({...f,[s]:{status:"loading",progress:0}}));const c=2*Math.PI*6.5;let d=0;const h=setInterval(()=>{d=Math.min(d+Math.random()*15+5,90);const f=e.current?.querySelector(`[data-type="video-url"][data-key="${s}"] .video-upload-progress-ring circle:last-child`);f&&f.setAttribute("stroke-dashoffset",String(c*(1-d/100)))},400);try{const f=await t({url:o});if(clearInterval(h),l(y=>({...y,[s]:{status:"success",videoUrl:f.videoUrl,thumbnail:f.thumbnail||"",fileName:o}})),!f.thumbnail&&f.videoUrl){const y=`/api/download-report-pdf?url=${encodeURIComponent(f.videoUrl)}`;Bc(y).then(E=>{E&&l(g=>{const v=g[s];return!v||v.status!=="success"?g:{...g,[s]:{...v,thumbnail:E}}})})}}catch(f){clearInterval(h),l(y=>({...y,[s]:{status:"error",errorMsg:f instanceof Error?f.message:"解析失败"}}))}},[t,l,e]);w.useEffect(()=>{const s=e.current;if(!s||!t)return;const u=c=>{const d=c.target?.closest?.('[data-node-type="video-url"]');if(!d)return;const h=d.dataset.key;h&&setTimeout(()=>{const f=(d.innerText||"").replace(/\u200B/g,"").trim();f&&i(h,f)},0)},o=c=>{const d=c.target?.closest?.('[data-node-type="video-url"]');if(!d)return;const h=d.dataset.key;if(!h)return;const f=r.current[h];if(f?.status==="success"||f?.status==="loading")return;const y=(d.innerText||"").replace(/\u200B/g,"").trim();y&&i(h,y)};return s.addEventListener("paste",u,!0),s.addEventListener("focusout",o,!0),()=>{s.removeEventListener("paste",u,!0),s.removeEventListener("focusout",o,!0)}},[e,t,i,...n])}function Hc(e,t,a){return w.useCallback(async(l,n)=>{if(!e)return;t(u=>({...u,[l]:{status:"loading",file:n,fileName:n.name,progress:0}}));const r=await Mc(n).catch(()=>"");r&&t(u=>{const o=u[l];return!o||o.status!=="loading"?u:{...u,[l]:{...o,thumbnail:r}}});const i=2*Math.PI*6.5,s=u=>{const o=Math.min(Math.max(u,0),100),c=a.current?.querySelector(`[data-type="video-upload"][data-key="${l}"] .video-upload-progress-ring circle:last-child`);c&&c.setAttribute("stroke-dashoffset",String(i*(1-o/100)))};try{const u=await e(n,s);t(o=>({...o,[l]:{status:"success",videoUrl:u.videoUrl,thumbnail:u.thumbnail||r,file:n,fileName:n.name}}))}catch(u){t(o=>({...o,[l]:{status:"error",file:n,fileName:n.name,errorMsg:u instanceof Error?u.message:"上传失败"}}))}},[e,t,a])}function $c(e,t,a,l){w.useEffect(()=>{const n=e.current;if(!n)return;const r=u=>u.scrollWidth>u.clientWidth+1,i=u=>{const o=u.target;if(!o||o.closest(".upload-info-icon")||o.closest(".video-remove-btn"))return;const c=o.closest('[data-type="video-url"], [data-type="video-upload"]');if(!c)return;const d=c.dataset.key;if(!d)return;const h=t[d];if(h?.status==="success"&&h.videoUrl){a({key:d,anchorEl:c,type:"video-preview"});return}const f=c.querySelector(".video-label");f&&f.dataset.fileName&&r(f)&&a({key:d,anchorEl:c,type:"upload-label"})},s=u=>{if(l)return;const o=u.target?.closest?.('[data-type="video-url"], [data-type="video-upload"]');if(!o)return;const c=u.relatedTarget;c?.closest?.(".rte-tooltip-overlay")||c&&o.contains(c)||a(null)};return n.addEventListener("mouseover",i,!0),n.addEventListener("mouseout",s,!0),()=>{n.removeEventListener("mouseover",i,!0),n.removeEventListener("mouseout",s,!0)}},[e,t,a,l])}const Rc=({config:e,editorRef:t,files:a,setFiles:l,multiVariableCounts:n,setMultiVariableCounts:r,reportAnalyzeState:i,setReportAnalyzeState:s,markdownAnalyzeState:u,setMarkdownAnalyzeState:o,markdownNameAnalyzeState:c,setMarkdownNameAnalyzeState:d,nodeValues:h,resolvedReportNamesRef:f})=>{const y=w.useRef({}),E=w.useRef({}),g=w.useRef({}),v=w.useRef(i),m=w.useRef(u),b=w.useRef(c),T=w.useCallback(N=>N.find(S=>S.type==="tag")?.text||null,[]),C=w.useRef(e),A=w.useRef(null);w.useEffect(()=>{E.current=a},[a]),w.useEffect(()=>{g.current=n},[n]),w.useEffect(()=>{v.current=i},[i]),w.useEffect(()=>{m.current=u},[u]),w.useEffect(()=>{b.current=c},[c]),w.useEffect(()=>{const N=T(C.current),k=T(e);if(N&&N!==k&&t.current){const S=t.current;S.__tempVariableValues&&delete S.__tempVariableValues}if(N&&N!==k&&t.current){const S={};t.current.querySelectorAll('[data-type="variable"]').forEach(I=>{const x=I.dataset.key;if(!x)return;const P=I.getAttribute("data-node-type")||"";if(P==="report-url"){const U=I.getAttribute("data-report-url");U&&(S[`${x}__url`]=U);return}if(P==="markdown-name"){const U=I.innerText.replace(/[\n]/g,"").trim();U&&(S[`${x}__name`]=U);return}const z=I.innerText.replace(/[\n]/g,"").trim();z&&(S[x]=z)}),t.current.querySelectorAll('[data-type="select"]').forEach(I=>{const x=I.dataset.key;if(x){const P=(I.getAttribute("data-value")||"").trim();P&&(S[x]=P)}}),t.current.querySelectorAll('[data-type="searchable-select"]').forEach(I=>{const x=I.dataset.key;if(x){const P=(I.getAttribute("data-value")||"").trim();P&&(S[x]=P)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(I=>{const x=I.dataset.key;if(x){const P=I.value.replace(/[]/g,"").trim();P&&(S[x]=P)}}),y.current[N]={variableValues:S,files:{...E.current},multiVariableCounts:{...g.current},reportAnalyzeState:{...v.current},markdownAnalyzeState:{...m.current},markdownNameAnalyzeState:{...b.current},resolvedReportNames:f?.current?{...f.current}:{}}}if(k&&y.current[k]){const S=y.current[k];A.current=S,l(S.files),r(S.multiVariableCounts),s(S.reportAnalyzeState),o(S.markdownAnalyzeState),d(S.markdownNameAnalyzeState),f&&(f.current={...S.resolvedReportNames}),Ea({clearAll:!0})}else if(k){A.current=null;const S={};e.forEach(L=>{if(Ye(L.type)&&L.key){const D=h?.[L.key],F=Array.isArray(D)?D.filter(M=>String(M??"").trim().length>0):D;Array.isArray(F)&&F.length>0?S[L.key]=Math.min(F.length+1,L.maxCount??9):S[L.key]=1}}),r(S),l({}),s({}),o({}),d({}),f&&(f.current={}),Ea({clearAll:!0})}else A.current=null,r({}),l({}),s({}),o({}),d({}),f&&(f.current={}),Ea({clearAll:!0});C.current=e},[e,t,T,l,r,s,o,d,f]),w.useLayoutEffect(()=>{A.current&&t.current&&(t.current.__tempVariableValues=A.current.variableValues,setTimeout(()=>{A.current&&(A.current=null)},0))})},Uc=e=>{const t={},a=e.current;return a&&(a.querySelectorAll('[data-type="variable"]').forEach(l=>{const n=l.dataset.key;if(!n)return;if(l.dataset.variableRender==="antd-textarea"){const s=(l.getAttribute("data-value")||"").trim();if(!s)return;try{const o=(decodeURIComponent(s)||"").replace(/\r\n/g,`
|
|
21
21
|
`).trim();o&&(t[n]=o)}catch{const u=s.trim();u&&(t[n]=u)}return}const r=l.getAttribute("data-node-type")||"";if(r==="report-url"){const s=l.getAttribute("data-report-url");if(s)t[`${n}__url`]=s;else{const u=(l.innerText||"").replace(/[\u200B\n]/g,"").trim();/^https?:\/\//i.test(u)&&(t[`${n}__url`]=u)}return}const i=(l.innerText||"").replace(//g,"").replace(/\r\n/g,`
|
|
22
22
|
`).trim();i&&(r==="markdown-name"?t[`${n}__name`]=i:t[n]=i)}),a.querySelectorAll('[data-type="select"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=(l.getAttribute("data-value")||"").trim();r&&(t[n]=r)}),a.querySelectorAll('[data-type="textarea"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=l.value.replace(/[]/g,"").trim();r&&(t[n]=r)}),a.querySelectorAll('[data-type="richtext"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=l.getAttribute("data-node-type")||"";if(r==="report-module"||r==="markdown-module"){const s=Number.parseInt(l.getAttribute("data-module-index")||"0",10),u=(l.innerHTML||"").replace(/[]/g,"").trim();t[`${n}__module_${Number.isFinite(s)?s:0}`]=u;return}const i=(l.textContent||"").replace(/[]/g,"").trim();i&&(t[n]=i)}),a.querySelectorAll('[data-type="datepicker"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=(l.getAttribute("data-value")||"").trim();r&&(t[n]=r)}),a.querySelectorAll('[data-type="number-input"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=(l.value||"").trim();r&&(t[n]=r)}),a.querySelectorAll('[data-type="searchable-select"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=(l.getAttribute("data-value")||"").trim();r&&(t[n]=r)}),a.querySelectorAll('[data-type="cascader"]').forEach(l=>{const n=l.dataset.key;if(!n)return;const r=(l.getAttribute("data-value")||"").trim();r&&(t[n]=r)})),t},qc=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:a,reportAnalyzeState:l,setReportAnalyzeState:n,markdownAnalyzeState:r,setMarkdownAnalyzeState:i,markdownNameAnalyzeState:s,setMarkdownNameAnalyzeState:u,editorRef:o,reportAnalyzeRef:c,markdownAnalyzeRef:d,markdownNameAnalyzeRef:h,markdownAnalyzeStateRef:f,markdownNameAnalyzeStateRef:y,reportNameResolve:E,applyReportNameChipRef:g})=>{const v=w.useCallback(()=>Uc(o),[o]),m=w.useRef(new Map),b=w.useRef(0),T=w.useCallback(M=>{b.current+=1;const I=b.current;return m.current.set(M,I),I},[]),C=w.useCallback((M,I)=>m.current.get(M)===I,[]);w.useEffect(()=>{const M=I=>{const x=I.detail;if(x){if("clearAll"in x&&x.clearAll){m.current.clear();return}if("keys"in x)for(const P of x.keys)m.current.delete(P)}};return document.addEventListener(Ql,M),()=>document.removeEventListener(Ql,M)},[]);const A=w.useCallback((M,I)=>{const x=(I||"").trim();if(!M)return;if(!x){n(V=>({...V,[M]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}if(E&&g&&!(o.current?.querySelector(`[data-type="variable"][data-key="${M}"]`)?.getAttribute("data-report-url")===x)){const G=T(M);E({url:x,nodeKey:M,nodeType:"report-url"}).then(({name:Y,url:O})=>{C(M,G)&&g.current(M,Y,O||x)}).catch(()=>{})}const P=l[M];if(P?.lastParsedUrl&&P.lastParsedUrl===x&&(P.status==="loading"||P.status==="success"))return;n(V=>({...V,[M]:{...V[M],status:"loading",error:void 0,lastParsedUrl:x}}));const z=Wr(x);(e||(async V=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
|
|
23
|
-
(reportId=${V.reportId||"unknown"}, agentId=${V.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(z).then(V=>{const _=yc(V);if(o.current){const G=v();_.forEach((Y,O)=>{G[`${M}__module_${O}`]=Y.content}),o.current.__tempVariableValues=G}n(G=>({...G,[M]:{status:"success",error:void 0,lastParsedUrl:x,modules:_}}))}).catch(V=>{const _=V instanceof Error?V.message:String(V);n(G=>({...G,[M]:{...G[M]||{modules:[]},status:"error",error:_||"解析失败",lastParsedUrl:x,modules:[]}}))})},[v,o,e,l,n,E,g,T,C]),N=w.useCallback((M,I)=>{const x=(I||"").trim();if(!M)return;if(!x){i(G=>({...G,[M]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const P=r[M];if(P?.lastParsedText&&P.lastParsedText===x&&P.status==="success")return;if(!t){const G=Gr(x),Y=Kl({modules:[{title:"内容",content:Yr(G),markdown:G}]});if(o.current){const O=v();Y.forEach((R,K)=>{O[`${M}__module_${K}`]=R.content}),o.current.__tempVariableValues=O}i(O=>({...O,[M]:{status:"success",error:void 0,lastParsedText:x,modules:Y}}));return}const z=f.current[M]?.status==="loading";z||i(G=>({...G,[M]:{...G[M],status:"loading",error:void 0,lastParsedText:x}}));const U=500,V=Date.now();setTimeout(()=>{t({text:x}).then(Y=>{const O=Kl(Y),R=Date.now()-V,K=Math.max(0,U-R);setTimeout(()=>{if(o.current){const X=v();O.forEach((W,ee)=>{X[`${M}__module_${ee}`]=W.content}),o.current.__tempVariableValues=X}i(X=>({...X,[M]:{status:"success",error:void 0,lastParsedText:x,modules:O}}))},K)}).catch(Y=>{const O=Y instanceof Error?Y.message:String(Y);i(R=>({...R,[M]:{...R[M]||{modules:[]},status:"error",error:O,lastParsedText:x}}))})},z?0:50)},[v,o,t,r,f,i]),k=w.useCallback((M,I)=>{const x=(I||"").trim();if(!M)return;if(!x){u(G=>({...G,[M]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const P=y.current[M];if(P?.lastParsedText&&P.lastParsedText===x&&P.status==="success"||!a)return;const z=y.current[M]?.status==="loading";z||u(G=>({...G,[M]:{...G[M],status:"loading",error:void 0,lastParsedText:x}}));const U=500,V=Date.now();setTimeout(()=>{a({text:x}).then(Y=>{const O=Kl(Y),R=Date.now()-V,K=Math.max(0,U-R);setTimeout(()=>{if(o.current){const X=v();O.forEach((W,ee)=>{X[`${M}__module_${ee}`]=W.content}),o.current.__tempVariableValues=X}u(X=>({...X,[M]:{status:"success",error:void 0,lastParsedText:x,modules:O}}))},K)}).catch(Y=>{const O=Y instanceof Error?Y.message:String(Y);u(R=>({...R,[M]:{...R[M]||{modules:[]},status:"error",error:O,lastParsedText:x}}))})},z?0:50)},[v,o,a,y,u]);w.useEffect(()=>{c.current=A},[c,A]),w.useEffect(()=>{d.current=N},[d,N]),w.useLayoutEffect(()=>{h.current=k},[h,k]);const S=w.useCallback((M,I)=>{c.current(M,I)},[c]),L=w.useCallback((M,I)=>{d.current(M,I)},[d]),D=w.useCallback((M,I)=>{h.current(M,I)},[h]),F=w.useCallback((M,I,x="multi-variable")=>{const P=(I||"").trim();if(!P||!E||!g||!/^https?:\/\//i.test(P))return;const z=T(M);E({url:P,nodeKey:M,nodeType:x}).then(({name:U,url:V})=>{if(!C(M,z))return;const _=V||P;g.current(M,U,_),x==="multi-variable-select"&&c.current(M,_)}).catch(()=>{})},[E,g,c,T,C]);return{handleReportUrlBlur:S,handleMarkdownBlur:L,handleMarkdownNameBlur:D,handleMultiVariableNameResolve:F}},zc=({collapsed:e,collapseTransitionMs:t,contentRef:a,contentBodyRef:l,editorRef:n,debugIdRef:r,setCollapsedContentMaxHeightPx:i,setExpandedContentMaxHeightPx:s,setIsCollapseAnimating:u,effectiveConfig:o,files:c,multiVariableCounts:d,selectPortalsLength:h,datePickerPortalsLength:f,variablePortalsLength:y})=>{const E=w.useRef(""),g=w.useCallback(()=>{const m=l.current;if(!m)return;const b=Math.max(0,Math.ceil(m.scrollHeight||0));!Number.isFinite(b)||b<=0||s(T=>T===b?T:b)},[l,s]);w.useLayoutEffect(()=>{if(!e)return;const m=a.current,b=n.current;if(!(!m||!b))try{const T=b.getBoundingClientRect(),C=document.createRange();C.selectNodeContents(b);const A=Array.from(C.getClientRects());let N;if(A.length>0){const k=Math.min(...A.map(D=>D.top)),S=2;let L=0;for(const D of A)Math.abs(D.top-k)<=S&&(L=Math.max(L,D.bottom));N=L>0?Math.max(0,Math.ceil(L-T.top)):58}else{const k=window.getComputedStyle(b),S=Number.parseFloat(k.paddingTop)||0,L=Number.parseFloat(k.lineHeight)||34;N=Math.max(0,Math.ceil(S+L))||58}if(!Number.isFinite(N)||N<=0)return;i(k=>k===N?k:N)}catch{}},[e,a,n,o,c,d,h,f,y,i]),w.useLayoutEffect(()=>{if(!e)return;const m=a.current,b=l.current,T=n.current;if(!m)return;const C=()=>{m.scrollTop=0,m.scrollLeft=0,b&&(b.scrollTop=0,b.scrollLeft=0),T&&(T.scrollTop=0,T.scrollLeft=0)},N=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;C();const k=M=>{M.preventDefault(),M.stopPropagation(),C()};m.addEventListener("wheel",k,{passive:!1}),m.addEventListener("touchmove",k,{passive:!1}),b&&(b.addEventListener("wheel",k,{passive:!1}),b.addEventListener("touchmove",k,{passive:!1}));const S=performance.now();let L=0;const D=M=>{C(),M-S<N&&(L=window.requestAnimationFrame(D))};L=window.requestAnimationFrame(D);const F=window.setTimeout(()=>{C()},N);return()=>{m.removeEventListener("wheel",k),m.removeEventListener("touchmove",k),b&&(b.removeEventListener("wheel",k),b.removeEventListener("touchmove",k)),window.cancelAnimationFrame(L),window.clearTimeout(F)}},[e,t,l,a,r,n]);const v=o.filter(m=>m.key&&m.type!=="report-module"&&m.type!=="markdown-module").map(m=>`${m.type}:${m.key}`).join("|");return v!==""&&E.current!==v&&(e||s(9999)),E.current=v,w.useEffect(()=>{if(e)return;const m=window.requestAnimationFrame(()=>{g();const b=window.setTimeout(()=>{g()},150);window.__rteSecondMeasureTimer=b});return()=>{window.cancelAnimationFrame(m);const b=window.__rteSecondMeasureTimer;b&&window.clearTimeout(b)}},[e,o,c,d,h,f,y,g]),w.useEffect(()=>{const m=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(m<=0){u(!1);return}u(!0);const b=window.setTimeout(()=>u(!1),m);return()=>window.clearTimeout(b)},[e,t,u]),{measureExpandedContentHeight:g}},Vc=({config:e,editorRef:t,setIsEmpty:a,setIsFormValid:l})=>{w.useEffect(()=>{if(e.length>0){a(!1);return}const n=()=>{if(!t.current){a(!0);return}const i=t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"",s=t.current.querySelectorAll('[data-type="variable"]'),u=t.current.querySelectorAll('[data-type="upload"]');let o=!1;s.forEach(d=>{
|
|
23
|
+
(reportId=${V.reportId||"unknown"}, agentId=${V.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(z).then(V=>{const _=yc(V);if(o.current){const G=v();_.forEach((Y,O)=>{G[`${M}__module_${O}`]=Y.content}),o.current.__tempVariableValues=G}n(G=>({...G,[M]:{status:"success",error:void 0,lastParsedUrl:x,modules:_}}))}).catch(V=>{const _=V instanceof Error?V.message:String(V);n(G=>({...G,[M]:{...G[M]||{modules:[]},status:"error",error:_||"解析失败",lastParsedUrl:x,modules:[]}}))})},[v,o,e,l,n,E,g,T,C]),N=w.useCallback((M,I)=>{const x=(I||"").trim();if(!M)return;if(!x){i(G=>({...G,[M]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const P=r[M];if(P?.lastParsedText&&P.lastParsedText===x&&P.status==="success")return;if(!t){const G=Gr(x),Y=Kl({modules:[{title:"内容",content:Yr(G),markdown:G}]});if(o.current){const O=v();Y.forEach((R,K)=>{O[`${M}__module_${K}`]=R.content}),o.current.__tempVariableValues=O}i(O=>({...O,[M]:{status:"success",error:void 0,lastParsedText:x,modules:Y}}));return}const z=f.current[M]?.status==="loading";z||i(G=>({...G,[M]:{...G[M],status:"loading",error:void 0,lastParsedText:x}}));const U=500,V=Date.now();setTimeout(()=>{t({text:x}).then(Y=>{const O=Kl(Y),R=Date.now()-V,K=Math.max(0,U-R);setTimeout(()=>{if(o.current){const X=v();O.forEach((W,ee)=>{X[`${M}__module_${ee}`]=W.content}),o.current.__tempVariableValues=X}i(X=>({...X,[M]:{status:"success",error:void 0,lastParsedText:x,modules:O}}))},K)}).catch(Y=>{const O=Y instanceof Error?Y.message:String(Y);i(R=>({...R,[M]:{...R[M]||{modules:[]},status:"error",error:O,lastParsedText:x}}))})},z?0:50)},[v,o,t,r,f,i]),k=w.useCallback((M,I)=>{const x=(I||"").trim();if(!M)return;if(!x){u(G=>({...G,[M]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const P=y.current[M];if(P?.lastParsedText&&P.lastParsedText===x&&P.status==="success"||!a)return;const z=y.current[M]?.status==="loading";z||u(G=>({...G,[M]:{...G[M],status:"loading",error:void 0,lastParsedText:x}}));const U=500,V=Date.now();setTimeout(()=>{a({text:x}).then(Y=>{const O=Kl(Y),R=Date.now()-V,K=Math.max(0,U-R);setTimeout(()=>{if(o.current){const X=v();O.forEach((W,ee)=>{X[`${M}__module_${ee}`]=W.content}),o.current.__tempVariableValues=X}u(X=>({...X,[M]:{status:"success",error:void 0,lastParsedText:x,modules:O}}))},K)}).catch(Y=>{const O=Y instanceof Error?Y.message:String(Y);u(R=>({...R,[M]:{...R[M]||{modules:[]},status:"error",error:O,lastParsedText:x}}))})},z?0:50)},[v,o,a,y,u]);w.useEffect(()=>{c.current=A},[c,A]),w.useEffect(()=>{d.current=N},[d,N]),w.useLayoutEffect(()=>{h.current=k},[h,k]);const S=w.useCallback((M,I)=>{c.current(M,I)},[c]),L=w.useCallback((M,I)=>{d.current(M,I)},[d]),D=w.useCallback((M,I)=>{h.current(M,I)},[h]),F=w.useCallback((M,I,x="multi-variable")=>{const P=(I||"").trim();if(!P||!E||!g||!/^https?:\/\//i.test(P))return;const z=T(M);E({url:P,nodeKey:M,nodeType:x}).then(({name:U,url:V})=>{if(!C(M,z))return;const _=V||P;g.current(M,U,_),x==="multi-variable-select"&&c.current(M,_)}).catch(()=>{})},[E,g,c,T,C]);return{handleReportUrlBlur:S,handleMarkdownBlur:L,handleMarkdownNameBlur:D,handleMultiVariableNameResolve:F}},zc=({collapsed:e,collapseTransitionMs:t,contentRef:a,contentBodyRef:l,editorRef:n,debugIdRef:r,setCollapsedContentMaxHeightPx:i,setExpandedContentMaxHeightPx:s,setIsCollapseAnimating:u,effectiveConfig:o,files:c,multiVariableCounts:d,selectPortalsLength:h,datePickerPortalsLength:f,variablePortalsLength:y})=>{const E=w.useRef(""),g=w.useCallback(()=>{const m=l.current;if(!m)return;const b=Math.max(0,Math.ceil(m.scrollHeight||0));!Number.isFinite(b)||b<=0||s(T=>T===b?T:b)},[l,s]);w.useLayoutEffect(()=>{if(!e)return;const m=a.current,b=n.current;if(!(!m||!b))try{const T=b.getBoundingClientRect(),C=document.createRange();C.selectNodeContents(b);const A=Array.from(C.getClientRects());let N;if(A.length>0){const k=Math.min(...A.map(D=>D.top)),S=2;let L=0;for(const D of A)Math.abs(D.top-k)<=S&&(L=Math.max(L,D.bottom));N=L>0?Math.max(0,Math.ceil(L-T.top)):58}else{const k=window.getComputedStyle(b),S=Number.parseFloat(k.paddingTop)||0,L=Number.parseFloat(k.lineHeight)||34;N=Math.max(0,Math.ceil(S+L))||58}if(!Number.isFinite(N)||N<=0)return;i(k=>k===N?k:N)}catch{}},[e,a,n,o,c,d,h,f,y,i]),w.useLayoutEffect(()=>{if(!e)return;const m=a.current,b=l.current,T=n.current;if(!m)return;const C=()=>{m.scrollTop=0,m.scrollLeft=0,b&&(b.scrollTop=0,b.scrollLeft=0),T&&(T.scrollTop=0,T.scrollLeft=0)},N=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;C();const k=M=>{M.preventDefault(),M.stopPropagation(),C()};m.addEventListener("wheel",k,{passive:!1}),m.addEventListener("touchmove",k,{passive:!1}),b&&(b.addEventListener("wheel",k,{passive:!1}),b.addEventListener("touchmove",k,{passive:!1}));const S=performance.now();let L=0;const D=M=>{C(),M-S<N&&(L=window.requestAnimationFrame(D))};L=window.requestAnimationFrame(D);const F=window.setTimeout(()=>{C()},N);return()=>{m.removeEventListener("wheel",k),m.removeEventListener("touchmove",k),b&&(b.removeEventListener("wheel",k),b.removeEventListener("touchmove",k)),window.cancelAnimationFrame(L),window.clearTimeout(F)}},[e,t,l,a,r,n]);const v=o.filter(m=>m.key&&m.type!=="report-module"&&m.type!=="markdown-module").map(m=>`${m.type}:${m.key}`).join("|");return v!==""&&E.current!==v&&(e||s(9999)),E.current=v,w.useEffect(()=>{if(e)return;const m=window.requestAnimationFrame(()=>{g();const b=window.setTimeout(()=>{g()},150);window.__rteSecondMeasureTimer=b});return()=>{window.cancelAnimationFrame(m);const b=window.__rteSecondMeasureTimer;b&&window.clearTimeout(b)}},[e,o,c,d,h,f,y,g]),w.useEffect(()=>{const m=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(m<=0){u(!1);return}u(!0);const b=window.setTimeout(()=>u(!1),m);return()=>window.clearTimeout(b)},[e,t,u]),{measureExpandedContentHeight:g}},Vc=({config:e,editorRef:t,setIsEmpty:a,setIsFormValid:l})=>{w.useEffect(()=>{if(e.length>0){a(!1);return}const n=()=>{if(!t.current){a(!0);return}const i=t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"",s=t.current.querySelectorAll('[data-type="variable"]'),u=t.current.querySelectorAll('[data-type="upload"]');let o=!1;s.forEach(d=>{d.textContent?.replace(/[\u200B\n]/g,"").trim()&&(o=!0)}),u.forEach(d=>{d.querySelector(".upload-inner-wrapper.has-file")&&(o=!0)});const c=!i&&!o;a(c),e.length===0&&l(!c)};n();const r=new MutationObserver(n);return t.current&&r.observe(t.current,{childList:!0,subtree:!0,characterData:!0}),()=>{r.disconnect()}},[e,t,a,l])},Gc=({config:e,reportAnalyzeState:t,markdownAnalyzeState:a,markdownNameAnalyzeState:l})=>w.useMemo(()=>{if(e.length===0)return e;const n=[];let r=!1;for(const i of e){if(i.type==="markdown"&&i.key==="tableData"||(r&&i.type==="text"&&i.text?.startsWith(`
|
|
24
24
|
`)?(n.push({...i,text:i.text.slice(1)}),r=!1):n.push(i)),i.type==="report-url"&&i.key){const s=t[i.key],u=s?.status??"idle",o=s?.modules??[];u==="loading"&&n.push({type:"text",className:"rte-report-parsing",text:`解析中...
|
|
25
25
|
`}),u==="error"&&s?.error&&n.push({type:"text",className:"rte-report-error",text:`解析失败:${fe(s.error)}
|
|
26
26
|
`}),o.length>0&&(o.forEach((c,d)=>{n.push({type:"report-module",key:i.key,moduleIndex:d,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:c.content})}),n.push({type:"text",text:`
|
|
@@ -39,20 +39,20 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
39
39
|
`).trim();Y&&(x[_]=Y)}}),t.current.__tempVariableValues=x;const U=[];for(let V=L;V<C;V++)U.push(`${b.key}_${V}`);Ea({keys:U}),document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close")),h(V=>({...V,[b.key]:P}));return}if(!k){const D=C-1,F=`${b.key}_${D}`,M=t.current.querySelector(`[data-type="variable"][data-key="${F}"][data-multi-key="${b.key}"]`);if(M&&(M.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
40
40
|
`).trim().length>0&&C<T){const x=window.getSelection();if(x&&x.rangeCount>0){const z=x.getRangeAt(0),U=z.startContainer,V=U.nodeType===Node.ELEMENT_NODE?U.closest('[data-type="variable"][data-multi-key]'):U.parentElement?.closest('[data-type="variable"][data-multi-key]');if(V){const _=V.dataset.key;if(_){const G=document.createRange();G.setStartBefore(V),G.setEnd(z.startContainer,z.startOffset);const Y=G.toString().length;f.current={key:_,offset:Y}}}}const P=M.querySelector(".rte-report-dropdown-host")&&(f.current?.key||F)?f.current?.key||F:void 0;document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:P?{exceptKey:P}:void 0})),h(z=>({...z,[b.key]:C+1}))}}})},[s,e,t,o,c,u,d,f,a,l,r,i,h,n,E,g,v,y]),Kc=({disabled:e,lockStructure:t,config:a,editorRef:l,handleInput:n,onEnterSend:r,onReportChipDeleted:i})=>w.useCallback(s=>{if(e){s.preventDefault();return}const u=s.target;if(u&&(u.tagName==="TEXTAREA"||u.tagName==="INPUT")&&u.closest?.('[data-variable-render="antd-textarea"]'))return;{const c=window.getSelection();if(c&&c.rangeCount>0){const d=c.getRangeAt(0);if(!d.collapsed&&d.startContainer===d.endContainer&&d.startContainer.nodeType===Node.ELEMENT_NODE&&d.endOffset-d.startOffset===1){const h=d.startContainer.childNodes[d.startOffset];if(h?.nodeType===Node.ELEMENT_NODE&&h.getAttribute?.("data-report-url")&&h.getAttribute?.("data-type")==="variable"&&!["Shift","Control","Alt","Meta","Tab","Escape","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","PageDown","CapsLock","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"].includes(s.key)&&!s.ctrlKey&&!s.metaKey&&!s.altKey){s.preventDefault();const y=h,E=y.dataset.key||"",g=y.getAttribute("data-node-type")||"",v=y.dataset.multiKey||"";y.removeAttribute("data-report-url"),y.removeAttribute("data-report-name"),y.classList.remove("rte-report-name-chip"),y.contentEditable="true";const m=y.querySelector(".rte-report-dropdown-host");m?.parentNode&&m.parentNode.removeChild(m);const b=y.querySelector(".rte-report-chip-clear-host");if(b?.parentNode&&b.parentNode.removeChild(b),y.textContent="",y.classList.add("show-placeholder"),m)m.classList.remove("hidden"),m.style.display="",y.appendChild(m);else{const T=document.createElement("span");T.contentEditable="false",T.className="rte-report-dropdown-host",T.dataset.key=E,T.dataset.nodeType=g,v&&(T.dataset.multiKey=v),y.appendChild(T)}y.classList.add("rte-variable-with-icon"),i?.(E,g),y.focus(),s.key.length===1&&(document.execCommand("insertText",!1,s.key),y.classList.remove("show-placeholder")),n();return}}}}if(s.key==="Enter"){if(s.nativeEvent.isComposing||s.keyCode===229)return;const c=s.target,d=c?.closest?.('[data-type="variable"]'),h=!!c?.closest?.('[data-type="richtext"]'),f=c?.tagName==="TEXTAREA"||!!c?.closest?.('[data-type="textarea"]');if(d){const y=d.getAttribute("data-node-type")||"";if(y==="report-url"||y==="markdown"||y==="markdown-name"){s.preventDefault();return}if(!(()=>{const v=d.dataset.multiKey;if(v)return a.find(C=>Ye(C.type)&&C.key===v)?.allowNewline!==!1;const m=d.dataset.key;return a.find(T=>T.type==="variable"&&T.key===m)?.allowNewline!==!1})()){s.preventDefault();return}s.preventDefault();const g=window.getSelection();if(g&&g.rangeCount>0){const v=g.getRangeAt(0);v.deleteContents();const m=document.createElement("br");v.insertNode(m);const b=document.createTextNode("");m.parentNode?.insertBefore(b,m.nextSibling),v.setStart(b,0),v.collapse(!0),g.removeAllRanges(),g.addRange(v)}n();return}if(!h&&!f){s.preventDefault(),a.length===0&&!s.shiftKey&&r&&r();return}}const o=window.getSelection();if(o&&o.rangeCount>0){const c=o.anchorNode;let d=null;if(c&&(c.nodeType===Node.ELEMENT_NODE?d=c.closest('[data-type="text"]'):c.nodeType===Node.TEXT_NODE&&c.parentElement&&(d=c.parentElement.closest('[data-type="text"]'))),d){if(s.preventDefault(),s.stopPropagation(),l.current){const h=l.current.querySelector('[data-type="variable"], [data-type="upload"]');h&&h.focus()}return}}if(t&&o&&o.rangeCount>0){const c=o.anchorNode;let d=null;if(c&&(c.nodeType===Node.ELEMENT_NODE?d=c.closest(".tag-node"):c.nodeType===Node.TEXT_NODE&&c.parentElement&&(d=c.parentElement.closest(".tag-node"))),d){if(s.preventDefault(),s.stopPropagation(),l.current){const h=l.current.querySelector('[data-type="variable"], [data-type="upload"]');h&&h.focus()}return}}if(s.key==="Escape"&&l.current){if(t){s.preventDefault();return}l.current.innerHTML="",l.current.focus()}if(s.key==="Backspace"){const c=window.getSelection();if(c&&c.rangeCount>0){const d=c.getRangeAt(0),h=c.anchorNode;if(t){let y=null,E=null;if(h&&(h.nodeType===Node.ELEMENT_NODE?(y=h.closest(".tag-node"),E=h.closest('[data-type="text"]')):h.nodeType===Node.TEXT_NODE&&h.parentElement&&(y=h.parentElement.closest(".tag-node"),E=h.parentElement.closest('[data-type="text"]'))),(y||E)&&d.collapsed&&d.startOffset===0){s.preventDefault();return}}let f=null;if(h&&(h.nodeType===Node.ELEMENT_NODE?f=h.closest('[data-type="variable"]'):h.nodeType===Node.TEXT_NODE&&h.parentElement&&(f=h.parentElement.closest('[data-type="variable"]'))),f){if(f.getAttribute("data-report-url")){s.preventDefault();const v=f.dataset.key||"",m=f.getAttribute("data-node-type")||"",b=f.dataset.multiKey||"";f.removeAttribute("data-report-url"),f.removeAttribute("data-report-name"),f.classList.remove("rte-report-name-chip"),f.contentEditable="true";const T=f.querySelector(".rte-report-dropdown-host");T?.parentNode&&T.parentNode.removeChild(T);const C=f.querySelector(".rte-report-chip-clear-host");if(C?.parentNode&&C.parentNode.removeChild(C),f.textContent="",f.classList.add("show-placeholder"),T)T.classList.remove("hidden"),T.style.display="",f.appendChild(T);else{const A=document.createElement("span");A.contentEditable="false",A.className="rte-report-dropdown-host",A.dataset.key=v,A.dataset.nodeType=m,b&&(A.dataset.multiKey=b),f.appendChild(A)}f.classList.add("rte-variable-with-icon"),i?.(v,m),f.focus(),n();return}if(!d.collapsed)return;const y=f.innerText;if(y===""||y===""){s.preventDefault();return}if((()=>{try{const v=document.createRange();v.selectNodeContents(f),v.setEnd(d.startContainer,d.startOffset);const m=v.cloneContents(),b=document.createTreeWalker(m,NodeFilter.SHOW_ALL);for(;b.nextNode();){const T=b.currentNode;if(T.nodeType===Node.ELEMENT_NODE){if(T.tagName==="BR")return!1}else if(T.nodeType===Node.TEXT_NODE&&(T.textContent||"").replace(/\u200B/g,"").trim().length>0)return!1}return!0}catch{return d.startOffset===0}})()){s.preventDefault();return}if(y.startsWith("")&&d.startOffset===1){s.preventDefault();return}}}}},[a,e,l,n,t,r,i]),Xc=({lockStructure:e,onAgentExit:t,editorRef:a,setPopoverVisible:l,isDraggingRef:n,mouseDownPosRef:r})=>{const i=(...h)=>{},s=h=>{try{const f=window.getSelection();if(!f)return i(h,"no selection");const y=f.rangeCount>0?f.getRangeAt(0):null;i(h,{rangeCount:f.rangeCount,isCollapsed:f.isCollapsed,anchorNode:f.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":f.anchorNode?.nodeName,anchorOffset:f.anchorOffset,focusNode:f.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":f.focusNode?.nodeName,focusOffset:f.focusOffset,range:y?{startContainer:y.startContainer.nodeType===Node.TEXT_NODE?"TEXT":y.startContainer.nodeName,startOffset:y.startOffset,endContainer:y.endContainer.nodeType===Node.TEXT_NODE?"TEXT":y.endContainer.nodeName,endOffset:y.endOffset}:null})}catch{}},u=w.useCallback(h=>{const f=h.target;if(i("mousedown",{tag:f.tagName,cls:f.className}),s("before mousedown"),f.closest(".rte-datepicker-wrapper")||f.closest(".rte-datepicker-host")||f.closest(".rte-select-wrapper")||f.closest(".rte-select-host")||f.closest(".ant-select-dropdown"))return;if(f.closest(".tag-close-btn")){if(h.preventDefault(),h.stopPropagation(),e)return;l(null),t?t():a.current&&(a.current.innerHTML="",a.current.focus());return}if(e){const g=f.closest(".tag-node"),v=f.closest('[data-type="text"]');if(g||v){h.preventDefault(),h.stopPropagation();const m=window.getSelection();m&&m.removeAllRanges();return}}const E=f.closest('[data-type="variable"]');if(E){if(i("mousedown on variable",{key:E.dataset.key,multiKey:E.dataset.multiKey,nodeType:E.getAttribute("data-node-type")||"",render:E.dataset.variableRender||"v1",classes:E.className}),E.dataset.variableRender==="antd-textarea")return;if(E.getAttribute("data-report-url")){h.preventDefault(),E.hasAttribute("tabindex")||E.setAttribute("tabindex","-1"),E.focus(),window.getSelection()?.removeAllRanges();return}const g=!!f.closest(".variable-info-icon"),v=E.classList.contains("show-placeholder")||(E.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(i("v1 variable mousedown",{isPlaceholder:v,isOnIcon:g,innerText:E.innerText}),v&&!g){h.preventDefault(),window.requestAnimationFrame(()=>{s("raf before setRange (mousedown)");const m=window.getSelection();if(!m)return;const b=E;b.focus();const T=document.createTreeWalker(b,NodeFilter.SHOW_TEXT),C=T.nextNode()?T.currentNode:null,A=document.createRange();C?(A.setStart(C,0),A.collapse(!0)):(A.selectNodeContents(b),A.collapse(!0)),m.removeAllRanges(),m.addRange(A),s("raf after setRange (mousedown)")});return}return}r.current={x:h.clientX,y:h.clientY},n.current=!1,f.closest(".file-remove-btn")&&(h.preventDefault(),h.stopPropagation())},[a,n,e,r,t,l]),o=w.useCallback(h=>{if(!h.target.closest('[data-type="variable"]')&&r.current){const E=Math.abs(h.clientX-r.current.x),g=Math.abs(h.clientY-r.current.y);(E>3||g>3)&&(n.current=!0)}},[n,r]),c=w.useCallback(h=>{const f=h.target;i("mouseup",{tag:f.tagName,cls:f.className}),s("before mouseup");const y=f.closest('[data-type="variable"]');if(y){if(y.getAttribute("data-report-url")){h.preventDefault(),r.current=null,n.current=!1;return}if(y.dataset.variableRender!=="antd-textarea"){const E=!!f.closest(".variable-info-icon"),g=y.classList.contains("show-placeholder")||(y.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;i("v1 variable mouseup",{key:y.dataset.key,isPlaceholder:g,isOnIcon:E,classes:y.className}),g&&!E&&(h.preventDefault(),window.requestAnimationFrame(()=>{s("raf before setRange (mouseup)");const v=window.getSelection();if(!v)return;const m=y;m.focus();const b=document.createTreeWalker(m,NodeFilter.SHOW_TEXT),T=b.nextNode()?b.currentNode:null,C=document.createRange();T?(C.setStart(T,0),C.collapse(!0)):(C.selectNodeContents(m),C.collapse(!0)),v.removeAllRanges(),v.addRange(C),s("raf after setRange (mouseup)")}))}r.current=null,n.current=!1;return}r.current=null,n.current=!1},[n,r]),d=w.useCallback(h=>{const y=h.target.closest('[data-type="variable"]');if(y){const E=window.getSelection();if(E){const g=document.createRange(),v=y.textContent||"";if(v.replace(/\u200B/g,"")){let b=0,T=v.length;v.startsWith("")&&(b=1),v.endsWith("")&&v.length>1&&(T=v.length-1);const C=y.firstChild;C&&C.nodeType===Node.TEXT_NODE?(g.setStart(C,b),g.setEnd(C,T)):g.selectNodeContents(y)}else g.selectNodeContents(y),g.collapse(!0);E.removeAllRanges(),E.addRange(g)}}},[]);return{handleMouseDown:u,handleMouseMove:o,handleMouseUp:c,handleDoubleClick:d}},Qc=({disabled:e,config:t,multiVariableCounts:a,setMultiVariableCounts:l,editorRef:n,handleInput:r,markdownAnalyzeRef:i,reportAnalyzeRef:s,markdownNameAnalyzeRef:u,markdownAnalyzeStateRef:o,markdownRawTextRef:c,setMarkdownAnalyzeState:d,setFooterFiles:h,footerFiles:f,messageApi:y,onPasteUnsupported:E})=>w.useCallback(g=>{const v=g.target,m=v?.closest?.('[data-type="variable"]')||null,b=m?.querySelector(".rte-report-dropdown-host")&&m.dataset.key?m.dataset.key:void 0;document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:b?{exceptKey:b}:void 0}));const T=t.some(F=>F.type==="tag"),C=Array.from(g.clipboardData.files);if(C.length>0&&T){g.preventDefault();return}if(C.length>0){g.preventDefault();const F=["pdf","xla","xlb","xlc","xlm","xls","xlsx","xlt","xlw","csv","tsv","iif","doc","docx","dot","odt","rtf","pot","ppa","pps","ppt","pptx","pwz","wiz","asm","bat","c","cc","conf","cpp","css","cxx","def","dic","eml","h","hh","htm","html","ics","ifb","in","js","json","ksh","png","jpeg","jpg","gif","webp","md","php","pkl","rb","tar","tex","ts","txt","xml"],M=[];let I=!1;for(const x of C){const P=(x.name||"").split(".").pop()?.toLowerCase()||"";F.includes(P)?M.push(x):I=!0}if(I&&E?.(),M.length>0){const P=f.reduce((V,_)=>V+_.size,0),z=[];let U=P;for(const V of M){if(U+V.size>52428800){y.error("文件总大小不能超过 50MB");break}z.push(V),U+=V.size}z.length>0&&h(V=>[...z,...V])}return}if(v&&(v.tagName==="TEXTAREA"||v.tagName==="INPUT")&&v.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){g.preventDefault();return}g.preventDefault();const N=(g.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
|
|
41
41
|
`).replace(/\n+$/g,""),k=window.getSelection();if(k&&k.rangeCount>0){const F=k.anchorNode;if(F){let M=null;if(F.nodeType===Node.ELEMENT_NODE?M=F.closest('[data-type="variable"]'):F.nodeType===Node.TEXT_NODE&&F.parentElement&&(M=F.parentElement.closest('[data-type="variable"]')),M){const I=M.dataset.multiKey;if(I){const z=/[、,,\s\n\r\t]+/,U=N.split(z).map(V=>V.trim()).filter(V=>V.length>0);if(U.length>1){const V=parseInt(M.dataset.index||"0",10),_=t.find(ie=>Ye(ie.type)&&ie.key===I)?.maxCount||9,G=a[I]||1,Y=Math.min(V+U.length,_);Y>G&&l(ee=>({...ee,[I]:Y}));const O=[];for(let ee=0;ee<G;ee++){const ie=`${I}_${ee}`,ce=n.current.querySelector(`[data-type="variable"][data-key="${ie}"][data-multi-key="${I}"]`);if(ce){const me=ce.innerText.replace(/[\u200B\n]/g,"").trim();O.push(me)}}O.splice(V,1,...U.slice(0,_-V));const R=O.slice(0,_);R.length>0&&R[R.length-1]!==""&&R.length<_&&R.push("");const K=Math.max(R.length,1),X={};R.forEach((ee,ie)=>{ee&&(X[`${I}_${ie}`]=ee)}),n.current.querySelectorAll('[data-type="variable"]').forEach(ee=>{const ie=ee.dataset.key,ce=ee.dataset.multiKey;if(ie&&ce!==I){const me=ee.innerText.replace(/[\u200B\n]/g,"").trim();me&&(X[ie]=me)}}),n.current.__tempVariableValues=X,l(ee=>({...ee,[I]:K}));return}}const x=M.getAttribute("data-node-type")||"";if(!(x==="markdown"||x==="report-url"||x==="markdown-name")){const z=(()=>{const V=M.getAttribute("data-node-type")||"";if(V==="report-url"||V==="markdown"||V==="markdown-name")return!1;const _=M.dataset.multiKey;if(_)return t.find(R=>Ye(R.type)&&R.key===_)?.allowNewline!==!1;const G=M.dataset.key;return t.find(O=>O.type==="variable"&&O.key===G)?.allowNewline!==!1})(),U=window.getSelection();if(U&&U.rangeCount>0){const V=U.getRangeAt(0);V.deleteContents();const _=document.createDocumentFragment(),Y=(z?N:N.replace(/\n+/g," ")).split(`
|
|
42
|
-
`);for(let R=0;R<Y.length;R++)_.appendChild(document.createTextNode(Y[R])),z&&R<Y.length-1&&_.appendChild(document.createElement("br"));V.insertNode(_),U.removeAllRanges();const O=document.createRange();O.selectNodeContents(M),O.collapse(!1),U.addRange(O)}r();return}}}}let S=!1,L="";const D=window.getSelection();if(D&&D.rangeCount>0){const F=D.anchorNode;if(F){let M=null;if(F.nodeType===Node.ELEMENT_NODE?M=F.closest('[data-type="variable"]'):F.nodeType===Node.TEXT_NODE&&F.parentElement&&(M=F.parentElement.closest('[data-type="variable"]')),M){const I=M.getAttribute("data-node-type")||"",x=M.dataset.key;if(I==="markdown"&&x&&/20\d{2}-\d{2}-\d{2}/.test(N))S=!0,L=x,c.current[x]=N,d(P=>({...P,[x]:{...P[x],status:"loading",error:void 0}}));else if(I==="report-url"&&x){document.execCommand("insertText",!1,N),r();return}else if(I==="markdown-name"&&x){document.execCommand("insertText",!1,N),r(),setTimeout(()=>{const P=M.innerText.replace(/[\u200B\n]/g,"").trim();u.current(x,P)},0);return}}}}if(S&&L){setTimeout(()=>{i.current(L,N)},0);return}document.execCommand("insertText",!1,N),r(),setTimeout(()=>{const F=window.getSelection();if(!F||F.rangeCount===0)return;const M=n.current?.parentElement;if(!M)return;let I=F.getRangeAt(0).getBoundingClientRect();if(!I||!I.height&&!I.top&&!I.bottom){const P=document.createElement("span");P.appendChild(document.createTextNode(""));const z=F.getRangeAt(0).cloneRange();z.collapse(!1),z.insertNode(P),I=P.getBoundingClientRect(),P.remove()}if(!I)return;const x=M.getBoundingClientRect();I.bottom>x.bottom?M.scrollTop+=I.bottom-x.bottom+8:I.top<x.top&&(M.scrollTop-=x.top-I.top+8)},0),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(N)&&o.current.tableData?.status==="success"&&(d(M=>({...M,tableData:{status:"loading",modules:[],lastParsedText:N,error:void 0}})),setTimeout(()=>{c.current.tableData=N,i.current("tableData",N)},0))},0)},[t,e,n,r,i,o,c,a,E,s,h,f,y,d,l]);async function Qr(e){const t=e.split("/").pop()?.split("?")[0]||"file",a=decodeURIComponent(t),l=async n=>{const r=await n.blob();return new File([r],a,{type:r.type||"application/octet-stream"})};try{const n=`/api/image-proxy?url=${encodeURIComponent(e)}`,r=await fetch(n);if(r.ok)return l(r)}catch{}return null}const Jc=({config:e,files:t,footerFiles:a,onFooterFilesClear:l,onSend:n,isProcessing:r,disabled:i,loading:s,isFormValid:u,editorRef:o,markdownAnalyzeState:c,markdownNameAnalyzeState:d,videoState:h})=>w.useCallback(()=>{if(r||i||s||!u||!o.current)return;if(e.length===0){const m=o.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!m&&a.length===0)return;if(a.length>0){const b=new FormData;b.append("fullPrompt",m),a.forEach(T=>{b.append("fileUrls",T)}),n(b,m),l()}else n(m,m);if(o.current){o.current.textContent="";const b=new Event("input",{bubbles:!0});o.current.dispatchEvent(b)}return}const f=o.current;let y="";const E={},g=m=>{if(!(m.nodeType===Node.ELEMENT_NODE&&m.style.display==="none")){if(m.nodeType===Node.TEXT_NODE)y+=(m.textContent||"").replace(/\u200B/g,"");else if(m.nodeType===Node.ELEMENT_NODE){const b=m,T=b.dataset.type,C=b.dataset.key;if(T==="variable"&&C){let A="";const N=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:L=>{const D=b.querySelector(".variable-info-icon");return D&&D.contains(L)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;N.nextNode();)A+=N.currentNode.textContent||"";const S=b.getAttribute("data-report-url")||A.replace(/[\u200B\n]/g,"").trim();if(S){const L=b.dataset.multiKey;if(L){(!E[L]||!Array.isArray(E[L]))&&(E[L]=[]);const D=E[L];D.push(S),D.length>1&&(y+=" "),y+=S}else E[C]=S,y+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const D=E.url;Array.isArray(D)?D.push(S):E.url=[String(D),S]}if(b.dataset.nodeType==="markdown-name"){const D=`${C}__sourceText`;E[D]===void 0&&(E[D]=S)}if(b.dataset.nodeType==="markdown"){const D=b.dataset.sourceTextKey||`${C}__sourceText`;if(E[D]===void 0)E[D]=S;else{const M=E[D];Array.isArray(M)?M.push(S):E[D]=[String(M),S]}const F=`${C}__markdown`;E[F]===void 0&&(E[F]=[Gr(S)])}}}else if((T==="select"||T==="searchable-select"||T==="cascader")&&C){const A=(b.getAttribute("data-value")||"").trim();A&&(E[C]=A,y+=A)}else if(T==="textarea"&&C){const N=(b.value||"").replace(/\u200B/g,"").trim();N&&(E[C]=N,y+=N)}else if(T==="richtext"&&C){const A=b,N=A.dataset.nodeType,k=(A.textContent||"").replace(/\u200B/g,"").trim();if(k)if(N==="report-module"||N==="markdown-module"){(!E[C]||!Array.isArray(E[C]))&&(E[C]=[]);const S=E[C];S.push(k),S.length>1&&(y+=" "),y+=k}else E[C]=k,y+=k}else if(T==="datepicker"&&C){const N=(b.getAttribute("data-value")||"").trim();if(N)if(N.includes(",")){const k=N.split(",");k.length===2?(E[C]=k,y+=`[${k[0]}, ${k[1]}]`):(E[C]=N,y+=N)}else E[C]=N,y+=N}else if(T==="number-input"&&C){const N=(b.value||"").trim();N&&(E[C]=N,y+=N)}else if(T==="upload"&&C){const A=b.dataset.batchKey;if(A){const N=e.find(k=>k.type==="upload"&&k.key===A);if(N&&typeof N.maxCount=="number"&&typeof N.minCount=="number"){const k=[];for(let S=0;S<N.maxCount;S++){const L=`${A}-${S}`,D=t[L];D&&k.push(D)}E[A]||(E[A]=k.length>0?k:null,k.length>0&&(y+=` [附带${k.length}个文件: ${k.map(S=>typeof S=="string"?S.split("/").pop()||"file":S.name).join(", ")}] `))}else if(E[C]=t[C]??null,t[C]){const k=t[C];y+=` [附带文件: ${typeof k=="string"?k.split("/").pop()||"file":k.name}] `}}else if(E[C]=t[C]??null,t[C]){const N=t[C];y+=` [附带文件: ${typeof N=="string"?N.split("/").pop()||"file":N.name}] `}}else if((T==="video-url"||T==="video-upload")&&C){const A=h?.[C];if(A?.status==="success"&&A.videoUrl){E[C]=A.videoUrl,A.file&&(E[`${C}__file`]=A.file);const N=A.fileName||"视频";y+=` [附带视频: ${N}] `}}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn")||b.classList.contains("video-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!T&&b.classList.contains("tag-node")?y+=b.innerText:b.childNodes.forEach(g)}}}};if(f.childNodes.forEach(g),y=y.trim(),!y)return;Object.keys(c).forEach(m=>{const b=c[m];if(!b||!b.modules||b.modules.length===0)return;const T=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);T.length!==0&&(E[`${m}__markdown`]=T)}),Object.keys(d).forEach(m=>{const b=d[m];if(!b||!b.modules||b.modules.length===0)return;const T=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);T.length!==0&&(E[`${m}__markdown`]=T)}),(async()=>{for(const b of Object.keys(E)){const T=E[b];if(typeof T=="string"&&T.startsWith("http")){if(e.find(A=>A.type==="upload"&&A.key===b)){const A=await Qr(T);A&&(E[b]=A)}}else if(Array.isArray(T)&&e.find(A=>A.type==="upload"&&A.key===b)){for(let A=0;A<T.length;A++)if(typeof T[A]=="string"&&T[A].startsWith("http")){const N=await Qr(T[A]);N&&(T[A]=N)}}}const m=new FormData;m.append("fullPrompt",y),Object.keys(E).forEach(b=>{const T=E[b];if(T!=null)if(T instanceof File)m.append(b,T);else if(Array.isArray(T)){const C=e.some(S=>Ye(S.type)&&S.key===b),A=e.some(S=>S.type==="report-url"&&S.key===b),N=b.endsWith("__markdown");C||A||N||b==="url"?T.forEach(S=>{S!=null&&S!==""&&m.append(b,String(S))}):T.forEach((S,L)=>{S!=null&&(S instanceof File?m.append(`${b}[${L}]`,S):typeof S=="string"?m.append(`${b}[${L}]`,S):m.append(`${b}[${L}]`,String(S)))})}else typeof T=="string"?m.append(b,T):m.append(b,String(T))}),a.length>0&&a.forEach(b=>{m.append("fileUrls",b)}),n(m,y),a.length>0&&l()})()},[e,t,a,l,n,r,i,s,u,o,c,d,h]);function Jr(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Zl(e={},t={}){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:Jr(t[l])&&Jr(e[l])&&Object.keys(t[l]).length>0&&Zl(e[l],t[l])})}const Zr={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Ut(){const e=typeof document<"u"?document:{};return Zl(e,Zr),e}const Zc={document:Zr,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Xe(){const e=typeof window<"u"?window:{};return Zl(e,Zc),e}function ed(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function td(e){const t=e;Object.keys(t).forEach(a=>{try{t[a]=null}catch{}try{delete t[a]}catch{}})}function ei(e,t=0){return setTimeout(e,t)}function pl(){return Date.now()}function ad(e){const t=Xe();let a;return t.getComputedStyle&&(a=t.getComputedStyle(e,null)),!a&&e.currentStyle&&(a=e.currentStyle),a||(a=e.style),a}function ld(e,t="x"){const a=Xe();let l,n,r;const i=ad(e);return a.WebKitCSSMatrix?(n=i.transform||i.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(s=>s.replace(",",".")).join(", ")),r=new a.WebKitCSSMatrix(n==="none"?"":n)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),l=r.toString().split(",")),t==="x"&&(a.WebKitCSSMatrix?n=r.m41:l.length===16?n=parseFloat(l[12]):n=parseFloat(l[4])),t==="y"&&(a.WebKitCSSMatrix?n=r.m42:l.length===16?n=parseFloat(l[13]):n=parseFloat(l[5])),n||0}function hl(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function nd(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function nt(...e){const t=Object(e[0]),a=["__proto__","constructor","prototype"];for(let l=1;l<e.length;l+=1){const n=e[l];if(n!=null&&!nd(n)){const r=Object.keys(Object(n)).filter(i=>a.indexOf(i)<0);for(let i=0,s=r.length;i<s;i+=1){const u=r[i],o=Object.getOwnPropertyDescriptor(n,u);o!==void 0&&o.enumerable&&(hl(t[u])&&hl(n[u])?n[u].__swiper__?t[u]=n[u]:nt(t[u],n[u]):!hl(t[u])&&hl(n[u])?(t[u]={},n[u].__swiper__?t[u]=n[u]:nt(t[u],n[u])):t[u]=n[u])}}}return t}function la(e,t,a){e.style.setProperty(t,a)}function ti({swiper:e,targetPosition:t,side:a}){const l=Xe(),n=-e.translate;let r=null,i;const s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",l.cancelAnimationFrame(e.cssModeFrameID);const u=t>n?"next":"prev",o=(d,h)=>u==="next"&&d>=h||u==="prev"&&d<=h,c=()=>{i=new Date().getTime(),r===null&&(r=i);const d=Math.max(Math.min((i-r)/s,1),0),h=.5-Math.cos(d*Math.PI)/2;let f=n+h*(t-n);if(o(f,t)&&(f=t),e.wrapperEl.scrollTo({[a]:f}),o(f,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[a]:f})}),l.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=l.requestAnimationFrame(c)};c()}function ht(e,t=""){const a=Xe(),l=[...e.children];return a.HTMLSlotElement&&e instanceof HTMLSlotElement&&l.push(...e.assignedElements()),t?l.filter(n=>n.matches(t)):l}function rd(e,t){const a=[t];for(;a.length>0;){const l=a.shift();if(e===l)return!0;a.push(...l.children,...l.shadowRoot?l.shadowRoot.children:[],...l.assignedElements?l.assignedElements():[])}}function id(e,t){const a=Xe();let l=t.contains(e);return!l&&a.HTMLSlotElement&&t instanceof HTMLSlotElement&&(l=[...t.assignedElements()].includes(e),l||(l=rd(e,t))),l}function bl(e){try{console.warn(e);return}catch{}}function ml(e,t=[]){const a=document.createElement(e);return a.classList.add(...Array.isArray(t)?t:ed(t)),a}function sd(e,t){const a=[];for(;e.previousElementSibling;){const l=e.previousElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function ud(e,t){const a=[];for(;e.nextElementSibling;){const l=e.nextElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function Nt(e,t){return Xe().getComputedStyle(e,null).getPropertyValue(t)}function vl(e){let t=e,a;if(t){for(a=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(a+=1);return a}}function ai(e,t){const a=[];let l=e.parentElement;for(;l;)t?l.matches(t)&&a.push(l):a.push(l),l=l.parentElement;return a}function en(e,t,a){const l=Xe();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ue(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function Ta(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:a=>a}).createHTML(t):e.innerHTML=t}let tn;function od(){const e=Xe(),t=Ut();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function li(){return tn||(tn=od()),tn}let an;function cd({userAgent:e}={}){const t=li(),a=Xe(),l=a.navigator.platform,n=e||a.navigator.userAgent,r={ios:!1,android:!1},i=a.screen.width,s=a.screen.height,u=n.match(/(Android);?[\s\/]+([\d.]+)?/);let o=n.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const c=n.match(/(iPod)(.*OS\s([\d_]+))?/),d=!o&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h=l==="Win32";let f=l==="MacIntel";const y=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!o&&f&&t.touch&&y.indexOf(`${i}x${s}`)>=0&&(o=n.match(/(Version)\/([\d.]+)/),o||(o=[0,1,"13_0_0"]),f=!1),u&&!h&&(r.os="android",r.android=!0),(o||d||c)&&(r.os="ios",r.ios=!0),r}function ni(e={}){return an||(an=cd(e)),an}let ln;function dd(){const e=Xe(),t=ni();let a=!1;function l(){const s=e.navigator.userAgent.toLowerCase();return s.indexOf("safari")>=0&&s.indexOf("chrome")<0&&s.indexOf("android")<0}if(l()){const s=String(e.navigator.userAgent);if(s.includes("Version/")){const[u,o]=s.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));a=u<16||u===16&&o<2}}const n=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=l(),i=r||n&&t.ios;return{isSafari:a||r,needPerspectiveFix:a,need3dFix:i,isWebView:n}}function ri(){return ln||(ln=dd()),ln}function fd({swiper:e,on:t,emit:a}){const l=Xe();let n=null,r=null;const i=()=>{!e||e.destroyed||!e.initialized||(a("beforeResize"),a("resize"))},s=()=>{!e||e.destroyed||!e.initialized||(n=new ResizeObserver(c=>{r=l.requestAnimationFrame(()=>{const{width:d,height:h}=e;let f=d,y=h;c.forEach(({contentBoxSize:E,contentRect:g,target:v})=>{v&&v!==e.el||(f=g?g.width:(E[0]||E).inlineSize,y=g?g.height:(E[0]||E).blockSize)}),(f!==d||y!==h)&&i()})}),n.observe(e.el))},u=()=>{r&&l.cancelAnimationFrame(r),n&&n.unobserve&&e.el&&(n.unobserve(e.el),n=null)},o=()=>{!e||e.destroyed||!e.initialized||a("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof l.ResizeObserver<"u"){s();return}l.addEventListener("resize",i),l.addEventListener("orientationchange",o)}),t("destroy",()=>{u(),l.removeEventListener("resize",i),l.removeEventListener("orientationchange",o)})}function pd({swiper:e,extendParams:t,on:a,emit:l}){const n=[],r=Xe(),i=(o,c={})=>{const d=r.MutationObserver||r.WebkitMutationObserver,h=new d(f=>{if(e.__preventObserver__)return;if(f.length===1){l("observerUpdate",f[0]);return}const y=function(){l("observerUpdate",f[0])};r.requestAnimationFrame?r.requestAnimationFrame(y):r.setTimeout(y,0)});h.observe(o,{attributes:typeof c.attributes>"u"?!0:c.attributes,childList:e.isElement||(typeof c.childList>"u"?!0:c).childList,characterData:typeof c.characterData>"u"?!0:c.characterData}),n.push(h)},s=()=>{if(e.params.observer){if(e.params.observeParents){const o=ai(e.hostEl);for(let c=0;c<o.length;c+=1)i(o[c])}i(e.hostEl,{childList:e.params.observeSlideChildren}),i(e.wrapperEl,{attributes:!1})}},u=()=>{n.forEach(o=>{o.disconnect()}),n.splice(0,n.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",s),a("destroy",u)}var hd={on(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;const n=a?"unshift":"push";return e.split(" ").forEach(r=>{l.eventsListeners[r]||(l.eventsListeners[r]=[]),l.eventsListeners[r][n](t)}),l},once(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;function n(...r){l.off(e,n),n.__emitterProxy&&delete n.__emitterProxy,t.apply(l,r)}return n.__emitterProxy=t,l.on(e,n,a)},onAny(e,t){const a=this;if(!a.eventsListeners||a.destroyed||typeof e!="function")return a;const l=t?"unshift":"push";return a.eventsAnyListeners.indexOf(e)<0&&a.eventsAnyListeners[l](e),a},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const a=t.eventsAnyListeners.indexOf(e);return a>=0&&t.eventsAnyListeners.splice(a,1),t},off(e,t){const a=this;return!a.eventsListeners||a.destroyed||!a.eventsListeners||e.split(" ").forEach(l=>{typeof t>"u"?a.eventsListeners[l]=[]:a.eventsListeners[l]&&a.eventsListeners[l].forEach((n,r)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&a.eventsListeners[l].splice(r,1)})}),a},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let a,l,n;return typeof e[0]=="string"||Array.isArray(e[0])?(a=e[0],l=e.slice(1,e.length),n=t):(a=e[0].events,l=e[0].data,n=e[0].context||t),l.unshift(n),(Array.isArray(a)?a:a.split(" ")).forEach(i=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(s=>{s.apply(n,[i,...l])}),t.eventsListeners&&t.eventsListeners[i]&&t.eventsListeners[i].forEach(s=>{s.apply(n,l)})}),t}};function bd(){const e=this;let t,a;const l=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=l.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?a=e.params.height:a=l.clientHeight,!(t===0&&e.isHorizontal()||a===0&&e.isVertical())&&(t=t-parseInt(Nt(l,"padding-left")||0,10)-parseInt(Nt(l,"padding-right")||0,10),a=a-parseInt(Nt(l,"padding-top")||0,10)-parseInt(Nt(l,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(a)&&(a=0),Object.assign(e,{width:t,height:a,size:e.isHorizontal()?t:a}))}function md(){const e=this;function t(L,D){return parseFloat(L.getPropertyValue(e.getDirectionLabel(D))||0)}const a=e.params,{wrapperEl:l,slidesEl:n,rtlTranslate:r,wrongRTL:i}=e,s=e.virtual&&a.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,o=ht(n,`.${e.params.slideClass}, swiper-slide`),c=s?e.virtual.slides.length:o.length;let d=[];const h=[],f=[];let y=a.slidesOffsetBefore;typeof y=="function"&&(y=a.slidesOffsetBefore.call(e));let E=a.slidesOffsetAfter;typeof E=="function"&&(E=a.slidesOffsetAfter.call(e));const g=e.snapGrid.length,v=e.slidesGrid.length,m=e.size-y-E;let b=a.spaceBetween,T=-y,C=0,A=0;if(typeof m>"u")return;typeof b=="string"&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*m:typeof b=="string"&&(b=parseFloat(b)),e.virtualSize=-b-y-E,o.forEach(L=>{r?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),a.centeredSlides&&a.cssMode&&(la(l,"--swiper-centered-offset-before",""),la(l,"--swiper-centered-offset-after","")),a.cssMode&&(la(l,"--swiper-slides-offset-before",`${y}px`),la(l,"--swiper-slides-offset-after",`${E}px`));const N=a.grid&&a.grid.rows>1&&e.grid;N?e.grid.initSlides(o):e.grid&&e.grid.unsetSlides();let k;const S=a.slidesPerView==="auto"&&a.breakpoints&&Object.keys(a.breakpoints).filter(L=>typeof a.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L<c;L+=1){k=0;const D=o[L];if(!(D&&(N&&e.grid.updateSlide(L,D,o),Nt(D,"display")==="none"))){if(s&&a.slidesPerView==="auto")a.virtual.slidesPerViewAutoSlideSize&&(k=a.virtual.slidesPerViewAutoSlideSize),k&&D&&(a.roundLengths&&(k=Math.floor(k)),D.style[e.getDirectionLabel("width")]=`${k}px`);else if(a.slidesPerView==="auto"){S&&(D.style[e.getDirectionLabel("width")]="");const F=getComputedStyle(D),M=D.style.transform,I=D.style.webkitTransform;if(M&&(D.style.transform="none"),I&&(D.style.webkitTransform="none"),a.roundLengths)k=e.isHorizontal()?en(D,"width"):en(D,"height");else{const x=t(F,"width"),P=t(F,"padding-left"),z=t(F,"padding-right"),U=t(F,"margin-left"),V=t(F,"margin-right"),_=F.getPropertyValue("box-sizing");if(_&&_==="border-box")k=x+U+V;else{const{clientWidth:G,offsetWidth:Y}=D;k=x+P+z+U+V+(Y-G)}}M&&(D.style.transform=M),I&&(D.style.webkitTransform=I),a.roundLengths&&(k=Math.floor(k))}else k=(m-(a.slidesPerView-1)*b)/a.slidesPerView,a.roundLengths&&(k=Math.floor(k)),D&&(D.style[e.getDirectionLabel("width")]=`${k}px`);D&&(D.swiperSlideSize=k),f.push(k),a.centeredSlides?(T=T+k/2+C/2+b,C===0&&L!==0&&(T=T-m/2-b),L===0&&(T=T-m/2-b),Math.abs(T)<1/1e3&&(T=0),a.roundLengths&&(T=Math.floor(T)),A%a.slidesPerGroup===0&&d.push(T),h.push(T)):(a.roundLengths&&(T=Math.floor(T)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&d.push(T),h.push(T),T=T+k+b),e.virtualSize+=k+b,C=k,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,m)+E,r&&i&&(a.effect==="slide"||a.effect==="coverflow")&&(l.style.width=`${e.virtualSize+b}px`),a.setWrapperSize&&(l.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),N&&e.grid.updateWrapperSize(k,d),!a.centeredSlides){const L=a.slidesPerView!=="auto"&&a.slidesPerView%1!==0,D=a.snapToSlideEdge&&!a.loop&&(a.slidesPerView==="auto"||L);let F=d.length;if(D){let I;if(a.slidesPerView==="auto"){I=1;let x=0;for(let P=f.length-1;P>=0&&(x+=f[P]+(P<f.length-1?b:0),x<=m);P-=1)I=f.length-P}else I=Math.floor(a.slidesPerView);F=Math.max(c-I,0)}const M=[];for(let I=0;I<d.length;I+=1){let x=d[I];a.roundLengths&&(x=Math.floor(x)),D?I<=F&&M.push(x):d[I]<=e.virtualSize-m&&M.push(x)}d=M,Math.floor(e.virtualSize-m)-Math.floor(d[d.length-1])>1&&(D||d.push(e.virtualSize-m))}if(s&&a.loop){const L=f[0]+b;if(a.slidesPerGroup>1){const D=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/a.slidesPerGroup),F=L*a.slidesPerGroup;for(let M=0;M<D;M+=1)d.push(d[d.length-1]+F)}for(let D=0;D<e.virtual.slidesBefore+e.virtual.slidesAfter;D+=1)a.slidesPerGroup===1&&d.push(d[d.length-1]+L),h.push(h[h.length-1]+L),e.virtualSize+=L}if(d.length===0&&(d=[0]),b!==0){const L=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");o.filter((D,F)=>!a.cssMode||a.loop?!0:F!==o.length-1).forEach(D=>{D.style[L]=`${b}px`})}if(a.centeredSlides&&a.centeredSlidesBounds){let L=0;f.forEach(F=>{L+=F+(b||0)}),L-=b;const D=L>m?L-m:0;d=d.map(F=>F<=0?-y:F>D?D+E:F)}if(a.centerInsufficientSlides){let L=0;f.forEach(F=>{L+=F+(b||0)}),L-=b;const D=(y||0)+(E||0);if(L+D<m){const F=(m-L-D)/2;d.forEach((M,I)=>{d[I]=M-F}),h.forEach((M,I)=>{h[I]=M+F})}}if(Object.assign(e,{slides:o,snapGrid:d,slidesGrid:h,slidesSizesGrid:f}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){la(l,"--swiper-centered-offset-before",`${-d[0]}px`),la(l,"--swiper-centered-offset-after",`${e.size/2-f[f.length-1]/2}px`);const L=-e.snapGrid[0],D=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+D)}if(c!==u&&e.emit("slidesLengthChange"),d.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==v&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!s&&!a.cssMode&&(a.effect==="slide"||a.effect==="fade")){const L=`${a.containerModifierClass}backface-hidden`,D=e.el.classList.contains(L);c<=a.maxBackfaceHiddenSlides?D||e.el.classList.add(L):D&&e.el.classList.remove(L)}}function vd(e){const t=this,a=[],l=t.virtual&&t.params.virtual.enabled;let n=0,r;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const i=s=>l?t.slides[t.getSlideIndexByData(s)]:t.slides[s];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(s=>{a.push(s)});else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const s=t.activeIndex+r;if(s>t.slides.length&&!l)break;a.push(i(s))}else a.push(i(t.activeIndex));for(r=0;r<a.length;r+=1)if(typeof a[r]<"u"){const s=a[r].offsetHeight;n=s>n?s:n}(n||n===0)&&(t.wrapperEl.style.height=`${n}px`)}function gd(){const e=this,t=e.slides,a=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let l=0;l<t.length;l+=1)t[l].swiperSlideOffset=(e.isHorizontal()?t[l].offsetLeft:t[l].offsetTop)-a-e.cssOverflowAdjustment()}const ii=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function Ed(e=this&&this.translate||0){const t=this,a=t.params,{slides:l,rtlTranslate:n,snapGrid:r}=t;if(l.length===0)return;typeof l[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let i=-e;n&&(i=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=a.spaceBetween;typeof s=="string"&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:typeof s=="string"&&(s=parseFloat(s));for(let u=0;u<l.length;u+=1){const o=l[u];let c=o.swiperSlideOffset;a.cssMode&&a.centeredSlides&&(c-=l[0].swiperSlideOffset);const d=(i+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+s),h=(i-r[0]+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+s),f=-(i-c),y=f+t.slidesSizesGrid[u],E=f>=0&&f<=t.size-t.slidesSizesGrid[u],g=f>=0&&f<t.size-1||y>1&&y<=t.size||f<=0&&y>=t.size;g&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(u)),ii(o,g,a.slideVisibleClass),ii(o,E,a.slideFullyVisibleClass),o.progress=n?-d:d,o.originalProgress=n?-h:h}}function yd(e){const t=this;if(typeof e>"u"){const c=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*c||0}const a=t.params,l=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:r,isEnd:i,progressLoop:s}=t;const u=r,o=i;if(l===0)n=0,r=!0,i=!0;else{n=(e-t.minTranslate())/l;const c=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;r=c||n<=0,i=d||n>=1,c&&(n=0),d&&(n=1)}if(a.loop){const c=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),h=t.slidesGrid[c],f=t.slidesGrid[d],y=t.slidesGrid[t.slidesGrid.length-1],E=Math.abs(e);E>=h?s=(E-h)/y:s=(E+y-f)/y,s>1&&(s-=1)}Object.assign(t,{progress:n,progressLoop:s,isBeginning:r,isEnd:i}),(a.watchSlidesProgress||a.centeredSlides&&a.autoHeight)&&t.updateSlidesProgress(e),r&&!u&&t.emit("reachBeginning toEdge"),i&&!o&&t.emit("reachEnd toEdge"),(u&&!r||o&&!i)&&t.emit("fromEdge"),t.emit("progress",n)}const nn=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function Td(){const e=this,{slides:t,params:a,slidesEl:l,activeIndex:n}=e,r=e.virtual&&a.virtual.enabled,i=e.grid&&a.grid&&a.grid.rows>1,s=d=>ht(l,`.${a.slideClass}${d}, swiper-slide${d}`)[0];let u,o,c;if(r)if(a.loop){let d=n-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),u=s(`[data-swiper-slide-index="${d}"]`)}else u=s(`[data-swiper-slide-index="${n}"]`);else i?(u=t.find(d=>d.column===n),c=t.find(d=>d.column===n+1),o=t.find(d=>d.column===n-1)):u=t[n];u&&(i||(c=ud(u,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!c&&(c=t[0]),o=sd(u,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!o===0&&(o=t[t.length-1]))),t.forEach(d=>{nn(d,d===u,a.slideActiveClass),nn(d,d===c,a.slideNextClass),nn(d,d===o,a.slidePrevClass)}),e.emitSlidesClasses()}const gl=(e,t)=>{if(!e||e.destroyed||!e.params)return;const a=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,l=t.closest(a());if(l){let n=l.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(l.shadowRoot?n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{l.shadowRoot&&(n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),n&&!n.lazyPreloaderManaged&&n.remove())})),n&&!n.lazyPreloaderManaged&&n.remove()}},rn=(e,t)=>{if(!e.slides[t])return;const a=e.slides[t].querySelector('[loading="lazy"]');a&&a.removeAttribute("loading")},sn=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const a=e.slides.length;if(!a||!t||t<0)return;t=Math.min(t,a);const l=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const i=n,s=[i-t];s.push(...Array.from({length:t}).map((u,o)=>i+l+o)),e.slides.forEach((u,o)=>{s.includes(u.column)&&rn(e,o)});return}const r=n+l-1;if(e.params.rewind||e.params.loop)for(let i=n-t;i<=r+t;i+=1){const s=(i%a+a)%a;(s<n||s>r)&&rn(e,s)}else for(let i=Math.max(n-t,0);i<=Math.min(r+t,a-1);i+=1)i!==n&&(i>r||i<n)&&rn(e,i)};function xd(e){const{slidesGrid:t,params:a}=e,l=e.rtlTranslate?e.translate:-e.translate;let n;for(let r=0;r<t.length;r+=1)typeof t[r+1]<"u"?l>=t[r]&&l<t[r+1]-(t[r+1]-t[r])/2?n=r:l>=t[r]&&l<t[r+1]&&(n=r+1):l>=t[r]&&(n=r);return a.normalizeSlideIndex&&(n<0||typeof n>"u")&&(n=0),n}function Cd(e){const t=this,a=t.rtlTranslate?t.translate:-t.translate,{snapGrid:l,params:n,activeIndex:r,realIndex:i,snapIndex:s}=t;let u=e,o;const c=f=>{let y=f-t.virtual.slidesBefore;return y<0&&(y=t.virtual.slides.length+y),y>=t.virtual.slides.length&&(y-=t.virtual.slides.length),y};if(typeof u>"u"&&(u=xd(t)),l.indexOf(a)>=0)o=l.indexOf(a);else{const f=Math.min(n.slidesPerGroupSkip,u);o=f+Math.floor((u-f)/n.slidesPerGroup)}if(o>=l.length&&(o=l.length-1),u===r&&!t.params.loop){o!==s&&(t.snapIndex=o,t.emit("snapIndexChange"));return}if(u===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(u);return}const d=t.grid&&n.grid&&n.grid.rows>1;let h;if(t.virtual&&n.virtual.enabled)n.loop?h=c(u):h=u;else if(d){const f=t.slides.find(E=>E.column===u);let y=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(y)&&(y=Math.max(t.slides.indexOf(f),0)),h=Math.floor(y/n.grid.rows)}else if(t.slides[u]){const f=t.slides[u].getAttribute("data-swiper-slide-index");f?h=parseInt(f,10):h=u}else h=u;Object.assign(t,{previousSnapIndex:s,snapIndex:o,previousRealIndex:i,realIndex:h,previousIndex:r,activeIndex:u}),t.initialized&&sn(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(i!==h&&t.emit("realIndexChange"),t.emit("slideChange"))}function Sd(e,t){const a=this,l=a.params;let n=e.closest(`.${l.slideClass}, swiper-slide`);!n&&a.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(s=>{!n&&s.matches&&s.matches(`.${l.slideClass}, swiper-slide`)&&(n=s)});let r=!1,i;if(n){for(let s=0;s<a.slides.length;s+=1)if(a.slides[s]===n){r=!0,i=s;break}}if(n&&r)a.clickedSlide=n,a.virtual&&a.params.virtual.enabled?a.clickedIndex=parseInt(n.getAttribute("data-swiper-slide-index"),10):a.clickedIndex=i;else{a.clickedSlide=void 0,a.clickedIndex=void 0;return}l.slideToClickedSlide&&a.clickedIndex!==void 0&&a.clickedIndex!==a.activeIndex&&a.slideToClickedSlide()}var Ad={updateSize:bd,updateSlides:md,updateAutoHeight:vd,updateSlidesOffset:gd,updateSlidesProgress:Ed,updateProgress:yd,updateSlidesClasses:Td,updateActiveIndex:Cd,updateClickedSlide:Sd};function wd(e=this.isHorizontal()?"x":"y"){const t=this,{params:a,rtlTranslate:l,translate:n,wrapperEl:r}=t;if(a.virtualTranslate)return l?-n:n;if(a.cssMode)return n;let i=ld(r,e);return i+=t.cssOverflowAdjustment(),l&&(i=-i),i||0}function kd(e,t){const a=this,{rtlTranslate:l,params:n,wrapperEl:r,progress:i}=a;let s=0,u=0;const o=0;a.isHorizontal()?s=l?-e:e:u=e,n.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?s:u,n.cssMode?r[a.isHorizontal()?"scrollLeft":"scrollTop"]=a.isHorizontal()?-s:-u:n.virtualTranslate||(a.isHorizontal()?s-=a.cssOverflowAdjustment():u-=a.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, ${o}px)`);let c;const d=a.maxTranslate()-a.minTranslate();d===0?c=0:c=(e-a.minTranslate())/d,c!==i&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)}function _d(){return-this.snapGrid[0]}function Nd(){return-this.snapGrid[this.snapGrid.length-1]}function Id(e=0,t=this.params.speed,a=!0,l=!0,n){const r=this,{params:i,wrapperEl:s}=r;if(r.animating&&i.preventInteractionOnTransition)return!1;const u=r.minTranslate(),o=r.maxTranslate();let c;if(l&&e>u?c=u:l&&e<o?c=o:c=e,r.updateProgress(c),i.cssMode){const d=r.isHorizontal();if(t===0)s[d?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return ti({swiper:r,targetPosition:-c,side:d?"left":"top"}),!0;s.scrollTo({[d?"left":"top"]:-c,behavior:"smooth"})}return!0}return t===0?(r.setTransition(0),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(h){!r||r.destroyed||h.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,a&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}var Ld={getTranslate:wd,setTranslate:kd,minTranslate:_d,maxTranslate:Nd,translateTo:Id};function Od(e,t){const a=this;a.params.cssMode||(a.wrapperEl.style.transitionDuration=`${e}ms`,a.wrapperEl.style.transitionDelay=e===0?"0ms":""),a.emit("setTransition",e,t)}function si({swiper:e,runCallbacks:t,direction:a,step:l}){const{activeIndex:n,previousIndex:r}=e;let i=a;i||(n>r?i="next":n<r?i="prev":i="reset"),e.emit(`transition${l}`),t&&i==="reset"?e.emit(`slideResetTransition${l}`):t&&n!==r&&(e.emit(`slideChangeTransition${l}`),i==="next"?e.emit(`slideNextTransition${l}`):e.emit(`slidePrevTransition${l}`))}function Dd(e=!0,t){const a=this,{params:l}=a;l.cssMode||(l.autoHeight&&a.updateAutoHeight(),si({swiper:a,runCallbacks:e,direction:t,step:"Start"}))}function Pd(e=!0,t){const a=this,{params:l}=a;a.animating=!1,!l.cssMode&&(a.setTransition(0),si({swiper:a,runCallbacks:e,direction:t,step:"End"}))}var Md={setTransition:Od,transitionStart:Dd,transitionEnd:Pd};function Bd(e=0,t,a=!0,l,n){typeof e=="string"&&(e=parseInt(e,10));const r=this;let i=e;i<0&&(i=0);const{params:s,snapGrid:u,slidesGrid:o,previousIndex:c,activeIndex:d,rtlTranslate:h,wrapperEl:f,enabled:y}=r;if(!y&&!l&&!n||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=r.params.speed);const E=Math.min(r.params.slidesPerGroupSkip,i);let g=E+Math.floor((i-E)/r.params.slidesPerGroup);g>=u.length&&(g=u.length-1);const v=-u[g];if(s.normalizeSlideIndex)for(let N=0;N<o.length;N+=1){const k=-Math.floor(v*100),S=Math.floor(o[N]*100),L=Math.floor(o[N+1]*100);typeof o[N+1]<"u"?k>=S&&k<L-(L-S)/2?i=N:k>=S&&k<L&&(i=N+1):k>=S&&(i=N)}if(r.initialized&&i!==d&&(!r.allowSlideNext&&(h?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate())||!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(d||0)!==i))return!1;i!==(c||0)&&a&&r.emit("beforeSlideChangeStart"),r.updateProgress(v);let m;i>d?m="next":i<d?m="prev":m="reset";const b=r.virtual&&r.params.virtual.enabled;if(!(b&&n)&&(h&&-v===r.translate||!h&&v===r.translate))return r.updateActiveIndex(i),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),s.effect!=="slide"&&r.setTranslate(v),m!=="reset"&&(r.transitionStart(a,m),r.transitionEnd(a,m)),!1;if(s.cssMode){const N=r.isHorizontal(),k=h?v:-v;if(t===0)b&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),b&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[N?"scrollLeft":"scrollTop"]=k})):f[N?"scrollLeft":"scrollTop"]=k,b&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return ti({swiper:r,targetPosition:k,side:N?"left":"top"}),!0;f.scrollTo({[N?"left":"top"]:k,behavior:"smooth"})}return!0}const A=ri().isSafari;return b&&!n&&A&&r.isElement&&r.virtual.update(!1,!1,i),r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(i),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,l),r.transitionStart(a,m),t===0?r.transitionEnd(a,m):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(k){!r||r.destroyed||k.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(a,m))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function Fd(e=0,t,a=!0,l){typeof e=="string"&&(e=parseInt(e,10));const n=this;if(n.destroyed)return;typeof t>"u"&&(t=n.params.speed);const r=n.grid&&n.params.grid&&n.params.grid.rows>1;let i=e;if(n.params.loop)if(n.virtual&&n.params.virtual.enabled)i=i+n.virtual.slidesBefore;else{let s;if(r){const E=i*n.params.grid.rows;s=n.slides.find(g=>g.getAttribute("data-swiper-slide-index")*1===E).column}else s=n.getSlideIndexByData(i);const u=r?Math.ceil(n.slides.length/n.params.grid.rows):n.slides.length,{centeredSlides:o,slidesOffsetBefore:c,slidesOffsetAfter:d}=n.params,h=o||!!c||!!d;let f=n.params.slidesPerView;f==="auto"?f=n.slidesPerViewDynamic():(f=Math.ceil(parseFloat(n.params.slidesPerView,10)),h&&f%2===0&&(f=f+1));let y=u-s<f;if(h&&(y=y||s<Math.ceil(f/2)),l&&h&&n.params.slidesPerView!=="auto"&&!r&&(y=!1),y){const E=h?s<n.activeIndex?"prev":"next":s-n.activeIndex-1<n.params.slidesPerView?"next":"prev";n.loopFix({direction:E,slideTo:!0,activeSlideIndex:E==="next"?s+1:s-u+1,slideRealIndex:E==="next"?n.realIndex:void 0})}if(r){const E=i*n.params.grid.rows;i=n.slides.find(g=>g.getAttribute("data-swiper-slide-index")*1===E).column}else i=n.getSlideIndexByData(i)}return requestAnimationFrame(()=>{n.slideTo(i,t,a,l)}),n}function Hd(e,t=!0,a){const l=this,{enabled:n,params:r,animating:i}=l;if(!n||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);let s=r.slidesPerGroup;r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(s=Math.max(l.slidesPerViewDynamic("current",!0),1));const u=l.activeIndex<r.slidesPerGroupSkip?1:s,o=l.virtual&&r.virtual.enabled;if(r.loop){if(i&&!o&&r.loopPreventsSliding)return!1;if(l.loopFix({direction:"next"}),l._clientLeft=l.wrapperEl.clientLeft,l.activeIndex===l.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{l.slideTo(l.activeIndex+u,e,t,a)}),!0}return r.rewind&&l.isEnd?l.slideTo(0,e,t,a):l.slideTo(l.activeIndex+u,e,t,a)}function $d(e,t=!0,a){const l=this,{params:n,snapGrid:r,slidesGrid:i,rtlTranslate:s,enabled:u,animating:o}=l;if(!u||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);const c=l.virtual&&n.virtual.enabled;if(n.loop){if(o&&!c&&n.loopPreventsSliding)return!1;l.loopFix({direction:"prev"}),l._clientLeft=l.wrapperEl.clientLeft}const d=s?l.translate:-l.translate;function h(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const f=h(d),y=r.map(m=>h(m)),E=n.freeMode&&n.freeMode.enabled;let g=r[y.indexOf(f)-1];if(typeof g>"u"&&(n.cssMode||E)){let m;r.forEach((b,T)=>{f>=b&&(m=T)}),typeof m<"u"&&(g=E?r[m]:r[m>0?m-1:m])}let v=0;if(typeof g<"u"&&(v=i.indexOf(g),v<0&&(v=l.activeIndex-1),n.slidesPerView==="auto"&&n.slidesPerGroup===1&&n.slidesPerGroupAuto&&(v=v-l.slidesPerViewDynamic("previous",!0)+1,v=Math.max(v,0))),n.rewind&&l.isBeginning){const m=l.params.virtual&&l.params.virtual.enabled&&l.virtual?l.virtual.slides.length-1:l.slides.length-1;return l.slideTo(m,e,t,a)}else if(n.loop&&l.activeIndex===0&&n.cssMode)return requestAnimationFrame(()=>{l.slideTo(v,e,t,a)}),!0;return l.slideTo(v,e,t,a)}function Rd(e,t=!0,a){const l=this;if(!l.destroyed)return typeof e>"u"&&(e=l.params.speed),l.slideTo(l.activeIndex,e,t,a)}function Ud(e,t=!0,a,l=.5){const n=this;if(n.destroyed)return;typeof e>"u"&&(e=n.params.speed);let r=n.activeIndex;const i=Math.min(n.params.slidesPerGroupSkip,r),s=i+Math.floor((r-i)/n.params.slidesPerGroup),u=n.rtlTranslate?n.translate:-n.translate;if(u>=n.snapGrid[s]){const o=n.snapGrid[s],c=n.snapGrid[s+1];u-o>(c-o)*l&&(r+=n.params.slidesPerGroup)}else{const o=n.snapGrid[s-1],c=n.snapGrid[s];u-o<=(c-o)*l&&(r-=n.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,n.slidesGrid.length-1),n.slideTo(r,e,t,a)}function qd(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:a}=e,l=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let n=e.getSlideIndexWhenGrid(e.clickedIndex),r;const i=e.isElement?"swiper-slide":`.${t.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;r=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(r):n>(s?(e.slides.length-l)/2-(e.params.grid.rows-1):e.slides.length-l)?(e.loopFix(),n=e.getSlideIndex(ht(a,`${i}[data-swiper-slide-index="${r}"]`)[0]),ei(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}var zd={slideTo:Bd,slideToLoop:Fd,slideNext:Hd,slidePrev:$d,slideReset:Rd,slideToClosest:Ud,slideToClickedSlide:qd};function Vd(e,t){const a=this,{params:l,slidesEl:n}=a;if(!l.loop||a.virtual&&a.params.virtual.enabled)return;const r=()=>{ht(n,`.${l.slideClass}, swiper-slide`).forEach((y,E)=>{y.setAttribute("data-swiper-slide-index",E)})},i=()=>{const f=ht(n,`.${l.slideBlankClass}`);f.forEach(y=>{y.remove()}),f.length>0&&(a.recalcSlides(),a.updateSlides())},s=a.grid&&l.grid&&l.grid.rows>1;l.loopAddBlankSlides&&(l.slidesPerGroup>1||s)&&i();const u=l.slidesPerGroup*(s?l.grid.rows:1),o=a.slides.length%u!==0,c=s&&a.slides.length%l.grid.rows!==0,d=f=>{for(let y=0;y<f;y+=1){const E=a.isElement?ml("swiper-slide",[l.slideBlankClass]):ml("div",[l.slideClass,l.slideBlankClass]);a.slidesEl.append(E)}};if(o){if(l.loopAddBlankSlides){const f=u-a.slides.length%u;d(f),a.recalcSlides(),a.updateSlides()}else bl("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(c){if(l.loopAddBlankSlides){const f=l.grid.rows-a.slides.length%l.grid.rows;d(f),a.recalcSlides(),a.updateSlides()}else bl("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const h=l.centeredSlides||!!l.slidesOffsetBefore||!!l.slidesOffsetAfter;a.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})}function Gd({slideRealIndex:e,slideTo:t=!0,direction:a,setTranslate:l,activeSlideIndex:n,initial:r,byController:i,byMousewheel:s}={}){const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:o,allowSlidePrev:c,allowSlideNext:d,slidesEl:h,params:f}=u,{centeredSlides:y,slidesOffsetBefore:E,slidesOffsetAfter:g,initialSlide:v}=f,m=y||!!E||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&f.virtual.enabled){t&&(!m&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):m&&u.snapIndex<f.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=c,u.allowSlideNext=d,u.emit("loopFix");return}let b=f.slidesPerView;b==="auto"?b=u.slidesPerViewDynamic():(b=Math.ceil(parseFloat(f.slidesPerView,10)),m&&b%2===0&&(b=b+1));const T=f.slidesPerGroupAuto?b:f.slidesPerGroup;let C=m?Math.max(T,Math.ceil(b/2)):T;C%T!==0&&(C+=T-C%T),C+=f.loopAdditionalSlides,u.loopedSlides=C;const A=u.grid&&f.grid&&f.grid.rows>1;o.length<b+C||u.params.effect==="cards"&&o.length<b+C*2?bl("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):A&&f.grid.fill==="row"&&bl("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const N=[],k=[],S=A?Math.ceil(o.length/f.grid.rows):o.length,L=r&&S-v<b&&!m;let D=L?v:u.activeIndex;typeof n>"u"?n=u.getSlideIndex(o.find(U=>U.classList.contains(f.slideActiveClass))):D=n;const F=a==="next"||!a,M=a==="prev"||!a;let I=0,x=0;const z=(A?o[n].column:n)+(m&&typeof l>"u"?-b/2+.5:0);if(z<C){I=Math.max(C-z,T);for(let U=0;U<C-z;U+=1){const V=U-Math.floor(U/S)*S;if(A){const _=S-V-1;for(let G=o.length-1;G>=0;G-=1)o[G].column===_&&N.push(G)}else N.push(S-V-1)}}else if(z+b>S-C){x=Math.max(z-(S-C*2),T),L&&(x=Math.max(x,b-S+v+1));for(let U=0;U<x;U+=1){const V=U-Math.floor(U/S)*S;A?o.forEach((_,G)=>{_.column===V&&k.push(G)}):k.push(V)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&o.length<b+C*2&&(k.includes(n)&&k.splice(k.indexOf(n),1),N.includes(n)&&N.splice(N.indexOf(n),1)),M&&N.forEach(U=>{o[U].swiperLoopMoveDOM=!0,h.prepend(o[U]),o[U].swiperLoopMoveDOM=!1}),F&&k.forEach(U=>{o[U].swiperLoopMoveDOM=!0,h.append(o[U]),o[U].swiperLoopMoveDOM=!1}),u.recalcSlides(),f.slidesPerView==="auto"?u.updateSlides():A&&(N.length>0&&M||k.length>0&&F)&&u.slides.forEach((U,V)=>{u.grid.updateSlide(V,U,u.slides)}),f.watchSlidesProgress&&u.updateSlidesOffset(),t){if(N.length>0&&M){if(typeof e>"u"){const U=u.slidesGrid[D],_=u.slidesGrid[D+I]-U;s?u.setTranslate(u.translate-_):(u.slideTo(D+Math.ceil(I),0,!1,!0),l&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else if(l){const U=A?N.length/f.grid.rows:N.length;u.slideTo(u.activeIndex+U,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(k.length>0&&F)if(typeof e>"u"){const U=u.slidesGrid[D],_=u.slidesGrid[D-x]-U;s?u.setTranslate(u.translate-_):(u.slideTo(D-x,0,!1,!0),l&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else{const U=A?k.length/f.grid.rows:k.length;u.slideTo(u.activeIndex-U,0,!1,!0)}}if(u.allowSlidePrev=c,u.allowSlideNext=d,u.controller&&u.controller.control&&!i){const U={slideRealIndex:e,direction:a,setTranslate:l,activeSlideIndex:n,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...U,slideTo:V.params.slidesPerView===f.slidesPerView?t:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...U,slideTo:u.controller.control.params.slidesPerView===f.slidesPerView?t:!1})}u.emit("loopFix")}function Yd(){const e=this,{params:t,slidesEl:a}=e;if(!t.loop||!a||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const l=[];e.slides.forEach(n=>{const r=typeof n.swiperSlideIndex>"u"?n.getAttribute("data-swiper-slide-index")*1:n.swiperSlideIndex;l[r]=n}),e.slides.forEach(n=>{n.removeAttribute("data-swiper-slide-index")}),l.forEach(n=>{a.append(n)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Wd={loopCreate:Vd,loopFix:Gd,loopDestroy:Yd};function jd(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const a=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),a.style.cursor="move",a.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Kd(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Xd={setGrabCursor:jd,unsetGrabCursor:Kd};function Qd(e,t=this){function a(l){if(!l||l===Ut()||l===Xe())return null;l.assignedSlot&&(l=l.assignedSlot);const n=l.closest(e);return!n&&!l.getRootNode?null:n||a(l.getRootNode().host)}return a(t)}function ui(e,t,a){const l=Xe(),{params:n}=e,r=n.edgeSwipeDetection,i=n.edgeSwipeThreshold;return r&&(a<=i||a>=l.innerWidth-i)?r==="prevent"?(t.preventDefault(),!0):!1:!0}function Jd(e){const t=this,a=Ut();let l=e;l.originalEvent&&(l=l.originalEvent);const n=t.touchEventsData;if(l.type==="pointerdown"){if(n.pointerId!==null&&n.pointerId!==l.pointerId)return;n.pointerId=l.pointerId}else l.type==="touchstart"&&l.targetTouches.length===1&&(n.touchId=l.targetTouches[0].identifier);if(l.type==="touchstart"){ui(t,l,l.targetTouches[0].pageX);return}const{params:r,touches:i,enabled:s}=t;if(!s||!r.simulateTouch&&l.pointerType==="mouse"||t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let u=l.target;if(r.touchEventsTarget==="wrapper"&&!id(u,t.wrapperEl)||"which"in l&&l.which===3||"button"in l&&l.button>0||n.isTouched&&n.isMoved)return;const o=!!r.noSwipingClass&&r.noSwipingClass!=="",c=l.composedPath?l.composedPath():l.path;o&&l.target&&l.target.shadowRoot&&c&&(u=c[0]);const d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!!(l.target&&l.target.shadowRoot);if(r.noSwiping&&(h?Qd(d,u):u.closest(d))){t.allowClick=!0;return}if(r.swipeHandler&&!u.closest(r.swipeHandler))return;i.currentX=l.pageX,i.currentY=l.pageY;const f=i.currentX,y=i.currentY;if(!ui(t,l,f))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),i.startX=f,i.startY=y,n.touchStartTime=pl(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(n.allowThresholdMove=!1);let E=!0;u.matches(n.focusableElements)&&(E=!1,u.nodeName==="SELECT"&&(n.isTouched=!1)),a.activeElement&&a.activeElement.matches(n.focusableElements)&&a.activeElement!==u&&(l.pointerType==="mouse"||l.pointerType!=="mouse"&&!u.matches(n.focusableElements))&&a.activeElement.blur();const g=E&&t.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||g)&&!u.isContentEditable&&l.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function Zd(e){const t=Ut(),a=this,l=a.touchEventsData,{params:n,touches:r,rtlTranslate:i,enabled:s}=a;if(!s||!n.simulateTouch&&e.pointerType==="mouse")return;let u=e;if(u.originalEvent&&(u=u.originalEvent),u.type==="pointermove"&&(l.touchId!==null||u.pointerId!==l.pointerId))return;let o;if(u.type==="touchmove"){if(o=[...u.changedTouches].find(C=>C.identifier===l.touchId),!o||o.identifier!==l.touchId)return}else o=u;if(!l.isTouched){l.startMoving&&l.isScrolling&&a.emit("touchMoveOpposite",u);return}const c=o.pageX,d=o.pageY;if(u.preventedByNestedSwiper){r.startX=c,r.startY=d;return}if(!a.allowTouchMove){u.target.matches(l.focusableElements)||(a.allowClick=!1),l.isTouched&&(Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d}),l.touchStartTime=pl());return}if(n.touchReleaseOnEdges&&!n.loop)if(a.isVertical()){if(d<r.startY&&a.translate<=a.maxTranslate()||d>r.startY&&a.translate>=a.minTranslate()){l.isTouched=!1,l.isMoved=!1;return}}else{if(i&&(c>r.startX&&-a.translate<=a.maxTranslate()||c<r.startX&&-a.translate>=a.minTranslate()))return;if(!i&&(c<r.startX&&a.translate<=a.maxTranslate()||c>r.startX&&a.translate>=a.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(l.focusableElements)&&t.activeElement!==u.target&&u.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(l.focusableElements)){l.isMoved=!0,a.allowClick=!1;return}l.allowTouchCallbacks&&a.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=c,r.currentY=d;const h=r.currentX-r.startX,f=r.currentY-r.startY;if(a.params.threshold&&Math.sqrt(h**2+f**2)<a.params.threshold)return;if(typeof l.isScrolling>"u"){let C;a.isHorizontal()&&r.currentY===r.startY||a.isVertical()&&r.currentX===r.startX?l.isScrolling=!1:h*h+f*f>=25&&(C=Math.atan2(Math.abs(f),Math.abs(h))*180/Math.PI,l.isScrolling=a.isHorizontal()?C>n.touchAngle:90-C>n.touchAngle)}if(l.isScrolling&&a.emit("touchMoveOpposite",u),typeof l.startMoving>"u"&&(r.currentX!==r.startX||r.currentY!==r.startY)&&(l.startMoving=!0),l.isScrolling||u.type==="touchmove"&&l.preventTouchMoveFromPointerMove){l.isTouched=!1;return}if(!l.startMoving)return;a.allowClick=!1,!n.cssMode&&u.cancelable&&u.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&u.stopPropagation();let y=a.isHorizontal()?h:f,E=a.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;n.oneWayMovement&&(y=Math.abs(y)*(i?1:-1),E=Math.abs(E)*(i?1:-1)),r.diff=y,y*=n.touchRatio,i&&(y=-y,E=-E);const g=a.touchesDirection;a.swipeDirection=y>0?"prev":"next",a.touchesDirection=E>0?"prev":"next";const v=a.params.loop&&!n.cssMode,m=a.touchesDirection==="next"&&a.allowSlideNext||a.touchesDirection==="prev"&&a.allowSlidePrev;if(!l.isMoved){if(v&&m&&a.loopFix({direction:a.swipeDirection}),l.startTranslate=a.getTranslate(),a.setTransition(0),a.animating){const C=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});a.wrapperEl.dispatchEvent(C)}l.allowMomentumBounce=!1,n.grabCursor&&(a.allowSlideNext===!0||a.allowSlidePrev===!0)&&a.setGrabCursor(!0),a.emit("sliderFirstMove",u)}if(new Date().getTime(),n._loopSwapReset!==!1&&l.isMoved&&l.allowThresholdMove&&g!==a.touchesDirection&&v&&m&&Math.abs(y)>=1){Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d,startTranslate:l.currentTranslate}),l.loopSwapReset=!0,l.startTranslate=l.currentTranslate;return}a.emit("sliderMove",u),l.isMoved=!0,l.currentTranslate=y+l.startTranslate;let b=!0,T=n.resistanceRatio;if(n.touchReleaseOnEdges&&(T=0),y>0?(v&&m&&l.allowThresholdMove&&l.currentTranslate>(n.centeredSlides?a.minTranslate()-a.slidesSizesGrid[a.activeIndex+1]-(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.activeIndex+1]+a.params.spaceBetween:0)-a.params.spaceBetween:a.minTranslate())&&a.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),l.currentTranslate>a.minTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.minTranslate()-1+(-a.minTranslate()+l.startTranslate+y)**T))):y<0&&(v&&m&&l.allowThresholdMove&&l.currentTranslate<(n.centeredSlides?a.maxTranslate()+a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween+(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween:0):a.maxTranslate())&&a.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:a.slides.length-(n.slidesPerView==="auto"?a.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),l.currentTranslate<a.maxTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.maxTranslate()+1-(a.maxTranslate()-l.startTranslate-y)**T))),b&&(u.preventedByNestedSwiper=!0),!a.allowSlideNext&&a.swipeDirection==="next"&&l.currentTranslate<l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&a.swipeDirection==="prev"&&l.currentTranslate>l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&!a.allowSlideNext&&(l.currentTranslate=l.startTranslate),n.threshold>0)if(Math.abs(y)>n.threshold||l.allowThresholdMove){if(!l.allowThresholdMove){l.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,l.currentTranslate=l.startTranslate,r.diff=a.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY;return}}else{l.currentTranslate=l.startTranslate;return}!n.followFinger||n.cssMode||((n.freeMode&&n.freeMode.enabled&&a.freeMode||n.watchSlidesProgress)&&(a.updateActiveIndex(),a.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&a.freeMode&&a.freeMode.onTouchMove(),a.updateProgress(l.currentTranslate),a.setTranslate(l.currentTranslate))}function ef(e){const t=this,a=t.touchEventsData;let l=e;l.originalEvent&&(l=l.originalEvent);let n;if(l.type==="touchend"||l.type==="touchcancel"){if(n=[...l.changedTouches].find(C=>C.identifier===a.touchId),!n||n.identifier!==a.touchId)return}else{if(a.touchId!==null||l.pointerId!==a.pointerId)return;n=l}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(l.type)&&!(["pointercancel","contextmenu"].includes(l.type)&&(t.browser.isSafari||t.browser.isWebView)))return;a.pointerId=null,a.touchId=null;const{params:i,touches:s,rtlTranslate:u,slidesGrid:o,enabled:c}=t;if(!c||!i.simulateTouch&&l.pointerType==="mouse")return;if(a.allowTouchCallbacks&&t.emit("touchEnd",l),a.allowTouchCallbacks=!1,!a.isTouched){a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,a.startMoving=!1;return}i.grabCursor&&a.isMoved&&a.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=pl(),h=d-a.touchStartTime;if(t.allowClick){const C=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(C&&C[0]||l.target,C),t.emit("tap click",l),h<300&&d-a.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(a.lastClickTime=pl(),ei(()=>{t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||s.diff===0&&!a.loopSwapReset||a.currentTranslate===a.startTranslate&&!a.loopSwapReset){a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;return}a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;let f;if(i.followFinger?f=u?t.translate:-t.translate:f=-a.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:f});return}const y=f>=-t.maxTranslate()&&!t.params.loop;let E=0,g=t.slidesSizesGrid[0];for(let C=0;C<o.length;C+=C<i.slidesPerGroupSkip?1:i.slidesPerGroup){const A=C<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;typeof o[C+A]<"u"?(y||f>=o[C]&&f<o[C+A])&&(E=C,g=o[C+A]-o[C]):(y||f>=o[C])&&(E=C,g=o[o.length-1]-o[o.length-2])}let v=null,m=null;i.rewind&&(t.isBeginning?m=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const b=(f-o[E])/g,T=E<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(h>i.longSwipesMs){if(!i.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?v:E+T):t.slideTo(E)),t.swipeDirection==="prev"&&(b>1-i.longSwipesRatio?t.slideTo(E+T):m!==null&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(m):t.slideTo(E))}else{if(!i.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(E+T):t.slideTo(E):(t.swipeDirection==="next"&&t.slideTo(v!==null?v:E+T),t.swipeDirection==="prev"&&t.slideTo(m!==null?m:E))}}function oi(){const e=this,{params:t,el:a}=e;if(a&&a.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:l,allowSlidePrev:n,snapGrid:r}=e,i=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=i&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!s?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!i?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=n,e.allowSlideNext=l,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function tf(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function af(){const e=this,{wrapperEl:t,rtlTranslate:a,enabled:l}=e;if(!l)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let n;const r=e.maxTranslate()-e.minTranslate();r===0?n=0:n=(e.translate-e.minTranslate())/r,n!==e.progress&&e.updateProgress(a?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function lf(e){const t=this;gl(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function nf(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const ci=(e,t)=>{const a=Ut(),{params:l,el:n,wrapperEl:r,device:i}=e,s=!!l.nested,u=t==="on"?"addEventListener":"removeEventListener",o=t;!n||typeof n=="string"||(a[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),n[u]("touchstart",e.onTouchStart,{passive:!1}),n[u]("pointerdown",e.onTouchStart,{passive:!1}),a[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),a[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),a[u]("touchend",e.onTouchEnd,{passive:!0}),a[u]("pointerup",e.onTouchEnd,{passive:!0}),a[u]("pointercancel",e.onTouchEnd,{passive:!0}),a[u]("touchcancel",e.onTouchEnd,{passive:!0}),a[u]("pointerout",e.onTouchEnd,{passive:!0}),a[u]("pointerleave",e.onTouchEnd,{passive:!0}),a[u]("contextmenu",e.onTouchEnd,{passive:!0}),(l.preventClicks||l.preventClicksPropagation)&&n[u]("click",e.onClick,!0),l.cssMode&&r[u]("scroll",e.onScroll),l.updateOnWindowResize?e[o](i.ios||i.android?"resize orientationchange observerUpdate":"resize observerUpdate",oi,!0):e[o]("observerUpdate",oi,!0),n[u]("load",e.onLoad,{capture:!0}))};function rf(){const e=this,{params:t}=e;e.onTouchStart=Jd.bind(e),e.onTouchMove=Zd.bind(e),e.onTouchEnd=ef.bind(e),e.onDocumentTouchStart=nf.bind(e),t.cssMode&&(e.onScroll=af.bind(e)),e.onClick=tf.bind(e),e.onLoad=lf.bind(e),ci(e,"on")}function sf(){ci(this,"off")}var uf={attachEvents:rf,detachEvents:sf};const di=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function of(){const e=this,{realIndex:t,initialized:a,params:l,el:n}=e,r=l.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const i=Ut(),s=l.breakpointsBase==="window"||!l.breakpointsBase?l.breakpointsBase:"container",u=["window","container"].includes(l.breakpointsBase)||!l.breakpointsBase?e.el:i.querySelector(l.breakpointsBase),o=e.getBreakpoint(r,s,u);if(!o||e.currentBreakpoint===o)return;const d=(o in r?r[o]:void 0)||e.originalParams,h=di(e,l),f=di(e,d),y=e.params.grabCursor,E=d.grabCursor,g=l.enabled;h&&!f?(n.classList.remove(`${l.containerModifierClass}grid`,`${l.containerModifierClass}grid-column`),e.emitContainerClasses()):!h&&f&&(n.classList.add(`${l.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&l.grid.fill==="column")&&n.classList.add(`${l.containerModifierClass}grid-column`),e.emitContainerClasses()),y&&!E?e.unsetGrabCursor():!y&&E&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof d[A]>"u")return;const N=l[A]&&l[A].enabled,k=d[A]&&d[A].enabled;N&&!k&&e[A].disable(),!N&&k&&e[A].enable()});const v=d.direction&&d.direction!==l.direction,m=l.loop&&(d.slidesPerView!==l.slidesPerView||v),b=l.loop;v&&a&&e.changeDirection(),nt(e.params,d);const T=e.params.enabled,C=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!T?e.disable():!g&&T&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",d),a&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&C?(e.loopCreate(t),e.updateSlides()):b&&!C&&e.loopDestroy()),e.emit("breakpoint",d)}function cf(e,t="window",a){if(!e||t==="container"&&!a)return;let l=!1;const n=Xe(),r=t==="window"?n.innerHeight:a.clientHeight,i=Object.keys(e).map(s=>{if(typeof s=="string"&&s.indexOf("@")===0){const u=parseFloat(s.substr(1));return{value:r*u,point:s}}return{value:s,point:s}});i.sort((s,u)=>parseInt(s.value,10)-parseInt(u.value,10));for(let s=0;s<i.length;s+=1){const{point:u,value:o}=i[s];t==="window"?n.matchMedia(`(min-width: ${o}px)`).matches&&(l=u):o<=a.clientWidth&&(l=u)}return l||"max"}var df={setBreakpoint:of,getBreakpoint:cf};function ff(e,t){const a=[];return e.forEach(l=>{typeof l=="object"?Object.keys(l).forEach(n=>{l[n]&&a.push(t+n)}):typeof l=="string"&&a.push(t+l)}),a}function pf(){const e=this,{classNames:t,params:a,rtl:l,el:n,device:r}=e,i=ff(["initialized",a.direction,{"free-mode":e.params.freeMode&&a.freeMode.enabled},{autoheight:a.autoHeight},{rtl:l},{grid:a.grid&&a.grid.rows>1},{"grid-column":a.grid&&a.grid.rows>1&&a.grid.fill==="column"},{android:r.android},{ios:r.ios},{"css-mode":a.cssMode},{centered:a.cssMode&&a.centeredSlides},{"watch-progress":a.watchSlidesProgress}],a.containerModifierClass);t.push(...i),n.classList.add(...t),e.emitContainerClasses()}function hf(){const e=this,{el:t,classNames:a}=e;!t||typeof t=="string"||(t.classList.remove(...a),e.emitContainerClasses())}var bf={addClasses:pf,removeClasses:hf};function mf(){const e=this,{isLocked:t,params:a}=e,{slidesOffsetBefore:l}=a;if(l){const n=e.slides.length-1,r=e.slidesGrid[n]+e.slidesSizesGrid[n]+l*2;e.isLocked=e.size>r}else e.isLocked=e.snapGrid.length===1;a.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),a.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var vf={checkOverflow:mf},un={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function gf(e,t){return function(l={}){const n=Object.keys(l)[0],r=l[n];if(typeof r!="object"||r===null){nt(t,l);return}if(e[n]===!0&&(e[n]={enabled:!0}),n==="navigation"&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),!(n in e&&"enabled"in r)){nt(t,l);return}typeof e[n]=="object"&&!("enabled"in e[n])&&(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),nt(t,l)}}const on={eventsEmitter:hd,update:Ad,translate:Ld,transition:Md,slide:zd,loop:Wd,grabCursor:Xd,events:uf,breakpoints:df,checkOverflow:vf,classes:bf},cn={};let dn=class _t{constructor(...t){let a,l;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?l=t[0]:[a,l]=t,l||(l={}),l=nt({},l),a&&!l.el&&(l.el=a);const n=Ut();if(l.el&&typeof l.el=="string"&&n.querySelectorAll(l.el).length>1){const u=[];return n.querySelectorAll(l.el).forEach(o=>{const c=nt({},l,{el:o});u.push(new _t(c))}),u}const r=this;r.__swiper__=!0,r.support=li(),r.device=ni({userAgent:l.userAgent}),r.browser=ri(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],l.modules&&Array.isArray(l.modules)&&r.modules.push(...l.modules);const i={};r.modules.forEach(u=>{u({params:l,swiper:r,extendParams:gf(l,i),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const s=nt({},un,i);return r.params=nt({},s,cn,l),r.originalParams=nt({},r.params),r.passedParams=nt({},l),r.params&&r.params.on&&Object.keys(r.params.on).forEach(u=>{r.on(u,r.params.on[u])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:a,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:a,params:l}=this,n=ht(a,`.${l.slideClass}, swiper-slide`),r=vl(n[0]);return vl(t)-r}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(a=>a.getAttribute("data-swiper-slide-index")*1===t))}getSlideIndexWhenGrid(t){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?t=Math.floor(t/this.params.grid.rows):this.params.grid.fill==="row"&&(t=t%Math.ceil(this.slides.length/this.params.grid.rows))),t}recalcSlides(){const t=this,{slidesEl:a,params:l}=t;t.slides=ht(a,`.${l.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,a){const l=this;t=Math.min(Math.max(t,0),1);const n=l.minTranslate(),i=(l.maxTranslate()-n)*t+n;l.translateTo(i,typeof a>"u"?0:a),l.updateActiveIndex(),l.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=t.el.className.split(" ").filter(l=>l.indexOf("swiper")===0||l.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",a.join(" "))}getSlideClasses(t){const a=this;return a.destroyed?"":t.className.split(" ").filter(l=>l.indexOf("swiper-slide")===0||l.indexOf(a.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=[];t.slides.forEach(l=>{const n=t.getSlideClasses(l);a.push({slideEl:l,classNames:n}),t.emit("_slideClass",l,n)}),t.emit("_slideClasses",a)}slidesPerViewDynamic(t="current",a=!1){const l=this,{params:n,slides:r,slidesGrid:i,slidesSizesGrid:s,size:u,activeIndex:o}=l;let c=1;if(typeof n.slidesPerView=="number")return n.slidesPerView;if(n.centeredSlides){let d=r[o]?Math.ceil(r[o].swiperSlideSize):0,h;for(let f=o+1;f<r.length;f+=1)r[f]&&!h&&(d+=Math.ceil(r[f].swiperSlideSize),c+=1,d>u&&(h=!0));for(let f=o-1;f>=0;f-=1)r[f]&&!h&&(d+=r[f].swiperSlideSize,c+=1,d>u&&(h=!0))}else if(t==="current")for(let d=o+1;d<r.length;d+=1)(a?i[d]+s[d]-i[o]<u:i[d]-i[o]<u)&&(c+=1);else for(let d=o-1;d>=0;d-=1)i[o]-i[d]<u&&(c+=1);return c}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:a,params:l}=t;l.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(i=>{i.complete&&gl(t,i)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function n(){const i=t.rtlTranslate?t.translate*-1:t.translate,s=Math.min(Math.max(i,t.maxTranslate()),t.minTranslate());t.setTranslate(s),t.updateActiveIndex(),t.updateSlidesClasses()}let r;if(l.freeMode&&l.freeMode.enabled&&!l.cssMode)n(),l.autoHeight&&t.updateAutoHeight();else{if((l.slidesPerView==="auto"||l.slidesPerView>1)&&t.isEnd&&!l.centeredSlides){const i=t.virtual&&l.virtual.enabled?t.virtual.slides:t.slides;r=t.slideTo(i.length-1,0,!1,!0)}else r=t.slideTo(t.activeIndex,0,!1,!0);r||n()}l.watchOverflow&&a!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,a=!0){const l=this,n=l.params.direction;return t||(t=n==="horizontal"?"vertical":"horizontal"),t===n||t!=="horizontal"&&t!=="vertical"||(l.el.classList.remove(`${l.params.containerModifierClass}${n}`),l.el.classList.add(`${l.params.containerModifierClass}${t}`),l.emitContainerClasses(),l.params.direction=t,l.slides.forEach(r=>{t==="vertical"?r.style.width="":r.style.height=""}),l.emit("changeDirection"),a&&l.update()),l}changeLanguageDirection(t){const a=this;a.rtl&&t==="rtl"||!a.rtl&&t==="ltr"||(a.rtl=t==="rtl",a.rtlTranslate=a.params.direction==="horizontal"&&a.rtl,a.rtl?(a.el.classList.add(`${a.params.containerModifierClass}rtl`),a.el.dir="rtl"):(a.el.classList.remove(`${a.params.containerModifierClass}rtl`),a.el.dir="ltr"),a.update())}mount(t){const a=this;if(a.mounted)return!0;let l=t||a.params.el;if(typeof l=="string"&&(l=document.querySelector(l)),!l)return!1;l.swiper=a,l.parentNode&&l.parentNode.host&&l.parentNode.host.nodeName===a.params.swiperElementNodeName.toUpperCase()&&(a.isElement=!0);const n=()=>`.${(a.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=l&&l.shadowRoot&&l.shadowRoot.querySelector?l.shadowRoot.querySelector(n()):ht(l,n())[0];return!i&&a.params.createElements&&(i=ml("div",a.params.wrapperClass),l.append(i),ht(l,`.${a.params.slideClass}`).forEach(s=>{i.append(s)})),Object.assign(a,{el:l,wrapperEl:i,slidesEl:a.isElement&&!l.parentNode.host.slideSlots?l.parentNode.host:i,hostEl:a.isElement?l.parentNode.host:l,mounted:!0,rtl:l.dir.toLowerCase()==="rtl"||Nt(l,"direction")==="rtl",rtlTranslate:a.params.direction==="horizontal"&&(l.dir.toLowerCase()==="rtl"||Nt(l,"direction")==="rtl"),wrongRTL:Nt(i,"display")==="-webkit-box"}),!0}init(t){const a=this;if(a.initialized||a.mount(t)===!1)return a;a.emit("beforeInit"),a.params.breakpoints&&a.setBreakpoint(),a.addClasses(),a.updateSize(),a.updateSlides(),a.params.watchOverflow&&a.checkOverflow(),a.params.grabCursor&&a.enabled&&a.setGrabCursor(),a.params.loop&&a.virtual&&a.params.virtual.enabled?a.slideTo(a.params.initialSlide+a.virtual.slidesBefore,0,a.params.runCallbacksOnInit,!1,!0):a.slideTo(a.params.initialSlide,0,a.params.runCallbacksOnInit,!1,!0),a.params.loop&&a.loopCreate(void 0,!0),a.attachEvents();const n=[...a.el.querySelectorAll('[loading="lazy"]')];return a.isElement&&n.push(...a.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(r=>{r.complete?gl(a,r):r.addEventListener("load",i=>{gl(a,i.target)})}),sn(a),a.initialized=!0,sn(a),a.emit("init"),a.emit("afterInit"),a}destroy(t=!0,a=!0){const l=this,{params:n,el:r,wrapperEl:i,slides:s}=l;return typeof l.params>"u"||l.destroyed||(l.emit("beforeDestroy"),l.initialized=!1,l.detachEvents(),n.loop&&l.loopDestroy(),a&&(l.removeClasses(),r&&typeof r!="string"&&r.removeAttribute("style"),i&&i.removeAttribute("style"),s&&s.length&&s.forEach(u=>{u.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),u.removeAttribute("style"),u.removeAttribute("data-swiper-slide-index")})),l.emit("destroy"),Object.keys(l.eventsListeners).forEach(u=>{l.off(u)}),t!==!1&&(l.el&&typeof l.el!="string"&&(l.el.swiper=null),td(l)),l.destroyed=!0),null}static extendDefaults(t){nt(cn,t)}static get extendedDefaults(){return cn}static get defaults(){return un}static installModule(t){_t.prototype.__modules__||(_t.prototype.__modules__=[]);const a=_t.prototype.__modules__;typeof t=="function"&&a.indexOf(t)<0&&a.push(t)}static use(t){return Array.isArray(t)?(t.forEach(a=>_t.installModule(a)),_t):(_t.installModule(t),_t)}};Object.keys(on).forEach(e=>{Object.keys(on[e]).forEach(t=>{dn.prototype[t]=on[e][t]})}),dn.use([fd,pd]);const fi=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function qt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function na(e,t){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:qt(t[l])&&qt(e[l])&&Object.keys(t[l]).length>0?t[l].__swiper__?e[l]=t[l]:na(e[l],t[l]):e[l]=t[l]})}function pi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function hi(e={}){return e.pagination&&typeof e.pagination.el>"u"}function bi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function mi(e=""){const t=e.split(" ").map(l=>l.trim()).filter(l=>!!l),a=[];return t.forEach(l=>{a.indexOf(l)<0&&a.push(l)}),a.join(" ")}function Ef(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function yf({swiper:e,slides:t,passedParams:a,changedParams:l,nextEl:n,prevEl:r,scrollbarEl:i,paginationEl:s}){const u=l.filter(k=>k!=="children"&&k!=="direction"&&k!=="wrapperClass"),{params:o,pagination:c,navigation:d,scrollbar:h,virtual:f,thumbs:y}=e;let E,g,v,m,b,T,C,A;l.includes("thumbs")&&a.thumbs&&a.thumbs.swiper&&!a.thumbs.swiper.destroyed&&o.thumbs&&(!o.thumbs.swiper||o.thumbs.swiper.destroyed)&&(E=!0),l.includes("controller")&&a.controller&&a.controller.control&&o.controller&&!o.controller.control&&(g=!0),l.includes("pagination")&&a.pagination&&(a.pagination.el||s)&&(o.pagination||o.pagination===!1)&&c&&!c.el&&(v=!0),l.includes("scrollbar")&&a.scrollbar&&(a.scrollbar.el||i)&&(o.scrollbar||o.scrollbar===!1)&&h&&!h.el&&(m=!0),l.includes("navigation")&&a.navigation&&(a.navigation.prevEl||r)&&(a.navigation.nextEl||n)&&(o.navigation||o.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(b=!0);const N=k=>{e[k]&&(e[k].destroy(),k==="navigation"?(e.isElement&&(e[k].prevEl.remove(),e[k].nextEl.remove()),o[k].prevEl=void 0,o[k].nextEl=void 0,e[k].prevEl=void 0,e[k].nextEl=void 0):(e.isElement&&e[k].el.remove(),o[k].el=void 0,e[k].el=void 0))};l.includes("loop")&&e.isElement&&(o.loop&&!a.loop?T=!0:!o.loop&&a.loop?C=!0:A=!0),u.forEach(k=>{if(qt(o[k])&&qt(a[k]))Object.assign(o[k],a[k]),(k==="navigation"||k==="pagination"||k==="scrollbar")&&"enabled"in a[k]&&!a[k].enabled&&N(k);else{const S=a[k];(S===!0||S===!1)&&(k==="navigation"||k==="pagination"||k==="scrollbar")?S===!1&&N(k):o[k]=a[k]}}),u.includes("controller")&&!g&&e.controller&&e.controller.control&&o.controller&&o.controller.control&&(e.controller.control=o.controller.control),l.includes("children")&&t&&f&&o.virtual.enabled?(f.slides=t,f.update(!0)):l.includes("virtual")&&f&&o.virtual.enabled&&(t&&(f.slides=t),f.update(!0)),l.includes("children")&&t&&o.loop&&(A=!0),E&&y.init()&&y.update(!0),g&&(e.controller.control=o.controller.control),v&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-pagination"),s.part.add("pagination"),e.el.appendChild(s)),s&&(o.pagination.el=s),c.init(),c.render(),c.update()),m&&(e.isElement&&(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-scrollbar"),i.part.add("scrollbar"),e.el.appendChild(i)),i&&(o.scrollbar.el=i),h.init(),h.updateSize(),h.setTranslate()),b&&(e.isElement&&((!n||typeof n=="string")&&(n=document.createElement("div"),n.classList.add("swiper-button-next"),Ta(n,e.navigation.arrowSvg),n.part.add("button-next"),e.el.appendChild(n)),(!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-prev"),Ta(r,e.navigation.arrowSvg),r.part.add("button-prev"),e.el.appendChild(r))),n&&(o.navigation.nextEl=n),r&&(o.navigation.prevEl=r),d.init(),d.update()),l.includes("allowSlideNext")&&(e.allowSlideNext=a.allowSlideNext),l.includes("allowSlidePrev")&&(e.allowSlidePrev=a.allowSlidePrev),l.includes("direction")&&e.changeDirection(a.direction,!1),(T||A)&&e.loopDestroy(),(C||A)&&e.loopCreate(),e.update()}function Tf(e={},t=!0){const a={on:{}},l={},n={};na(a,un),a._emitClasses=!0,a.init=!1;const r={},i=fi.map(u=>u.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(u=>{typeof e[u]>"u"||(i.indexOf(u)>=0?qt(e[u])?(a[u]={},n[u]={},na(a[u],e[u]),na(n[u],e[u])):(a[u]=e[u],n[u]=e[u]):u.search(/on[A-Z]/)===0&&typeof e[u]=="function"?t?l[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:a.on[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:r[u]=e[u])}),["navigation","pagination","scrollbar"].forEach(u=>{a[u]===!0&&(a[u]={}),a[u]===!1&&delete a[u]}),{params:a,passedParams:n,rest:r,events:l}}function xf({el:e,nextEl:t,prevEl:a,paginationEl:l,scrollbarEl:n,swiper:r},i){pi(i)&&t&&a&&(r.params.navigation.nextEl=t,r.originalParams.navigation.nextEl=t,r.params.navigation.prevEl=a,r.originalParams.navigation.prevEl=a),hi(i)&&l&&(r.params.pagination.el=l,r.originalParams.pagination.el=l),bi(i)&&n&&(r.params.scrollbar.el=n,r.originalParams.scrollbar.el=n),r.init(e)}function Cf(e,t,a,l,n){const r=[];if(!t)return r;const i=u=>{r.indexOf(u)<0&&r.push(u)};if(a&&l){const u=l.map(n),o=a.map(n);u.join("")!==o.join("")&&i("children"),l.length!==a.length&&i("children")}return fi.filter(u=>u[0]==="_").map(u=>u.replace(/_/,"")).forEach(u=>{if(u in e&&u in t)if(qt(e[u])&&qt(t[u])){const o=Object.keys(e[u]),c=Object.keys(t[u]);o.length!==c.length?i(u):(o.forEach(d=>{e[u][d]!==t[u][d]&&i(u)}),c.forEach(d=>{e[u][d]!==t[u][d]&&i(u)}))}else e[u]!==t[u]&&i(u)}),r}const Sf=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},El.apply(this,arguments)}function vi(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function gi(e){const t=[];return w.Children.toArray(e).forEach(a=>{vi(a)?t.push(a):a.props&&a.props.children&&gi(a.props.children).forEach(l=>t.push(l))}),t}function Af(e){const t=[],a={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return w.Children.toArray(e).forEach(l=>{if(vi(l))t.push(l);else if(l.props&&l.props.slot&&a[l.props.slot])a[l.props.slot].push(l);else if(l.props&&l.props.children){const n=gi(l.props.children);n.length>0?n.forEach(r=>t.push(r)):a["container-end"].push(l)}else a["container-end"].push(l)}),{slides:t,slots:a}}function wf(e,t,a){if(!a)return null;const l=c=>{let d=c;return c<0?d=t.length+c:d>=t.length&&(d=d-t.length),d},n=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${a.offset}px`}:{top:`${a.offset}px`},{from:r,to:i}=a,s=e.params.loop?-t.length:0,u=e.params.loop?t.length*2:t.length,o=[];for(let c=s;c<u;c+=1)c>=r&&c<=i&&o.push(t[l(c)]);return o.map((c,d)=>w.cloneElement(c,{swiper:e,style:n,key:c.props.virtualIndex||c.key||`slide-${d}`}))}function xa(e,t){return typeof window>"u"?w.useEffect(e,t):w.useLayoutEffect(e,t)}const Ei=w.createContext(null),kf=w.createContext(null),yi=w.forwardRef(({className:e,tag:t="div",wrapperTag:a="div",children:l,onSwiper:n,...r}={},i)=>{let s=!1;const[u,o]=w.useState("swiper"),[c,d]=w.useState(null),[h,f]=w.useState(!1),y=w.useRef(!1),E=w.useRef(null),g=w.useRef(null),v=w.useRef(null),m=w.useRef(null),b=w.useRef(null),T=w.useRef(null),C=w.useRef(null),A=w.useRef(null),{params:N,passedParams:k,rest:S,events:L}=Tf(r),{slides:D,slots:F}=Af(l),M=()=>{f(!h)};Object.assign(N.on,{_containerClasses(U,V){o(V)}});const I=()=>{Object.assign(N.on,L),s=!0;const U={...N};if(delete U.wrapperClass,g.current=new dn(U),g.current.virtual&&g.current.params.virtual.enabled){g.current.virtual.slides=D;const V={cache:!1,slides:D,renderExternal:d,renderExternalUpdate:!1};na(g.current.params.virtual,V),na(g.current.originalParams.virtual,V)}};E.current||I(),g.current&&g.current.on("_beforeBreakpoint",M);const x=()=>{s||!L||!g.current||Object.keys(L).forEach(U=>{g.current.on(U,L[U])})},P=()=>{!L||!g.current||Object.keys(L).forEach(U=>{g.current.off(U,L[U])})};w.useEffect(()=>()=>{g.current&&g.current.off("_beforeBreakpoint",M)}),w.useEffect(()=>{!y.current&&g.current&&(g.current.emitSlidesClasses(),y.current=!0)}),xa(()=>{if(i&&(i.current=E.current),!!E.current)return g.current.destroyed&&I(),xf({el:E.current,nextEl:b.current,prevEl:T.current,paginationEl:C.current,scrollbarEl:A.current,swiper:g.current},N),n&&!g.current.destroyed&&n(g.current),()=>{g.current&&!g.current.destroyed&&g.current.destroy(!0,!1)}},[]),xa(()=>{x();const U=Cf(k,v.current,D,m.current,V=>V.key);return v.current=k,m.current=D,U.length&&g.current&&!g.current.destroyed&&yf({swiper:g.current,slides:D,passedParams:k,changedParams:U,nextEl:b.current,prevEl:T.current,scrollbarEl:A.current,paginationEl:C.current}),()=>{P()}}),xa(()=>{Sf(g.current)},[c]);function z(){return N.virtual?wf(g.current,D,c):D.map((U,V)=>w.cloneElement(U,{swiper:g.current,swiperSlideIndex:V}))}return w.createElement(t,El({ref:E,className:mi(`${u}${e?` ${e}`:""}`)},S),w.createElement(kf.Provider,{value:g.current},F["container-start"],w.createElement(a,{className:Ef(N.wrapperClass)},F["wrapper-start"],z(),F["wrapper-end"]),pi(N)&&w.createElement(w.Fragment,null,w.createElement("div",{ref:T,className:"swiper-button-prev"}),w.createElement("div",{ref:b,className:"swiper-button-next"})),bi(N)&&w.createElement("div",{ref:A,className:"swiper-scrollbar"}),hi(N)&&w.createElement("div",{ref:C,className:"swiper-pagination"}),F["container-end"]))});yi.displayName="Swiper";const Ti=w.forwardRef(({tag:e="div",children:t,className:a="",swiper:l,zoom:n,lazy:r,virtualIndex:i,swiperSlideIndex:s,...u}={},o)=>{const c=w.useRef(null),[d,h]=w.useState("swiper-slide"),[f,y]=w.useState(!1);function E(b,T,C){T===c.current&&h(C)}xa(()=>{if(typeof s<"u"&&(c.current.swiperSlideIndex=s),o&&(o.current=c.current),!(!c.current||!l)){if(l.destroyed){d!=="swiper-slide"&&h("swiper-slide");return}return l.on("_slideClass",E),()=>{l&&l.off("_slideClass",E)}}}),xa(()=>{l&&c.current&&!l.destroyed&&h(l.getSlideClasses(c.current))},[l]);const g={isActive:d.indexOf("swiper-slide-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0},v=()=>typeof t=="function"?t(g):t,m=()=>{y(!0)};return w.createElement(e,El({ref:c,className:mi(`${d}${a?` ${a}`:""}`),"data-swiper-slide-index":i,onLoad:m},u),n&&w.createElement(Ei.Provider,{value:g},w.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof n=="number"?n:void 0},v(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}}))),!n&&w.createElement(Ei.Provider,{value:g},v(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}})))});Ti.displayName="SwiperSlide";function xi(e,t,a,l){return e.params.createElements&&Object.keys(l).forEach(n=>{if(!a[n]&&a.auto===!0){let r=ht(e.el,`.${l[n]}`)[0];r||(r=ml("div",l[n]),r.className=l[n],e.el.append(r)),a[n]=r,t[n]=r}}),a}const Ci='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function _f({swiper:e,extendParams:t,on:a,emit:l}){t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:Ci};function n(f){let y;return f&&typeof f=="string"&&e.isElement&&(y=e.el.querySelector(f)||e.hostEl.querySelector(f),y)?y:(f&&(typeof f=="string"&&(y=[...document.querySelectorAll(f)]),e.params.uniqueNavElements&&typeof f=="string"&&y&&y.length>1&&e.el.querySelectorAll(f).length===1?y=e.el.querySelector(f):y&&y.length===1&&(y=y[0])),f&&!y?f:y)}function r(f,y){const E=e.params.navigation;f=Ue(f),f.forEach(g=>{g&&(g.classList[y?"add":"remove"](...E.disabledClass.split(" ")),g.tagName==="BUTTON"&&(g.disabled=y),e.params.watchOverflow&&e.enabled&&g.classList[e.isLocked?"add":"remove"](E.lockClass))})}function i(){const{nextEl:f,prevEl:y}=e.navigation;if(e.params.loop){r(y,!1),r(f,!1);return}r(y,e.isBeginning&&!e.params.rewind),r(f,e.isEnd&&!e.params.rewind)}function s(f){f.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),l("navigationPrev"))}function u(f){f.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),l("navigationNext"))}function o(){const f=e.params.navigation;if(e.params.navigation=xi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(f.nextEl||f.prevEl))return;let y=n(f.nextEl),E=n(f.prevEl);Object.assign(e.navigation,{nextEl:y,prevEl:E}),y=Ue(y),E=Ue(E);const g=(v,m)=>{if(v){if(f.addIcons&&v.matches(".swiper-button-next,.swiper-button-prev")&&!v.querySelector("svg")){const b=document.createElement("div");Ta(b,Ci),v.appendChild(b.querySelector("svg")),b.remove()}v.addEventListener("click",m==="next"?u:s)}!e.enabled&&v&&v.classList.add(...f.lockClass.split(" "))};y.forEach(v=>g(v,"next")),E.forEach(v=>g(v,"prev"))}function c(){let{nextEl:f,prevEl:y}=e.navigation;f=Ue(f),y=Ue(y);const E=(g,v)=>{g.removeEventListener("click",v==="next"?u:s),g.classList.remove(...e.params.navigation.disabledClass.split(" "))};f.forEach(g=>E(g,"next")),y.forEach(g=>E(g,"prev"))}a("init",()=>{e.params.navigation.enabled===!1?h():(o(),i())}),a("toEdge fromEdge lock unlock",()=>{i()}),a("destroy",()=>{c()}),a("enable disable",()=>{let{nextEl:f,prevEl:y}=e.navigation;if(f=Ue(f),y=Ue(y),e.enabled){i();return}[...f,...y].filter(E=>!!E).forEach(E=>E.classList.add(e.params.navigation.lockClass))}),a("click",(f,y)=>{let{nextEl:E,prevEl:g}=e.navigation;E=Ue(E),g=Ue(g);const v=y.target;let m=g.includes(v)||E.includes(v);if(e.isElement&&!m){const b=y.path||y.composedPath&&y.composedPath();b&&(m=b.find(T=>E.includes(T)||g.includes(T)))}if(e.params.navigation.hideOnClick&&!m){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===v||e.pagination.el.contains(v)))return;let b;E.length?b=E[0].classList.contains(e.params.navigation.hiddenClass):g.length&&(b=g[0].classList.contains(e.params.navigation.hiddenClass)),l(b===!0?"navigationShow":"navigationHide"),[...E,...g].filter(T=>!!T).forEach(T=>T.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),o(),i()},h=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),c()};Object.assign(e.navigation,{enable:d,disable:h,update:i,init:o,destroy:c})}function Ca(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Nf({swiper:e,extendParams:t,on:a,emit:l}){const n="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:v=>v,formatFractionTotal:v=>v,bulletClass:`${n}-bullet`,bulletActiveClass:`${n}-bullet-active`,modifierClass:`${n}-`,currentClass:`${n}-current`,totalClass:`${n}-total`,hiddenClass:`${n}-hidden`,progressbarFillClass:`${n}-progressbar-fill`,progressbarOppositeClass:`${n}-progressbar-opposite`,clickableClass:`${n}-clickable`,lockClass:`${n}-lock`,horizontalClass:`${n}-horizontal`,verticalClass:`${n}-vertical`,paginationDisabledClass:`${n}-disabled`}}),e.pagination={el:null,bullets:[]};let r,i=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function u(v,m){const{bulletActiveClass:b}=e.params.pagination;v&&(v=v[`${m==="prev"?"previous":"next"}ElementSibling`],v&&(v.classList.add(`${b}-${m}`),v=v[`${m==="prev"?"previous":"next"}ElementSibling`],v&&v.classList.add(`${b}-${m}-${m}`)))}function o(v,m,b){if(v=v%b,m=m%b,m===v+1)return"next";if(m===v-1)return"previous"}function c(v){const m=v.target.closest(Ca(e.params.pagination.bulletClass));if(!m)return;v.preventDefault();const b=vl(m)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===b)return;const T=o(e.realIndex,b,e.slides.length);T==="next"?e.slideNext():T==="previous"?e.slidePrev():e.slideToLoop(b)}else e.slideTo(b)}function d(){const v=e.rtl,m=e.params.pagination;if(s())return;let b=e.pagination.el;b=Ue(b);let T,C;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,N=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(C=e.previousRealIndex||0,T=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(T=e.snapIndex,C=e.previousSnapIndex):(C=e.previousIndex||0,T=e.activeIndex||0),m.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const k=e.pagination.bullets;let S,L,D;if(m.dynamicBullets&&(r=en(k[0],e.isHorizontal()?"width":"height"),b.forEach(F=>{F.style[e.isHorizontal()?"width":"height"]=`${r*(m.dynamicMainBullets+4)}px`}),m.dynamicMainBullets>1&&C!==void 0&&(i+=T-(C||0),i>m.dynamicMainBullets-1?i=m.dynamicMainBullets-1:i<0&&(i=0)),S=Math.max(T-i,0),L=S+(Math.min(k.length,m.dynamicMainBullets)-1),D=(L+S)/2),k.forEach(F=>{const M=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(I=>`${m.bulletActiveClass}${I}`)].map(I=>typeof I=="string"&&I.includes(" ")?I.split(" "):I).flat();F.classList.remove(...M)}),b.length>1)k.forEach(F=>{const M=vl(F);M===T?F.classList.add(...m.bulletActiveClass.split(" ")):e.isElement&&F.setAttribute("part","bullet"),m.dynamicBullets&&(M>=S&&M<=L&&F.classList.add(...`${m.bulletActiveClass}-main`.split(" ")),M===S&&u(F,"prev"),M===L&&u(F,"next"))});else{const F=k[T];if(F&&F.classList.add(...m.bulletActiveClass.split(" ")),e.isElement&&k.forEach((M,I)=>{M.setAttribute("part",I===T?"bullet-active":"bullet")}),m.dynamicBullets){const M=k[S],I=k[L];for(let x=S;x<=L;x+=1)k[x]&&k[x].classList.add(...`${m.bulletActiveClass}-main`.split(" "));u(M,"prev"),u(I,"next")}}if(m.dynamicBullets){const F=Math.min(k.length,m.dynamicMainBullets+4),M=(r*F-r)/2-D*r,I=v?"right":"left";k.forEach(x=>{x.style[e.isHorizontal()?I:"top"]=`${M}px`})}}b.forEach((k,S)=>{if(m.type==="fraction"&&(k.querySelectorAll(Ca(m.currentClass)).forEach(L=>{L.textContent=m.formatFractionCurrent(T+1)}),k.querySelectorAll(Ca(m.totalClass)).forEach(L=>{L.textContent=m.formatFractionTotal(N)})),m.type==="progressbar"){let L;m.progressbarOpposite?L=e.isHorizontal()?"vertical":"horizontal":L=e.isHorizontal()?"horizontal":"vertical";const D=(T+1)/N;let F=1,M=1;L==="horizontal"?F=D:M=D,k.querySelectorAll(Ca(m.progressbarFillClass)).forEach(I=>{I.style.transform=`translate3d(0,0,0) scaleX(${F}) scaleY(${M})`,I.style.transitionDuration=`${e.params.speed}ms`})}m.type==="custom"&&m.renderCustom?(Ta(k,m.renderCustom(e,T+1,N)),S===0&&l("paginationRender",k)):(S===0&&l("paginationRender",k),l("paginationUpdate",k)),e.params.watchOverflow&&e.enabled&&k.classList[e.isLocked?"add":"remove"](m.lockClass)})}function h(){const v=e.params.pagination;if(s())return;const m=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let b=e.pagination.el;b=Ue(b);let T="";if(v.type==="bullets"){let C=e.params.loop?Math.ceil(m/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&C>m&&(C=m);for(let A=0;A<C;A+=1)v.renderBullet?T+=v.renderBullet.call(e,A,v.bulletClass):T+=`<${v.bulletElement} ${e.isElement?'part="bullet"':""} class="${v.bulletClass}"></${v.bulletElement}>`}v.type==="fraction"&&(v.renderFraction?T=v.renderFraction.call(e,v.currentClass,v.totalClass):T=`<span class="${v.currentClass}"></span> / <span class="${v.totalClass}"></span>`),v.type==="progressbar"&&(v.renderProgressbar?T=v.renderProgressbar.call(e,v.progressbarFillClass):T=`<span class="${v.progressbarFillClass}"></span>`),e.pagination.bullets=[],b.forEach(C=>{v.type!=="custom"&&Ta(C,T||""),v.type==="bullets"&&e.pagination.bullets.push(...C.querySelectorAll(Ca(v.bulletClass)))}),v.type!=="custom"&&l("paginationRender",b[0])}function f(){e.params.pagination=xi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const v=e.params.pagination;if(!v.el)return;let m;typeof v.el=="string"&&e.isElement&&(m=e.el.querySelector(v.el)),!m&&typeof v.el=="string"&&(m=[...document.querySelectorAll(v.el)]),m||(m=v.el),!(!m||m.length===0)&&(e.params.uniqueNavElements&&typeof v.el=="string"&&Array.isArray(m)&&m.length>1&&(m=[...e.el.querySelectorAll(v.el)],m.length>1&&(m=m.find(b=>ai(b,".swiper")[0]===e.el))),Array.isArray(m)&&m.length===1&&(m=m[0]),Object.assign(e.pagination,{el:m}),m=Ue(m),m.forEach(b=>{v.type==="bullets"&&v.clickable&&b.classList.add(...(v.clickableClass||"").split(" ")),b.classList.add(v.modifierClass+v.type),b.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.type==="bullets"&&v.dynamicBullets&&(b.classList.add(`${v.modifierClass}${v.type}-dynamic`),i=0,v.dynamicMainBullets<1&&(v.dynamicMainBullets=1)),v.type==="progressbar"&&v.progressbarOpposite&&b.classList.add(v.progressbarOppositeClass),v.clickable&&b.addEventListener("click",c),e.enabled||b.classList.add(v.lockClass)}))}function y(){const v=e.params.pagination;if(s())return;let m=e.pagination.el;m&&(m=Ue(m),m.forEach(b=>{b.classList.remove(v.hiddenClass),b.classList.remove(v.modifierClass+v.type),b.classList.remove(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.clickable&&(b.classList.remove(...(v.clickableClass||"").split(" ")),b.removeEventListener("click",c))})),e.pagination.bullets&&e.pagination.bullets.forEach(b=>b.classList.remove(...v.bulletActiveClass.split(" ")))}a("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const v=e.params.pagination;let{el:m}=e.pagination;m=Ue(m),m.forEach(b=>{b.classList.remove(v.horizontalClass,v.verticalClass),b.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass)})}),a("init",()=>{e.params.pagination.enabled===!1?g():(f(),h(),d())}),a("activeIndexChange",()=>{typeof e.snapIndex>"u"&&d()}),a("snapIndexChange",()=>{d()}),a("snapGridLengthChange",()=>{h(),d()}),a("destroy",()=>{y()}),a("enable disable",()=>{let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),a("lock unlock",()=>{d()}),a("click",(v,m)=>{const b=m.target,T=Ue(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&T&&T.length>0&&!b.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&b===e.navigation.nextEl||e.navigation.prevEl&&b===e.navigation.prevEl))return;const C=T[0].classList.contains(e.params.pagination.hiddenClass);l(C===!0?"paginationShow":"paginationHide"),T.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const E=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList.remove(e.params.pagination.paginationDisabledClass))),f(),h(),d()},g=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList.add(e.params.pagination.paginationDisabledClass))),y()};Object.assign(e.pagination,{enable:E,disable:g,render:h,update:d,init:f,destroy:y})}function uT(){}function oT(){}function Si(e){const t=[],a=String(e||"");let l=a.indexOf(","),n=0,r=!1;for(;!r;){l===-1&&(l=a.length,r=!0);const i=a.slice(n,l).trim();(i||!r)&&t.push(i),n=l+1,l=a.indexOf(",",n)}return t}function Ai(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const If=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Of={};function wi(e,t){return(Of.jsx?Lf:If).test(e)}const Df=/[ \t\n\f\r]/g;function Pf(e){return typeof e=="object"?e.type==="text"?ki(e.value):!1:ki(e)}function ki(e){return e.replace(Df,"")===""}class Sa{constructor(t,a,l){this.normal=a,this.property=t,l&&(this.space=l)}}Sa.prototype.normal={},Sa.prototype.property={},Sa.prototype.space=void 0;function _i(e,t){const a={},l={};for(const n of e)Object.assign(a,n.property),Object.assign(l,n.normal);return new Sa(a,l,t)}function Aa(e){return e.toLowerCase()}class et{constructor(t,a){this.attribute=a,this.property=t}}et.prototype.attribute="",et.prototype.booleanish=!1,et.prototype.boolean=!1,et.prototype.commaOrSpaceSeparated=!1,et.prototype.commaSeparated=!1,et.prototype.defined=!1,et.prototype.mustUseProperty=!1,et.prototype.number=!1,et.prototype.overloadedBoolean=!1,et.prototype.property="",et.prototype.spaceSeparated=!1,et.prototype.space=void 0;let Mf=0;const ye=zt(),Re=zt(),fn=zt(),le=zt(),Oe=zt(),ra=zt(),rt=zt();function zt(){return 2**++Mf}const pn=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:Re,commaOrSpaceSeparated:rt,commaSeparated:ra,number:le,overloadedBoolean:fn,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),hn=Object.keys(pn);class bn extends et{constructor(t,a,l,n){let r=-1;if(super(t,a),Ni(this,"space",n),typeof l=="number")for(;++r<hn.length;){const i=hn[r];Ni(this,hn[r],(l&pn[i])===pn[i])}}}bn.prototype.defined=!0;function Ni(e,t,a){a&&(e[t]=a)}function ia(e){const t={},a={};for(const[l,n]of Object.entries(e.properties)){const r=new bn(l,e.transform(e.attributes||{},l),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),t[l]=r,a[Aa(l)]=l,a[Aa(r.attribute)]=l}return new Sa(t,a,e.space)}const Ii=ia({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:Oe,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:le,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:Oe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Re,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Li(e,t){return t in e?e[t]:t}function Oi(e,t){return Li(e,t.toLowerCase())}const Bf=ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Oe,autoFocus:ye,autoPlay:ye,blocking:Oe,capture:null,charSet:null,checked:ye,cite:null,className:Oe,cols:le,colSpan:null,content:null,contentEditable:Re,controls:ye,controlsList:Oe,coords:le|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:fn,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Oe,height:le,hidden:fn,high:le,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ye,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:le,pattern:null,ping:Oe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Oe,required:ye,reversed:ye,rows:le,rowSpan:le,sandbox:Oe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:Re,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Oi}),Ff=ia({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ra,g2:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Li}),Di=ia({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pi=ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Oi}),Mi=ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$f=/[A-Z]/g,Bi=/-[a-z]/g,Rf=/^data[-\w.:]+$/i;function yl(e,t){const a=Aa(t);let l=t,n=et;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Rf.test(t)){if(t.charAt(4)==="-"){const r=t.slice(5).replace(Bi,qf);l="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=t.slice(4);if(!Bi.test(r)){let i=r.replace($f,Uf);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=bn}return new n(l,t)}function Uf(e){return"-"+e.toLowerCase()}function qf(e){return e.charAt(1).toUpperCase()}const wa=_i([Ii,Bf,Di,Pi,Mi],"html"),It=_i([Ii,Ff,Di,Pi,Mi],"svg");function Fi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hi(e){return e.join(" ").trim()}function mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sa={},vn,$i;function zf(){if($i)return vn;$i=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,u=`
|
|
42
|
+
`);for(let R=0;R<Y.length;R++)_.appendChild(document.createTextNode(Y[R])),z&&R<Y.length-1&&_.appendChild(document.createElement("br"));V.insertNode(_),U.removeAllRanges();const O=document.createRange();O.selectNodeContents(M),O.collapse(!1),U.addRange(O)}r();return}}}}let S=!1,L="";const D=window.getSelection();if(D&&D.rangeCount>0){const F=D.anchorNode;if(F){let M=null;if(F.nodeType===Node.ELEMENT_NODE?M=F.closest('[data-type="variable"]'):F.nodeType===Node.TEXT_NODE&&F.parentElement&&(M=F.parentElement.closest('[data-type="variable"]')),M){const I=M.getAttribute("data-node-type")||"",x=M.dataset.key;if(I==="markdown"&&x&&/20\d{2}-\d{2}-\d{2}/.test(N))S=!0,L=x,c.current[x]=N,d(P=>({...P,[x]:{...P[x],status:"loading",error:void 0}}));else if(I==="report-url"&&x){document.execCommand("insertText",!1,N),r();return}else if(I==="markdown-name"&&x){document.execCommand("insertText",!1,N),r(),setTimeout(()=>{const P=M.innerText.replace(/[\u200B\n]/g,"").trim();u.current(x,P)},0);return}}}}if(S&&L){setTimeout(()=>{i.current(L,N)},0);return}document.execCommand("insertText",!1,N),r(),setTimeout(()=>{const F=window.getSelection();if(!F||F.rangeCount===0)return;const M=n.current?.parentElement;if(!M)return;let I=F.getRangeAt(0).getBoundingClientRect();if(!I||!I.height&&!I.top&&!I.bottom){const P=document.createElement("span");P.appendChild(document.createTextNode(""));const z=F.getRangeAt(0).cloneRange();z.collapse(!1),z.insertNode(P),I=P.getBoundingClientRect(),P.remove()}if(!I)return;const x=M.getBoundingClientRect();I.bottom>x.bottom?M.scrollTop+=I.bottom-x.bottom+8:I.top<x.top&&(M.scrollTop-=x.top-I.top+8)},0),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(N)&&o.current.tableData?.status==="success"&&(d(M=>({...M,tableData:{status:"loading",modules:[],lastParsedText:N,error:void 0}})),setTimeout(()=>{c.current.tableData=N,i.current("tableData",N)},0))},0)},[t,e,n,r,i,o,c,a,E,s,h,f,y,d,l]);async function Qr(e){const t=e.split("/").pop()?.split("?")[0]||"file",a=decodeURIComponent(t),l=async n=>{const r=await n.blob();return new File([r],a,{type:r.type||"application/octet-stream"})};try{const n=`/api/image-proxy?url=${encodeURIComponent(e)}`,r=await fetch(n);if(r.ok)return l(r)}catch{}return null}const Jc=({config:e,files:t,footerFiles:a,onFooterFilesClear:l,onSend:n,isProcessing:r,disabled:i,loading:s,isFormValid:u,editorRef:o,markdownAnalyzeState:c,markdownNameAnalyzeState:d,videoState:h})=>w.useCallback(()=>{if(r||i||s||!u||!o.current)return;if(e.length===0){const m=o.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!m&&a.length===0)return;if(a.length>0){const b=new FormData;b.append("fullPrompt",m),a.forEach(T=>{b.append("fileUrls",T)}),n(b,m),l()}else n(m,m);if(o.current){o.current.textContent="";const b=new Event("input",{bubbles:!0});o.current.dispatchEvent(b)}return}const f=o.current;let y="";const E={},g=m=>{if(!(m.nodeType===Node.ELEMENT_NODE&&m.style.display==="none")){if(m.nodeType===Node.TEXT_NODE)y+=(m.textContent||"").replace(/\u200B/g,"");else if(m.nodeType===Node.ELEMENT_NODE){const b=m,T=b.dataset.type,C=b.dataset.key;if(T==="variable"&&C){let A="";const N=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:L=>{const D=b.querySelector(".variable-info-icon");return D&&D.contains(L)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;N.nextNode();)A+=N.currentNode.textContent||"";const S=b.getAttribute("data-report-url")||A.replace(/[\u200B\n]/g,"").trim();if(S){const L=b.dataset.multiKey;if(L){(!E[L]||!Array.isArray(E[L]))&&(E[L]=[]);const D=E[L];D.push(S),D.length>1&&(y+=" "),y+=S}else E[C]=S,y+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const D=E.url;Array.isArray(D)?D.push(S):E.url=[String(D),S]}if(b.dataset.nodeType==="markdown-name"){const D=`${C}__sourceText`;E[D]===void 0&&(E[D]=S)}if(b.dataset.nodeType==="markdown"){const D=b.dataset.sourceTextKey||`${C}__sourceText`;if(E[D]===void 0)E[D]=S;else{const M=E[D];Array.isArray(M)?M.push(S):E[D]=[String(M),S]}const F=`${C}__markdown`;E[F]===void 0&&(E[F]=[Gr(S)])}}}else if((T==="select"||T==="searchable-select"||T==="cascader")&&C){const A=(b.getAttribute("data-value")||"").trim();A&&(E[C]=A,y+=A)}else if(T==="textarea"&&C){const N=(b.value||"").replace(/\u200B/g,"").trim();N&&(E[C]=N,y+=N)}else if(T==="richtext"&&C){const A=b,N=A.dataset.nodeType,k=(A.textContent||"").replace(/\u200B/g,"").trim();if(k)if(N==="report-module"||N==="markdown-module"){(!E[C]||!Array.isArray(E[C]))&&(E[C]=[]);const S=E[C];S.push(k),S.length>1&&(y+=" "),y+=k}else E[C]=k,y+=k}else if(T==="datepicker"&&C){const N=(b.getAttribute("data-value")||"").trim();if(N)if(N.includes(",")){const k=N.split(",");k.length===2?(E[C]=k,y+=`[${k[0]}, ${k[1]}]`):(E[C]=N,y+=N)}else E[C]=N,y+=N}else if(T==="number-input"&&C){const N=(b.value||"").trim();N&&(E[C]=N,y+=N)}else if(T==="upload"&&C){const A=b.dataset.batchKey;if(A){const N=e.find(k=>k.type==="upload"&&k.key===A);if(N&&typeof N.maxCount=="number"&&typeof N.minCount=="number"){const k=[];for(let S=0;S<N.maxCount;S++){const L=`${A}-${S}`,D=t[L];D&&k.push(D)}E[A]||(E[A]=k.length>0?k:null,k.length>0&&(y+=` [附带${k.length}个文件: ${k.map(S=>typeof S=="string"?S.split("/").pop()||"file":S.name).join(", ")}] `))}else if(E[C]=t[C]??null,t[C]){const k=t[C];y+=` [附带文件: ${typeof k=="string"?k.split("/").pop()||"file":k.name}] `}}else if(E[C]=t[C]??null,t[C]){const N=t[C];y+=` [附带文件: ${typeof N=="string"?N.split("/").pop()||"file":N.name}] `}}else if((T==="video-url"||T==="video-upload")&&C){const A=h?.[C];if(A?.status==="success"&&A.videoUrl){E[C]=A.videoUrl,A.file&&(E[`${C}__file`]=A.file);const N=A.fileName||"视频";y+=` [附带视频: ${N}] `}}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn")||b.classList.contains("video-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!T&&b.classList.contains("tag-node")?y+=b.innerText:b.childNodes.forEach(g)}}}};if(f.childNodes.forEach(g),y=y.trim(),!y)return;Object.keys(c).forEach(m=>{const b=c[m];if(!b||!b.modules||b.modules.length===0)return;const T=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);T.length!==0&&(E[`${m}__markdown`]=T)}),Object.keys(d).forEach(m=>{const b=d[m];if(!b||!b.modules||b.modules.length===0)return;const T=b.modules.map(C=>(C?.markdown||"").trim()).filter(C=>C.length>0);T.length!==0&&(E[`${m}__markdown`]=T)}),(async()=>{for(const b of Object.keys(E)){const T=E[b];if(typeof T=="string"&&T.startsWith("http")){if(e.find(A=>A.type==="upload"&&A.key===b)){const A=await Qr(T);A&&(E[b]=A)}}else if(Array.isArray(T)&&e.find(A=>A.type==="upload"&&A.key===b)){for(let A=0;A<T.length;A++)if(typeof T[A]=="string"&&T[A].startsWith("http")){const N=await Qr(T[A]);N&&(T[A]=N)}}}const m=new FormData;m.append("fullPrompt",y),Object.keys(E).forEach(b=>{const T=E[b];if(T!=null)if(T instanceof File)m.append(b,T);else if(Array.isArray(T)){const C=e.some(S=>Ye(S.type)&&S.key===b),A=e.some(S=>S.type==="report-url"&&S.key===b),N=b.endsWith("__markdown");C||A||N||b==="url"?T.forEach(S=>{S!=null&&S!==""&&m.append(b,String(S))}):T.forEach((S,L)=>{S!=null&&(S instanceof File?m.append(`${b}[${L}]`,S):typeof S=="string"?m.append(`${b}[${L}]`,S):m.append(`${b}[${L}]`,String(S)))})}else typeof T=="string"?m.append(b,T):m.append(b,String(T))}),a.length>0&&a.forEach(b=>{m.append("fileUrls",b)}),n(m,y),a.length>0&&l()})()},[e,t,a,l,n,r,i,s,u,o,c,d,h]);function Jr(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function Zl(e={},t={}){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:Jr(t[l])&&Jr(e[l])&&Object.keys(t[l]).length>0&&Zl(e[l],t[l])})}const Zr={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Ut(){const e=typeof document<"u"?document:{};return Zl(e,Zr),e}const Zc={document:Zr,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Xe(){const e=typeof window<"u"?window:{};return Zl(e,Zc),e}function ed(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function td(e){const t=e;Object.keys(t).forEach(a=>{try{t[a]=null}catch{}try{delete t[a]}catch{}})}function ei(e,t=0){return setTimeout(e,t)}function pl(){return Date.now()}function ad(e){const t=Xe();let a;return t.getComputedStyle&&(a=t.getComputedStyle(e,null)),!a&&e.currentStyle&&(a=e.currentStyle),a||(a=e.style),a}function ld(e,t="x"){const a=Xe();let l,n,r;const i=ad(e);return a.WebKitCSSMatrix?(n=i.transform||i.webkitTransform,n.split(",").length>6&&(n=n.split(", ").map(s=>s.replace(",",".")).join(", ")),r=new a.WebKitCSSMatrix(n==="none"?"":n)):(r=i.MozTransform||i.OTransform||i.MsTransform||i.msTransform||i.transform||i.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),l=r.toString().split(",")),t==="x"&&(a.WebKitCSSMatrix?n=r.m41:l.length===16?n=parseFloat(l[12]):n=parseFloat(l[4])),t==="y"&&(a.WebKitCSSMatrix?n=r.m42:l.length===16?n=parseFloat(l[13]):n=parseFloat(l[5])),n||0}function hl(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function nd(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function nt(...e){const t=Object(e[0]);for(let a=1;a<e.length;a+=1){const l=e[a];if(l!=null&&!nd(l)){const n=Object.keys(Object(l)).filter(r=>r!=="__proto__"&&r!=="constructor"&&r!=="prototype");for(let r=0,i=n.length;r<i;r+=1){const s=n[r],u=Object.getOwnPropertyDescriptor(l,s);u!==void 0&&u.enumerable&&(hl(t[s])&&hl(l[s])?l[s].__swiper__?t[s]=l[s]:nt(t[s],l[s]):!hl(t[s])&&hl(l[s])?(t[s]={},l[s].__swiper__?t[s]=l[s]:nt(t[s],l[s])):t[s]=l[s])}}}return t}function la(e,t,a){e.style.setProperty(t,a)}function ti({swiper:e,targetPosition:t,side:a}){const l=Xe(),n=-e.translate;let r=null,i;const s=e.params.speed;e.wrapperEl.style.scrollSnapType="none",l.cancelAnimationFrame(e.cssModeFrameID);const u=t>n?"next":"prev",o=(d,h)=>u==="next"&&d>=h||u==="prev"&&d<=h,c=()=>{i=new Date().getTime(),r===null&&(r=i);const d=Math.max(Math.min((i-r)/s,1),0),h=.5-Math.cos(d*Math.PI)/2;let f=n+h*(t-n);if(o(f,t)&&(f=t),e.wrapperEl.scrollTo({[a]:f}),o(f,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[a]:f})}),l.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=l.requestAnimationFrame(c)};c()}function ht(e,t=""){const a=Xe(),l=[...e.children];return a.HTMLSlotElement&&e instanceof HTMLSlotElement&&l.push(...e.assignedElements()),t?l.filter(n=>n.matches(t)):l}function rd(e,t){const a=[t];for(;a.length>0;){const l=a.shift();if(e===l)return!0;a.push(...l.children,...l.shadowRoot?l.shadowRoot.children:[],...l.assignedElements?l.assignedElements():[])}}function id(e,t){const a=Xe();let l=t.contains(e);return!l&&a.HTMLSlotElement&&t instanceof HTMLSlotElement&&(l=[...t.assignedElements()].includes(e),l||(l=rd(e,t))),l}function bl(e){try{console.warn(e);return}catch{}}function ml(e,t=[]){const a=document.createElement(e);return a.classList.add(...Array.isArray(t)?t:ed(t)),a}function sd(e,t){const a=[];for(;e.previousElementSibling;){const l=e.previousElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function ud(e,t){const a=[];for(;e.nextElementSibling;){const l=e.nextElementSibling;t?l.matches(t)&&a.push(l):a.push(l),e=l}return a}function Nt(e,t){return Xe().getComputedStyle(e,null).getPropertyValue(t)}function vl(e){let t=e,a;if(t){for(a=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(a+=1);return a}}function ai(e,t){const a=[];let l=e.parentElement;for(;l;)t?l.matches(t)&&a.push(l):a.push(l),l=l.parentElement;return a}function en(e,t,a){const l=Xe();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(l.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ue(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function Ta(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:a=>a}).createHTML(t):e.innerHTML=t}let tn;function od(){const e=Xe(),t=Ut();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function li(){return tn||(tn=od()),tn}let an;function cd({userAgent:e}={}){const t=li(),a=Xe(),l=a.navigator.platform,n=e||a.navigator.userAgent,r={ios:!1,android:!1},i=a.screen.width,s=a.screen.height,u=n.match(/(Android);?[\s\/]+([\d.]+)?/);let o=n.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const c=n.match(/(iPod)(.*OS\s([\d_]+))?/),d=!o&&n.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h=l==="Win32";let f=l==="MacIntel";const y=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!o&&f&&t.touch&&y.indexOf(`${i}x${s}`)>=0&&(o=n.match(/(Version)\/([\d.]+)/),o||(o=[0,1,"13_0_0"]),f=!1),u&&!h&&(r.os="android",r.android=!0),(o||d||c)&&(r.os="ios",r.ios=!0),r}function ni(e={}){return an||(an=cd(e)),an}let ln;function dd(){const e=Xe(),t=ni();let a=!1;function l(){const s=e.navigator.userAgent.toLowerCase();return s.indexOf("safari")>=0&&s.indexOf("chrome")<0&&s.indexOf("android")<0}if(l()){const s=String(e.navigator.userAgent);if(s.includes("Version/")){const[u,o]=s.split("Version/")[1].split(" ")[0].split(".").map(c=>Number(c));a=u<16||u===16&&o<2}}const n=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),r=l(),i=r||n&&t.ios;return{isSafari:a||r,needPerspectiveFix:a,need3dFix:i,isWebView:n}}function ri(){return ln||(ln=dd()),ln}function fd({swiper:e,on:t,emit:a}){const l=Xe();let n=null,r=null;const i=()=>{!e||e.destroyed||!e.initialized||(a("beforeResize"),a("resize"))},s=()=>{!e||e.destroyed||!e.initialized||(n=new ResizeObserver(c=>{r=l.requestAnimationFrame(()=>{const{width:d,height:h}=e;let f=d,y=h;c.forEach(({contentBoxSize:E,contentRect:g,target:v})=>{v&&v!==e.el||(f=g?g.width:(E[0]||E).inlineSize,y=g?g.height:(E[0]||E).blockSize)}),(f!==d||y!==h)&&i()})}),n.observe(e.el))},u=()=>{r&&l.cancelAnimationFrame(r),n&&n.unobserve&&e.el&&(n.unobserve(e.el),n=null)},o=()=>{!e||e.destroyed||!e.initialized||a("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof l.ResizeObserver<"u"){s();return}l.addEventListener("resize",i),l.addEventListener("orientationchange",o)}),t("destroy",()=>{u(),l.removeEventListener("resize",i),l.removeEventListener("orientationchange",o)})}function pd({swiper:e,extendParams:t,on:a,emit:l}){const n=[],r=Xe(),i=(o,c={})=>{const d=r.MutationObserver||r.WebkitMutationObserver,h=new d(f=>{if(e.__preventObserver__)return;if(f.length===1){l("observerUpdate",f[0]);return}const y=function(){l("observerUpdate",f[0])};r.requestAnimationFrame?r.requestAnimationFrame(y):r.setTimeout(y,0)});h.observe(o,{attributes:typeof c.attributes>"u"?!0:c.attributes,childList:e.isElement||(typeof c.childList>"u"?!0:c).childList,characterData:typeof c.characterData>"u"?!0:c.characterData}),n.push(h)},s=()=>{if(e.params.observer){if(e.params.observeParents){const o=ai(e.hostEl);for(let c=0;c<o.length;c+=1)i(o[c])}i(e.hostEl,{childList:e.params.observeSlideChildren}),i(e.wrapperEl,{attributes:!1})}},u=()=>{n.forEach(o=>{o.disconnect()}),n.splice(0,n.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),a("init",s),a("destroy",u)}var hd={on(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;const n=a?"unshift":"push";return e.split(" ").forEach(r=>{l.eventsListeners[r]||(l.eventsListeners[r]=[]),l.eventsListeners[r][n](t)}),l},once(e,t,a){const l=this;if(!l.eventsListeners||l.destroyed||typeof t!="function")return l;function n(...r){l.off(e,n),n.__emitterProxy&&delete n.__emitterProxy,t.apply(l,r)}return n.__emitterProxy=t,l.on(e,n,a)},onAny(e,t){const a=this;if(!a.eventsListeners||a.destroyed||typeof e!="function")return a;const l=t?"unshift":"push";return a.eventsAnyListeners.indexOf(e)<0&&a.eventsAnyListeners[l](e),a},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const a=t.eventsAnyListeners.indexOf(e);return a>=0&&t.eventsAnyListeners.splice(a,1),t},off(e,t){const a=this;return!a.eventsListeners||a.destroyed||!a.eventsListeners||e.split(" ").forEach(l=>{typeof t>"u"?a.eventsListeners[l]=[]:a.eventsListeners[l]&&a.eventsListeners[l].forEach((n,r)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&a.eventsListeners[l].splice(r,1)})}),a},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let a,l,n;return typeof e[0]=="string"||Array.isArray(e[0])?(a=e[0],l=e.slice(1,e.length),n=t):(a=e[0].events,l=e[0].data,n=e[0].context||t),l.unshift(n),(Array.isArray(a)?a:a.split(" ")).forEach(i=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(s=>{s.apply(n,[i,...l])}),t.eventsListeners&&t.eventsListeners[i]&&t.eventsListeners[i].forEach(s=>{s.apply(n,l)})}),t}};function bd(){const e=this;let t,a;const l=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=l.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?a=e.params.height:a=l.clientHeight,!(t===0&&e.isHorizontal()||a===0&&e.isVertical())&&(t=t-parseInt(Nt(l,"padding-left")||0,10)-parseInt(Nt(l,"padding-right")||0,10),a=a-parseInt(Nt(l,"padding-top")||0,10)-parseInt(Nt(l,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(a)&&(a=0),Object.assign(e,{width:t,height:a,size:e.isHorizontal()?t:a}))}function md(){const e=this;function t(L,D){return parseFloat(L.getPropertyValue(e.getDirectionLabel(D))||0)}const a=e.params,{wrapperEl:l,slidesEl:n,rtlTranslate:r,wrongRTL:i}=e,s=e.virtual&&a.virtual.enabled,u=s?e.virtual.slides.length:e.slides.length,o=ht(n,`.${e.params.slideClass}, swiper-slide`),c=s?e.virtual.slides.length:o.length;let d=[];const h=[],f=[];let y=a.slidesOffsetBefore;typeof y=="function"&&(y=a.slidesOffsetBefore.call(e));let E=a.slidesOffsetAfter;typeof E=="function"&&(E=a.slidesOffsetAfter.call(e));const g=e.snapGrid.length,v=e.slidesGrid.length,m=e.size-y-E;let b=a.spaceBetween,T=-y,C=0,A=0;if(typeof m>"u")return;typeof b=="string"&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*m:typeof b=="string"&&(b=parseFloat(b)),e.virtualSize=-b-y-E,o.forEach(L=>{r?L.style.marginLeft="":L.style.marginRight="",L.style.marginBottom="",L.style.marginTop=""}),a.centeredSlides&&a.cssMode&&(la(l,"--swiper-centered-offset-before",""),la(l,"--swiper-centered-offset-after","")),a.cssMode&&(la(l,"--swiper-slides-offset-before",`${y}px`),la(l,"--swiper-slides-offset-after",`${E}px`));const N=a.grid&&a.grid.rows>1&&e.grid;N?e.grid.initSlides(o):e.grid&&e.grid.unsetSlides();let k;const S=a.slidesPerView==="auto"&&a.breakpoints&&Object.keys(a.breakpoints).filter(L=>typeof a.breakpoints[L].slidesPerView<"u").length>0;for(let L=0;L<c;L+=1){k=0;const D=o[L];if(!(D&&(N&&e.grid.updateSlide(L,D,o),Nt(D,"display")==="none"))){if(s&&a.slidesPerView==="auto")a.virtual.slidesPerViewAutoSlideSize&&(k=a.virtual.slidesPerViewAutoSlideSize),k&&D&&(a.roundLengths&&(k=Math.floor(k)),D.style[e.getDirectionLabel("width")]=`${k}px`);else if(a.slidesPerView==="auto"){S&&(D.style[e.getDirectionLabel("width")]="");const F=getComputedStyle(D),M=D.style.transform,I=D.style.webkitTransform;if(M&&(D.style.transform="none"),I&&(D.style.webkitTransform="none"),a.roundLengths)k=e.isHorizontal()?en(D,"width"):en(D,"height");else{const x=t(F,"width"),P=t(F,"padding-left"),z=t(F,"padding-right"),U=t(F,"margin-left"),V=t(F,"margin-right"),_=F.getPropertyValue("box-sizing");if(_&&_==="border-box")k=x+U+V;else{const{clientWidth:G,offsetWidth:Y}=D;k=x+P+z+U+V+(Y-G)}}M&&(D.style.transform=M),I&&(D.style.webkitTransform=I),a.roundLengths&&(k=Math.floor(k))}else k=(m-(a.slidesPerView-1)*b)/a.slidesPerView,a.roundLengths&&(k=Math.floor(k)),D&&(D.style[e.getDirectionLabel("width")]=`${k}px`);D&&(D.swiperSlideSize=k),f.push(k),a.centeredSlides?(T=T+k/2+C/2+b,C===0&&L!==0&&(T=T-m/2-b),L===0&&(T=T-m/2-b),Math.abs(T)<1/1e3&&(T=0),a.roundLengths&&(T=Math.floor(T)),A%a.slidesPerGroup===0&&d.push(T),h.push(T)):(a.roundLengths&&(T=Math.floor(T)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&d.push(T),h.push(T),T=T+k+b),e.virtualSize+=k+b,C=k,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,m)+E,r&&i&&(a.effect==="slide"||a.effect==="coverflow")&&(l.style.width=`${e.virtualSize+b}px`),a.setWrapperSize&&(l.style[e.getDirectionLabel("width")]=`${e.virtualSize+b}px`),N&&e.grid.updateWrapperSize(k,d),!a.centeredSlides){const L=a.slidesPerView!=="auto"&&a.slidesPerView%1!==0,D=a.snapToSlideEdge&&!a.loop&&(a.slidesPerView==="auto"||L);let F=d.length;if(D){let I;if(a.slidesPerView==="auto"){I=1;let x=0;for(let P=f.length-1;P>=0&&(x+=f[P]+(P<f.length-1?b:0),x<=m);P-=1)I=f.length-P}else I=Math.floor(a.slidesPerView);F=Math.max(c-I,0)}const M=[];for(let I=0;I<d.length;I+=1){let x=d[I];a.roundLengths&&(x=Math.floor(x)),D?I<=F&&M.push(x):d[I]<=e.virtualSize-m&&M.push(x)}d=M,Math.floor(e.virtualSize-m)-Math.floor(d[d.length-1])>1&&(D||d.push(e.virtualSize-m))}if(s&&a.loop){const L=f[0]+b;if(a.slidesPerGroup>1){const D=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/a.slidesPerGroup),F=L*a.slidesPerGroup;for(let M=0;M<D;M+=1)d.push(d[d.length-1]+F)}for(let D=0;D<e.virtual.slidesBefore+e.virtual.slidesAfter;D+=1)a.slidesPerGroup===1&&d.push(d[d.length-1]+L),h.push(h[h.length-1]+L),e.virtualSize+=L}if(d.length===0&&(d=[0]),b!==0){const L=e.isHorizontal()&&r?"marginLeft":e.getDirectionLabel("marginRight");o.filter((D,F)=>!a.cssMode||a.loop?!0:F!==o.length-1).forEach(D=>{D.style[L]=`${b}px`})}if(a.centeredSlides&&a.centeredSlidesBounds){let L=0;f.forEach(F=>{L+=F+(b||0)}),L-=b;const D=L>m?L-m:0;d=d.map(F=>F<=0?-y:F>D?D+E:F)}if(a.centerInsufficientSlides){let L=0;if(f.forEach(D=>{L+=D+(b||0)}),L-=b,L<m){const D=(m-L)/2;d.forEach((F,M)=>{d[M]=F-D}),h.forEach((F,M)=>{h[M]=F+D})}}if(Object.assign(e,{slides:o,snapGrid:d,slidesGrid:h,slidesSizesGrid:f}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){la(l,"--swiper-centered-offset-before",`${-d[0]}px`),la(l,"--swiper-centered-offset-after",`${e.size/2-f[f.length-1]/2}px`);const L=-e.snapGrid[0],D=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(F=>F+L),e.slidesGrid=e.slidesGrid.map(F=>F+D)}if(c!==u&&e.emit("slidesLengthChange"),d.length!==g&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==v&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!s&&!a.cssMode&&(a.effect==="slide"||a.effect==="fade")){const L=`${a.containerModifierClass}backface-hidden`,D=e.el.classList.contains(L);c<=a.maxBackfaceHiddenSlides?D||e.el.classList.add(L):D&&e.el.classList.remove(L)}}function vd(e){const t=this,a=[],l=t.virtual&&t.params.virtual.enabled;let n=0,r;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const i=s=>l?t.slides[t.getSlideIndexByData(s)]:t.slides[s];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(s=>{a.push(s)});else for(r=0;r<Math.ceil(t.params.slidesPerView);r+=1){const s=t.activeIndex+r;if(s>t.slides.length&&!l)break;a.push(i(s))}else a.push(i(t.activeIndex));for(r=0;r<a.length;r+=1)if(typeof a[r]<"u"){const s=a[r].offsetHeight;n=s>n?s:n}(n||n===0)&&(t.wrapperEl.style.height=`${n}px`)}function gd(){const e=this,t=e.slides,a=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let l=0;l<t.length;l+=1)t[l].swiperSlideOffset=(e.isHorizontal()?t[l].offsetLeft:t[l].offsetTop)-a-e.cssOverflowAdjustment()}const ii=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function Ed(e=this&&this.translate||0){const t=this,a=t.params,{slides:l,rtlTranslate:n,snapGrid:r}=t;if(l.length===0)return;typeof l[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let i=-e;n&&(i=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let s=a.spaceBetween;typeof s=="string"&&s.indexOf("%")>=0?s=parseFloat(s.replace("%",""))/100*t.size:typeof s=="string"&&(s=parseFloat(s));for(let u=0;u<l.length;u+=1){const o=l[u];let c=o.swiperSlideOffset;a.cssMode&&a.centeredSlides&&(c-=l[0].swiperSlideOffset);const d=(i+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+s),h=(i-r[0]+(a.centeredSlides?t.minTranslate():0)-c)/(o.swiperSlideSize+s),f=-(i-c),y=f+t.slidesSizesGrid[u],E=f>=0&&f<=t.size-t.slidesSizesGrid[u],g=f>=0&&f<t.size-1||y>1&&y<=t.size||f<=0&&y>=t.size;g&&(t.visibleSlides.push(o),t.visibleSlidesIndexes.push(u)),ii(o,g,a.slideVisibleClass),ii(o,E,a.slideFullyVisibleClass),o.progress=n?-d:d,o.originalProgress=n?-h:h}}function yd(e){const t=this;if(typeof e>"u"){const c=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*c||0}const a=t.params,l=t.maxTranslate()-t.minTranslate();let{progress:n,isBeginning:r,isEnd:i,progressLoop:s}=t;const u=r,o=i;if(l===0)n=0,r=!0,i=!0;else{n=(e-t.minTranslate())/l;const c=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;r=c||n<=0,i=d||n>=1,c&&(n=0),d&&(n=1)}if(a.loop){const c=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),h=t.slidesGrid[c],f=t.slidesGrid[d],y=t.slidesGrid[t.slidesGrid.length-1],E=Math.abs(e);E>=h?s=(E-h)/y:s=(E+y-f)/y,s>1&&(s-=1)}Object.assign(t,{progress:n,progressLoop:s,isBeginning:r,isEnd:i}),(a.watchSlidesProgress||a.centeredSlides&&a.autoHeight)&&t.updateSlidesProgress(e),r&&!u&&t.emit("reachBeginning toEdge"),i&&!o&&t.emit("reachEnd toEdge"),(u&&!r||o&&!i)&&t.emit("fromEdge"),t.emit("progress",n)}const nn=(e,t,a)=>{t&&!e.classList.contains(a)?e.classList.add(a):!t&&e.classList.contains(a)&&e.classList.remove(a)};function Td(){const e=this,{slides:t,params:a,slidesEl:l,activeIndex:n}=e,r=e.virtual&&a.virtual.enabled,i=e.grid&&a.grid&&a.grid.rows>1,s=d=>ht(l,`.${a.slideClass}${d}, swiper-slide${d}`)[0];let u,o,c;if(r)if(a.loop){let d=n-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),u=s(`[data-swiper-slide-index="${d}"]`)}else u=s(`[data-swiper-slide-index="${n}"]`);else i?(u=t.find(d=>d.column===n),c=t.find(d=>d.column===n+1),o=t.find(d=>d.column===n-1)):u=t[n];u&&(i||(c=ud(u,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!c&&(c=t[0]),o=sd(u,`.${a.slideClass}, swiper-slide`)[0],a.loop&&!o===0&&(o=t[t.length-1]))),t.forEach(d=>{nn(d,d===u,a.slideActiveClass),nn(d,d===c,a.slideNextClass),nn(d,d===o,a.slidePrevClass)}),e.emitSlidesClasses()}const gl=(e,t)=>{if(!e||e.destroyed||!e.params)return;const a=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,l=t.closest(a());if(l){let n=l.querySelector(`.${e.params.lazyPreloaderClass}`);!n&&e.isElement&&(l.shadowRoot?n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{l.shadowRoot&&(n=l.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),n&&!n.lazyPreloaderManaged&&n.remove())})),n&&!n.lazyPreloaderManaged&&n.remove()}},rn=(e,t)=>{if(!e.slides[t])return;const a=e.slides[t].querySelector('[loading="lazy"]');a&&a.removeAttribute("loading")},sn=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const a=e.slides.length;if(!a||!t||t<0)return;t=Math.min(t,a);const l=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),n=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const i=n,s=[i-t];s.push(...Array.from({length:t}).map((u,o)=>i+l+o)),e.slides.forEach((u,o)=>{s.includes(u.column)&&rn(e,o)});return}const r=n+l-1;if(e.params.rewind||e.params.loop)for(let i=n-t;i<=r+t;i+=1){const s=(i%a+a)%a;(s<n||s>r)&&rn(e,s)}else for(let i=Math.max(n-t,0);i<=Math.min(r+t,a-1);i+=1)i!==n&&(i>r||i<n)&&rn(e,i)};function xd(e){const{slidesGrid:t,params:a}=e,l=e.rtlTranslate?e.translate:-e.translate;let n;for(let r=0;r<t.length;r+=1)typeof t[r+1]<"u"?l>=t[r]&&l<t[r+1]-(t[r+1]-t[r])/2?n=r:l>=t[r]&&l<t[r+1]&&(n=r+1):l>=t[r]&&(n=r);return a.normalizeSlideIndex&&(n<0||typeof n>"u")&&(n=0),n}function Cd(e){const t=this,a=t.rtlTranslate?t.translate:-t.translate,{snapGrid:l,params:n,activeIndex:r,realIndex:i,snapIndex:s}=t;let u=e,o;const c=f=>{let y=f-t.virtual.slidesBefore;return y<0&&(y=t.virtual.slides.length+y),y>=t.virtual.slides.length&&(y-=t.virtual.slides.length),y};if(typeof u>"u"&&(u=xd(t)),l.indexOf(a)>=0)o=l.indexOf(a);else{const f=Math.min(n.slidesPerGroupSkip,u);o=f+Math.floor((u-f)/n.slidesPerGroup)}if(o>=l.length&&(o=l.length-1),u===r&&!t.params.loop){o!==s&&(t.snapIndex=o,t.emit("snapIndexChange"));return}if(u===r&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=c(u);return}const d=t.grid&&n.grid&&n.grid.rows>1;let h;if(t.virtual&&n.virtual.enabled)n.loop?h=c(u):h=u;else if(d){const f=t.slides.find(E=>E.column===u);let y=parseInt(f.getAttribute("data-swiper-slide-index"),10);Number.isNaN(y)&&(y=Math.max(t.slides.indexOf(f),0)),h=Math.floor(y/n.grid.rows)}else if(t.slides[u]){const f=t.slides[u].getAttribute("data-swiper-slide-index");f?h=parseInt(f,10):h=u}else h=u;Object.assign(t,{previousSnapIndex:s,snapIndex:o,previousRealIndex:i,realIndex:h,previousIndex:r,activeIndex:u}),t.initialized&&sn(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(i!==h&&t.emit("realIndexChange"),t.emit("slideChange"))}function Sd(e,t){const a=this,l=a.params;let n=e.closest(`.${l.slideClass}, swiper-slide`);!n&&a.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(s=>{!n&&s.matches&&s.matches(`.${l.slideClass}, swiper-slide`)&&(n=s)});let r=!1,i;if(n){for(let s=0;s<a.slides.length;s+=1)if(a.slides[s]===n){r=!0,i=s;break}}if(n&&r)a.clickedSlide=n,a.virtual&&a.params.virtual.enabled?a.clickedIndex=parseInt(n.getAttribute("data-swiper-slide-index"),10):a.clickedIndex=i;else{a.clickedSlide=void 0,a.clickedIndex=void 0;return}l.slideToClickedSlide&&a.clickedIndex!==void 0&&a.clickedIndex!==a.activeIndex&&a.slideToClickedSlide()}var Ad={updateSize:bd,updateSlides:md,updateAutoHeight:vd,updateSlidesOffset:gd,updateSlidesProgress:Ed,updateProgress:yd,updateSlidesClasses:Td,updateActiveIndex:Cd,updateClickedSlide:Sd};function wd(e=this.isHorizontal()?"x":"y"){const t=this,{params:a,rtlTranslate:l,translate:n,wrapperEl:r}=t;if(a.virtualTranslate)return l?-n:n;if(a.cssMode)return n;let i=ld(r,e);return i+=t.cssOverflowAdjustment(),l&&(i=-i),i||0}function kd(e,t){const a=this,{rtlTranslate:l,params:n,wrapperEl:r,progress:i}=a;let s=0,u=0;const o=0;a.isHorizontal()?s=l?-e:e:u=e,n.roundLengths&&(s=Math.floor(s),u=Math.floor(u)),a.previousTranslate=a.translate,a.translate=a.isHorizontal()?s:u,n.cssMode?r[a.isHorizontal()?"scrollLeft":"scrollTop"]=a.isHorizontal()?-s:-u:n.virtualTranslate||(a.isHorizontal()?s-=a.cssOverflowAdjustment():u-=a.cssOverflowAdjustment(),r.style.transform=`translate3d(${s}px, ${u}px, ${o}px)`);let c;const d=a.maxTranslate()-a.minTranslate();d===0?c=0:c=(e-a.minTranslate())/d,c!==i&&a.updateProgress(e),a.emit("setTranslate",a.translate,t)}function _d(){return-this.snapGrid[0]}function Nd(){return-this.snapGrid[this.snapGrid.length-1]}function Id(e=0,t=this.params.speed,a=!0,l=!0,n){const r=this,{params:i,wrapperEl:s}=r;if(r.animating&&i.preventInteractionOnTransition)return!1;const u=r.minTranslate(),o=r.maxTranslate();let c;if(l&&e>u?c=u:l&&e<o?c=o:c=e,r.updateProgress(c),i.cssMode){const d=r.isHorizontal();if(t===0)s[d?"scrollLeft":"scrollTop"]=-c;else{if(!r.support.smoothScroll)return ti({swiper:r,targetPosition:-c,side:d?"left":"top"}),!0;s.scrollTo({[d?"left":"top"]:-c,behavior:"smooth"})}return!0}return t===0?(r.setTransition(0),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(c),a&&(r.emit("beforeTransitionStart",t,n),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(h){!r||r.destroyed||h.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,r.animating=!1,a&&r.emit("transitionEnd"))}),r.wrapperEl.addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd))),!0}var Ld={getTranslate:wd,setTranslate:kd,minTranslate:_d,maxTranslate:Nd,translateTo:Id};function Od(e,t){const a=this;a.params.cssMode||(a.wrapperEl.style.transitionDuration=`${e}ms`,a.wrapperEl.style.transitionDelay=e===0?"0ms":""),a.emit("setTransition",e,t)}function si({swiper:e,runCallbacks:t,direction:a,step:l}){const{activeIndex:n,previousIndex:r}=e;let i=a;i||(n>r?i="next":n<r?i="prev":i="reset"),e.emit(`transition${l}`),t&&i==="reset"?e.emit(`slideResetTransition${l}`):t&&n!==r&&(e.emit(`slideChangeTransition${l}`),i==="next"?e.emit(`slideNextTransition${l}`):e.emit(`slidePrevTransition${l}`))}function Dd(e=!0,t){const a=this,{params:l}=a;l.cssMode||(l.autoHeight&&a.updateAutoHeight(),si({swiper:a,runCallbacks:e,direction:t,step:"Start"}))}function Pd(e=!0,t){const a=this,{params:l}=a;a.animating=!1,!l.cssMode&&(a.setTransition(0),si({swiper:a,runCallbacks:e,direction:t,step:"End"}))}var Md={setTransition:Od,transitionStart:Dd,transitionEnd:Pd};function Bd(e=0,t,a=!0,l,n){typeof e=="string"&&(e=parseInt(e,10));const r=this;let i=e;i<0&&(i=0);const{params:s,snapGrid:u,slidesGrid:o,previousIndex:c,activeIndex:d,rtlTranslate:h,wrapperEl:f,enabled:y}=r;if(!y&&!l&&!n||r.destroyed||r.animating&&s.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=r.params.speed);const E=Math.min(r.params.slidesPerGroupSkip,i);let g=E+Math.floor((i-E)/r.params.slidesPerGroup);g>=u.length&&(g=u.length-1);const v=-u[g];if(s.normalizeSlideIndex)for(let N=0;N<o.length;N+=1){const k=-Math.floor(v*100),S=Math.floor(o[N]*100),L=Math.floor(o[N+1]*100);typeof o[N+1]<"u"?k>=S&&k<L-(L-S)/2?i=N:k>=S&&k<L&&(i=N+1):k>=S&&(i=N)}if(r.initialized&&i!==d&&(!r.allowSlideNext&&(h?v>r.translate&&v>r.minTranslate():v<r.translate&&v<r.minTranslate())||!r.allowSlidePrev&&v>r.translate&&v>r.maxTranslate()&&(d||0)!==i))return!1;i!==(c||0)&&a&&r.emit("beforeSlideChangeStart"),r.updateProgress(v);let m;i>d?m="next":i<d?m="prev":m="reset";const b=r.virtual&&r.params.virtual.enabled;if(!(b&&n)&&(h&&-v===r.translate||!h&&v===r.translate))return r.updateActiveIndex(i),s.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),s.effect!=="slide"&&r.setTranslate(v),m!=="reset"&&(r.transitionStart(a,m),r.transitionEnd(a,m)),!1;if(s.cssMode){const N=r.isHorizontal(),k=h?v:-v;if(t===0)b&&(r.wrapperEl.style.scrollSnapType="none",r._immediateVirtual=!0),b&&!r._cssModeVirtualInitialSet&&r.params.initialSlide>0?(r._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{f[N?"scrollLeft":"scrollTop"]=k})):f[N?"scrollLeft":"scrollTop"]=k,b&&requestAnimationFrame(()=>{r.wrapperEl.style.scrollSnapType="",r._immediateVirtual=!1});else{if(!r.support.smoothScroll)return ti({swiper:r,targetPosition:k,side:N?"left":"top"}),!0;f.scrollTo({[N?"left":"top"]:k,behavior:"smooth"})}return!0}const A=ri().isSafari;return b&&!n&&A&&r.isElement&&r.virtual.update(!1,!1,i),r.setTransition(t),r.setTranslate(v),r.updateActiveIndex(i),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,l),r.transitionStart(a,m),t===0?r.transitionEnd(a,m):r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(k){!r||r.destroyed||k.target===this&&(r.wrapperEl.removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(a,m))}),r.wrapperEl.addEventListener("transitionend",r.onSlideToWrapperTransitionEnd)),!0}function Fd(e=0,t,a=!0,l){typeof e=="string"&&(e=parseInt(e,10));const n=this;if(n.destroyed)return;typeof t>"u"&&(t=n.params.speed);const r=n.grid&&n.params.grid&&n.params.grid.rows>1;let i=e;if(n.params.loop)if(n.virtual&&n.params.virtual.enabled)i=i+n.virtual.slidesBefore;else{let s;if(r){const E=i*n.params.grid.rows;s=n.slides.find(g=>g.getAttribute("data-swiper-slide-index")*1===E).column}else s=n.getSlideIndexByData(i);const u=r?Math.ceil(n.slides.length/n.params.grid.rows):n.slides.length,{centeredSlides:o,slidesOffsetBefore:c,slidesOffsetAfter:d}=n.params,h=o||!!c||!!d;let f=n.params.slidesPerView;f==="auto"?f=n.slidesPerViewDynamic():(f=Math.ceil(parseFloat(n.params.slidesPerView,10)),h&&f%2===0&&(f=f+1));let y=u-s<f;if(h&&(y=y||s<Math.ceil(f/2)),l&&h&&n.params.slidesPerView!=="auto"&&!r&&(y=!1),y){const E=h?s<n.activeIndex?"prev":"next":s-n.activeIndex-1<n.params.slidesPerView?"next":"prev";n.loopFix({direction:E,slideTo:!0,activeSlideIndex:E==="next"?s+1:s-u+1,slideRealIndex:E==="next"?n.realIndex:void 0})}if(r){const E=i*n.params.grid.rows;i=n.slides.find(g=>g.getAttribute("data-swiper-slide-index")*1===E).column}else i=n.getSlideIndexByData(i)}return requestAnimationFrame(()=>{n.slideTo(i,t,a,l)}),n}function Hd(e,t=!0,a){const l=this,{enabled:n,params:r,animating:i}=l;if(!n||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);let s=r.slidesPerGroup;r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(s=Math.max(l.slidesPerViewDynamic("current",!0),1));const u=l.activeIndex<r.slidesPerGroupSkip?1:s,o=l.virtual&&r.virtual.enabled;if(r.loop){if(i&&!o&&r.loopPreventsSliding)return!1;if(l.loopFix({direction:"next"}),l._clientLeft=l.wrapperEl.clientLeft,l.activeIndex===l.slides.length-1&&r.cssMode)return requestAnimationFrame(()=>{l.slideTo(l.activeIndex+u,e,t,a)}),!0}return r.rewind&&l.isEnd?l.slideTo(0,e,t,a):l.slideTo(l.activeIndex+u,e,t,a)}function $d(e,t=!0,a){const l=this,{params:n,snapGrid:r,slidesGrid:i,rtlTranslate:s,enabled:u,animating:o}=l;if(!u||l.destroyed)return l;typeof e>"u"&&(e=l.params.speed);const c=l.virtual&&n.virtual.enabled;if(n.loop){if(o&&!c&&n.loopPreventsSliding)return!1;l.loopFix({direction:"prev"}),l._clientLeft=l.wrapperEl.clientLeft}const d=s?l.translate:-l.translate;function h(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const f=h(d),y=r.map(m=>h(m)),E=n.freeMode&&n.freeMode.enabled;let g=r[y.indexOf(f)-1];if(typeof g>"u"&&(n.cssMode||E)){let m;r.forEach((b,T)=>{f>=b&&(m=T)}),typeof m<"u"&&(g=E?r[m]:r[m>0?m-1:m])}let v=0;if(typeof g<"u"&&(v=i.indexOf(g),v<0&&(v=l.activeIndex-1),n.slidesPerView==="auto"&&n.slidesPerGroup===1&&n.slidesPerGroupAuto&&(v=v-l.slidesPerViewDynamic("previous",!0)+1,v=Math.max(v,0))),n.rewind&&l.isBeginning){const m=l.params.virtual&&l.params.virtual.enabled&&l.virtual?l.virtual.slides.length-1:l.slides.length-1;return l.slideTo(m,e,t,a)}else if(n.loop&&l.activeIndex===0&&n.cssMode)return requestAnimationFrame(()=>{l.slideTo(v,e,t,a)}),!0;return l.slideTo(v,e,t,a)}function Rd(e,t=!0,a){const l=this;if(!l.destroyed)return typeof e>"u"&&(e=l.params.speed),l.slideTo(l.activeIndex,e,t,a)}function Ud(e,t=!0,a,l=.5){const n=this;if(n.destroyed)return;typeof e>"u"&&(e=n.params.speed);let r=n.activeIndex;const i=Math.min(n.params.slidesPerGroupSkip,r),s=i+Math.floor((r-i)/n.params.slidesPerGroup),u=n.rtlTranslate?n.translate:-n.translate;if(u>=n.snapGrid[s]){const o=n.snapGrid[s],c=n.snapGrid[s+1];u-o>(c-o)*l&&(r+=n.params.slidesPerGroup)}else{const o=n.snapGrid[s-1],c=n.snapGrid[s];u-o<=(c-o)*l&&(r-=n.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,n.slidesGrid.length-1),n.slideTo(r,e,t,a)}function qd(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:a}=e,l=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let n=e.getSlideIndexWhenGrid(e.clickedIndex),r;const i=e.isElement?"swiper-slide":`.${t.slideClass}`,s=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;r=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(r):n>(s?(e.slides.length-l)/2-(e.params.grid.rows-1):e.slides.length-l)?(e.loopFix(),n=e.getSlideIndex(ht(a,`${i}[data-swiper-slide-index="${r}"]`)[0]),ei(()=>{e.slideTo(n)})):e.slideTo(n)}else e.slideTo(n)}var zd={slideTo:Bd,slideToLoop:Fd,slideNext:Hd,slidePrev:$d,slideReset:Rd,slideToClosest:Ud,slideToClickedSlide:qd};function Vd(e,t){const a=this,{params:l,slidesEl:n}=a;if(!l.loop||a.virtual&&a.params.virtual.enabled)return;const r=()=>{ht(n,`.${l.slideClass}, swiper-slide`).forEach((y,E)=>{y.setAttribute("data-swiper-slide-index",E)})},i=()=>{const f=ht(n,`.${l.slideBlankClass}`);f.forEach(y=>{y.remove()}),f.length>0&&(a.recalcSlides(),a.updateSlides())},s=a.grid&&l.grid&&l.grid.rows>1;l.loopAddBlankSlides&&(l.slidesPerGroup>1||s)&&i();const u=l.slidesPerGroup*(s?l.grid.rows:1),o=a.slides.length%u!==0,c=s&&a.slides.length%l.grid.rows!==0,d=f=>{for(let y=0;y<f;y+=1){const E=a.isElement?ml("swiper-slide",[l.slideBlankClass]):ml("div",[l.slideClass,l.slideBlankClass]);a.slidesEl.append(E)}};if(o){if(l.loopAddBlankSlides){const f=u-a.slides.length%u;d(f),a.recalcSlides(),a.updateSlides()}else bl("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else if(c){if(l.loopAddBlankSlides){const f=l.grid.rows-a.slides.length%l.grid.rows;d(f),a.recalcSlides(),a.updateSlides()}else bl("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");r()}else r();const h=l.centeredSlides||!!l.slidesOffsetBefore||!!l.slidesOffsetAfter;a.loopFix({slideRealIndex:e,direction:h?void 0:"next",initial:t})}function Gd({slideRealIndex:e,slideTo:t=!0,direction:a,setTranslate:l,activeSlideIndex:n,initial:r,byController:i,byMousewheel:s}={}){const u=this;if(!u.params.loop)return;u.emit("beforeLoopFix");const{slides:o,allowSlidePrev:c,allowSlideNext:d,slidesEl:h,params:f}=u,{centeredSlides:y,slidesOffsetBefore:E,slidesOffsetAfter:g,initialSlide:v}=f,m=y||!!E||!!g;if(u.allowSlidePrev=!0,u.allowSlideNext=!0,u.virtual&&f.virtual.enabled){t&&(!m&&u.snapIndex===0?u.slideTo(u.virtual.slides.length,0,!1,!0):m&&u.snapIndex<f.slidesPerView?u.slideTo(u.virtual.slides.length+u.snapIndex,0,!1,!0):u.snapIndex===u.snapGrid.length-1&&u.slideTo(u.virtual.slidesBefore,0,!1,!0)),u.allowSlidePrev=c,u.allowSlideNext=d,u.emit("loopFix");return}let b=f.slidesPerView;b==="auto"?b=u.slidesPerViewDynamic():(b=Math.ceil(parseFloat(f.slidesPerView,10)),m&&b%2===0&&(b=b+1));const T=f.slidesPerGroupAuto?b:f.slidesPerGroup;let C=m?Math.max(T,Math.ceil(b/2)):T;C%T!==0&&(C+=T-C%T),C+=f.loopAdditionalSlides,u.loopedSlides=C;const A=u.grid&&f.grid&&f.grid.rows>1;o.length<b+C||u.params.effect==="cards"&&o.length<b+C*2?bl("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):A&&f.grid.fill==="row"&&bl("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const N=[],k=[],S=A?Math.ceil(o.length/f.grid.rows):o.length,L=r&&S-v<b&&!m;let D=L?v:u.activeIndex;typeof n>"u"?n=u.getSlideIndex(o.find(U=>U.classList.contains(f.slideActiveClass))):D=n;const F=a==="next"||!a,M=a==="prev"||!a;let I=0,x=0;const z=(A?o[n].column:n)+(m&&typeof l>"u"?-b/2+.5:0);if(z<C){I=Math.max(C-z,T);for(let U=0;U<C-z;U+=1){const V=U-Math.floor(U/S)*S;if(A){const _=S-V-1;for(let G=o.length-1;G>=0;G-=1)o[G].column===_&&N.push(G)}else N.push(S-V-1)}}else if(z+b>S-C){x=Math.max(z-(S-C*2),T),L&&(x=Math.max(x,b-S+v+1));for(let U=0;U<x;U+=1){const V=U-Math.floor(U/S)*S;A?o.forEach((_,G)=>{_.column===V&&k.push(G)}):k.push(V)}}if(u.__preventObserver__=!0,requestAnimationFrame(()=>{u.__preventObserver__=!1}),u.params.effect==="cards"&&o.length<b+C*2&&(k.includes(n)&&k.splice(k.indexOf(n),1),N.includes(n)&&N.splice(N.indexOf(n),1)),M&&N.forEach(U=>{o[U].swiperLoopMoveDOM=!0,h.prepend(o[U]),o[U].swiperLoopMoveDOM=!1}),F&&k.forEach(U=>{o[U].swiperLoopMoveDOM=!0,h.append(o[U]),o[U].swiperLoopMoveDOM=!1}),u.recalcSlides(),f.slidesPerView==="auto"?u.updateSlides():A&&(N.length>0&&M||k.length>0&&F)&&u.slides.forEach((U,V)=>{u.grid.updateSlide(V,U,u.slides)}),f.watchSlidesProgress&&u.updateSlidesOffset(),t){if(N.length>0&&M){if(typeof e>"u"){const U=u.slidesGrid[D],_=u.slidesGrid[D+I]-U;s?u.setTranslate(u.translate-_):(u.slideTo(D+Math.ceil(I),0,!1,!0),l&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else if(l){const U=A?N.length/f.grid.rows:N.length;u.slideTo(u.activeIndex+U,0,!1,!0),u.touchEventsData.currentTranslate=u.translate}}else if(k.length>0&&F)if(typeof e>"u"){const U=u.slidesGrid[D],_=u.slidesGrid[D-x]-U;s?u.setTranslate(u.translate-_):(u.slideTo(D-x,0,!1,!0),l&&(u.touchEventsData.startTranslate=u.touchEventsData.startTranslate-_,u.touchEventsData.currentTranslate=u.touchEventsData.currentTranslate-_))}else{const U=A?k.length/f.grid.rows:k.length;u.slideTo(u.activeIndex-U,0,!1,!0)}}if(u.allowSlidePrev=c,u.allowSlideNext=d,u.controller&&u.controller.control&&!i){const U={slideRealIndex:e,direction:a,setTranslate:l,activeSlideIndex:n,byController:!0};Array.isArray(u.controller.control)?u.controller.control.forEach(V=>{!V.destroyed&&V.params.loop&&V.loopFix({...U,slideTo:V.params.slidesPerView===f.slidesPerView?t:!1})}):u.controller.control instanceof u.constructor&&u.controller.control.params.loop&&u.controller.control.loopFix({...U,slideTo:u.controller.control.params.slidesPerView===f.slidesPerView?t:!1})}u.emit("loopFix")}function Yd(){const e=this,{params:t,slidesEl:a}=e;if(!t.loop||!a||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const l=[];e.slides.forEach(n=>{const r=typeof n.swiperSlideIndex>"u"?n.getAttribute("data-swiper-slide-index")*1:n.swiperSlideIndex;l[r]=n}),e.slides.forEach(n=>{n.removeAttribute("data-swiper-slide-index")}),l.forEach(n=>{a.append(n)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var Wd={loopCreate:Vd,loopFix:Gd,loopDestroy:Yd};function jd(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const a=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),a.style.cursor="move",a.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Kd(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var Xd={setGrabCursor:jd,unsetGrabCursor:Kd};function Qd(e,t=this){function a(l){if(!l||l===Ut()||l===Xe())return null;l.assignedSlot&&(l=l.assignedSlot);const n=l.closest(e);return!n&&!l.getRootNode?null:n||a(l.getRootNode().host)}return a(t)}function ui(e,t,a){const l=Xe(),{params:n}=e,r=n.edgeSwipeDetection,i=n.edgeSwipeThreshold;return r&&(a<=i||a>=l.innerWidth-i)?r==="prevent"?(t.preventDefault(),!0):!1:!0}function Jd(e){const t=this,a=Ut();let l=e;l.originalEvent&&(l=l.originalEvent);const n=t.touchEventsData;if(l.type==="pointerdown"){if(n.pointerId!==null&&n.pointerId!==l.pointerId)return;n.pointerId=l.pointerId}else l.type==="touchstart"&&l.targetTouches.length===1&&(n.touchId=l.targetTouches[0].identifier);if(l.type==="touchstart"){ui(t,l,l.targetTouches[0].pageX);return}const{params:r,touches:i,enabled:s}=t;if(!s||!r.simulateTouch&&l.pointerType==="mouse"||t.animating&&r.preventInteractionOnTransition)return;!t.animating&&r.cssMode&&r.loop&&t.loopFix();let u=l.target;if(r.touchEventsTarget==="wrapper"&&!id(u,t.wrapperEl)||"which"in l&&l.which===3||"button"in l&&l.button>0||n.isTouched&&n.isMoved)return;const o=!!r.noSwipingClass&&r.noSwipingClass!=="",c=l.composedPath?l.composedPath():l.path;o&&l.target&&l.target.shadowRoot&&c&&(u=c[0]);const d=r.noSwipingSelector?r.noSwipingSelector:`.${r.noSwipingClass}`,h=!!(l.target&&l.target.shadowRoot);if(r.noSwiping&&(h?Qd(d,u):u.closest(d))){t.allowClick=!0;return}if(r.swipeHandler&&!u.closest(r.swipeHandler))return;i.currentX=l.pageX,i.currentY=l.pageY;const f=i.currentX,y=i.currentY;if(!ui(t,l,f))return;Object.assign(n,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),i.startX=f,i.startY=y,n.touchStartTime=pl(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,r.threshold>0&&(n.allowThresholdMove=!1);let E=!0;u.matches(n.focusableElements)&&(E=!1,u.nodeName==="SELECT"&&(n.isTouched=!1)),a.activeElement&&a.activeElement.matches(n.focusableElements)&&a.activeElement!==u&&(l.pointerType==="mouse"||l.pointerType!=="mouse"&&!u.matches(n.focusableElements))&&a.activeElement.blur();const g=E&&t.allowTouchMove&&r.touchStartPreventDefault;(r.touchStartForcePreventDefault||g)&&!u.isContentEditable&&l.preventDefault(),r.freeMode&&r.freeMode.enabled&&t.freeMode&&t.animating&&!r.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function Zd(e){const t=Ut(),a=this,l=a.touchEventsData,{params:n,touches:r,rtlTranslate:i,enabled:s}=a;if(!s||!n.simulateTouch&&e.pointerType==="mouse")return;let u=e;if(u.originalEvent&&(u=u.originalEvent),u.type==="pointermove"&&(l.touchId!==null||u.pointerId!==l.pointerId))return;let o;if(u.type==="touchmove"){if(o=[...u.changedTouches].find(C=>C.identifier===l.touchId),!o||o.identifier!==l.touchId)return}else o=u;if(!l.isTouched){l.startMoving&&l.isScrolling&&a.emit("touchMoveOpposite",u);return}const c=o.pageX,d=o.pageY;if(u.preventedByNestedSwiper){r.startX=c,r.startY=d;return}if(!a.allowTouchMove){u.target.matches(l.focusableElements)||(a.allowClick=!1),l.isTouched&&(Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d}),l.touchStartTime=pl());return}if(n.touchReleaseOnEdges&&!n.loop)if(a.isVertical()){if(d<r.startY&&a.translate<=a.maxTranslate()||d>r.startY&&a.translate>=a.minTranslate()){l.isTouched=!1,l.isMoved=!1;return}}else{if(i&&(c>r.startX&&-a.translate<=a.maxTranslate()||c<r.startX&&-a.translate>=a.minTranslate()))return;if(!i&&(c<r.startX&&a.translate<=a.maxTranslate()||c>r.startX&&a.translate>=a.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(l.focusableElements)&&t.activeElement!==u.target&&u.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&u.target===t.activeElement&&u.target.matches(l.focusableElements)){l.isMoved=!0,a.allowClick=!1;return}l.allowTouchCallbacks&&a.emit("touchMove",u),r.previousX=r.currentX,r.previousY=r.currentY,r.currentX=c,r.currentY=d;const h=r.currentX-r.startX,f=r.currentY-r.startY;if(a.params.threshold&&Math.sqrt(h**2+f**2)<a.params.threshold)return;if(typeof l.isScrolling>"u"){let C;a.isHorizontal()&&r.currentY===r.startY||a.isVertical()&&r.currentX===r.startX?l.isScrolling=!1:h*h+f*f>=25&&(C=Math.atan2(Math.abs(f),Math.abs(h))*180/Math.PI,l.isScrolling=a.isHorizontal()?C>n.touchAngle:90-C>n.touchAngle)}if(l.isScrolling&&a.emit("touchMoveOpposite",u),typeof l.startMoving>"u"&&(r.currentX!==r.startX||r.currentY!==r.startY)&&(l.startMoving=!0),l.isScrolling||u.type==="touchmove"&&l.preventTouchMoveFromPointerMove){l.isTouched=!1;return}if(!l.startMoving)return;a.allowClick=!1,!n.cssMode&&u.cancelable&&u.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&u.stopPropagation();let y=a.isHorizontal()?h:f,E=a.isHorizontal()?r.currentX-r.previousX:r.currentY-r.previousY;n.oneWayMovement&&(y=Math.abs(y)*(i?1:-1),E=Math.abs(E)*(i?1:-1)),r.diff=y,y*=n.touchRatio,i&&(y=-y,E=-E);const g=a.touchesDirection;a.swipeDirection=y>0?"prev":"next",a.touchesDirection=E>0?"prev":"next";const v=a.params.loop&&!n.cssMode,m=a.touchesDirection==="next"&&a.allowSlideNext||a.touchesDirection==="prev"&&a.allowSlidePrev;if(!l.isMoved){if(v&&m&&a.loopFix({direction:a.swipeDirection}),l.startTranslate=a.getTranslate(),a.setTransition(0),a.animating){const C=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});a.wrapperEl.dispatchEvent(C)}l.allowMomentumBounce=!1,n.grabCursor&&(a.allowSlideNext===!0||a.allowSlidePrev===!0)&&a.setGrabCursor(!0),a.emit("sliderFirstMove",u)}if(new Date().getTime(),n._loopSwapReset!==!1&&l.isMoved&&l.allowThresholdMove&&g!==a.touchesDirection&&v&&m&&Math.abs(y)>=1){Object.assign(r,{startX:c,startY:d,currentX:c,currentY:d,startTranslate:l.currentTranslate}),l.loopSwapReset=!0,l.startTranslate=l.currentTranslate;return}a.emit("sliderMove",u),l.isMoved=!0,l.currentTranslate=y+l.startTranslate;let b=!0,T=n.resistanceRatio;if(n.touchReleaseOnEdges&&(T=0),y>0?(v&&m&&l.allowThresholdMove&&l.currentTranslate>(n.centeredSlides?a.minTranslate()-a.slidesSizesGrid[a.activeIndex+1]-(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.activeIndex+1]+a.params.spaceBetween:0)-a.params.spaceBetween:a.minTranslate())&&a.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),l.currentTranslate>a.minTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.minTranslate()-1+(-a.minTranslate()+l.startTranslate+y)**T))):y<0&&(v&&m&&l.allowThresholdMove&&l.currentTranslate<(n.centeredSlides?a.maxTranslate()+a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween+(n.slidesPerView!=="auto"&&a.slides.length-n.slidesPerView>=2?a.slidesSizesGrid[a.slidesSizesGrid.length-1]+a.params.spaceBetween:0):a.maxTranslate())&&a.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:a.slides.length-(n.slidesPerView==="auto"?a.slidesPerViewDynamic():Math.ceil(parseFloat(n.slidesPerView,10)))}),l.currentTranslate<a.maxTranslate()&&(b=!1,n.resistance&&(l.currentTranslate=a.maxTranslate()+1-(a.maxTranslate()-l.startTranslate-y)**T))),b&&(u.preventedByNestedSwiper=!0),!a.allowSlideNext&&a.swipeDirection==="next"&&l.currentTranslate<l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&a.swipeDirection==="prev"&&l.currentTranslate>l.startTranslate&&(l.currentTranslate=l.startTranslate),!a.allowSlidePrev&&!a.allowSlideNext&&(l.currentTranslate=l.startTranslate),n.threshold>0)if(Math.abs(y)>n.threshold||l.allowThresholdMove){if(!l.allowThresholdMove){l.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,l.currentTranslate=l.startTranslate,r.diff=a.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY;return}}else{l.currentTranslate=l.startTranslate;return}!n.followFinger||n.cssMode||((n.freeMode&&n.freeMode.enabled&&a.freeMode||n.watchSlidesProgress)&&(a.updateActiveIndex(),a.updateSlidesClasses()),n.freeMode&&n.freeMode.enabled&&a.freeMode&&a.freeMode.onTouchMove(),a.updateProgress(l.currentTranslate),a.setTranslate(l.currentTranslate))}function ef(e){const t=this,a=t.touchEventsData;let l=e;l.originalEvent&&(l=l.originalEvent);let n;if(l.type==="touchend"||l.type==="touchcancel"){if(n=[...l.changedTouches].find(C=>C.identifier===a.touchId),!n||n.identifier!==a.touchId)return}else{if(a.touchId!==null||l.pointerId!==a.pointerId)return;n=l}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(l.type)&&!(["pointercancel","contextmenu"].includes(l.type)&&(t.browser.isSafari||t.browser.isWebView)))return;a.pointerId=null,a.touchId=null;const{params:i,touches:s,rtlTranslate:u,slidesGrid:o,enabled:c}=t;if(!c||!i.simulateTouch&&l.pointerType==="mouse")return;if(a.allowTouchCallbacks&&t.emit("touchEnd",l),a.allowTouchCallbacks=!1,!a.isTouched){a.isMoved&&i.grabCursor&&t.setGrabCursor(!1),a.isMoved=!1,a.startMoving=!1;return}i.grabCursor&&a.isMoved&&a.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=pl(),h=d-a.touchStartTime;if(t.allowClick){const C=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(C&&C[0]||l.target,C),t.emit("tap click",l),h<300&&d-a.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(a.lastClickTime=pl(),ei(()=>{t.destroyed||(t.allowClick=!0)}),!a.isTouched||!a.isMoved||!t.swipeDirection||s.diff===0&&!a.loopSwapReset||a.currentTranslate===a.startTranslate&&!a.loopSwapReset){a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;return}a.isTouched=!1,a.isMoved=!1,a.startMoving=!1;let f;if(i.followFinger?f=u?t.translate:-t.translate:f=-a.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:f});return}const y=f>=-t.maxTranslate()&&!t.params.loop;let E=0,g=t.slidesSizesGrid[0];for(let C=0;C<o.length;C+=C<i.slidesPerGroupSkip?1:i.slidesPerGroup){const A=C<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;typeof o[C+A]<"u"?(y||f>=o[C]&&f<o[C+A])&&(E=C,g=o[C+A]-o[C]):(y||f>=o[C])&&(E=C,g=o[o.length-1]-o[o.length-2])}let v=null,m=null;i.rewind&&(t.isBeginning?m=i.virtual&&i.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const b=(f-o[E])/g,T=E<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(h>i.longSwipesMs){if(!i.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(b>=i.longSwipesRatio?t.slideTo(i.rewind&&t.isEnd?v:E+T):t.slideTo(E)),t.swipeDirection==="prev"&&(b>1-i.longSwipesRatio?t.slideTo(E+T):m!==null&&b<0&&Math.abs(b)>i.longSwipesRatio?t.slideTo(m):t.slideTo(E))}else{if(!i.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(E+T):t.slideTo(E):(t.swipeDirection==="next"&&t.slideTo(v!==null?v:E+T),t.swipeDirection==="prev"&&t.slideTo(m!==null?m:E))}}function oi(){const e=this,{params:t,el:a}=e;if(a&&a.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:l,allowSlidePrev:n,snapGrid:r}=e,i=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const s=i&&t.loop;if((t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!s){const u=i?e.virtual.slides:e.slides;e.slideTo(u.length-1,0,!1,!0)}else e.params.loop&&!i?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0);e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=n,e.allowSlideNext=l,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}function tf(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function af(){const e=this,{wrapperEl:t,rtlTranslate:a,enabled:l}=e;if(!l)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let n;const r=e.maxTranslate()-e.minTranslate();r===0?n=0:n=(e.translate-e.minTranslate())/r,n!==e.progress&&e.updateProgress(a?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function lf(e){const t=this;gl(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function nf(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const ci=(e,t)=>{const a=Ut(),{params:l,el:n,wrapperEl:r,device:i}=e,s=!!l.nested,u=t==="on"?"addEventListener":"removeEventListener",o=t;!n||typeof n=="string"||(a[u]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:s}),n[u]("touchstart",e.onTouchStart,{passive:!1}),n[u]("pointerdown",e.onTouchStart,{passive:!1}),a[u]("touchmove",e.onTouchMove,{passive:!1,capture:s}),a[u]("pointermove",e.onTouchMove,{passive:!1,capture:s}),a[u]("touchend",e.onTouchEnd,{passive:!0}),a[u]("pointerup",e.onTouchEnd,{passive:!0}),a[u]("pointercancel",e.onTouchEnd,{passive:!0}),a[u]("touchcancel",e.onTouchEnd,{passive:!0}),a[u]("pointerout",e.onTouchEnd,{passive:!0}),a[u]("pointerleave",e.onTouchEnd,{passive:!0}),a[u]("contextmenu",e.onTouchEnd,{passive:!0}),(l.preventClicks||l.preventClicksPropagation)&&n[u]("click",e.onClick,!0),l.cssMode&&r[u]("scroll",e.onScroll),l.updateOnWindowResize?e[o](i.ios||i.android?"resize orientationchange observerUpdate":"resize observerUpdate",oi,!0):e[o]("observerUpdate",oi,!0),n[u]("load",e.onLoad,{capture:!0}))};function rf(){const e=this,{params:t}=e;e.onTouchStart=Jd.bind(e),e.onTouchMove=Zd.bind(e),e.onTouchEnd=ef.bind(e),e.onDocumentTouchStart=nf.bind(e),t.cssMode&&(e.onScroll=af.bind(e)),e.onClick=tf.bind(e),e.onLoad=lf.bind(e),ci(e,"on")}function sf(){ci(this,"off")}var uf={attachEvents:rf,detachEvents:sf};const di=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function of(){const e=this,{realIndex:t,initialized:a,params:l,el:n}=e,r=l.breakpoints;if(!r||r&&Object.keys(r).length===0)return;const i=Ut(),s=l.breakpointsBase==="window"||!l.breakpointsBase?l.breakpointsBase:"container",u=["window","container"].includes(l.breakpointsBase)||!l.breakpointsBase?e.el:i.querySelector(l.breakpointsBase),o=e.getBreakpoint(r,s,u);if(!o||e.currentBreakpoint===o)return;const d=(o in r?r[o]:void 0)||e.originalParams,h=di(e,l),f=di(e,d),y=e.params.grabCursor,E=d.grabCursor,g=l.enabled;h&&!f?(n.classList.remove(`${l.containerModifierClass}grid`,`${l.containerModifierClass}grid-column`),e.emitContainerClasses()):!h&&f&&(n.classList.add(`${l.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&l.grid.fill==="column")&&n.classList.add(`${l.containerModifierClass}grid-column`),e.emitContainerClasses()),y&&!E?e.unsetGrabCursor():!y&&E&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof d[A]>"u")return;const N=l[A]&&l[A].enabled,k=d[A]&&d[A].enabled;N&&!k&&e[A].disable(),!N&&k&&e[A].enable()});const v=d.direction&&d.direction!==l.direction,m=l.loop&&(d.slidesPerView!==l.slidesPerView||v),b=l.loop;v&&a&&e.changeDirection(),nt(e.params,d);const T=e.params.enabled,C=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!T?e.disable():!g&&T&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",d),a&&(m?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!b&&C?(e.loopCreate(t),e.updateSlides()):b&&!C&&e.loopDestroy()),e.emit("breakpoint",d)}function cf(e,t="window",a){if(!e||t==="container"&&!a)return;let l=!1;const n=Xe(),r=t==="window"?n.innerHeight:a.clientHeight,i=Object.keys(e).map(s=>{if(typeof s=="string"&&s.indexOf("@")===0){const u=parseFloat(s.substr(1));return{value:r*u,point:s}}return{value:s,point:s}});i.sort((s,u)=>parseInt(s.value,10)-parseInt(u.value,10));for(let s=0;s<i.length;s+=1){const{point:u,value:o}=i[s];t==="window"?n.matchMedia(`(min-width: ${o}px)`).matches&&(l=u):o<=a.clientWidth&&(l=u)}return l||"max"}var df={setBreakpoint:of,getBreakpoint:cf};function ff(e,t){const a=[];return e.forEach(l=>{typeof l=="object"?Object.keys(l).forEach(n=>{l[n]&&a.push(t+n)}):typeof l=="string"&&a.push(t+l)}),a}function pf(){const e=this,{classNames:t,params:a,rtl:l,el:n,device:r}=e,i=ff(["initialized",a.direction,{"free-mode":e.params.freeMode&&a.freeMode.enabled},{autoheight:a.autoHeight},{rtl:l},{grid:a.grid&&a.grid.rows>1},{"grid-column":a.grid&&a.grid.rows>1&&a.grid.fill==="column"},{android:r.android},{ios:r.ios},{"css-mode":a.cssMode},{centered:a.cssMode&&a.centeredSlides},{"watch-progress":a.watchSlidesProgress}],a.containerModifierClass);t.push(...i),n.classList.add(...t),e.emitContainerClasses()}function hf(){const e=this,{el:t,classNames:a}=e;!t||typeof t=="string"||(t.classList.remove(...a),e.emitContainerClasses())}var bf={addClasses:pf,removeClasses:hf};function mf(){const e=this,{isLocked:t,params:a}=e,{slidesOffsetBefore:l}=a;if(l){const n=e.slides.length-1,r=e.slidesGrid[n]+e.slidesSizesGrid[n]+l*2;e.isLocked=e.size>r}else e.isLocked=e.snapGrid.length===1;a.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),a.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var vf={checkOverflow:mf},un={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,snapToSlideEdge:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function gf(e,t){return function(l={}){const n=Object.keys(l)[0],r=l[n];if(typeof r!="object"||r===null){nt(t,l);return}if(e[n]===!0&&(e[n]={enabled:!0}),n==="navigation"&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),!(n in e&&"enabled"in r)){nt(t,l);return}typeof e[n]=="object"&&!("enabled"in e[n])&&(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),nt(t,l)}}const on={eventsEmitter:hd,update:Ad,translate:Ld,transition:Md,slide:zd,loop:Wd,grabCursor:Xd,events:uf,breakpoints:df,checkOverflow:vf,classes:bf},cn={};let dn=class _t{constructor(...t){let a,l;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?l=t[0]:[a,l]=t,l||(l={}),l=nt({},l),a&&!l.el&&(l.el=a);const n=Ut();if(l.el&&typeof l.el=="string"&&n.querySelectorAll(l.el).length>1){const u=[];return n.querySelectorAll(l.el).forEach(o=>{const c=nt({},l,{el:o});u.push(new _t(c))}),u}const r=this;r.__swiper__=!0,r.support=li(),r.device=ni({userAgent:l.userAgent}),r.browser=ri(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],l.modules&&Array.isArray(l.modules)&&l.modules.forEach(u=>{typeof u=="function"&&r.modules.indexOf(u)<0&&r.modules.push(u)});const i={};r.modules.forEach(u=>{u({params:l,swiper:r,extendParams:gf(l,i),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const s=nt({},un,i);return r.params=nt({},s,cn,l),r.originalParams=nt({},r.params),r.passedParams=nt({},l),r.params&&r.params.on&&Object.keys(r.params.on).forEach(u=>{r.on(u,r.params.on[u])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),Object.assign(r,{enabled:r.params.enabled,el:a,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:a,params:l}=this,n=ht(a,`.${l.slideClass}, swiper-slide`),r=vl(n[0]);return vl(t)-r}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(a=>a.getAttribute("data-swiper-slide-index")*1===t))}getSlideIndexWhenGrid(t){return this.grid&&this.params.grid&&this.params.grid.rows>1&&(this.params.grid.fill==="column"?t=Math.floor(t/this.params.grid.rows):this.params.grid.fill==="row"&&(t=t%Math.ceil(this.slides.length/this.params.grid.rows))),t}recalcSlides(){const t=this,{slidesEl:a,params:l}=t;t.slides=ht(a,`.${l.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,a){const l=this;t=Math.min(Math.max(t,0),1);const n=l.minTranslate(),i=(l.maxTranslate()-n)*t+n;l.translateTo(i,typeof a>"u"?0:a),l.updateActiveIndex(),l.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=t.el.className.split(" ").filter(l=>l.indexOf("swiper")===0||l.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",a.join(" "))}getSlideClasses(t){const a=this;return a.destroyed?"":t.className.split(" ").filter(l=>l.indexOf("swiper-slide")===0||l.indexOf(a.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const a=[];t.slides.forEach(l=>{const n=t.getSlideClasses(l);a.push({slideEl:l,classNames:n}),t.emit("_slideClass",l,n)}),t.emit("_slideClasses",a)}slidesPerViewDynamic(t="current",a=!1){const l=this,{params:n,slides:r,slidesGrid:i,slidesSizesGrid:s,size:u,activeIndex:o}=l;let c=1;if(typeof n.slidesPerView=="number")return n.slidesPerView;if(n.centeredSlides){let d=r[o]?Math.ceil(r[o].swiperSlideSize):0,h;for(let f=o+1;f<r.length;f+=1)r[f]&&!h&&(d+=Math.ceil(r[f].swiperSlideSize),c+=1,d>u&&(h=!0));for(let f=o-1;f>=0;f-=1)r[f]&&!h&&(d+=r[f].swiperSlideSize,c+=1,d>u&&(h=!0))}else if(t==="current")for(let d=o+1;d<r.length;d+=1)(a?i[d]+s[d]-i[o]<u:i[d]-i[o]<u)&&(c+=1);else for(let d=o-1;d>=0;d-=1)i[o]-i[d]<u&&(c+=1);return c}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:a,params:l}=t;l.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(i=>{i.complete&&gl(t,i)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function n(){const i=t.rtlTranslate?t.translate*-1:t.translate,s=Math.min(Math.max(i,t.maxTranslate()),t.minTranslate());t.setTranslate(s),t.updateActiveIndex(),t.updateSlidesClasses()}let r;if(l.freeMode&&l.freeMode.enabled&&!l.cssMode)n(),l.autoHeight&&t.updateAutoHeight();else{if((l.slidesPerView==="auto"||l.slidesPerView>1)&&t.isEnd&&!l.centeredSlides){const i=t.virtual&&l.virtual.enabled?t.virtual.slides:t.slides;r=t.slideTo(i.length-1,0,!1,!0)}else r=t.slideTo(t.activeIndex,0,!1,!0);r||n()}l.watchOverflow&&a!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,a=!0){const l=this,n=l.params.direction;return t||(t=n==="horizontal"?"vertical":"horizontal"),t===n||t!=="horizontal"&&t!=="vertical"||(l.el.classList.remove(`${l.params.containerModifierClass}${n}`),l.el.classList.add(`${l.params.containerModifierClass}${t}`),l.emitContainerClasses(),l.params.direction=t,l.slides.forEach(r=>{t==="vertical"?r.style.width="":r.style.height=""}),l.emit("changeDirection"),a&&l.update()),l}changeLanguageDirection(t){const a=this;a.rtl&&t==="rtl"||!a.rtl&&t==="ltr"||(a.rtl=t==="rtl",a.rtlTranslate=a.params.direction==="horizontal"&&a.rtl,a.rtl?(a.el.classList.add(`${a.params.containerModifierClass}rtl`),a.el.dir="rtl"):(a.el.classList.remove(`${a.params.containerModifierClass}rtl`),a.el.dir="ltr"),a.update())}mount(t){const a=this;if(a.mounted)return!0;let l=t||a.params.el;if(typeof l=="string"&&(l=document.querySelector(l)),!l)return!1;l.swiper=a,l.parentNode&&l.parentNode.host&&l.parentNode.host.nodeName===a.params.swiperElementNodeName.toUpperCase()&&(a.isElement=!0);const n=()=>`.${(a.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=l&&l.shadowRoot&&l.shadowRoot.querySelector?l.shadowRoot.querySelector(n()):ht(l,n())[0];return!i&&a.params.createElements&&(i=ml("div",a.params.wrapperClass),l.append(i),ht(l,`.${a.params.slideClass}`).forEach(s=>{i.append(s)})),Object.assign(a,{el:l,wrapperEl:i,slidesEl:a.isElement&&!l.parentNode.host.slideSlots?l.parentNode.host:i,hostEl:a.isElement?l.parentNode.host:l,mounted:!0,rtl:l.dir.toLowerCase()==="rtl"||Nt(l,"direction")==="rtl",rtlTranslate:a.params.direction==="horizontal"&&(l.dir.toLowerCase()==="rtl"||Nt(l,"direction")==="rtl"),wrongRTL:Nt(i,"display")==="-webkit-box"}),!0}init(t){const a=this;if(a.initialized||a.mount(t)===!1)return a;a.emit("beforeInit"),a.params.breakpoints&&a.setBreakpoint(),a.addClasses(),a.updateSize(),a.updateSlides(),a.params.watchOverflow&&a.checkOverflow(),a.params.grabCursor&&a.enabled&&a.setGrabCursor(),a.params.loop&&a.virtual&&a.params.virtual.enabled?a.slideTo(a.params.initialSlide+a.virtual.slidesBefore,0,a.params.runCallbacksOnInit,!1,!0):a.slideTo(a.params.initialSlide,0,a.params.runCallbacksOnInit,!1,!0),a.params.loop&&a.loopCreate(void 0,!0),a.attachEvents();const n=[...a.el.querySelectorAll('[loading="lazy"]')];return a.isElement&&n.push(...a.hostEl.querySelectorAll('[loading="lazy"]')),n.forEach(r=>{r.complete?gl(a,r):r.addEventListener("load",i=>{gl(a,i.target)})}),sn(a),a.initialized=!0,sn(a),a.emit("init"),a.emit("afterInit"),a}destroy(t=!0,a=!0){const l=this,{params:n,el:r,wrapperEl:i,slides:s}=l;return typeof l.params>"u"||l.destroyed||(l.emit("beforeDestroy"),l.initialized=!1,l.detachEvents(),n.loop&&l.loopDestroy(),a&&(l.removeClasses(),r&&typeof r!="string"&&r.removeAttribute("style"),i&&i.removeAttribute("style"),s&&s.length&&s.forEach(u=>{u.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),u.removeAttribute("style"),u.removeAttribute("data-swiper-slide-index")})),l.emit("destroy"),Object.keys(l.eventsListeners).forEach(u=>{l.off(u)}),t!==!1&&(l.el&&typeof l.el!="string"&&(l.el.swiper=null),td(l)),l.destroyed=!0),null}static extendDefaults(t){nt(cn,t)}static get extendedDefaults(){return cn}static get defaults(){return un}static installModule(t){_t.prototype.__modules__||(_t.prototype.__modules__=[]);const a=_t.prototype.__modules__;typeof t=="function"&&a.indexOf(t)<0&&a.push(t)}static use(t){return Array.isArray(t)?(t.forEach(a=>_t.installModule(a)),_t):(_t.installModule(t),_t)}};Object.keys(on).forEach(e=>{Object.keys(on[e]).forEach(t=>{dn.prototype[t]=on[e][t]})}),dn.use([fd,pd]);const fi=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_snapToSlideEdge","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function qt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function na(e,t){const a=["__proto__","constructor","prototype"];Object.keys(t).filter(l=>a.indexOf(l)<0).forEach(l=>{typeof e[l]>"u"?e[l]=t[l]:qt(t[l])&&qt(e[l])&&Object.keys(t[l]).length>0?t[l].__swiper__?e[l]=t[l]:na(e[l],t[l]):e[l]=t[l]})}function pi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function hi(e={}){return e.pagination&&typeof e.pagination.el>"u"}function bi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function mi(e=""){const t=e.split(" ").map(l=>l.trim()).filter(l=>!!l),a=[];return t.forEach(l=>{a.indexOf(l)<0&&a.push(l)}),a.join(" ")}function Ef(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function yf({swiper:e,slides:t,passedParams:a,changedParams:l,nextEl:n,prevEl:r,scrollbarEl:i,paginationEl:s}){const u=l.filter(k=>k!=="children"&&k!=="direction"&&k!=="wrapperClass"),{params:o,pagination:c,navigation:d,scrollbar:h,virtual:f,thumbs:y}=e;let E,g,v,m,b,T,C,A;l.includes("thumbs")&&a.thumbs&&a.thumbs.swiper&&!a.thumbs.swiper.destroyed&&o.thumbs&&(!o.thumbs.swiper||o.thumbs.swiper.destroyed)&&(E=!0),l.includes("controller")&&a.controller&&a.controller.control&&o.controller&&!o.controller.control&&(g=!0),l.includes("pagination")&&a.pagination&&(a.pagination.el||s)&&(o.pagination||o.pagination===!1)&&c&&!c.el&&(v=!0),l.includes("scrollbar")&&a.scrollbar&&(a.scrollbar.el||i)&&(o.scrollbar||o.scrollbar===!1)&&h&&!h.el&&(m=!0),l.includes("navigation")&&a.navigation&&(a.navigation.prevEl||r)&&(a.navigation.nextEl||n)&&(o.navigation||o.navigation===!1)&&d&&!d.prevEl&&!d.nextEl&&(b=!0);const N=k=>{e[k]&&(e[k].destroy(),k==="navigation"?(e.isElement&&(e[k].prevEl.remove(),e[k].nextEl.remove()),o[k].prevEl=void 0,o[k].nextEl=void 0,e[k].prevEl=void 0,e[k].nextEl=void 0):(e.isElement&&e[k].el.remove(),o[k].el=void 0,e[k].el=void 0))};l.includes("loop")&&e.isElement&&(o.loop&&!a.loop?T=!0:!o.loop&&a.loop?C=!0:A=!0),u.forEach(k=>{if(qt(o[k])&&qt(a[k]))Object.assign(o[k],a[k]),(k==="navigation"||k==="pagination"||k==="scrollbar")&&"enabled"in a[k]&&!a[k].enabled&&N(k);else{const S=a[k];(S===!0||S===!1)&&(k==="navigation"||k==="pagination"||k==="scrollbar")?S===!1&&N(k):o[k]=a[k]}}),u.includes("controller")&&!g&&e.controller&&e.controller.control&&o.controller&&o.controller.control&&(e.controller.control=o.controller.control),l.includes("children")&&t&&f&&o.virtual.enabled?(f.slides=t,f.update(!0)):l.includes("virtual")&&f&&o.virtual.enabled&&(t&&(f.slides=t),f.update(!0)),l.includes("children")&&t&&o.loop&&(A=!0),E&&y.init()&&y.update(!0),g&&(e.controller.control=o.controller.control),v&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-pagination"),s.part.add("pagination"),e.el.appendChild(s)),s&&(o.pagination.el=s),c.init(),c.render(),c.update()),m&&(e.isElement&&(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-scrollbar"),i.part.add("scrollbar"),e.el.appendChild(i)),i&&(o.scrollbar.el=i),h.init(),h.updateSize(),h.setTranslate()),b&&(e.isElement&&((!n||typeof n=="string")&&(n=document.createElement("div"),n.classList.add("swiper-button-next"),Ta(n,e.navigation.arrowSvg),n.part.add("button-next"),e.el.appendChild(n)),(!r||typeof r=="string")&&(r=document.createElement("div"),r.classList.add("swiper-button-prev"),Ta(r,e.navigation.arrowSvg),r.part.add("button-prev"),e.el.appendChild(r))),n&&(o.navigation.nextEl=n),r&&(o.navigation.prevEl=r),d.init(),d.update()),l.includes("allowSlideNext")&&(e.allowSlideNext=a.allowSlideNext),l.includes("allowSlidePrev")&&(e.allowSlidePrev=a.allowSlidePrev),l.includes("direction")&&e.changeDirection(a.direction,!1),(T||A)&&e.loopDestroy(),(C||A)&&e.loopCreate(),e.update()}function Tf(e={},t=!0){const a={on:{}},l={},n={};na(a,un),a._emitClasses=!0,a.init=!1;const r={},i=fi.map(u=>u.replace(/_/,"")),s=Object.assign({},e);return Object.keys(s).forEach(u=>{typeof e[u]>"u"||(i.indexOf(u)>=0?qt(e[u])?(a[u]={},n[u]={},na(a[u],e[u]),na(n[u],e[u])):(a[u]=e[u],n[u]=e[u]):u.search(/on[A-Z]/)===0&&typeof e[u]=="function"?t?l[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:a.on[`${u[2].toLowerCase()}${u.substr(3)}`]=e[u]:r[u]=e[u])}),["navigation","pagination","scrollbar"].forEach(u=>{a[u]===!0&&(a[u]={}),a[u]===!1&&delete a[u]}),{params:a,passedParams:n,rest:r,events:l}}function xf({el:e,nextEl:t,prevEl:a,paginationEl:l,scrollbarEl:n,swiper:r},i){pi(i)&&t&&a&&(r.params.navigation.nextEl=t,r.originalParams.navigation.nextEl=t,r.params.navigation.prevEl=a,r.originalParams.navigation.prevEl=a),hi(i)&&l&&(r.params.pagination.el=l,r.originalParams.pagination.el=l),bi(i)&&n&&(r.params.scrollbar.el=n,r.originalParams.scrollbar.el=n),r.init(e)}function Cf(e,t,a,l,n){const r=[];if(!t)return r;const i=u=>{r.indexOf(u)<0&&r.push(u)};if(a&&l){const u=l.map(n),o=a.map(n);u.join("")!==o.join("")&&i("children"),l.length!==a.length&&i("children")}return fi.filter(u=>u[0]==="_").map(u=>u.replace(/_/,"")).forEach(u=>{if(u in e&&u in t)if(qt(e[u])&&qt(t[u])){const o=Object.keys(e[u]),c=Object.keys(t[u]);o.length!==c.length?i(u):(o.forEach(d=>{e[u][d]!==t[u][d]&&i(u)}),c.forEach(d=>{e[u][d]!==t[u][d]&&i(u)}))}else e[u]!==t[u]&&i(u)}),r}const Sf=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function El(){return El=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},El.apply(this,arguments)}function vi(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function gi(e){const t=[];return w.Children.toArray(e).forEach(a=>{vi(a)?t.push(a):a.props&&a.props.children&&gi(a.props.children).forEach(l=>t.push(l))}),t}function Af(e){const t=[],a={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return w.Children.toArray(e).forEach(l=>{if(vi(l))t.push(l);else if(l.props&&l.props.slot&&a[l.props.slot])a[l.props.slot].push(l);else if(l.props&&l.props.children){const n=gi(l.props.children);n.length>0?n.forEach(r=>t.push(r)):a["container-end"].push(l)}else a["container-end"].push(l)}),{slides:t,slots:a}}function wf(e,t,a){if(!a)return null;const l=c=>{let d=c;return c<0?d=t.length+c:d>=t.length&&(d=d-t.length),d},n=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${a.offset}px`}:{top:`${a.offset}px`},{from:r,to:i}=a,s=e.params.loop?-t.length:0,u=e.params.loop?t.length*2:t.length,o=[];for(let c=s;c<u;c+=1)c>=r&&c<=i&&o.push(t[l(c)]);return o.map((c,d)=>w.cloneElement(c,{swiper:e,style:n,key:c.props.virtualIndex||c.key||`slide-${d}`}))}function xa(e,t){return typeof window>"u"?w.useEffect(e,t):w.useLayoutEffect(e,t)}const Ei=w.createContext(null),kf=w.createContext(null),yi=w.forwardRef(({className:e,tag:t="div",wrapperTag:a="div",children:l,onSwiper:n,...r}={},i)=>{let s=!1;const[u,o]=w.useState("swiper"),[c,d]=w.useState(null),[h,f]=w.useState(!1),y=w.useRef(!1),E=w.useRef(null),g=w.useRef(null),v=w.useRef(null),m=w.useRef(null),b=w.useRef(null),T=w.useRef(null),C=w.useRef(null),A=w.useRef(null),{params:N,passedParams:k,rest:S,events:L}=Tf(r),{slides:D,slots:F}=Af(l),M=()=>{f(!h)};Object.assign(N.on,{_containerClasses(U,V){o(V)}});const I=()=>{Object.assign(N.on,L),s=!0;const U={...N};if(delete U.wrapperClass,g.current=new dn(U),g.current.virtual&&g.current.params.virtual.enabled){g.current.virtual.slides=D;const V={cache:!1,slides:D,renderExternal:d,renderExternalUpdate:!1};na(g.current.params.virtual,V),na(g.current.originalParams.virtual,V)}};E.current||I(),g.current&&g.current.on("_beforeBreakpoint",M);const x=()=>{s||!L||!g.current||Object.keys(L).forEach(U=>{g.current.on(U,L[U])})},P=()=>{!L||!g.current||Object.keys(L).forEach(U=>{g.current.off(U,L[U])})};w.useEffect(()=>()=>{g.current&&g.current.off("_beforeBreakpoint",M)}),w.useEffect(()=>{!y.current&&g.current&&(g.current.emitSlidesClasses(),y.current=!0)}),xa(()=>{if(i&&(i.current=E.current),!!E.current)return g.current.destroyed&&I(),xf({el:E.current,nextEl:b.current,prevEl:T.current,paginationEl:C.current,scrollbarEl:A.current,swiper:g.current},N),n&&!g.current.destroyed&&n(g.current),()=>{g.current&&!g.current.destroyed&&g.current.destroy(!0,!1)}},[]),xa(()=>{x();const U=Cf(k,v.current,D,m.current,V=>V.key);return v.current=k,m.current=D,U.length&&g.current&&!g.current.destroyed&&yf({swiper:g.current,slides:D,passedParams:k,changedParams:U,nextEl:b.current,prevEl:T.current,scrollbarEl:A.current,paginationEl:C.current}),()=>{P()}}),xa(()=>{Sf(g.current)},[c]);function z(){return N.virtual?wf(g.current,D,c):D.map((U,V)=>w.cloneElement(U,{swiper:g.current,swiperSlideIndex:V}))}return w.createElement(t,El({ref:E,className:mi(`${u}${e?` ${e}`:""}`)},S),w.createElement(kf.Provider,{value:g.current},F["container-start"],w.createElement(a,{className:Ef(N.wrapperClass)},F["wrapper-start"],z(),F["wrapper-end"]),pi(N)&&w.createElement(w.Fragment,null,w.createElement("div",{ref:T,className:"swiper-button-prev"}),w.createElement("div",{ref:b,className:"swiper-button-next"})),bi(N)&&w.createElement("div",{ref:A,className:"swiper-scrollbar"}),hi(N)&&w.createElement("div",{ref:C,className:"swiper-pagination"}),F["container-end"]))});yi.displayName="Swiper";const Ti=w.forwardRef(({tag:e="div",children:t,className:a="",swiper:l,zoom:n,lazy:r,virtualIndex:i,swiperSlideIndex:s,...u}={},o)=>{const c=w.useRef(null),[d,h]=w.useState("swiper-slide"),[f,y]=w.useState(!1);function E(b,T,C){T===c.current&&h(C)}xa(()=>{if(typeof s<"u"&&(c.current.swiperSlideIndex=s),o&&(o.current=c.current),!(!c.current||!l)){if(l.destroyed){d!=="swiper-slide"&&h("swiper-slide");return}return l.on("_slideClass",E),()=>{l&&l.off("_slideClass",E)}}}),xa(()=>{l&&c.current&&!l.destroyed&&h(l.getSlideClasses(c.current))},[l]);const g={isActive:d.indexOf("swiper-slide-active")>=0,isVisible:d.indexOf("swiper-slide-visible")>=0,isPrev:d.indexOf("swiper-slide-prev")>=0,isNext:d.indexOf("swiper-slide-next")>=0},v=()=>typeof t=="function"?t(g):t,m=()=>{y(!0)};return w.createElement(e,El({ref:c,className:mi(`${d}${a?` ${a}`:""}`),"data-swiper-slide-index":i,onLoad:m},u),n&&w.createElement(Ei.Provider,{value:g},w.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof n=="number"?n:void 0},v(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}}))),!n&&w.createElement(Ei.Provider,{value:g},v(),r&&!f&&w.createElement("div",{className:"swiper-lazy-preloader",ref:b=>{b&&(b.lazyPreloaderManaged=!0)}})))});Ti.displayName="SwiperSlide";function xi(e,t,a,l){return e.params.createElements&&Object.keys(l).forEach(n=>{if(!a[n]&&a.auto===!0){let r=ht(e.el,`.${l[n]}`)[0];r||(r=ml("div",l[n]),r.className=l[n],e.el.append(r)),a[n]=r,t[n]=r}}),a}const Ci='<svg class="swiper-navigation-icon" width="11" height="20" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.38296 20.0762C0.111788 19.805 0.111788 19.3654 0.38296 19.0942L9.19758 10.2796L0.38296 1.46497C0.111788 1.19379 0.111788 0.754138 0.38296 0.482966C0.654131 0.211794 1.09379 0.211794 1.36496 0.482966L10.4341 9.55214C10.8359 9.9539 10.8359 10.6053 10.4341 11.007L1.36496 20.0762C1.09379 20.3474 0.654131 20.3474 0.38296 20.0762Z" fill="currentColor"/></svg>';function _f({swiper:e,extendParams:t,on:a,emit:l}){t({navigation:{nextEl:null,prevEl:null,addIcons:!0,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,prevEl:null,arrowSvg:Ci};function n(f){let y;return f&&typeof f=="string"&&e.isElement&&(y=e.el.querySelector(f)||e.hostEl.querySelector(f),y)?y:(f&&(typeof f=="string"&&(y=[...document.querySelectorAll(f)]),e.params.uniqueNavElements&&typeof f=="string"&&y&&y.length>1&&e.el.querySelectorAll(f).length===1?y=e.el.querySelector(f):y&&y.length===1&&(y=y[0])),f&&!y?f:y)}function r(f,y){const E=e.params.navigation;f=Ue(f),f.forEach(g=>{g&&(g.classList[y?"add":"remove"](...E.disabledClass.split(" ")),g.tagName==="BUTTON"&&(g.disabled=y),e.params.watchOverflow&&e.enabled&&g.classList[e.isLocked?"add":"remove"](E.lockClass))})}function i(){const{nextEl:f,prevEl:y}=e.navigation;if(e.params.loop){r(y,!1),r(f,!1);return}r(y,e.isBeginning&&!e.params.rewind),r(f,e.isEnd&&!e.params.rewind)}function s(f){f.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),l("navigationPrev"))}function u(f){f.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),l("navigationNext"))}function o(){const f=e.params.navigation;if(e.params.navigation=xi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(f.nextEl||f.prevEl))return;let y=n(f.nextEl),E=n(f.prevEl);Object.assign(e.navigation,{nextEl:y,prevEl:E}),y=Ue(y),E=Ue(E);const g=(v,m)=>{if(v){if(f.addIcons&&v.matches(".swiper-button-next,.swiper-button-prev")&&!v.querySelector("svg")){const b=document.createElement("div");Ta(b,Ci),v.appendChild(b.querySelector("svg")),b.remove()}v.addEventListener("click",m==="next"?u:s)}!e.enabled&&v&&v.classList.add(...f.lockClass.split(" "))};y.forEach(v=>g(v,"next")),E.forEach(v=>g(v,"prev"))}function c(){let{nextEl:f,prevEl:y}=e.navigation;f=Ue(f),y=Ue(y);const E=(g,v)=>{g.removeEventListener("click",v==="next"?u:s),g.classList.remove(...e.params.navigation.disabledClass.split(" "))};f.forEach(g=>E(g,"next")),y.forEach(g=>E(g,"prev"))}a("init",()=>{e.params.navigation.enabled===!1?h():(o(),i())}),a("toEdge fromEdge lock unlock",()=>{i()}),a("destroy",()=>{c()}),a("enable disable",()=>{let{nextEl:f,prevEl:y}=e.navigation;if(f=Ue(f),y=Ue(y),e.enabled){i();return}[...f,...y].filter(E=>!!E).forEach(E=>E.classList.add(e.params.navigation.lockClass))}),a("click",(f,y)=>{let{nextEl:E,prevEl:g}=e.navigation;E=Ue(E),g=Ue(g);const v=y.target;let m=g.includes(v)||E.includes(v);if(e.isElement&&!m){const b=y.path||y.composedPath&&y.composedPath();b&&(m=b.find(T=>E.includes(T)||g.includes(T)))}if(e.params.navigation.hideOnClick&&!m){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===v||e.pagination.el.contains(v)))return;let b;E.length?b=E[0].classList.contains(e.params.navigation.hiddenClass):g.length&&(b=g[0].classList.contains(e.params.navigation.hiddenClass)),l(b===!0?"navigationShow":"navigationHide"),[...E,...g].filter(T=>!!T).forEach(T=>T.classList.toggle(e.params.navigation.hiddenClass))}});const d=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),o(),i()},h=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),c()};Object.assign(e.navigation,{enable:d,disable:h,update:i,init:o,destroy:c})}function Ca(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Nf({swiper:e,extendParams:t,on:a,emit:l}){const n="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:v=>v,formatFractionTotal:v=>v,bulletClass:`${n}-bullet`,bulletActiveClass:`${n}-bullet-active`,modifierClass:`${n}-`,currentClass:`${n}-current`,totalClass:`${n}-total`,hiddenClass:`${n}-hidden`,progressbarFillClass:`${n}-progressbar-fill`,progressbarOppositeClass:`${n}-progressbar-opposite`,clickableClass:`${n}-clickable`,lockClass:`${n}-lock`,horizontalClass:`${n}-horizontal`,verticalClass:`${n}-vertical`,paginationDisabledClass:`${n}-disabled`}}),e.pagination={el:null,bullets:[]};let r,i=0;function s(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function u(v,m){const{bulletActiveClass:b}=e.params.pagination;v&&(v=v[`${m==="prev"?"previous":"next"}ElementSibling`],v&&(v.classList.add(`${b}-${m}`),v=v[`${m==="prev"?"previous":"next"}ElementSibling`],v&&v.classList.add(`${b}-${m}-${m}`)))}function o(v,m,b){if(v=v%b,m=m%b,m===v+1)return"next";if(m===v-1)return"previous"}function c(v){const m=v.target.closest(Ca(e.params.pagination.bulletClass));if(!m)return;v.preventDefault();const b=vl(m)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===b)return;const T=o(e.realIndex,b,e.slides.length);T==="next"?e.slideNext():T==="previous"?e.slidePrev():e.slideToLoop(b)}else e.slideTo(b)}function d(){const v=e.rtl,m=e.params.pagination;if(s())return;let b=e.pagination.el;b=Ue(b);let T,C;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,N=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(C=e.previousRealIndex||0,T=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(T=e.snapIndex,C=e.previousSnapIndex):(C=e.previousIndex||0,T=e.activeIndex||0),m.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const k=e.pagination.bullets;let S,L,D;if(m.dynamicBullets&&(r=en(k[0],e.isHorizontal()?"width":"height"),b.forEach(F=>{F.style[e.isHorizontal()?"width":"height"]=`${r*(m.dynamicMainBullets+4)}px`}),m.dynamicMainBullets>1&&C!==void 0&&(i+=T-(C||0),i>m.dynamicMainBullets-1?i=m.dynamicMainBullets-1:i<0&&(i=0)),S=Math.max(T-i,0),L=S+(Math.min(k.length,m.dynamicMainBullets)-1),D=(L+S)/2),k.forEach(F=>{const M=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(I=>`${m.bulletActiveClass}${I}`)].map(I=>typeof I=="string"&&I.includes(" ")?I.split(" "):I).flat();F.classList.remove(...M)}),b.length>1)k.forEach(F=>{const M=vl(F);M===T?F.classList.add(...m.bulletActiveClass.split(" ")):e.isElement&&F.setAttribute("part","bullet"),m.dynamicBullets&&(M>=S&&M<=L&&F.classList.add(...`${m.bulletActiveClass}-main`.split(" ")),M===S&&u(F,"prev"),M===L&&u(F,"next"))});else{const F=k[T];if(F&&F.classList.add(...m.bulletActiveClass.split(" ")),e.isElement&&k.forEach((M,I)=>{M.setAttribute("part",I===T?"bullet-active":"bullet")}),m.dynamicBullets){const M=k[S],I=k[L];for(let x=S;x<=L;x+=1)k[x]&&k[x].classList.add(...`${m.bulletActiveClass}-main`.split(" "));u(M,"prev"),u(I,"next")}}if(m.dynamicBullets){const F=Math.min(k.length,m.dynamicMainBullets+4),M=(r*F-r)/2-D*r,I=v?"right":"left";k.forEach(x=>{x.style[e.isHorizontal()?I:"top"]=`${M}px`})}}b.forEach((k,S)=>{if(m.type==="fraction"&&(k.querySelectorAll(Ca(m.currentClass)).forEach(L=>{L.textContent=m.formatFractionCurrent(T+1)}),k.querySelectorAll(Ca(m.totalClass)).forEach(L=>{L.textContent=m.formatFractionTotal(N)})),m.type==="progressbar"){let L;m.progressbarOpposite?L=e.isHorizontal()?"vertical":"horizontal":L=e.isHorizontal()?"horizontal":"vertical";const D=(T+1)/N;let F=1,M=1;L==="horizontal"?F=D:M=D,k.querySelectorAll(Ca(m.progressbarFillClass)).forEach(I=>{I.style.transform=`translate3d(0,0,0) scaleX(${F}) scaleY(${M})`,I.style.transitionDuration=`${e.params.speed}ms`})}m.type==="custom"&&m.renderCustom?(Ta(k,m.renderCustom(e,T+1,N)),S===0&&l("paginationRender",k)):(S===0&&l("paginationRender",k),l("paginationUpdate",k)),e.params.watchOverflow&&e.enabled&&k.classList[e.isLocked?"add":"remove"](m.lockClass)})}function h(){const v=e.params.pagination;if(s())return;const m=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.grid&&e.params.grid.rows>1?e.slides.length/Math.ceil(e.params.grid.rows):e.slides.length;let b=e.pagination.el;b=Ue(b);let T="";if(v.type==="bullets"){let C=e.params.loop?Math.ceil(m/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&C>m&&(C=m);for(let A=0;A<C;A+=1)v.renderBullet?T+=v.renderBullet.call(e,A,v.bulletClass):T+=`<${v.bulletElement} ${e.isElement?'part="bullet"':""} class="${v.bulletClass}"></${v.bulletElement}>`}v.type==="fraction"&&(v.renderFraction?T=v.renderFraction.call(e,v.currentClass,v.totalClass):T=`<span class="${v.currentClass}"></span> / <span class="${v.totalClass}"></span>`),v.type==="progressbar"&&(v.renderProgressbar?T=v.renderProgressbar.call(e,v.progressbarFillClass):T=`<span class="${v.progressbarFillClass}"></span>`),e.pagination.bullets=[],b.forEach(C=>{v.type!=="custom"&&Ta(C,T||""),v.type==="bullets"&&e.pagination.bullets.push(...C.querySelectorAll(Ca(v.bulletClass)))}),v.type!=="custom"&&l("paginationRender",b[0])}function f(){e.params.pagination=xi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const v=e.params.pagination;if(!v.el)return;let m;typeof v.el=="string"&&e.isElement&&(m=e.el.querySelector(v.el)),!m&&typeof v.el=="string"&&(m=[...document.querySelectorAll(v.el)]),m||(m=v.el),!(!m||m.length===0)&&(e.params.uniqueNavElements&&typeof v.el=="string"&&Array.isArray(m)&&m.length>1&&(m=[...e.el.querySelectorAll(v.el)],m.length>1&&(m=m.find(b=>ai(b,".swiper")[0]===e.el))),Array.isArray(m)&&m.length===1&&(m=m[0]),Object.assign(e.pagination,{el:m}),m=Ue(m),m.forEach(b=>{v.type==="bullets"&&v.clickable&&b.classList.add(...(v.clickableClass||"").split(" ")),b.classList.add(v.modifierClass+v.type),b.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.type==="bullets"&&v.dynamicBullets&&(b.classList.add(`${v.modifierClass}${v.type}-dynamic`),i=0,v.dynamicMainBullets<1&&(v.dynamicMainBullets=1)),v.type==="progressbar"&&v.progressbarOpposite&&b.classList.add(v.progressbarOppositeClass),v.clickable&&b.addEventListener("click",c),e.enabled||b.classList.add(v.lockClass)}))}function y(){const v=e.params.pagination;if(s())return;let m=e.pagination.el;m&&(m=Ue(m),m.forEach(b=>{b.classList.remove(v.hiddenClass),b.classList.remove(v.modifierClass+v.type),b.classList.remove(e.isHorizontal()?v.horizontalClass:v.verticalClass),v.clickable&&(b.classList.remove(...(v.clickableClass||"").split(" ")),b.removeEventListener("click",c))})),e.pagination.bullets&&e.pagination.bullets.forEach(b=>b.classList.remove(...v.bulletActiveClass.split(" ")))}a("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const v=e.params.pagination;let{el:m}=e.pagination;m=Ue(m),m.forEach(b=>{b.classList.remove(v.horizontalClass,v.verticalClass),b.classList.add(e.isHorizontal()?v.horizontalClass:v.verticalClass)})}),a("init",()=>{e.params.pagination.enabled===!1?g():(f(),h(),d())}),a("activeIndexChange",()=>{typeof e.snapIndex>"u"&&d()}),a("snapIndexChange",()=>{d()}),a("snapGridLengthChange",()=>{h(),d()}),a("destroy",()=>{y()}),a("enable disable",()=>{let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),a("lock unlock",()=>{d()}),a("click",(v,m)=>{const b=m.target,T=Ue(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&T&&T.length>0&&!b.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&b===e.navigation.nextEl||e.navigation.prevEl&&b===e.navigation.prevEl))return;const C=T[0].classList.contains(e.params.pagination.hiddenClass);l(C===!0?"paginationShow":"paginationHide"),T.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const E=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList.remove(e.params.pagination.paginationDisabledClass))),f(),h(),d()},g=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:v}=e.pagination;v&&(v=Ue(v),v.forEach(m=>m.classList.add(e.params.pagination.paginationDisabledClass))),y()};Object.assign(e.pagination,{enable:E,disable:g,render:h,update:d,init:f,destroy:y})}function uT(){}function oT(){}function Si(e){const t=[],a=String(e||"");let l=a.indexOf(","),n=0,r=!1;for(;!r;){l===-1&&(l=a.length,r=!0);const i=a.slice(n,l).trim();(i||!r)&&t.push(i),n=l+1,l=a.indexOf(",",n)}return t}function Ai(e,t){const a={};return(e[e.length-1]===""?[...e,""]:e).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const If=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lf=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Of={};function wi(e,t){return(Of.jsx?Lf:If).test(e)}const Df=/[ \t\n\f\r]/g;function Pf(e){return typeof e=="object"?e.type==="text"?ki(e.value):!1:ki(e)}function ki(e){return e.replace(Df,"")===""}class Sa{constructor(t,a,l){this.normal=a,this.property=t,l&&(this.space=l)}}Sa.prototype.normal={},Sa.prototype.property={},Sa.prototype.space=void 0;function _i(e,t){const a={},l={};for(const n of e)Object.assign(a,n.property),Object.assign(l,n.normal);return new Sa(a,l,t)}function Aa(e){return e.toLowerCase()}class et{constructor(t,a){this.attribute=a,this.property=t}}et.prototype.attribute="",et.prototype.booleanish=!1,et.prototype.boolean=!1,et.prototype.commaOrSpaceSeparated=!1,et.prototype.commaSeparated=!1,et.prototype.defined=!1,et.prototype.mustUseProperty=!1,et.prototype.number=!1,et.prototype.overloadedBoolean=!1,et.prototype.property="",et.prototype.spaceSeparated=!1,et.prototype.space=void 0;let Mf=0;const ye=zt(),Re=zt(),fn=zt(),le=zt(),Oe=zt(),ra=zt(),rt=zt();function zt(){return 2**++Mf}const pn=Object.freeze(Object.defineProperty({__proto__:null,boolean:ye,booleanish:Re,commaOrSpaceSeparated:rt,commaSeparated:ra,number:le,overloadedBoolean:fn,spaceSeparated:Oe},Symbol.toStringTag,{value:"Module"})),hn=Object.keys(pn);class bn extends et{constructor(t,a,l,n){let r=-1;if(super(t,a),Ni(this,"space",n),typeof l=="number")for(;++r<hn.length;){const i=hn[r];Ni(this,hn[r],(l&pn[i])===pn[i])}}}bn.prototype.defined=!0;function Ni(e,t,a){a&&(e[t]=a)}function ia(e){const t={},a={};for(const[l,n]of Object.entries(e.properties)){const r=new bn(l,e.transform(e.attributes||{},l),n,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),t[l]=r,a[Aa(l)]=l,a[Aa(r.attribute)]=l}return new Sa(t,a,e.space)}const Ii=ia({properties:{ariaActiveDescendant:null,ariaAtomic:Re,ariaAutoComplete:null,ariaBusy:Re,ariaChecked:Re,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Oe,ariaCurrent:null,ariaDescribedBy:Oe,ariaDetails:null,ariaDisabled:Re,ariaDropEffect:Oe,ariaErrorMessage:null,ariaExpanded:Re,ariaFlowTo:Oe,ariaGrabbed:Re,ariaHasPopup:null,ariaHidden:Re,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Oe,ariaLevel:le,ariaLive:null,ariaModal:Re,ariaMultiLine:Re,ariaMultiSelectable:Re,ariaOrientation:null,ariaOwns:Oe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:Re,ariaReadOnly:Re,ariaRelevant:null,ariaRequired:Re,ariaRoleDescription:Oe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:Re,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Li(e,t){return t in e?e[t]:t}function Oi(e,t){return Li(e,t.toLowerCase())}const Bf=ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ra,acceptCharset:Oe,accessKey:Oe,action:null,allow:null,allowFullScreen:ye,allowPaymentRequest:ye,allowUserMedia:ye,alt:null,as:null,async:ye,autoCapitalize:null,autoComplete:Oe,autoFocus:ye,autoPlay:ye,blocking:Oe,capture:null,charSet:null,checked:ye,cite:null,className:Oe,cols:le,colSpan:null,content:null,contentEditable:Re,controls:ye,controlsList:Oe,coords:le|ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ye,defer:ye,dir:null,dirName:null,disabled:ye,download:fn,draggable:Re,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ye,formTarget:null,headers:Oe,height:le,hidden:fn,high:le,href:null,hrefLang:null,htmlFor:Oe,httpEquiv:Oe,id:null,imageSizes:null,imageSrcSet:null,inert:ye,inputMode:null,integrity:null,is:null,isMap:ye,itemId:null,itemProp:Oe,itemRef:Oe,itemScope:ye,itemType:Oe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ye,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:ye,muted:ye,name:null,nonce:null,noModule:ye,noValidate:ye,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ye,optimum:le,pattern:null,ping:Oe,placeholder:null,playsInline:ye,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ye,referrerPolicy:null,rel:Oe,required:ye,reversed:ye,rows:le,rowSpan:le,sandbox:Oe,scope:null,scoped:ye,seamless:ye,selected:ye,shadowRootClonable:ye,shadowRootDelegatesFocus:ye,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:Re,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:ye,useMap:null,value:Re,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Oe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ye,declare:ye,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:ye,noHref:ye,noShade:ye,noWrap:ye,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:Re,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ye,disableRemotePlayback:ye,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Oi}),Ff=ia({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:rt,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Oe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:ye,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ra,g2:ra,glyphName:ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:rt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:le,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Oe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rt,rev:rt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rt,requiredFeatures:rt,requiredFonts:rt,requiredFormats:rt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:rt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rt,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Li}),Di=ia({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Pi=ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Oi}),Mi=ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hf={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$f=/[A-Z]/g,Bi=/-[a-z]/g,Rf=/^data[-\w.:]+$/i;function yl(e,t){const a=Aa(t);let l=t,n=et;if(a in e.normal)return e.property[e.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&Rf.test(t)){if(t.charAt(4)==="-"){const r=t.slice(5).replace(Bi,qf);l="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{const r=t.slice(4);if(!Bi.test(r)){let i=r.replace($f,Uf);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}n=bn}return new n(l,t)}function Uf(e){return"-"+e.toLowerCase()}function qf(e){return e.charAt(1).toUpperCase()}const wa=_i([Ii,Bf,Di,Pi,Mi],"html"),It=_i([Ii,Ff,Di,Pi,Mi],"svg");function Fi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Hi(e){return e.join(" ").trim()}function mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sa={},vn,$i;function zf(){if($i)return vn;$i=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,a=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,n=/^:\s*/,r=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,i=/^[;\s]*/,s=/^\s+|\s+$/g,u=`
|
|
43
43
|
`,o="/",c="*",d="",h="comment",f="declaration";function y(g,v){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];v=v||{};var m=1,b=1;function T(I){var x=I.match(t);x&&(m+=x.length);var P=I.lastIndexOf(u);b=~P?I.length-P:b+I.length}function C(){var I={line:m,column:b};return function(x){return x.position=new A(I),S(),x}}function A(I){this.start=I,this.end={line:m,column:b},this.source=v.source}A.prototype.content=g;function N(I){var x=new Error(v.source+":"+m+":"+b+": "+I);if(x.reason=I,x.filename=v.source,x.line=m,x.column=b,x.source=g,!v.silent)throw x}function k(I){var x=I.exec(g);if(x){var P=x[0];return T(P),g=g.slice(P.length),x}}function S(){k(a)}function L(I){var x;for(I=I||[];x=D();)x!==!1&&I.push(x);return I}function D(){var I=C();if(!(o!=g.charAt(0)||c!=g.charAt(1))){for(var x=2;d!=g.charAt(x)&&(c!=g.charAt(x)||o!=g.charAt(x+1));)++x;if(x+=2,d===g.charAt(x-1))return N("End of comment missing");var P=g.slice(2,x-2);return b+=2,T(P),g=g.slice(x),b+=2,I({type:h,comment:P})}}function F(){var I=C(),x=k(l);if(x){if(D(),!k(n))return N("property missing ':'");var P=k(r),z=I({type:f,property:E(x[0].replace(e,d)),value:P?E(P[0].replace(e,d)):d});return k(i),z}}function M(){var I=[];L(I);for(var x;x=F();)x!==!1&&(I.push(x),L(I));return I}return S(),M()}function E(g){return g?g.replace(s,d):d}return vn=y,vn}var Ri;function Vf(){if(Ri)return sa;Ri=1;var e=sa&&sa.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(sa,"__esModule",{value:!0}),sa.default=a;const t=e(zf());function a(l,n){let r=null;if(!l||typeof l!="string")return r;const i=(0,t.default)(l),s=typeof n=="function";return i.forEach(u=>{if(u.type!=="declaration")return;const{property:o,value:c}=u;s?n(o,c,u):c&&(r=r||{},r[o]=c)}),r}return sa}var ka={},Ui;function Gf(){if(Ui)return ka;Ui=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,a=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,n=/^-(ms)-/,r=function(o){return!o||a.test(o)||e.test(o)},i=function(o,c){return c.toUpperCase()},s=function(o,c){return"".concat(c,"-")},u=function(o,c){return c===void 0&&(c={}),r(o)?o:(o=o.toLowerCase(),c.reactCompat?o=o.replace(n,s):o=o.replace(l,s),o.replace(t,i))};return ka.camelCase=u,ka}var _a,qi;function Yf(){if(qi)return _a;qi=1;var e=_a&&_a.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},t=e(Vf()),a=Gf();function l(n,r){var i={};return!n||typeof n!="string"||(0,t.default)(n,function(s,u){s&&u&&(i[(0,a.camelCase)(s,r)]=u)}),i}return l.default=l,_a=l,_a}var Wf=Yf();const jf=mn(Wf),Tl=zi("end"),bt=zi("start");function zi(e){return t;function t(a){const l=a&&a.position&&a.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function Vi(e){const t=bt(e),a=Tl(e);if(t&&a)return{start:t,end:a}}function Na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Gi(e.position):"start"in e||"end"in e?Gi(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Yi(e&&e.line)+":"+Yi(e&&e.column)}function Gi(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Yi(e){return e&&typeof e=="number"?e:1}class We extends Error{constructor(t,a,l){super(),typeof a=="string"&&(l=a,a=void 0);let n="",r={},i=!1;if(a&&("line"in a&&"column"in a?r={place:a}:"start"in a&&"end"in a?r={place:a}:"type"in a?r={ancestors:[a],place:a.position}:r={...a}),typeof t=="string"?n=t:!r.cause&&t&&(i=!0,n=t.message,r.cause=t),!r.ruleId&&!r.source&&typeof l=="string"){const u=l.indexOf(":");u===-1?r.ruleId=l:(r.source=l.slice(0,u),r.ruleId=l.slice(u+1))}if(!r.place&&r.ancestors&&r.ancestors){const u=r.ancestors[r.ancestors.length-1];u&&(r.place=u.position)}const s=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=n,this.line=s?s.line:void 0,this.name=Na(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=i&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}We.prototype.file="",We.prototype.name="",We.prototype.reason="",We.prototype.message="",We.prototype.stack="",We.prototype.column=void 0,We.prototype.line=void 0,We.prototype.ancestors=void 0,We.prototype.cause=void 0,We.prototype.fatal=void 0,We.prototype.place=void 0,We.prototype.ruleId=void 0,We.prototype.source=void 0;const En={}.hasOwnProperty,Kf=new Map,Xf=/[A-Z]/g,Qf=new Set(["table","tbody","thead","tfoot","tr"]),Jf=new Set(["td","th"]),Wi="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Zf(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=t.filePath||void 0;let l;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=sp(a,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=ip(a,t.jsx,t.jsxs)}const n={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:l,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?It:wa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},r=ji(n,e,void 0);return r&&typeof r!="string"?r:n.create(e,n.Fragment,{children:r||void 0},void 0)}function ji(e,t,a){if(t.type==="element")return ep(e,t,a);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tp(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return lp(e,t,a);if(t.type==="mdxjsEsm")return ap(e,t);if(t.type==="root")return np(e,t,a);if(t.type==="text")return rp(e,t)}function ep(e,t,a){const l=e.schema;let n=l;t.tagName.toLowerCase()==="svg"&&l.space==="html"&&(n=It,e.schema=n),e.ancestors.push(t);const r=Xi(e,t.tagName,!1),i=up(e,t);let s=Tn(e,t);return Qf.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!Pf(u):!0})),Ki(e,i,r,t),yn(i,s),e.ancestors.pop(),e.schema=l,e.create(t,r,i,a)}function tp(e,t){if(t.data&&t.data.estree&&e.evaluater){const l=t.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Ia(e,t.position)}function ap(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ia(e,t.position)}function lp(e,t,a){const l=e.schema;let n=l;t.name==="svg"&&l.space==="html"&&(n=It,e.schema=n),e.ancestors.push(t);const r=t.name===null?e.Fragment:Xi(e,t.name,!0),i=op(e,t),s=Tn(e,t);return Ki(e,i,r,t),yn(i,s),e.ancestors.pop(),e.schema=l,e.create(t,r,i,a)}function np(e,t,a){const l={};return yn(l,Tn(e,t)),e.create(t,e.Fragment,l,a)}function rp(e,t){return t.value}function Ki(e,t,a,l){typeof a!="string"&&a!==e.Fragment&&e.passNode&&(t.node=l)}function yn(e,t){if(t.length>0){const a=t.length>1?t:t[0];a&&(e.children=a)}}function ip(e,t,a){return l;function l(n,r,i,s){const o=Array.isArray(i.children)?a:t;return s?o(r,i,s):o(r,i)}}function sp(e,t){return a;function a(l,n,r,i){const s=Array.isArray(r.children),u=bt(l);return t(n,r,i,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function up(e,t){const a={};let l,n;for(n in t.properties)if(n!=="children"&&En.call(t.properties,n)){const r=cp(e,n,t.properties[n]);if(r){const[i,s]=r;e.tableCellAlignToStyle&&i==="align"&&typeof s=="string"&&Jf.has(t.tagName)?l=s:a[i]=s}}if(l){const r=a.style||(a.style={});r[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return a}function op(e,t){const a={};for(const l of t.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const r=l.data.estree.body[0];r.type;const i=r.expression;i.type;const s=i.properties[0];s.type,Object.assign(a,e.evaluater.evaluateExpression(s.argument))}else Ia(e,t.position);else{const n=l.name;let r;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const s=l.value.data.estree.body[0];s.type,r=e.evaluater.evaluateExpression(s.expression)}else Ia(e,t.position);else r=l.value===null?!0:l.value;a[n]=r}return a}function Tn(e,t){const a=[];let l=-1;const n=e.passKeys?new Map:Kf;for(;++l<t.children.length;){const r=t.children[l];let i;if(e.passKeys){const u=r.type==="element"?r.tagName:r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement"?r.name:void 0;if(u){const o=n.get(u)||0;i=u+"-"+o,n.set(u,o+1)}}const s=ji(e,r,i);s!==void 0&&a.push(s)}return a}function cp(e,t,a){const l=yl(e.schema,t);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=l.commaSeparated?Ai(a):Hi(a)),l.property==="style"){let n=typeof a=="object"?a:dp(e,String(a));return e.stylePropertyNameCase==="css"&&(n=fp(n)),["style",n]}return[e.elementAttributeNameCase==="react"&&l.space?Hf[l.property]||l.property:l.attribute,a]}}function dp(e,t){try{return jf(t,{reactCompat:!0})}catch(a){if(e.ignoreInvalidStyle)return{};const l=a,n=new We("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Wi+"#cannot-parse-style-attribute",n}}function Xi(e,t,a){let l;if(!a)l={type:"Literal",value:t};else if(t.includes(".")){const n=t.split(".");let r=-1,i;for(;++r<n.length;){const s=wi(n[r])?{type:"Identifier",name:n[r]}:{type:"Literal",value:n[r]};i=i?{type:"MemberExpression",object:i,property:s,computed:!!(r&&s.type==="Literal"),optional:!1}:s}l=i}else l=wi(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(l.type==="Literal"){const n=l.value;return En.call(e.components,n)?e.components[n]:n}if(e.evaluater)return e.evaluater.evaluateExpression(l);Ia(e)}function Ia(e,t){const a=new We("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Wi+"#cannot-handle-mdx-estrees-without-createevaluater",a}function fp(e){const t={};let a;for(a in e)En.call(e,a)&&(t[pp(a)]=e[a]);return t}function pp(e){let t=e.replace(Xf,hp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hp(e){return"-"+e.toLowerCase()}const xn={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},bp={};function mp(e,t){const a=bp,l=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,n=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return Qi(e,l,n)}function Qi(e,t,a){if(vp(e)){if("value"in e)return e.type==="html"&&!a?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Ji(e.children,t,a)}return Array.isArray(e)?Ji(e,t,a):""}function Ji(e,t,a){const l=[];let n=-1;for(;++n<e.length;)l[n]=Qi(e[n],t,a);return l.join("")}function vp(e){return!!(e&&typeof e=="object")}const Zi=document.createElement("i");function La(e){const t="&"+e+";";Zi.innerHTML=t;const a=Zi.textContent;return a.charCodeAt(a.length-1)===59&&e!=="semi"||a===t?!1:a}function mt(e,t,a,l){const n=e.length;let r=0,i;if(t<0?t=-t>n?0:n+t:t=t>n?n:t,a=a>0?a:0,l.length<1e4)i=Array.from(l),i.unshift(t,a),e.splice(...i);else for(a&&e.splice(t,a);r<l.length;)i=l.slice(r,r+1e4),i.unshift(t,0),e.splice(...i),r+=1e4,t+=1e4}function ut(e,t){return e.length>0?(mt(e,e.length,0,t),e):t}const es={}.hasOwnProperty;function gp(e){const t={};let a=-1;for(;++a<e.length;)Ep(t,e[a]);return t}function Ep(e,t){let a;for(a in t){const n=(es.call(e,a)?e[a]:void 0)||(e[a]={}),r=t[a];let i;if(r)for(i in r){es.call(n,i)||(n[i]=[]);const s=r[i];yp(n[i],Array.isArray(s)?s:s?[s]:[])}}}function yp(e,t){let a=-1;const l=[];for(;++a<t.length;)(t[a].add==="after"?e:l).push(t[a]);mt(e,0,0,l)}function ts(e,t){const a=Number.parseInt(e,t);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function ua(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vt=Lt(/[A-Za-z]/),it=Lt(/[\dA-Za-z]/),Tp=Lt(/[#-'*+\--9=?A-Z^-~]/);function Cn(e){return e!==null&&(e<32||e===127)}const Sn=Lt(/\d/),xp=Lt(/[\dA-Fa-f]/),Cp=Lt(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function He(e){return e!==null&&(e<0||e===32)}function Ce(e){return e===-2||e===-1||e===32}const Oa=Lt(new RegExp("\\p{P}|\\p{S}","u")),Da=Lt(/\s/);function Lt(e){return t;function t(a){return a!==null&&a>-1&&e.test(String.fromCharCode(a))}}function oa(e){const t=[];let a=-1,l=0,n=0;for(;++a<e.length;){const r=e.charCodeAt(a);let i="";if(r===37&&it(e.charCodeAt(a+1))&&it(e.charCodeAt(a+2)))n=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(i=String.fromCharCode(r));else if(r>55295&&r<57344){const s=e.charCodeAt(a+1);r<56320&&s>56319&&s<57344?(i=String.fromCharCode(r,s),n=1):i="�"}else i=String.fromCharCode(r);i&&(t.push(e.slice(l,a),encodeURIComponent(i)),l=a+n+1,i=""),n&&(a+=n,n=0)}return t.join("")+e.slice(l)}function Se(e,t,a,l){const n=l?l-1:Number.POSITIVE_INFINITY;let r=0;return i;function i(u){return Ce(u)?(e.enter(a),s(u)):t(u)}function s(u){return Ce(u)&&r++<n?(e.consume(u),s):(e.exit(a),t(u))}}const Sp={tokenize:Ap};function Ap(e){const t=e.attempt(this.parser.constructs.contentInitial,l,n);let a;return t;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Se(e,t,"linePrefix")}function n(s){return e.enter("paragraph"),r(s)}function r(s){const u=e.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=u),a=u,i(s)}function i(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return oe(s)?(e.consume(s),e.exit("chunkText"),r):(e.consume(s),i)}}const wp={tokenize:kp},as={tokenize:_p};function kp(e){const t=this,a=[];let l=0,n,r,i;return s;function s(b){if(l<a.length){const T=a[l];return t.containerState=T[1],e.attempt(T[0].continuation,u,o)(b)}return o(b)}function u(b){if(l++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,n&&m();const T=t.events.length;let C=T,A;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){A=t.events[C][1].end;break}v(l);let N=T;for(;N<t.events.length;)t.events[N][1].end={...A},N++;return mt(t.events,C+1,0,t.events.slice(T)),t.events.length=N,o(b)}return s(b)}function o(b){if(l===a.length){if(!n)return h(b);if(n.currentConstruct&&n.currentConstruct.concrete)return y(b);t.interrupt=!!(n.currentConstruct&&!n._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(as,c,d)(b)}function c(b){return n&&m(),v(l),h(b)}function d(b){return t.parser.lazy[t.now().line]=l!==a.length,i=t.now().offset,y(b)}function h(b){return t.containerState={},e.attempt(as,f,y)(b)}function f(b){return l++,a.push([t.currentConstruct,t.containerState]),h(b)}function y(b){if(b===null){n&&m(),v(0),e.consume(b);return}return n=n||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:n,contentType:"flow",previous:r}),E(b)}function E(b){if(b===null){g(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return oe(b)?(e.consume(b),g(e.exit("chunkFlow")),l=0,t.interrupt=void 0,s):(e.consume(b),E)}function g(b,T){const C=t.sliceStream(b);if(T&&C.push(null),b.previous=r,r&&(r.next=b),r=b,n.defineSkip(b.start),n.write(C),t.parser.lazy[b.start.line]){let A=n.events.length;for(;A--;)if(n.events[A][1].start.offset<i&&(!n.events[A][1].end||n.events[A][1].end.offset>i))return;const N=t.events.length;let k=N,S,L;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){if(S){L=t.events[k][1].end;break}S=!0}for(v(l),A=N;A<t.events.length;)t.events[A][1].end={...L},A++;mt(t.events,k+1,0,t.events.slice(N)),t.events.length=A}}function v(b){let T=a.length;for(;T-- >b;){const C=a[T];t.containerState=C[1],C[0].exit.call(t,e)}a.length=b}function m(){n.write([null]),r=void 0,n=void 0,t.containerState._closeFlow=void 0}}function _p(e,t,a){return Se(e,e.attempt(this.parser.constructs.document,t,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ls(e){if(e===null||He(e)||Da(e))return 1;if(Oa(e))return 2}function An(e,t,a){const l=[];let n=-1;for(;++n<e.length;){const r=e[n].resolveAll;r&&!l.includes(r)&&(t=r(t,a),l.push(r))}return t}const wn={name:"attention",resolveAll:Np,tokenize:Ip};function Np(e,t){let a=-1,l,n,r,i,s,u,o,c;for(;++a<e.length;)if(e[a][0]==="enter"&&e[a][1].type==="attentionSequence"&&e[a][1]._close){for(l=a;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&t.sliceSerialize(e[l][1]).charCodeAt(0)===t.sliceSerialize(e[a][1]).charCodeAt(0)){if((e[l][1]._close||e[a][1]._open)&&(e[a][1].end.offset-e[a][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[a][1].end.offset-e[a][1].start.offset)%3))continue;u=e[l][1].end.offset-e[l][1].start.offset>1&&e[a][1].end.offset-e[a][1].start.offset>1?2:1;const d={...e[l][1].end},h={...e[a][1].start};ns(d,-u),ns(h,u),i={type:u>1?"strongSequence":"emphasisSequence",start:d,end:{...e[l][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[a][1].start},end:h},r={type:u>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[a][1].start}},n={type:u>1?"strong":"emphasis",start:{...i.start},end:{...s.end}},e[l][1].end={...i.start},e[a][1].start={...s.end},o=[],e[l][1].end.offset-e[l][1].start.offset&&(o=ut(o,[["enter",e[l][1],t],["exit",e[l][1],t]])),o=ut(o,[["enter",n,t],["enter",i,t],["exit",i,t],["enter",r,t]]),o=ut(o,An(t.parser.constructs.insideSpan.null,e.slice(l+1,a),t)),o=ut(o,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",n,t]]),e[a][1].end.offset-e[a][1].start.offset?(c=2,o=ut(o,[["enter",e[a][1],t],["exit",e[a][1],t]])):c=0,mt(e,l-1,a-l+3,o),a=l+o.length-c-2;break}}for(a=-1;++a<e.length;)e[a][1].type==="attentionSequence"&&(e[a][1].type="data");return e}function Ip(e,t){const a=this.parser.constructs.attentionMarkers.null,l=this.previous,n=ls(l);let r;return i;function i(u){return r=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===r)return e.consume(u),s;const o=e.exit("attentionSequence"),c=ls(u),d=!c||c===2&&n||a.includes(u),h=!n||n===2&&c||a.includes(l);return o._open=!!(r===42?d:d&&(n||!h)),o._close=!!(r===42?h:h&&(c||!d)),t(u)}}function ns(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Lp={name:"autolink",tokenize:Op};function Op(e,t,a){let l=0;return n;function n(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r}function r(f){return vt(f)?(e.consume(f),i):f===64?a(f):o(f)}function i(f){return f===43||f===45||f===46||it(f)?(l=1,s(f)):o(f)}function s(f){return f===58?(e.consume(f),l=0,u):(f===43||f===45||f===46||it(f))&&l++<32?(e.consume(f),s):(l=0,o(f))}function u(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||Cn(f)?a(f):(e.consume(f),u)}function o(f){return f===64?(e.consume(f),c):Tp(f)?(e.consume(f),o):a(f)}function c(f){return it(f)?d(f):a(f)}function d(f){return f===46?(e.consume(f),l=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):h(f)}function h(f){if((f===45||it(f))&&l++<63){const y=f===45?h:d;return e.consume(f),y}return a(f)}}const xl={partial:!0,tokenize:Dp};function Dp(e,t,a){return l;function l(r){return Ce(r)?Se(e,n,"linePrefix")(r):n(r)}function n(r){return r===null||oe(r)?t(r):a(r)}}const rs={continuation:{tokenize:Mp},exit:Bp,name:"blockQuote",tokenize:Pp};function Pp(e,t,a){const l=this;return n;function n(i){if(i===62){const s=l.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(i),e.exit("blockQuoteMarker"),r}return a(i)}function r(i){return Ce(i)?(e.enter("blockQuotePrefixWhitespace"),e.consume(i),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(i))}}function Mp(e,t,a){const l=this;return n;function n(i){return Ce(i)?Se(e,r,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i):r(i)}function r(i){return e.attempt(rs,t,a)(i)}}function Bp(e){e.exit("blockQuote")}const is={name:"characterEscape",tokenize:Fp};function Fp(e,t,a){return l;function l(r){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(r),e.exit("escapeMarker"),n}function n(r){return Cp(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):a(r)}}const ss={name:"characterReference",tokenize:Hp};function Hp(e,t,a){const l=this;let n=0,r,i;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),u}function u(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),o):(e.enter("characterReferenceValue"),r=31,i=it,c(d))}function o(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,i=xp,c):(e.enter("characterReferenceValue"),r=7,i=Sn,c(d))}function c(d){if(d===59&&n){const h=e.exit("characterReferenceValue");return i===it&&!La(l.sliceSerialize(h))?a(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return i(d)&&n++<r?(e.consume(d),c):a(d)}}const us={partial:!0,tokenize:Rp},os={concrete:!0,name:"codeFenced",tokenize:$p};function $p(e,t,a){const l=this,n={partial:!0,tokenize:C};let r=0,i=0,s;return u;function u(A){return o(A)}function o(A){const N=l.events[l.events.length-1];return r=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(A)}function c(A){return A===s?(i++,e.consume(A),c):i<3?a(A):(e.exit("codeFencedFenceSequence"),Ce(A)?Se(e,d,"whitespace")(A):d(A))}function d(A){return A===null||oe(A)?(e.exit("codeFencedFence"),l.interrupt?t(A):e.check(us,E,T)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(A))}function h(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(A)):Ce(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Se(e,f,"whitespace")(A)):A===96&&A===s?a(A):(e.consume(A),h)}function f(A){return A===null||oe(A)?d(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(A))}function y(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(A)):A===96&&A===s?a(A):(e.consume(A),y)}function E(A){return e.attempt(n,T,g)(A)}function g(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v}function v(A){return r>0&&Ce(A)?Se(e,m,"linePrefix",r+1)(A):m(A)}function m(A){return A===null||oe(A)?e.check(us,E,T)(A):(e.enter("codeFlowValue"),b(A))}function b(A){return A===null||oe(A)?(e.exit("codeFlowValue"),m(A)):(e.consume(A),b)}function T(A){return e.exit("codeFenced"),t(A)}function C(A,N,k){let S=0;return L;function L(x){return A.enter("lineEnding"),A.consume(x),A.exit("lineEnding"),D}function D(x){return A.enter("codeFencedFence"),Ce(x)?Se(A,F,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):F(x)}function F(x){return x===s?(A.enter("codeFencedFenceSequence"),M(x)):k(x)}function M(x){return x===s?(S++,A.consume(x),M):S>=i?(A.exit("codeFencedFenceSequence"),Ce(x)?Se(A,I,"whitespace")(x):I(x)):k(x)}function I(x){return x===null||oe(x)?(A.exit("codeFencedFence"),N(x)):k(x)}}}function Rp(e,t,a){const l=this;return n;function n(i){return i===null?a(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r)}function r(i){return l.parser.lazy[l.now().line]?a(i):t(i)}}const kn={name:"codeIndented",tokenize:qp},Up={partial:!0,tokenize:zp};function qp(e,t,a){const l=this;return n;function n(o){return e.enter("codeIndented"),Se(e,r,"linePrefix",5)(o)}function r(o){const c=l.events[l.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?i(o):a(o)}function i(o){return o===null?u(o):oe(o)?e.attempt(Up,i,u)(o):(e.enter("codeFlowValue"),s(o))}function s(o){return o===null||oe(o)?(e.exit("codeFlowValue"),i(o)):(e.consume(o),s)}function u(o){return e.exit("codeIndented"),t(o)}}function zp(e,t,a){const l=this;return n;function n(i){return l.parser.lazy[l.now().line]?a(i):oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n):Se(e,r,"linePrefix",5)(i)}function r(i){const s=l.events[l.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):oe(i)?n(i):a(i)}}const Vp={name:"codeText",previous:Yp,resolve:Gp,tokenize:Wp};function Gp(e){let t=e.length-4,a=3,l,n;if((e[a][1].type==="lineEnding"||e[a][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(l=a;++l<t;)if(e[l][1].type==="codeTextData"){e[a][1].type="codeTextPadding",e[t][1].type="codeTextPadding",a+=2,t-=2;break}}for(l=a-1,t++;++l<=t;)n===void 0?l!==t&&e[l][1].type!=="lineEnding"&&(n=l):(l===t||e[l][1].type==="lineEnding")&&(e[n][1].type="codeTextData",l!==n+2&&(e[n][1].end=e[l-1][1].end,e.splice(n+2,l-n-2),t-=l-n-2,l=n+2),n=void 0);return e}function Yp(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Wp(e,t,a){let l=0,n,r;return i;function i(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),l++,s):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?a(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(r=e.enter("codeTextSequence"),n=0,c(d)):oe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),o(d))}function o(d){return d===null||d===32||d===96||oe(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),o)}function c(d){return d===96?(e.consume(d),n++,c):n===l?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(r.type="codeTextData",o(d))}}class jp{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,a){const l=a??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(t,l):t>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(t,a,l){const n=a||0;this.setCursor(Math.trunc(t));const r=this.right.splice(this.right.length-n,Number.POSITIVE_INFINITY);return l&&Pa(this.left,l),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Pa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Pa(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const a=this.left.splice(t,Number.POSITIVE_INFINITY);Pa(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Pa(this.left,a.reverse())}}}function Pa(e,t){let a=0;if(t.length<1e4)e.push(...t);else for(;a<t.length;)e.push(...t.slice(a,a+1e4)),a+=1e4}function cs(e){const t={};let a=-1,l,n,r,i,s,u,o;const c=new jp(e);for(;++a<c.length;){for(;a in t;)a=t[a];if(l=c.get(a),a&&l[1].type==="chunkFlow"&&c.get(a-1)[1].type==="listItemPrefix"&&(u=l[1]._tokenizer.events,r=0,r<u.length&&u[r][1].type==="lineEndingBlank"&&(r+=2),r<u.length&&u[r][1].type==="content"))for(;++r<u.length&&u[r][1].type!=="content";)u[r][1].type==="chunkText"&&(u[r][1]._isInFirstContentOfListItem=!0,r++);if(l[0]==="enter")l[1].contentType&&(Object.assign(t,Kp(c,a)),a=t[a],o=!0);else if(l[1]._container){for(r=a,n=void 0;r--;)if(i=c.get(r),i[1].type==="lineEnding"||i[1].type==="lineEndingBlank")i[0]==="enter"&&(n&&(c.get(n)[1].type="lineEndingBlank"),i[1].type="lineEnding",n=r);else if(!(i[1].type==="linePrefix"||i[1].type==="listItemIndent"))break;n&&(l[1].end={...c.get(n)[1].start},s=c.slice(n,a),s.unshift(l),c.splice(n,a-n+1,s))}}return mt(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!o}function Kp(e,t){const a=e.get(t)[1],l=e.get(t)[2];let n=t-1;const r=[];let i=a._tokenizer;i||(i=l.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(i._contentTypeTextTrailing=!0));const s=i.events,u=[],o={};let c,d,h=-1,f=a,y=0,E=0;const g=[E];for(;f;){for(;e.get(++n)[1]!==f;);r.push(n),f._tokenizer||(c=l.sliceStream(f),f.next||c.push(null),d&&i.defineSkip(f.start),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=!0),i.write(c),f._isInFirstContentOfListItem&&(i._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=a;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(E=h+1,g.push(E),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(i.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),h=g.length;h--;){const v=s.slice(g[h],g[h+1]),m=r.pop();u.push([m,m+v.length-1]),e.splice(m,2,v)}for(u.reverse(),h=-1;++h<u.length;)o[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return o}const Xp={resolve:Jp,tokenize:Zp},Qp={partial:!0,tokenize:eh};function Jp(e){return cs(e),e}function Zp(e,t){let a;return l;function l(s){return e.enter("content"),a=e.enter("chunkContent",{contentType:"content"}),n(s)}function n(s){return s===null?r(s):oe(s)?e.check(Qp,i,r)(s):(e.consume(s),n)}function r(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function i(s){return e.consume(s),e.exit("chunkContent"),a.next=e.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,n}}function eh(e,t,a){const l=this;return n;function n(i){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Se(e,r,"linePrefix")}function r(i){if(i===null||oe(i))return a(i);const s=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(i):e.interrupt(l.parser.constructs.flow,a,t)(i)}}function ds(e,t,a,l,n,r,i,s,u){const o=u||Number.POSITIVE_INFINITY;let c=0;return d;function d(v){return v===60?(e.enter(l),e.enter(n),e.enter(r),e.consume(v),e.exit(r),h):v===null||v===32||v===41||Cn(v)?a(v):(e.enter(l),e.enter(i),e.enter(s),e.enter("chunkString",{contentType:"string"}),E(v))}function h(v){return v===62?(e.enter(r),e.consume(v),e.exit(r),e.exit(n),e.exit(l),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(v))}function f(v){return v===62?(e.exit("chunkString"),e.exit(s),h(v)):v===null||v===60||oe(v)?a(v):(e.consume(v),v===92?y:f)}function y(v){return v===60||v===62||v===92?(e.consume(v),f):f(v)}function E(v){return!c&&(v===null||v===41||He(v))?(e.exit("chunkString"),e.exit(s),e.exit(i),e.exit(l),t(v)):c<o&&v===40?(e.consume(v),c++,E):v===41?(e.consume(v),c--,E):v===null||v===32||v===40||Cn(v)?a(v):(e.consume(v),v===92?g:E)}function g(v){return v===40||v===41||v===92?(e.consume(v),E):E(v)}}function fs(e,t,a,l,n,r){const i=this;let s=0,u;return o;function o(f){return e.enter(l),e.enter(n),e.consume(f),e.exit(n),e.enter(r),c}function c(f){return s>999||f===null||f===91||f===93&&!u||f===94&&!s&&"_hiddenFootnoteSupport"in i.parser.constructs?a(f):f===93?(e.exit(r),e.enter(n),e.consume(f),e.exit(n),e.exit(l),t):oe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||oe(f)||s++>999?(e.exit("chunkString"),c(f)):(e.consume(f),u||(u=!Ce(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function ps(e,t,a,l,n,r){let i;return s;function s(h){return h===34||h===39||h===40?(e.enter(l),e.enter(n),e.consume(h),e.exit(n),i=h===40?41:h,u):a(h)}function u(h){return h===i?(e.enter(n),e.consume(h),e.exit(n),e.exit(l),t):(e.enter(r),o(h))}function o(h){return h===i?(e.exit(r),u(i)):h===null?a(h):oe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),Se(e,o,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(h))}function c(h){return h===i||h===null||oe(h)?(e.exit("chunkString"),o(h)):(e.consume(h),h===92?d:c)}function d(h){return h===i||h===92?(e.consume(h),c):c(h)}}function St(e,t){let a;return l;function l(n){return oe(n)?(e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),a=!0,l):Ce(n)?Se(e,l,a?"linePrefix":"lineSuffix")(n):t(n)}}const th={name:"definition",tokenize:lh},ah={partial:!0,tokenize:nh};function lh(e,t,a){const l=this;let n;return r;function r(f){return e.enter("definition"),i(f)}function i(f){return fs.call(l,e,s,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return n=ua(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),u):a(f)}function u(f){return He(f)?St(e,o)(f):o(f)}function o(f){return ds(e,c,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(ah,d,d)(f)}function d(f){return Ce(f)?Se(e,h,"whitespace")(f):h(f)}function h(f){return f===null||oe(f)?(e.exit("definition"),l.parser.defined.push(n),t(f)):a(f)}}function nh(e,t,a){return l;function l(s){return He(s)?St(e,n)(s):a(s)}function n(s){return ps(e,r,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function r(s){return Ce(s)?Se(e,i,"whitespace")(s):i(s)}function i(s){return s===null||oe(s)?t(s):a(s)}}const rh={name:"hardBreakEscape",tokenize:ih};function ih(e,t,a){return l;function l(r){return e.enter("hardBreakEscape"),e.consume(r),n}function n(r){return oe(r)?(e.exit("hardBreakEscape"),t(r)):a(r)}}const sh={name:"headingAtx",resolve:uh,tokenize:oh};function uh(e,t){let a=e.length-2,l=3,n,r;return e[l][1].type==="whitespace"&&(l+=2),a-2>l&&e[a][1].type==="whitespace"&&(a-=2),e[a][1].type==="atxHeadingSequence"&&(l===a-1||a-4>l&&e[a-2][1].type==="whitespace")&&(a-=l+1===a?2:4),a>l&&(n={type:"atxHeadingText",start:e[l][1].start,end:e[a][1].end},r={type:"chunkText",start:e[l][1].start,end:e[a][1].end,contentType:"text"},mt(e,l,a-l+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}function oh(e,t,a){let l=0;return n;function n(c){return e.enter("atxHeading"),r(c)}function r(c){return e.enter("atxHeadingSequence"),i(c)}function i(c){return c===35&&l++<6?(e.consume(c),i):c===null||He(c)?(e.exit("atxHeadingSequence"),s(c)):a(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),u(c)):c===null||oe(c)?(e.exit("atxHeading"),t(c)):Ce(c)?Se(e,s,"whitespace")(c):(e.enter("atxHeadingText"),o(c))}function u(c){return c===35?(e.consume(c),u):(e.exit("atxHeadingSequence"),s(c))}function o(c){return c===null||c===35||He(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),o)}}const ch=["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"],hs=["pre","script","style","textarea"],dh={concrete:!0,name:"htmlFlow",resolveTo:hh,tokenize:bh},fh={partial:!0,tokenize:vh},ph={partial:!0,tokenize:mh};function hh(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function bh(e,t,a){const l=this;let n,r,i,s,u;return o;function o(O){return c(O)}function c(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),r=!0,E):O===63?(e.consume(O),n=3,l.interrupt?t:_):vt(O)?(e.consume(O),i=String.fromCharCode(O),g):a(O)}function h(O){return O===45?(e.consume(O),n=2,f):O===91?(e.consume(O),n=5,s=0,y):vt(O)?(e.consume(O),n=4,l.interrupt?t:_):a(O)}function f(O){return O===45?(e.consume(O),l.interrupt?t:_):a(O)}function y(O){const R="CDATA[";return O===R.charCodeAt(s++)?(e.consume(O),s===R.length?l.interrupt?t:F:y):a(O)}function E(O){return vt(O)?(e.consume(O),i=String.fromCharCode(O),g):a(O)}function g(O){if(O===null||O===47||O===62||He(O)){const R=O===47,K=i.toLowerCase();return!R&&!r&&hs.includes(K)?(n=1,l.interrupt?t(O):F(O)):ch.includes(i.toLowerCase())?(n=6,R?(e.consume(O),v):l.interrupt?t(O):F(O)):(n=7,l.interrupt&&!l.parser.lazy[l.now().line]?a(O):r?m(O):b(O))}return O===45||it(O)?(e.consume(O),i+=String.fromCharCode(O),g):a(O)}function v(O){return O===62?(e.consume(O),l.interrupt?t:F):a(O)}function m(O){return Ce(O)?(e.consume(O),m):L(O)}function b(O){return O===47?(e.consume(O),L):O===58||O===95||vt(O)?(e.consume(O),T):Ce(O)?(e.consume(O),b):L(O)}function T(O){return O===45||O===46||O===58||O===95||it(O)?(e.consume(O),T):C(O)}function C(O){return O===61?(e.consume(O),A):Ce(O)?(e.consume(O),C):b(O)}function A(O){return O===null||O===60||O===61||O===62||O===96?a(O):O===34||O===39?(e.consume(O),u=O,N):Ce(O)?(e.consume(O),A):k(O)}function N(O){return O===u?(e.consume(O),u=null,S):O===null||oe(O)?a(O):(e.consume(O),N)}function k(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||He(O)?C(O):(e.consume(O),k)}function S(O){return O===47||O===62||Ce(O)?b(O):a(O)}function L(O){return O===62?(e.consume(O),D):a(O)}function D(O){return O===null||oe(O)?F(O):Ce(O)?(e.consume(O),D):a(O)}function F(O){return O===45&&n===2?(e.consume(O),P):O===60&&n===1?(e.consume(O),z):O===62&&n===4?(e.consume(O),G):O===63&&n===3?(e.consume(O),_):O===93&&n===5?(e.consume(O),V):oe(O)&&(n===6||n===7)?(e.exit("htmlFlowData"),e.check(fh,Y,M)(O)):O===null||oe(O)?(e.exit("htmlFlowData"),M(O)):(e.consume(O),F)}function M(O){return e.check(ph,I,Y)(O)}function I(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),x}function x(O){return O===null||oe(O)?M(O):(e.enter("htmlFlowData"),F(O))}function P(O){return O===45?(e.consume(O),_):F(O)}function z(O){return O===47?(e.consume(O),i="",U):F(O)}function U(O){if(O===62){const R=i.toLowerCase();return hs.includes(R)?(e.consume(O),G):F(O)}return vt(O)&&i.length<8?(e.consume(O),i+=String.fromCharCode(O),U):F(O)}function V(O){return O===93?(e.consume(O),_):F(O)}function _(O){return O===62?(e.consume(O),G):O===45&&n===2?(e.consume(O),_):F(O)}function G(O){return O===null||oe(O)?(e.exit("htmlFlowData"),Y(O)):(e.consume(O),G)}function Y(O){return e.exit("htmlFlow"),t(O)}}function mh(e,t,a){const l=this;return n;function n(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),r):a(i)}function r(i){return l.parser.lazy[l.now().line]?a(i):t(i)}}function vh(e,t,a){return l;function l(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),e.attempt(xl,t,a)}}const gh={name:"htmlText",tokenize:Eh};function Eh(e,t,a){const l=this;let n,r,i;return s;function s(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),u}function u(_){return _===33?(e.consume(_),o):_===47?(e.consume(_),C):_===63?(e.consume(_),b):vt(_)?(e.consume(_),k):a(_)}function o(_){return _===45?(e.consume(_),c):_===91?(e.consume(_),r=0,y):vt(_)?(e.consume(_),m):a(_)}function c(_){return _===45?(e.consume(_),f):a(_)}function d(_){return _===null?a(_):_===45?(e.consume(_),h):oe(_)?(i=d,z(_)):(e.consume(_),d)}function h(_){return _===45?(e.consume(_),f):d(_)}function f(_){return _===62?P(_):_===45?h(_):d(_)}function y(_){const G="CDATA[";return _===G.charCodeAt(r++)?(e.consume(_),r===G.length?E:y):a(_)}function E(_){return _===null?a(_):_===93?(e.consume(_),g):oe(_)?(i=E,z(_)):(e.consume(_),E)}function g(_){return _===93?(e.consume(_),v):E(_)}function v(_){return _===62?P(_):_===93?(e.consume(_),v):E(_)}function m(_){return _===null||_===62?P(_):oe(_)?(i=m,z(_)):(e.consume(_),m)}function b(_){return _===null?a(_):_===63?(e.consume(_),T):oe(_)?(i=b,z(_)):(e.consume(_),b)}function T(_){return _===62?P(_):b(_)}function C(_){return vt(_)?(e.consume(_),A):a(_)}function A(_){return _===45||it(_)?(e.consume(_),A):N(_)}function N(_){return oe(_)?(i=N,z(_)):Ce(_)?(e.consume(_),N):P(_)}function k(_){return _===45||it(_)?(e.consume(_),k):_===47||_===62||He(_)?S(_):a(_)}function S(_){return _===47?(e.consume(_),P):_===58||_===95||vt(_)?(e.consume(_),L):oe(_)?(i=S,z(_)):Ce(_)?(e.consume(_),S):P(_)}function L(_){return _===45||_===46||_===58||_===95||it(_)?(e.consume(_),L):D(_)}function D(_){return _===61?(e.consume(_),F):oe(_)?(i=D,z(_)):Ce(_)?(e.consume(_),D):S(_)}function F(_){return _===null||_===60||_===61||_===62||_===96?a(_):_===34||_===39?(e.consume(_),n=_,M):oe(_)?(i=F,z(_)):Ce(_)?(e.consume(_),F):(e.consume(_),I)}function M(_){return _===n?(e.consume(_),n=void 0,x):_===null?a(_):oe(_)?(i=M,z(_)):(e.consume(_),M)}function I(_){return _===null||_===34||_===39||_===60||_===61||_===96?a(_):_===47||_===62||He(_)?S(_):(e.consume(_),I)}function x(_){return _===47||_===62||He(_)?S(_):a(_)}function P(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):a(_)}function z(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),U}function U(_){return Ce(_)?Se(e,V,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):V(_)}function V(_){return e.enter("htmlTextData"),i(_)}}const _n={name:"labelEnd",resolveAll:Ch,resolveTo:Sh,tokenize:Ah},yh={tokenize:wh},Th={tokenize:kh},xh={tokenize:_h};function Ch(e){let t=-1;const a=[];for(;++t<e.length;){const l=e[t][1];if(a.push(e[t]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const n=l.type==="labelImage"?4:2;l.type="data",t+=n}}return e.length!==a.length&&mt(e,0,e.length,a),e}function Sh(e,t){let a=e.length,l=0,n,r,i,s;for(;a--;)if(n=e[a][1],r){if(n.type==="link"||n.type==="labelLink"&&n._inactive)break;e[a][0]==="enter"&&n.type==="labelLink"&&(n._inactive=!0)}else if(i){if(e[a][0]==="enter"&&(n.type==="labelImage"||n.type==="labelLink")&&!n._balanced&&(r=a,n.type!=="labelLink")){l=2;break}}else n.type==="labelEnd"&&(i=a);const u={type:e[r][1].type==="labelLink"?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},o={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},c={type:"labelText",start:{...e[r+l+2][1].end},end:{...e[i-2][1].start}};return s=[["enter",u,t],["enter",o,t]],s=ut(s,e.slice(r+1,r+l+3)),s=ut(s,[["enter",c,t]]),s=ut(s,An(t.parser.constructs.insideSpan.null,e.slice(r+l+4,i-3),t)),s=ut(s,[["exit",c,t],e[i-2],e[i-1],["exit",o,t]]),s=ut(s,e.slice(i+1)),s=ut(s,[["exit",u,t]]),mt(e,r,e.length,s),e}function Ah(e,t,a){const l=this;let n=l.events.length,r,i;for(;n--;)if((l.events[n][1].type==="labelImage"||l.events[n][1].type==="labelLink")&&!l.events[n][1]._balanced){r=l.events[n][1];break}return s;function s(h){return r?r._inactive?d(h):(i=l.parser.defined.includes(ua(l.sliceSerialize({start:r.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):a(h)}function u(h){return h===40?e.attempt(yh,c,i?c:d)(h):h===91?e.attempt(Th,c,i?o:d)(h):i?c(h):d(h)}function o(h){return e.attempt(xh,c,d)(h)}function c(h){return t(h)}function d(h){return r._balanced=!0,a(h)}}function wh(e,t,a){return l;function l(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),n}function n(d){return He(d)?St(e,r)(d):r(d)}function r(d){return d===41?c(d):ds(e,i,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function i(d){return He(d)?St(e,u)(d):c(d)}function s(d){return a(d)}function u(d){return d===34||d===39||d===40?ps(e,o,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):c(d)}function o(d){return He(d)?St(e,c)(d):c(d)}function c(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):a(d)}}function kh(e,t,a){const l=this;return n;function n(s){return fs.call(l,e,r,i,"reference","referenceMarker","referenceString")(s)}function r(s){return l.parser.defined.includes(ua(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?t(s):a(s)}function i(s){return a(s)}}function _h(e,t,a){return l;function l(r){return e.enter("reference"),e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),n}function n(r){return r===93?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):a(r)}}const Nh={name:"labelStartImage",resolveAll:_n.resolveAll,tokenize:Ih};function Ih(e,t,a){const l=this;return n;function n(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),r}function r(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),i):a(s)}function i(s){return s===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(s):t(s)}}const Lh={name:"labelStartLink",resolveAll:_n.resolveAll,tokenize:Oh};function Oh(e,t,a){const l=this;return n;function n(i){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(i),e.exit("labelMarker"),e.exit("labelLink"),r}function r(i){return i===94&&"_hiddenFootnoteSupport"in l.parser.constructs?a(i):t(i)}}const Nn={name:"lineEnding",tokenize:Dh};function Dh(e,t){return a;function a(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Se(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:Ph};function Ph(e,t,a){let l=0,n;return r;function r(o){return e.enter("thematicBreak"),i(o)}function i(o){return n=o,s(o)}function s(o){return o===n?(e.enter("thematicBreakSequence"),u(o)):l>=3&&(o===null||oe(o))?(e.exit("thematicBreak"),t(o)):a(o)}function u(o){return o===n?(e.consume(o),l++,u):(e.exit("thematicBreakSequence"),Ce(o)?Se(e,s,"whitespace")(o):s(o))}}const tt={continuation:{tokenize:Hh},exit:Rh,name:"list",tokenize:Fh},Mh={partial:!0,tokenize:Uh},Bh={partial:!0,tokenize:$h};function Fh(e,t,a){const l=this,n=l.events[l.events.length-1];let r=n&&n[1].type==="linePrefix"?n[2].sliceSerialize(n[1],!0).length:0,i=0;return s;function s(f){const y=l.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!l.containerState.marker||f===l.containerState.marker:Sn(f)){if(l.containerState.type||(l.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Cl,a,o)(f):o(f);if(!l.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(f)}return a(f)}function u(f){return Sn(f)&&++i<10?(e.consume(f),u):(!l.interrupt||i<2)&&(l.containerState.marker?f===l.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),o(f)):a(f)}function o(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||f,e.check(xl,l.interrupt?a:c,e.attempt(Mh,h,d))}function c(f){return l.containerState.initialBlankLine=!0,r++,h(f)}function d(f){return Ce(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),h):a(f)}function h(f){return l.containerState.size=r+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function Hh(e,t,a){const l=this;return l.containerState._closeFlow=void 0,e.check(xl,n,r);function n(s){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Se(e,t,"listItemIndent",l.containerState.size+1)(s)}function r(s){return l.containerState.furtherBlankLines||!Ce(s)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,i(s)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(Bh,t,i)(s))}function i(s){return l.containerState._closeFlow=!0,l.interrupt=void 0,Se(e,e.attempt(tt,t,a),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function $h(e,t,a){const l=this;return Se(e,n,"listItemIndent",l.containerState.size+1);function n(r){const i=l.events[l.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===l.containerState.size?t(r):a(r)}}function Rh(e){e.exit(this.containerState.type)}function Uh(e,t,a){const l=this;return Se(e,n,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function n(r){const i=l.events[l.events.length-1];return!Ce(r)&&i&&i[1].type==="listItemPrefixWhitespace"?t(r):a(r)}}const bs={name:"setextUnderline",resolveTo:qh,tokenize:zh};function qh(e,t){let a=e.length,l,n,r;for(;a--;)if(e[a][0]==="enter"){if(e[a][1].type==="content"){l=a;break}e[a][1].type==="paragraph"&&(n=a)}else e[a][1].type==="content"&&e.splice(a,1),!r&&e[a][1].type==="definition"&&(r=a);const i={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[n][1].type="setextHeadingText",r?(e.splice(n,0,["enter",i,t]),e.splice(r+1,0,["exit",e[l][1],t]),e[l][1].end={...e[r][1].end}):e[l][1]=i,e.push(["exit",i,t]),e}function zh(e,t,a){const l=this;let n;return r;function r(o){let c=l.events.length,d;for(;c--;)if(l.events[c][1].type!=="lineEnding"&&l.events[c][1].type!=="linePrefix"&&l.events[c][1].type!=="content"){d=l.events[c][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||d)?(e.enter("setextHeadingLine"),n=o,i(o)):a(o)}function i(o){return e.enter("setextHeadingLineSequence"),s(o)}function s(o){return o===n?(e.consume(o),s):(e.exit("setextHeadingLineSequence"),Ce(o)?Se(e,u,"lineSuffix")(o):u(o))}function u(o){return o===null||oe(o)?(e.exit("setextHeadingLine"),t(o)):a(o)}}const Vh={tokenize:Gh};function Gh(e){const t=this,a=e.attempt(xl,l,e.attempt(this.parser.constructs.flowInitial,n,Se(e,e.attempt(this.parser.constructs.flow,n,e.attempt(Xp,n)),"linePrefix")));return a;function l(r){if(r===null){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,a}function n(r){if(r===null){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,a}}const Yh={resolveAll:vs()},Wh=ms("string"),jh=ms("text");function ms(e){return{resolveAll:vs(e==="text"?Kh:void 0),tokenize:t};function t(a){const l=this,n=this.parser.constructs[e],r=a.attempt(n,i,s);return i;function i(c){return o(c)?r(c):s(c)}function s(c){if(c===null){a.consume(c);return}return a.enter("data"),a.consume(c),u}function u(c){return o(c)?(a.exit("data"),r(c)):(a.consume(c),u)}function o(c){if(c===null)return!0;const d=n[c];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(l,l.previous))return!0}return!1}}}function vs(e){return t;function t(a,l){let n=-1,r;for(;++n<=a.length;)r===void 0?a[n]&&a[n][1].type==="data"&&(r=n,n++):(!a[n]||a[n][1].type!=="data")&&(n!==r+2&&(a[r][1].end=a[n-1][1].end,a.splice(r+2,n-r-2),n=r+2),r=void 0);return e?e(a,l):a}}function Kh(e,t){let a=0;for(;++a<=e.length;)if((a===e.length||e[a][1].type==="lineEnding")&&e[a-1][1].type==="data"){const l=e[a-1][1],n=t.sliceStream(l);let r=n.length,i=-1,s=0,u;for(;r--;){const o=n[r];if(typeof o=="string"){for(i=o.length;o.charCodeAt(i-1)===32;)s++,i--;if(i)break;i=-1}else if(o===-2)u=!0,s++;else if(o!==-1){r++;break}}if(t._contentTypeTextTrailing&&a===e.length&&(s=0),s){const o={type:a===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:r?i:l.start._bufferIndex+i,_index:l.start._index+r,line:l.end.line,column:l.end.column-s,offset:l.end.offset-s},end:{...l.end}};l.end={...o.start},l.start.offset===l.end.offset?Object.assign(l,o):(e.splice(a,0,["enter",o,t],["exit",o,t]),a+=2)}a++}return e}const Xh=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:th},disable:{null:[]},document:{42:tt,43:tt,45:tt,48:tt,49:tt,50:tt,51:tt,52:tt,53:tt,54:tt,55:tt,56:tt,57:tt,62:rs},flow:{35:sh,42:Cl,45:[bs,Cl],60:dh,61:bs,95:Cl,96:os,126:os},flowInitial:{[-2]:kn,[-1]:kn,32:kn},insideSpan:{null:[wn,Yh]},string:{38:ss,92:is},text:{[-5]:Nn,[-4]:Nn,[-3]:Nn,33:Nh,38:ss,42:wn,60:[Lp,gh],91:Lh,92:[rh,is],93:_n,95:wn,96:Vp}},Symbol.toStringTag,{value:"Module"}));function Qh(e,t,a){let l={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const n={},r=[];let i=[],s=[];const u={attempt:N(C),check:N(A),consume:m,enter:b,exit:T,interrupt:N(A,{interrupt:!0})},o={code:null,containerState:{},defineSkip:E,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:f,write:d};let c=t.tokenize.call(o,u);return t.resolveAll&&r.push(t),o;function d(D){return i=ut(i,D),g(),i[i.length-1]!==null?[]:(k(t,0),o.events=An(r,o.events,o),o.events)}function h(D,F){return Zh(f(D),F)}function f(D){return Jh(i,D)}function y(){const{_bufferIndex:D,_index:F,line:M,column:I,offset:x}=l;return{_bufferIndex:D,_index:F,line:M,column:I,offset:x}}function E(D){n[D.line]=D.column,L()}function g(){let D;for(;l._index<i.length;){const F=i[l._index];if(typeof F=="string")for(D=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===D&&l._bufferIndex<F.length;)v(F.charCodeAt(l._bufferIndex));else v(F)}}function v(D){c=c(D)}function m(D){oe(D)?(l.line++,l.column=1,l.offset+=D===-3?2:1,L()):D!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===i[l._index].length&&(l._bufferIndex=-1,l._index++)),o.previous=D}function b(D,F){const M=F||{};return M.type=D,M.start=y(),o.events.push(["enter",M,o]),s.push(M),M}function T(D){const F=s.pop();return F.end=y(),o.events.push(["exit",F,o]),F}function C(D,F){k(D,F.from)}function A(D,F){F.restore()}function N(D,F){return M;function M(I,x,P){let z,U,V,_;return Array.isArray(I)?Y(I):"tokenize"in I?Y([I]):G(I);function G(X){return W;function W(ee){const ie=ee!==null&&X[ee],ce=ee!==null&&X.null,me=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return Y(me)(ee)}}function Y(X){return z=X,U=0,X.length===0?P:O(X[U])}function O(X){return W;function W(ee){return _=S(),V=X,X.partial||(o.currentConstruct=X),X.name&&o.parser.constructs.disable.null.includes(X.name)?K():X.tokenize.call(F?Object.assign(Object.create(o),F):o,u,R,K)(ee)}}function R(X){return D(V,_),x}function K(X){return _.restore(),++U<z.length?O(z[U]):P}}}function k(D,F){D.resolveAll&&!r.includes(D)&&r.push(D),D.resolve&&mt(o.events,F,o.events.length-F,D.resolve(o.events.slice(F),o)),D.resolveTo&&(o.events=D.resolveTo(o.events,o))}function S(){const D=y(),F=o.previous,M=o.currentConstruct,I=o.events.length,x=Array.from(s);return{from:I,restore:P};function P(){l=D,o.previous=F,o.currentConstruct=M,o.events.length=I,s=x,L()}}function L(){l.line in n&&l.column<2&&(l.column=n[l.line],l.offset+=n[l.line]-1)}}function Jh(e,t){const a=t.start._index,l=t.start._bufferIndex,n=t.end._index,r=t.end._bufferIndex;let i;if(a===n)i=[e[a].slice(l,r)];else{if(i=e.slice(a,n),l>-1){const s=i[0];typeof s=="string"?i[0]=s.slice(l):i.shift()}r>0&&i.push(e[n].slice(0,r))}return i}function Zh(e,t){let a=-1;const l=[];let n;for(;++a<e.length;){const r=e[a];let i;if(typeof r=="string")i=r;else switch(r){case-5:{i="\r";break}case-4:{i=`
|
|
44
44
|
`;break}case-3:{i=`\r
|
|
45
|
-
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(r)}n=r===-2,l.push(i)}return l.join("")}function eb(e){const l={constructs:gp([Xh,...(e||{}).extensions||[]]),content:n(Sp),defined:[],document:n(wp),flow:n(Vh),lazy:{},string:n(Wh),text:n(jh)};return l;function n(r){return i;function i(s){return Qh(l,r,s)}}}function tb(e){for(;!cs(e););return e}const gs=/[\0\t\n\r]/g;function ab(){let e=1,t="",a=!0,l;return n;function n(r,i,s){const u=[];let o,c,d,h,f;for(r=t+(typeof r=="string"?r.toString():new TextDecoder(i||void 0).decode(r)),d=0,t="",a&&(r.charCodeAt(0)===65279&&d++,a=void 0);d<r.length;){if(gs.lastIndex=d,o=gs.exec(r),h=o&&o.index!==void 0?o.index:r.length,f=r.charCodeAt(h),!o){t=r.slice(d);break}if(f===10&&d===h&&l)u.push(-3),l=void 0;else switch(l&&(u.push(-5),l=void 0),d<h&&(u.push(r.slice(d,h)),e+=h-d),f){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:l=!0,e=1}d=h+1}return s&&(l&&u.push(-5),t&&u.push(t),u.push(null)),u}}const lb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nb(e){return e.replace(lb,rb)}function rb(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const n=a.charCodeAt(1),r=n===120||n===88;return ts(a.slice(r?2:1),r?16:10)}return La(a)||e}const Es={}.hasOwnProperty;function ib(e,t,a){return typeof t!="string"&&(a=t,t=void 0),sb(a)(tb(eb(a).document().write(ab()(e,t,!0))))}function sb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(yt),autolinkProtocol:S,autolinkEmail:S,atxHeading:r(Ve),blockQuote:r(ce),characterEscape:S,characterReference:S,codeFenced:r(me),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(me,i),codeText:r(Pe,i),codeTextData:S,data:S,codeFlowValue:S,definition:r(Ne),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(ct),hardBreakEscape:r(Ge),hardBreakTrailing:r(Ge),htmlFlow:r(Qe,i),htmlFlowData:S,htmlText:r(Qe,i),htmlTextData:S,image:r(Kt),label:i,link:r(yt),listItem:r(Ft),listItemValue:h,listOrdered:r(wt,d),listUnordered:r(wt),paragraph:r(Za),reference:O,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(Ve),strong:r(ke),thematicBreak:r(el)},exit:{atxHeading:u(),atxHeadingSequence:C,autolink:u(),autolinkEmail:ie,autolinkProtocol:ee,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:X,characterReference:W,codeFenced:u(g),codeFencedFence:E,codeFencedFenceInfo:f,codeFencedFenceMeta:y,codeFlowValue:L,codeIndented:u(v),codeText:u(x),codeTextData:L,data:L,definition:u(),definitionDestinationString:T,definitionLabelString:m,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(M),htmlFlowData:L,htmlText:u(I),htmlTextData:L,image:u(z),label:V,labelText:U,lineEnding:D,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:R,resourceDestinationString:_,resourceTitleString:G,resource:Y,setextHeading:u(k),setextHeadingLineSequence:N,setextHeadingText:A,strong:u(),thematicBreak:u()}};ys(t,(e||{}).mdastExtensions||[]);const a={};return l;function l(Z){let ne={type:"root",children:[]};const ge={stack:[ne],tokenStack:[],config:t,enter:s,exit:o,buffer:i,resume:c,data:a},Te=[];let _e=-1;for(;++_e<Z.length;)if(Z[_e][1].type==="listOrdered"||Z[_e][1].type==="listUnordered")if(Z[_e][0]==="enter")Te.push(_e);else{const Je=Te.pop();_e=n(Z,Je,_e)}for(_e=-1;++_e<Z.length;){const Je=t[Z[_e][0]];Es.call(Je,Z[_e][1].type)&&Je[Z[_e][1].type].call(Object.assign({sliceSerialize:Z[_e][2].sliceSerialize},ge),Z[_e][1])}if(ge.tokenStack.length>0){const Je=ge.tokenStack[ge.tokenStack.length-1];(Je[1]||Ts).call(ge,void 0,Je[0])}for(ne.position={start:Ot(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ot(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)ne=t.transforms[_e](ne)||ne;return ne}function n(Z,ne,ge){let Te=ne-1,_e=-1,Je=!1,kt,Ke,Ht,Xt;for(;++Te<=ge;){const Ze=Z[Te];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?_e++:_e--,Xt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(kt&&!Xt&&!_e&&!Ht&&(Ht=Te),Xt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xt=void 0}if(!_e&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||_e===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(kt){let $t=Te;for(Ke=void 0;$t--;){const lt=Z[$t];if(lt[1].type==="lineEnding"||lt[1].type==="lineEndingBlank"){if(lt[0]==="exit")continue;Ke&&(Z[Ke][1].type="lineEndingBlank",Je=!0),lt[1].type="lineEnding",Ke=$t}else if(!(lt[1].type==="linePrefix"||lt[1].type==="blockQuotePrefix"||lt[1].type==="blockQuotePrefixWhitespace"||lt[1].type==="blockQuoteMarker"||lt[1].type==="listItemIndent"))break}Ht&&(!Ke||Ht<Ke)&&(kt._spread=!0),kt.end=Object.assign({},Ke?Z[Ke][1].start:Ze[1].end),Z.splice(Ke||Te,0,["exit",kt,Ze[2]]),Te++,ge++}if(Ze[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};kt=$t,Z.splice(Te,0,["enter",$t,Ze[2]]),Te++,ge++,Ht=void 0,Xt=!0}}}return Z[ne][1]._spread=Je,ge}function r(Z,ne){return ge;function ge(Te){s.call(this,Z(Te),Te),ne&&ne.call(this,Te)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(Z,ne,ge){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ne,ge||void 0]),Z.position={start:Ot(ne.start),end:void 0}}function u(Z){return ne;function ne(ge){Z&&Z.call(this,ge),o.call(this,ge)}}function o(Z,ne){const ge=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==Z.type&&(ne?ne.call(this,Z,Te[0]):(Te[1]||Ts).call(this,Z,Te[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Na({start:Z.start,end:Z.end})+"): it’s not open");ge.position.end=Ot(Z.end)}function c(){return mp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(Z){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function f(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=Z}function y(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=Z}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z.replace(/(\r?\n|\r)$/g,"")}function m(Z){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=ua(this.sliceSerialize(Z)).toLowerCase()}function b(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Z}function T(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Z}function C(Z){const ne=this.stack[this.stack.length-1];if(!ne.depth){const ge=this.sliceSerialize(Z).length;ne.depth=ge}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(Z){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function S(Z){const ge=this.stack[this.stack.length-1].children;let Te=ge[ge.length-1];(!Te||Te.type!=="text")&&(Te=Be(),Te.position={start:Ot(Z.start),end:void 0},ge.push(Te)),this.stack.push(Te)}function L(Z){const ne=this.stack.pop();ne.value+=this.sliceSerialize(Z),ne.position.end=Ot(Z.end)}function D(Z){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ne.children[ne.children.length-1];ge.position.end=Ot(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(S.call(this,Z),L.call(this,Z))}function F(){this.data.atHardBreak=!0}function M(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function I(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function x(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function P(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ne,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function z(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ne,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function U(Z){const ne=this.sliceSerialize(Z),ge=this.stack[this.stack.length-2];ge.label=nb(ne),ge.identifier=ua(ne).toLowerCase()}function V(){const Z=this.stack[this.stack.length-1],ne=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Te=Z.children;ge.children=Te}else ge.alt=ne}function _(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Z}function G(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Z}function Y(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function R(Z){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=ua(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function K(Z){this.data.characterReferenceType=Z.type}function X(Z){const ne=this.sliceSerialize(Z),ge=this.data.characterReferenceType;let Te;ge?(Te=ts(ne,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=La(ne);const _e=this.stack[this.stack.length-1];_e.value+=Te}function W(Z){const ne=this.stack.pop();ne.position.end=Ot(Z.end)}function ee(Z){L.call(this,Z);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(Z)}function ie(Z){L.call(this,Z);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(Z)}function ce(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function Pe(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ct(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function Kt(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function wt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Ft(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Za(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function Be(){return{type:"text",value:""}}function el(){return{type:"thematicBreak"}}}function Ot(e){return{line:e.line,column:e.column,offset:e.offset}}function ys(e,t){let a=-1;for(;++a<t.length;){const l=t[a];Array.isArray(l)?ys(e,l):ub(e,l)}}function ub(e,t){let a;for(a in t)if(Es.call(t,a))switch(a){case"canContainEols":{const l=t[a];l&&e[a].push(...l);break}case"transforms":{const l=t[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=t[a];l&&Object.assign(e[a],l);break}}}function Ts(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function ob(e){const t=this;t.parser=a;function a(l){return ib(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cb(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function db(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
45
|
+
`;break}case-2:{i=t?" ":" ";break}case-1:{if(!t&&n)continue;i=" ";break}default:i=String.fromCharCode(r)}n=r===-2,l.push(i)}return l.join("")}function eb(e){const l={constructs:gp([Xh,...(e||{}).extensions||[]]),content:n(Sp),defined:[],document:n(wp),flow:n(Vh),lazy:{},string:n(Wh),text:n(jh)};return l;function n(r){return i;function i(s){return Qh(l,r,s)}}}function tb(e){for(;!cs(e););return e}const gs=/[\0\t\n\r]/g;function ab(){let e=1,t="",a=!0,l;return n;function n(r,i,s){const u=[];let o,c,d,h,f;for(r=t+(typeof r=="string"?r.toString():new TextDecoder(i||void 0).decode(r)),d=0,t="",a&&(r.charCodeAt(0)===65279&&d++,a=void 0);d<r.length;){if(gs.lastIndex=d,o=gs.exec(r),h=o&&o.index!==void 0?o.index:r.length,f=r.charCodeAt(h),!o){t=r.slice(d);break}if(f===10&&d===h&&l)u.push(-3),l=void 0;else switch(l&&(u.push(-5),l=void 0),d<h&&(u.push(r.slice(d,h)),e+=h-d),f){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:l=!0,e=1}d=h+1}return s&&(l&&u.push(-5),t&&u.push(t),u.push(null)),u}}const lb=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function nb(e){return e.replace(lb,rb)}function rb(e,t,a){if(t)return t;if(a.charCodeAt(0)===35){const n=a.charCodeAt(1),r=n===120||n===88;return ts(a.slice(r?2:1),r?16:10)}return La(a)||e}const Es={}.hasOwnProperty;function ib(e,t,a){return t&&typeof t=="object"&&(a=t,t=void 0),sb(a)(tb(eb(a).document().write(ab()(e,t,!0))))}function sb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(yt),autolinkProtocol:S,autolinkEmail:S,atxHeading:r(Ve),blockQuote:r(ce),characterEscape:S,characterReference:S,codeFenced:r(me),codeFencedFenceInfo:i,codeFencedFenceMeta:i,codeIndented:r(me,i),codeText:r(Pe,i),codeTextData:S,data:S,codeFlowValue:S,definition:r(Ne),definitionDestinationString:i,definitionLabelString:i,definitionTitleString:i,emphasis:r(ct),hardBreakEscape:r(Ge),hardBreakTrailing:r(Ge),htmlFlow:r(Qe,i),htmlFlowData:S,htmlText:r(Qe,i),htmlTextData:S,image:r(Kt),label:i,link:r(yt),listItem:r(Ft),listItemValue:h,listOrdered:r(wt,d),listUnordered:r(wt),paragraph:r(Za),reference:O,referenceString:i,resourceDestinationString:i,resourceTitleString:i,setextHeading:r(Ve),strong:r(ke),thematicBreak:r(el)},exit:{atxHeading:u(),atxHeadingSequence:C,autolink:u(),autolinkEmail:ie,autolinkProtocol:ee,blockQuote:u(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:X,characterReference:W,codeFenced:u(g),codeFencedFence:E,codeFencedFenceInfo:f,codeFencedFenceMeta:y,codeFlowValue:L,codeIndented:u(v),codeText:u(x),codeTextData:L,data:L,definition:u(),definitionDestinationString:T,definitionLabelString:m,definitionTitleString:b,emphasis:u(),hardBreakEscape:u(F),hardBreakTrailing:u(F),htmlFlow:u(M),htmlFlowData:L,htmlText:u(I),htmlTextData:L,image:u(z),label:V,labelText:U,lineEnding:D,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:R,resourceDestinationString:_,resourceTitleString:G,resource:Y,setextHeading:u(k),setextHeadingLineSequence:N,setextHeadingText:A,strong:u(),thematicBreak:u()}};ys(t,(e||{}).mdastExtensions||[]);const a={};return l;function l(Z){let ne={type:"root",children:[]};const ge={stack:[ne],tokenStack:[],config:t,enter:s,exit:o,buffer:i,resume:c,data:a},Te=[];let _e=-1;for(;++_e<Z.length;)if(Z[_e][1].type==="listOrdered"||Z[_e][1].type==="listUnordered")if(Z[_e][0]==="enter")Te.push(_e);else{const Je=Te.pop();_e=n(Z,Je,_e)}for(_e=-1;++_e<Z.length;){const Je=t[Z[_e][0]];Es.call(Je,Z[_e][1].type)&&Je[Z[_e][1].type].call(Object.assign({sliceSerialize:Z[_e][2].sliceSerialize},ge),Z[_e][1])}if(ge.tokenStack.length>0){const Je=ge.tokenStack[ge.tokenStack.length-1];(Je[1]||Ts).call(ge,void 0,Je[0])}for(ne.position={start:Ot(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ot(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)ne=t.transforms[_e](ne)||ne;return ne}function n(Z,ne,ge){let Te=ne-1,_e=-1,Je=!1,kt,Ke,Ht,Xt;for(;++Te<=ge;){const Ze=Z[Te];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?_e++:_e--,Xt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(kt&&!Xt&&!_e&&!Ht&&(Ht=Te),Xt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Xt=void 0}if(!_e&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||_e===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(kt){let $t=Te;for(Ke=void 0;$t--;){const lt=Z[$t];if(lt[1].type==="lineEnding"||lt[1].type==="lineEndingBlank"){if(lt[0]==="exit")continue;Ke&&(Z[Ke][1].type="lineEndingBlank",Je=!0),lt[1].type="lineEnding",Ke=$t}else if(!(lt[1].type==="linePrefix"||lt[1].type==="blockQuotePrefix"||lt[1].type==="blockQuotePrefixWhitespace"||lt[1].type==="blockQuoteMarker"||lt[1].type==="listItemIndent"))break}Ht&&(!Ke||Ht<Ke)&&(kt._spread=!0),kt.end=Object.assign({},Ke?Z[Ke][1].start:Ze[1].end),Z.splice(Ke||Te,0,["exit",kt,Ze[2]]),Te++,ge++}if(Ze[1].type==="listItemPrefix"){const $t={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};kt=$t,Z.splice(Te,0,["enter",$t,Ze[2]]),Te++,ge++,Ht=void 0,Xt=!0}}}return Z[ne][1]._spread=Je,ge}function r(Z,ne){return ge;function ge(Te){s.call(this,Z(Te),Te),ne&&ne.call(this,Te)}}function i(){this.stack.push({type:"fragment",children:[]})}function s(Z,ne,ge){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ne,ge||void 0]),Z.position={start:Ot(ne.start),end:void 0}}function u(Z){return ne;function ne(ge){Z&&Z.call(this,ge),o.call(this,ge)}}function o(Z,ne){const ge=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==Z.type&&(ne?ne.call(this,Z,Te[0]):(Te[1]||Ts).call(this,Z,Te[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Na({start:Z.start,end:Z.end})+"): it’s not open");ge.position.end=Ot(Z.end)}function c(){return mp(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(Z){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function f(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=Z}function y(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=Z}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z.replace(/(\r?\n|\r)$/g,"")}function m(Z){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=ua(this.sliceSerialize(Z)).toLowerCase()}function b(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Z}function T(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Z}function C(Z){const ne=this.stack[this.stack.length-1];if(!ne.depth){const ge=this.sliceSerialize(Z).length;ne.depth=ge}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function N(Z){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function S(Z){const ge=this.stack[this.stack.length-1].children;let Te=ge[ge.length-1];(!Te||Te.type!=="text")&&(Te=Be(),Te.position={start:Ot(Z.start),end:void 0},ge.push(Te)),this.stack.push(Te)}function L(Z){const ne=this.stack.pop();ne.value+=this.sliceSerialize(Z),ne.position.end=Ot(Z.end)}function D(Z){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=ne.children[ne.children.length-1];ge.position.end=Ot(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&(S.call(this,Z),L.call(this,Z))}function F(){this.data.atHardBreak=!0}function M(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function I(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function x(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Z}function P(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ne,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function z(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ne,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function U(Z){const ne=this.sliceSerialize(Z),ge=this.stack[this.stack.length-2];ge.label=nb(ne),ge.identifier=ua(ne).toLowerCase()}function V(){const Z=this.stack[this.stack.length-1],ne=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Te=Z.children;ge.children=Te}else ge.alt=ne}function _(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Z}function G(){const Z=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Z}function Y(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function R(Z){const ne=this.resume(),ge=this.stack[this.stack.length-1];ge.label=ne,ge.identifier=ua(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function K(Z){this.data.characterReferenceType=Z.type}function X(Z){const ne=this.sliceSerialize(Z),ge=this.data.characterReferenceType;let Te;ge?(Te=ts(ne,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=La(ne);const _e=this.stack[this.stack.length-1];_e.value+=Te}function W(Z){const ne=this.stack.pop();ne.position.end=Ot(Z.end)}function ee(Z){L.call(this,Z);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(Z)}function ie(Z){L.call(this,Z);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(Z)}function ce(){return{type:"blockquote",children:[]}}function me(){return{type:"code",lang:null,meta:null,value:""}}function Pe(){return{type:"inlineCode",value:""}}function Ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ct(){return{type:"emphasis",children:[]}}function Ve(){return{type:"heading",depth:0,children:[]}}function Ge(){return{type:"break"}}function Qe(){return{type:"html",value:""}}function Kt(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function wt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function Ft(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Za(){return{type:"paragraph",children:[]}}function ke(){return{type:"strong",children:[]}}function Be(){return{type:"text",value:""}}function el(){return{type:"thematicBreak"}}}function Ot(e){return{line:e.line,column:e.column,offset:e.offset}}function ys(e,t){let a=-1;for(;++a<t.length;){const l=t[a];Array.isArray(l)?ys(e,l):ub(e,l)}}function ub(e,t){let a;for(a in t)if(Es.call(t,a))switch(a){case"canContainEols":{const l=t[a];l&&e[a].push(...l);break}case"transforms":{const l=t[a];l&&e[a].push(...l);break}case"enter":case"exit":{const l=t[a];l&&Object.assign(e[a],l);break}}}function Ts(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Na({start:t.start,end:t.end})+") is still open")}function ob(e){const t=this;t.parser=a;function a(l){return ib(l,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cb(e,t){const a={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,a),e.applyData(t,a)}function db(e,t){const a={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,a),[e.applyData(t,a),{type:"text",value:`
|
|
46
46
|
`}]}function fb(e,t){const a=t.value?t.value+`
|
|
47
47
|
`:"",l={},n=t.lang?t.lang.split(/\s+/):[];n.length>0&&(l.className=["language-"+n[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:a}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}function pb(e,t){const a={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function hb(e,t){const a={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function bb(e,t){const a=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(t.identifier).toUpperCase(),n=oa(l.toLowerCase()),r=e.footnoteOrder.indexOf(l);let i,s=e.footnoteCounts.get(l);s===void 0?(s=0,e.footnoteOrder.push(l),i=e.footnoteOrder.length):i=r+1,s+=1,e.footnoteCounts.set(l,s);const u={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+n,id:a+"fnref-"+n+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,u);const o={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,o),e.applyData(t,o)}function mb(e,t){const a={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function vb(e,t){if(e.options.allowDangerousHtml){const a={type:"raw",value:t.value};return e.patch(t,a),e.applyData(t,a)}}function xs(e,t){const a=t.referenceType;let l="]";if(a==="collapsed"?l+="[]":a==="full"&&(l+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+l}];const n=e.all(t),r=n[0];r&&r.type==="text"?r.value="["+r.value:n.unshift({type:"text",value:"["});const i=n[n.length-1];return i&&i.type==="text"?i.value+=l:n.push({type:"text",value:l}),n}function gb(e,t){const a=String(t.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return xs(e,t);const n={src:oa(l.url||""),alt:t.alt};l.title!==null&&l.title!==void 0&&(n.title=l.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Eb(e,t){const a={src:oa(t.url)};t.alt!==null&&t.alt!==void 0&&(a.alt=t.alt),t.title!==null&&t.title!==void 0&&(a.title=t.title);const l={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,l),e.applyData(t,l)}function yb(e,t){const a={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,a);const l={type:"element",tagName:"code",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function Tb(e,t){const a=String(t.identifier).toUpperCase(),l=e.definitionById.get(a);if(!l)return xs(e,t);const n={href:oa(l.url||"")};l.title!==null&&l.title!==void 0&&(n.title=l.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xb(e,t){const a={href:oa(t.url)};t.title!==null&&t.title!==void 0&&(a.title=t.title);const l={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function Cb(e,t,a){const l=e.all(t),n=a?Sb(a):Cs(t),r={},i=[];if(typeof t.checked=="boolean"){const c=l[0];let d;c&&c.type==="element"&&c.tagName==="p"?d=c:(d={type:"element",tagName:"p",properties:{},children:[]},l.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let s=-1;for(;++s<l.length;){const c=l[s];(n||s!==0||c.type!=="element"||c.tagName!=="p")&&i.push({type:"text",value:`
|
|
48
48
|
`}),c.type==="element"&&c.tagName==="p"&&!n?i.push(...c.children):i.push(c)}const u=l[l.length-1];u&&(n||u.type!=="element"||u.tagName!=="p")&&i.push({type:"text",value:`
|
|
49
49
|
`});const o={type:"element",tagName:"li",properties:r,children:i};return e.patch(t,o),e.applyData(t,o)}function Sb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const a=e.children;let l=-1;for(;!t&&++l<a.length;)t=Cs(a[l])}return t}function Cs(e){const t=e.spread;return t??e.children.length>1}function Ab(e,t){const a={},l=e.all(t);let n=-1;for(typeof t.start=="number"&&t.start!==1&&(a.start=t.start);++n<l.length;){const i=l[n];if(i.type==="element"&&i.tagName==="li"&&i.properties&&Array.isArray(i.properties.className)&&i.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const r={type:"element",tagName:t.ordered?"ol":"ul",properties:a,children:e.wrap(l,!0)};return e.patch(t,r),e.applyData(t,r)}function wb(e,t){const a={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function kb(e,t){const a={type:"root",children:e.wrap(e.all(t))};return e.patch(t,a),e.applyData(t,a)}function _b(e,t){const a={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Nb(e,t){const a=e.all(t),l=a.shift(),n=[];if(l){const i={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(t.children[0],i),n.push(i)}if(a.length>0){const i={type:"element",tagName:"tbody",properties:{},children:e.wrap(a,!0)},s=bt(t.children[1]),u=Tl(t.children[t.children.length-1]);s&&u&&(i.position={start:s,end:u}),n.push(i)}const r={type:"element",tagName:"table",properties:{},children:e.wrap(n,!0)};return e.patch(t,r),e.applyData(t,r)}function Ib(e,t,a){const l=a?a.children:void 0,r=(l?l.indexOf(t):1)===0?"th":"td",i=a&&a.type==="table"?a.align:void 0,s=i?i.length:t.children.length;let u=-1;const o=[];for(;++u<s;){const d=t.children[u],h={},f=i?i[u]:void 0;f&&(h.align=f);let y={type:"element",tagName:r,properties:h,children:[]};d&&(y.children=e.all(d),e.patch(d,y),y=e.applyData(d,y)),o.push(y)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(o,!0)};return e.patch(t,c),e.applyData(t,c)}function Lb(e,t){const a={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}const Ss=9,As=32;function Ob(e){const t=String(e),a=/\r?\n|\r/g;let l=a.exec(t),n=0;const r=[];for(;l;)r.push(ws(t.slice(n,l.index),n>0,!0),l[0]),n=l.index+l[0].length,l=a.exec(t);return r.push(ws(t.slice(n),n>0,!1)),r.join("")}function ws(e,t,a){let l=0,n=e.length;if(t){let r=e.codePointAt(l);for(;r===Ss||r===As;)l++,r=e.codePointAt(l)}if(a){let r=e.codePointAt(n-1);for(;r===Ss||r===As;)n--,r=e.codePointAt(n-1)}return n>l?e.slice(l,n):""}function Db(e,t){const a={type:"text",value:Ob(String(t.value))};return e.patch(t,a),e.applyData(t,a)}function Pb(e,t){const a={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,a),e.applyData(t,a)}const Mb={blockquote:cb,break:db,code:fb,delete:pb,emphasis:hb,footnoteReference:bb,heading:mb,html:vb,imageReference:gb,image:Eb,inlineCode:yb,linkReference:Tb,link:xb,listItem:Cb,list:Ab,paragraph:wb,root:kb,strong:_b,table:Nb,tableCell:Lb,tableRow:Ib,text:Db,thematicBreak:Pb,toml:Sl,yaml:Sl,definition:Sl,footnoteDefinition:Sl};function Sl(){}const ks=-1,Al=0,Ma=1,wl=2,In=3,Ln=4,On=5,Dn=6,_s=7,Ns=8,Is=typeof self=="object"?self:globalThis,Bb=(e,t)=>{const a=(n,r)=>(e.set(r,n),n),l=n=>{if(e.has(n))return e.get(n);const[r,i]=t[n];switch(r){case Al:case ks:return a(i,n);case Ma:{const s=a([],n);for(const u of i)s.push(l(u));return s}case wl:{const s=a({},n);for(const[u,o]of i)s[l(u)]=l(o);return s}case In:return a(new Date(i),n);case Ln:{const{source:s,flags:u}=i;return a(new RegExp(s,u),n)}case On:{const s=a(new Map,n);for(const[u,o]of i)s.set(l(u),l(o));return s}case Dn:{const s=a(new Set,n);for(const u of i)s.add(l(u));return s}case _s:{const{name:s,message:u}=i;return a(new Is[s](u),n)}case Ns:return a(BigInt(i),n);case"BigInt":return a(Object(BigInt(i)),n);case"ArrayBuffer":return a(new Uint8Array(i).buffer,i);case"DataView":{const{buffer:s}=new Uint8Array(i);return a(new DataView(s),i)}}return a(new Is[r](i),n)};return l},Ls=e=>Bb(new Map,e)(0),ca="",{toString:Fb}={},{keys:Hb}=Object,Ba=e=>{const t=typeof e;if(t!=="object"||!e)return[Al,t];const a=Fb.call(e).slice(8,-1);switch(a){case"Array":return[Ma,ca];case"Object":return[wl,ca];case"Date":return[In,ca];case"RegExp":return[Ln,ca];case"Map":return[On,ca];case"Set":return[Dn,ca];case"DataView":return[Ma,a]}return a.includes("Array")?[Ma,a]:a.includes("Error")?[_s,a]:[wl,a]},kl=([e,t])=>e===Al&&(t==="function"||t==="symbol"),$b=(e,t,a,l)=>{const n=(i,s)=>{const u=l.push(i)-1;return a.set(s,u),u},r=i=>{if(a.has(i))return a.get(i);let[s,u]=Ba(i);switch(s){case Al:{let c=i;switch(u){case"bigint":s=Ns,c=i.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);c=null;break;case"undefined":return n([ks],i)}return n([s,c],i)}case Ma:{if(u){let h=i;return u==="DataView"?h=new Uint8Array(i.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(i)),n([u,[...h]],i)}const c=[],d=n([s,c],i);for(const h of i)c.push(r(h));return d}case wl:{if(u)switch(u){case"BigInt":return n([u,i.toString()],i);case"Boolean":case"Number":case"String":return n([u,i.valueOf()],i)}if(t&&"toJSON"in i)return r(i.toJSON());const c=[],d=n([s,c],i);for(const h of Hb(i))(e||!kl(Ba(i[h])))&&c.push([r(h),r(i[h])]);return d}case In:return n([s,i.toISOString()],i);case Ln:{const{source:c,flags:d}=i;return n([s,{source:c,flags:d}],i)}case On:{const c=[],d=n([s,c],i);for(const[h,f]of i)(e||!(kl(Ba(h))||kl(Ba(f))))&&c.push([r(h),r(f)]);return d}case Dn:{const c=[],d=n([s,c],i);for(const h of i)(e||!kl(Ba(h)))&&c.push(r(h));return d}}const{message:o}=i;return n([s,{name:u,message:o}],i)};return r},Os=(e,{json:t,lossy:a}={})=>{const l=[];return $b(!(t||a),!!t,new Map,l)(e),l},Vt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ls(Os(e,t)):structuredClone(e):(e,t)=>Ls(Os(e,t));function Rb(e,t){const a=[{type:"text",value:"↩"}];return t>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),a}function Ub(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=e.options.footnoteBackContent||Rb,l=e.options.footnoteBackLabel||Ub,n=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",i=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[u]);if(!o)continue;const c=e.all(o),d=String(o.identifier).toUpperCase(),h=oa(d.toLowerCase());let f=0;const y=[],E=e.footnoteCounts.get(d);for(;E!==void 0&&++f<=E;){y.length>0&&y.push({type:"text",value:" "});let m=typeof a=="string"?a:a(u,f);typeof m=="string"&&(m={type:"text",value:m}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(u,f),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const g=c[c.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const m=g.children[g.children.length-1];m&&m.type==="text"?m.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...y)}else c.push(...y);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(c,!0)};e.patch(o,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Vt(i),id:"footnote-label"},children:[{type:"text",value:n}]},{type:"text",value:`
|
|
50
50
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
51
|
-
`}]}}const Ds=function(e){if(e==null)return Yb;if(typeof e=="function")return _l(e);if(typeof e=="object")return Array.isArray(e)?zb(e):Vb(e);if(typeof e=="string")return Gb(e);throw new Error("Expected function, string, or object as test")};function zb(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Ds(e[a]);return _l(l);function l(...n){let r=-1;for(;++r<t.length;)if(t[r].apply(this,n))return!0;return!1}}function Vb(e){const t=e;return _l(a);function a(l){const n=l;let r;for(r in e)if(n[r]!==t[r])return!1;return!0}}function Gb(e){return _l(t);function t(a){return a&&a.type===e}}function _l(e){return t;function t(a,l,n){return!!(Wb(a)&&e.call(this,a,typeof l=="number"?l:void 0,n||void 0))}}function Yb(){return!0}function Wb(e){return e!==null&&typeof e=="object"&&"type"in e}function ET(e){return e}const Ps=[],jb=!0,Ms=!1,Kb="skip";function Bs(e,t,a,l){let n;typeof t=="function"&&typeof a!="function"?(l=a,a=t):n=t;const r=Ds(n),i=l?-1:1;s(e,void 0,[])();function s(u,o,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=Ps,y,E,g;if((!t||r(u,o,c[c.length-1]||void 0))&&(f=Xb(a(u,c)),f[0]===Ms))return f;if("children"in u&&u.children){const v=u;if(v.children&&f[0]!==Kb)for(E=(l?v.children.length:-1)+i,g=c.concat(v);E>-1&&E<v.children.length;){const m=v.children[E];if(y=s(m,E,g)(),y[0]===Ms)return y;E=typeof y[1]=="number"?y[1]:E+i}}return f}}}function Xb(e){return Array.isArray(e)?e:typeof e=="number"?[jb,e]:e==null?Ps:[e]}function Nl(e,t,a,l){let n,r,i;typeof t=="function"&&typeof a!="function"?(r=void 0,i=t,n=a):(r=t,i=a,n=l),Bs(e,r,s,n);function s(u,o){const c=o[o.length-1],d=c?c.children.indexOf(u):void 0;return i(u,d,c)}}const Pn={}.hasOwnProperty,Qb={};function Jb(e,t){const a=t||Qb,l=new Map,n=new Map,r=new Map,i={...Mb,...a.handlers},s={all:o,applyData:em,definitionById:l,footnoteById:n,footnoteCounts:r,footnoteOrder:[],handlers:i,one:u,options:a,patch:Zb,wrap:am};return Nl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?l:n,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),s;function u(c,d){const h=c.type,f=s.handlers[h];if(Pn.call(s.handlers,h)&&f)return f(s,c,d);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in c){const{children:E,...g}=c,v=Vt(g);return v.children=s.all(c),v}return Vt(c)}return(s.options.unknownHandler||tm)(s,c,d)}function o(c){const d=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const y=s.one(h[f],c);if(y){if(f&&h[f-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Fs(y.value)),!Array.isArray(y)&&y.type==="element")){const E=y.children[0];E&&E.type==="text"&&(E.value=Fs(E.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function Zb(e,t){e.position&&(t.position=Vi(e))}function em(e,t){let a=t;if(e&&e.data){const l=e.data.hName,n=e.data.hChildren,r=e.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const i="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:i}}a.type==="element"&&r&&Object.assign(a.properties,Vt(r)),"children"in a&&a.children&&n!==null&&n!==void 0&&(a.children=n)}return a}function tm(e,t){const a=t.data||{},l="value"in t&&!(Pn.call(a,"hProperties")||Pn.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function am(e,t){const a=[];let l=-1;for(t&&a.push({type:"text",value:`
|
|
51
|
+
`}]}}const Ds=(function(e){if(e==null)return Yb;if(typeof e=="function")return _l(e);if(typeof e=="object")return Array.isArray(e)?zb(e):Vb(e);if(typeof e=="string")return Gb(e);throw new Error("Expected function, string, or object as test")});function zb(e){const t=[];let a=-1;for(;++a<e.length;)t[a]=Ds(e[a]);return _l(l);function l(...n){let r=-1;for(;++r<t.length;)if(t[r].apply(this,n))return!0;return!1}}function Vb(e){const t=e;return _l(a);function a(l){const n=l;let r;for(r in e)if(n[r]!==t[r])return!1;return!0}}function Gb(e){return _l(t);function t(a){return a&&a.type===e}}function _l(e){return t;function t(a,l,n){return!!(Wb(a)&&e.call(this,a,typeof l=="number"?l:void 0,n||void 0))}}function Yb(){return!0}function Wb(e){return e!==null&&typeof e=="object"&&"type"in e}function ET(e){return e}const Ps=[],jb=!0,Ms=!1,Kb="skip";function Bs(e,t,a,l){let n;typeof t=="function"&&typeof a!="function"?(l=a,a=t):n=t;const r=Ds(n),i=l?-1:1;s(e,void 0,[])();function s(u,o,c){const d=u&&typeof u=="object"?u:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=Ps,y,E,g;if((!t||r(u,o,c[c.length-1]||void 0))&&(f=Xb(a(u,c)),f[0]===Ms))return f;if("children"in u&&u.children){const v=u;if(v.children&&f[0]!==Kb)for(E=(l?v.children.length:-1)+i,g=c.concat(v);E>-1&&E<v.children.length;){const m=v.children[E];if(y=s(m,E,g)(),y[0]===Ms)return y;E=typeof y[1]=="number"?y[1]:E+i}}return f}}}function Xb(e){return Array.isArray(e)?e:typeof e=="number"?[jb,e]:e==null?Ps:[e]}function Nl(e,t,a,l){let n,r,i;typeof t=="function"&&typeof a!="function"?(r=void 0,i=t,n=a):(r=t,i=a,n=l),Bs(e,r,s,n);function s(u,o){const c=o[o.length-1],d=c?c.children.indexOf(u):void 0;return i(u,d,c)}}const Pn={}.hasOwnProperty,Qb={};function Jb(e,t){const a=t||Qb,l=new Map,n=new Map,r=new Map,i={...Mb,...a.handlers},s={all:o,applyData:em,definitionById:l,footnoteById:n,footnoteCounts:r,footnoteOrder:[],handlers:i,one:u,options:a,patch:Zb,wrap:am};return Nl(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const d=c.type==="definition"?l:n,h=String(c.identifier).toUpperCase();d.has(h)||d.set(h,c)}}),s;function u(c,d){const h=c.type,f=s.handlers[h];if(Pn.call(s.handlers,h)&&f)return f(s,c,d);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in c){const{children:E,...g}=c,v=Vt(g);return v.children=s.all(c),v}return Vt(c)}return(s.options.unknownHandler||tm)(s,c,d)}function o(c){const d=[];if("children"in c){const h=c.children;let f=-1;for(;++f<h.length;){const y=s.one(h[f],c);if(y){if(f&&h[f-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Fs(y.value)),!Array.isArray(y)&&y.type==="element")){const E=y.children[0];E&&E.type==="text"&&(E.value=Fs(E.value))}Array.isArray(y)?d.push(...y):d.push(y)}}}return d}}function Zb(e,t){e.position&&(t.position=Vi(e))}function em(e,t){let a=t;if(e&&e.data){const l=e.data.hName,n=e.data.hChildren,r=e.data.hProperties;if(typeof l=="string")if(a.type==="element")a.tagName=l;else{const i="children"in a?a.children:[a];a={type:"element",tagName:l,properties:{},children:i}}a.type==="element"&&r&&Object.assign(a.properties,Vt(r)),"children"in a&&a.children&&n!==null&&n!==void 0&&(a.children=n)}return a}function tm(e,t){const a=t.data||{},l="value"in t&&!(Pn.call(a,"hProperties")||Pn.call(a,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function am(e,t){const a=[];let l=-1;for(t&&a.push({type:"text",value:`
|
|
52
52
|
`});++l<e.length;)l&&a.push({type:"text",value:`
|
|
53
53
|
`}),a.push(e[l]);return t&&e.length>0&&a.push({type:"text",value:`
|
|
54
54
|
`}),a}function Fs(e){let t=0,a=e.charCodeAt(t);for(;a===9||a===32;)t++,a=e.charCodeAt(t);return e.slice(t)}function Hs(e,t){const a=Jb(e,t),l=a.one(e,void 0),n=qb(a),r=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return n&&r.children.push({type:"text",value:`
|
|
55
|
-
`},n),r}function lm(e,t){return e&&"run"in e?async function(a,l){const n=Hs(a,{file:l,...t});await e.run(n,l)}:function(a,l){return Hs(a,{file:l,...e||t})}}function $s(e){if(e)throw e}var Mn,Rs;function nm(){if(Rs)return Mn;Rs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=function(o){return typeof Array.isArray=="function"?Array.isArray(o):t.call(o)==="[object Array]"},r=function(o){if(!o||t.call(o)!=="[object Object]")return!1;var c=e.call(o,"constructor"),d=o.constructor&&o.constructor.prototype&&e.call(o.constructor.prototype,"isPrototypeOf");if(o.constructor&&!c&&!d)return!1;var h;for(h in o);return typeof h>"u"||e.call(o,h)},i=function(o,c){a&&c.name==="__proto__"?a(o,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):o[c.name]=c.newValue},s=function(o,c){if(c==="__proto__")if(e.call(o,c)){if(l)return l(o,c).value}else return;return o[c]};return Mn=function u(){var o,c,d,h,f,y,E=arguments[0],g=1,v=arguments.length,m=!1;for(typeof E=="boolean"&&(m=E,E=arguments[1]||{},g=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});g<v;++g)if(o=arguments[g],o!=null)for(c in o)d=s(E,c),h=s(o,c),E!==h&&(m&&h&&(r(h)||(f=n(h)))?(f?(f=!1,y=d&&n(d)?d:[]):y=d&&r(d)?d:{},i(E,{name:c,newValue:u(m,y,h)})):typeof h<"u"&&i(E,{name:c,newValue:h}));return E},Mn}var rm=nm();const Bn=mn(rm);function Fn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function im(){const e=[],t={run:a,use:l};return t;function a(...n){let r=-1;const i=n.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...n);function s(u,...o){const c=e[++r];let d=-1;if(u){i(u);return}for(;++d<n.length;)(o[d]===null||o[d]===void 0)&&(o[d]=n[d]);n=o,c?sm(c,s)(...o):i(null,...o)}}function l(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function sm(e,t){let a;return l;function l(...i){const s=e.length>i.length;let u;s&&i.push(n);try{u=e.apply(this,i)}catch(o){const c=o;if(s&&a)throw c;return n(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(r,n):u instanceof Error?n(u):r(u))}function n(i,...s){a||(a=!0,t(i,...s))}function r(i){n(null,i)}}const gt={basename:um,dirname:om,extname:cm,join:dm,sep:"/"};function um(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fa(e);let a=0,l=-1,n=e.length,r;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(r){a=n+1;break}}else l<0&&(r=!0,l=n+1);return l<0?"":e.slice(a,l)}if(t===e)return"";let i=-1,s=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(r){a=n+1;break}}else i<0&&(r=!0,i=n+1),s>-1&&(e.codePointAt(n)===t.codePointAt(s--)?s<0&&(l=n):(s=-1,l=i));return a===l?l=i:l<0&&(l=e.length),e.slice(a,l)}function om(e){if(Fa(e),e.length===0)return".";let t=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){t=a;break}}else l||(l=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function cm(e){Fa(e);let t=e.length,a=-1,l=0,n=-1,r=0,i;for(;t--;){const s=e.codePointAt(t);if(s===47){if(i){l=t+1;break}continue}a<0&&(i=!0,a=t+1),s===46?n<0?n=t:r!==1&&(r=1):n>-1&&(r=-1)}return n<0||a<0||r===0||r===1&&n===a-1&&n===l+1?"":e.slice(n,a)}function dm(...e){let t=-1,a;for(;++t<e.length;)Fa(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":fm(a)}function fm(e){Fa(e);const t=e.codePointAt(0)===47;let a=pm(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function pm(e,t){let a="",l=0,n=-1,r=0,i=-1,s,u;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(n===i-1||r===1))if(n!==i-1&&r===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(u=a.lastIndexOf("/"),u!==a.length-1){u<0?(a="",l=0):(a=a.slice(0,u),l=a.length-1-a.lastIndexOf("/")),n=i,r=0;continue}}else if(a.length>0){a="",l=0,n=i,r=0;continue}}t&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(n+1,i):a=e.slice(n+1,i),l=i-n-1;n=i,r=0}else s===46&&r>-1?r++:r=-1}return a}function Fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hm={cwd:bm};function bm(){return"/"}function Hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mm(e){if(typeof e=="string")e=new URL(e);else if(!Hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return vm(e)}function vm(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=e.pathname;let a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const l=t.codePointAt(a+2);if(l===70||l===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}const $n=["history","path","basename","stem","extname","dirname"];class Us{constructor(t){let a;t?Hn(t)?a={path:t}:typeof t=="string"||gm(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":hm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<$n.length;){const r=$n[l];r in a&&a[r]!==void 0&&a[r]!==null&&(this[r]=r==="history"?[...a[r]]:a[r])}let n;for(n in a)$n.includes(n)||(this[n]=a[n])}get basename(){return typeof this.path=="string"?gt.basename(this.path):void 0}set basename(t){Un(t,"basename"),Rn(t,"basename"),this.path=gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gt.dirname(this.path):void 0}set dirname(t){qs(this.basename,"dirname"),this.path=gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gt.extname(this.path):void 0}set extname(t){if(Rn(t,"extname"),qs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hn(t)&&(t=mm(t)),Un(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gt.basename(this.path,this.extname):void 0}set stem(t){Un(t,"stem"),Rn(t,"stem"),this.path=gt.join(this.dirname||"",t+(this.extname||""))}fail(t,a,l){const n=this.message(t,a,l);throw n.fatal=!0,n}info(t,a,l){const n=this.message(t,a,l);return n.fatal=void 0,n}message(t,a,l){const n=new We(t,a,l);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rn(e,t){if(e&&e.includes(gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gt.sep+"`")}function Un(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function gm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Em=function(e){const l=this.constructor.prototype,n=l[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,l),r},ym={}.hasOwnProperty;class qn extends Em{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=im()}copy(){const t=new qn;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];t.use(...l)}return t.data(Bn(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Gn("data",this.frozen),this.namespace[t]=a,this):ym.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const n=a.call(t,...l);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=Il(t),l=this.parser||this.Parser;return zn("parse",l),l(String(a),a)}process(t,a){const l=this;return this.freeze(),zn("process",this.parser||this.Parser),Vn("process",this.compiler||this.Compiler),a?n(void 0,a):new Promise(n);function n(r,i){const s=Il(t),u=l.parse(s);l.run(u,s,function(c,d,h){if(c||!d||!h)return o(c);const f=d,y=l.stringify(f,h);Cm(y)?h.value=y:h.result=y,o(c,h)});function o(c,d){c||!d?i(c):r?r(d):a(void 0,d)}}}processSync(t){let a=!1,l;return this.freeze(),zn("processSync",this.parser||this.Parser),Vn("processSync",this.compiler||this.Compiler),this.process(t,n),Vs("processSync","process",a),l;function n(r,i){a=!0,$s(r),l=i}}run(t,a,l){zs(t),this.freeze();const n=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?r(void 0,l):new Promise(r);function r(i,s){const u=Il(a);n.run(t,u,o);function o(c,d,h){const f=d||t;c?s(c):i?i(f):l(void 0,f,h)}}}runSync(t,a){let l=!1,n;return this.run(t,a,r),Vs("runSync","run",l),n;function r(i,s){$s(i),n=s,l=!0}}stringify(t,a){this.freeze();const l=Il(a),n=this.compiler||this.Compiler;return Vn("stringify",n),zs(t),n(t,l)}use(t,...a){const l=this.attachers,n=this.namespace;if(Gn("use",this.frozen),t!=null)if(typeof t=="function")u(t,a);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function r(o){if(typeof o=="function")u(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[c,...d]=o;u(c,d)}else i(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function i(o){if(!("plugins"in o)&&!("settings"in o))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(o.plugins),o.settings&&(n.settings=Bn(!0,n.settings,o.settings))}function s(o){let c=-1;if(o!=null)if(Array.isArray(o))for(;++c<o.length;){const d=o[c];r(d)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function u(o,c){let d=-1,h=-1;for(;++d<l.length;)if(l[d][0]===o){h=d;break}if(h===-1)l.push([o,...c]);else if(c.length>0){let[f,...y]=c;const E=l[h][1];Fn(E)&&Fn(f)&&(f=Bn(!0,E,f)),l[h]=[o,f,...y]}}}}const Tm=new qn().freeze();function zn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zs(e){if(!Fn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vs(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Il(e){return xm(e)?e:new Us(e)}function xm(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Cm(e){return typeof e=="string"||Sm(e)}function Sm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Am="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gs=[],Ys={allowDangerousHtml:!0},wm=/^(https?|ircs?|mailto|xmpp)$/i,km=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function _m(e){const t=Nm(e),a=Im(e);return Lm(t.runSync(t.parse(a),a),e)}function Nm(e){const t=e.rehypePlugins||Gs,a=e.remarkPlugins||Gs,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ys}:Ys;return Tm().use(ob).use(a).use(lm,l).use(t)}function Im(e){const t=e.children||"",a=new Us;return typeof t=="string"&&(a.value=t),a}function Lm(e,t){const a=t.allowedElements,l=t.allowElement,n=t.components,r=t.disallowedElements,i=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||Om;for(const c of km)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Am+c.id,void 0);return Nl(e,o),Zf(e,{Fragment:$.Fragment,components:n,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function o(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return i?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let f;for(f in xn)if(Object.hasOwn(xn,f)&&Object.hasOwn(c.properties,f)){const y=c.properties[f],E=xn[f];(E===null||E.includes(c.tagName))&&(c.properties[f]=u(String(y||""),f,c))}}if(c.type==="element"){let f=a?!a.includes(c.tagName):r?r.includes(c.tagName):!1;if(!f&&l&&typeof d=="number"&&(f=!l(c,d,h)),f&&h&&typeof d=="number")return s&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function Om(e){const t=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),n=e.indexOf("/");return t===-1||n!==-1&&t>n||a!==-1&&t>a||l!==-1&&t>l||wm.test(e.slice(0,t))?e:""}const Ws=/[#.]/g;function Dm(e,t){const a=e||"",l={};let n=0,r,i;for(;n<a.length;){Ws.lastIndex=n;const s=Ws.exec(a),u=a.slice(n,s?s.index:a.length);u&&(r?r==="#"?l.id=u:Array.isArray(l.className)?l.className.push(u):l.className=[u]:i=u,n+=u.length),s&&(r=s[0],n++)}return{type:"element",tagName:i||t||"div",properties:l,children:[]}}function js(e,t,a){const l=a?Fm(a):void 0;function n(r,i,...s){let u;if(r==null){u={type:"root",children:[]};const o=i;s.unshift(o)}else{u=Dm(r,t);const o=u.tagName.toLowerCase(),c=l?l.get(o):void 0;if(u.tagName=c||o,Pm(i))s.unshift(i);else for(const[d,h]of Object.entries(i))Mm(e,u.properties,d,h)}for(const o of s)Yn(u.children,o);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return n}function Pm(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,a=Object.keys(e);for(const l of a){const n=t[l];if(n&&typeof n=="object"){if(!Array.isArray(n))return!0;const r=n;for(const i of r)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Mm(e,t,a,l){const n=yl(e,a);let r;if(l!=null){if(typeof l=="number"){if(Number.isNaN(l))return;r=l}else typeof l=="boolean"?r=l:typeof l=="string"?n.spaceSeparated?r=Fi(l):n.commaSeparated?r=Si(l):n.commaOrSpaceSeparated?r=Fi(Si(l).join(" ")):r=Ks(n,n.property,l):Array.isArray(l)?r=[...l]:r=n.property==="style"?Bm(l):String(l);if(Array.isArray(r)){const i=[];for(const s of r)i.push(Ks(n,n.property,s));r=i}n.property==="className"&&Array.isArray(t.className)&&(r=t.className.concat(r)),t[n.property]=r}}function Yn(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const a of t)Yn(e,a);else if(typeof t=="object"&&"type"in t)t.type==="root"?Yn(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ks(e,t,a){if(typeof a=="string"){if(e.number&&a&&!Number.isNaN(Number(a)))return Number(a);if((e.boolean||e.overloadedBoolean)&&(a===""||Aa(a)===Aa(t)))return!0}return a}function Bm(e){const t=[];for(const[a,l]of Object.entries(e))t.push([a,l].join(": "));return t.join("; ")}function Fm(e){const t=new Map;for(const a of e)t.set(a.toLowerCase(),a);return t}const Hm=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],$m=js(wa,"div"),Rm=js(It,"g",Hm);function Um(e){const t=String(e),a=[];return{toOffset:n,toPoint:l};function l(r){if(typeof r=="number"&&r>-1&&r<=t.length){let i=0;for(;;){let s=a[i];if(s===void 0){const u=Xs(t,a[i-1]);s=u===-1?t.length+1:u+1,a[i]=s}if(s>r)return{line:i+1,column:r-(i>0?a[i-1]:0)+1,offset:r};i++}}}function n(r){if(r&&typeof r.line=="number"&&typeof r.column=="number"&&!Number.isNaN(r.line)&&!Number.isNaN(r.column)){for(;a.length<r.line;){const s=a[a.length-1],u=Xs(t,s),o=u===-1?t.length+1:u+1;if(s===o)break;a.push(o)}const i=(r.line>1?a[r.line-2]:0)+r.column-1;if(i<a[r.line-1])return i}}}function Xs(e,t){const a=e.indexOf("\r",t),l=e.indexOf(`
|
|
55
|
+
`},n),r}function lm(e,t){return e&&"run"in e?async function(a,l){const n=Hs(a,{file:l,...t});await e.run(n,l)}:function(a,l){return Hs(a,{file:l,...e||t})}}function $s(e){if(e)throw e}var Mn,Rs;function nm(){if(Rs)return Mn;Rs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,a=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=function(o){return typeof Array.isArray=="function"?Array.isArray(o):t.call(o)==="[object Array]"},r=function(o){if(!o||t.call(o)!=="[object Object]")return!1;var c=e.call(o,"constructor"),d=o.constructor&&o.constructor.prototype&&e.call(o.constructor.prototype,"isPrototypeOf");if(o.constructor&&!c&&!d)return!1;var h;for(h in o);return typeof h>"u"||e.call(o,h)},i=function(o,c){a&&c.name==="__proto__"?a(o,c.name,{enumerable:!0,configurable:!0,value:c.newValue,writable:!0}):o[c.name]=c.newValue},s=function(o,c){if(c==="__proto__")if(e.call(o,c)){if(l)return l(o,c).value}else return;return o[c]};return Mn=function u(){var o,c,d,h,f,y,E=arguments[0],g=1,v=arguments.length,m=!1;for(typeof E=="boolean"&&(m=E,E=arguments[1]||{},g=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});g<v;++g)if(o=arguments[g],o!=null)for(c in o)d=s(E,c),h=s(o,c),E!==h&&(m&&h&&(r(h)||(f=n(h)))?(f?(f=!1,y=d&&n(d)?d:[]):y=d&&r(d)?d:{},i(E,{name:c,newValue:u(m,y,h)})):typeof h<"u"&&i(E,{name:c,newValue:h}));return E},Mn}var rm=nm();const Bn=mn(rm);function Fn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function im(){const e=[],t={run:a,use:l};return t;function a(...n){let r=-1;const i=n.pop();if(typeof i!="function")throw new TypeError("Expected function as last argument, not "+i);s(null,...n);function s(u,...o){const c=e[++r];let d=-1;if(u){i(u);return}for(;++d<n.length;)(o[d]===null||o[d]===void 0)&&(o[d]=n[d]);n=o,c?sm(c,s)(...o):i(null,...o)}}function l(n){if(typeof n!="function")throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function sm(e,t){let a;return l;function l(...i){const s=e.length>i.length;let u;s&&i.push(n);try{u=e.apply(this,i)}catch(o){const c=o;if(s&&a)throw c;return n(c)}s||(u&&u.then&&typeof u.then=="function"?u.then(r,n):u instanceof Error?n(u):r(u))}function n(i,...s){a||(a=!0,t(i,...s))}function r(i){n(null,i)}}const gt={basename:um,dirname:om,extname:cm,join:dm,sep:"/"};function um(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fa(e);let a=0,l=-1,n=e.length,r;if(t===void 0||t.length===0||t.length>e.length){for(;n--;)if(e.codePointAt(n)===47){if(r){a=n+1;break}}else l<0&&(r=!0,l=n+1);return l<0?"":e.slice(a,l)}if(t===e)return"";let i=-1,s=t.length-1;for(;n--;)if(e.codePointAt(n)===47){if(r){a=n+1;break}}else i<0&&(r=!0,i=n+1),s>-1&&(e.codePointAt(n)===t.codePointAt(s--)?s<0&&(l=n):(s=-1,l=i));return a===l?l=i:l<0&&(l=e.length),e.slice(a,l)}function om(e){if(Fa(e),e.length===0)return".";let t=-1,a=e.length,l;for(;--a;)if(e.codePointAt(a)===47){if(l){t=a;break}}else l||(l=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function cm(e){Fa(e);let t=e.length,a=-1,l=0,n=-1,r=0,i;for(;t--;){const s=e.codePointAt(t);if(s===47){if(i){l=t+1;break}continue}a<0&&(i=!0,a=t+1),s===46?n<0?n=t:r!==1&&(r=1):n>-1&&(r=-1)}return n<0||a<0||r===0||r===1&&n===a-1&&n===l+1?"":e.slice(n,a)}function dm(...e){let t=-1,a;for(;++t<e.length;)Fa(e[t]),e[t]&&(a=a===void 0?e[t]:a+"/"+e[t]);return a===void 0?".":fm(a)}function fm(e){Fa(e);const t=e.codePointAt(0)===47;let a=pm(e,!t);return a.length===0&&!t&&(a="."),a.length>0&&e.codePointAt(e.length-1)===47&&(a+="/"),t?"/"+a:a}function pm(e,t){let a="",l=0,n=-1,r=0,i=-1,s,u;for(;++i<=e.length;){if(i<e.length)s=e.codePointAt(i);else{if(s===47)break;s=47}if(s===47){if(!(n===i-1||r===1))if(n!==i-1&&r===2){if(a.length<2||l!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(u=a.lastIndexOf("/"),u!==a.length-1){u<0?(a="",l=0):(a=a.slice(0,u),l=a.length-1-a.lastIndexOf("/")),n=i,r=0;continue}}else if(a.length>0){a="",l=0,n=i,r=0;continue}}t&&(a=a.length>0?a+"/..":"..",l=2)}else a.length>0?a+="/"+e.slice(n+1,i):a=e.slice(n+1,i),l=i-n-1;n=i,r=0}else s===46&&r>-1?r++:r=-1}return a}function Fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const hm={cwd:bm};function bm(){return"/"}function Hn(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function mm(e){if(typeof e=="string")e=new URL(e);else if(!Hn(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return vm(e)}function vm(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const t=e.pathname;let a=-1;for(;++a<t.length;)if(t.codePointAt(a)===37&&t.codePointAt(a+1)===50){const l=t.codePointAt(a+2);if(l===70||l===102){const n=new TypeError("File URL path must not include encoded / characters");throw n.code="ERR_INVALID_FILE_URL_PATH",n}}return decodeURIComponent(t)}const $n=["history","path","basename","stem","extname","dirname"];class Us{constructor(t){let a;t?Hn(t)?a={path:t}:typeof t=="string"||gm(t)?a={value:t}:a=t:a={},this.cwd="cwd"in a?"":hm.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<$n.length;){const r=$n[l];r in a&&a[r]!==void 0&&a[r]!==null&&(this[r]=r==="history"?[...a[r]]:a[r])}let n;for(n in a)$n.includes(n)||(this[n]=a[n])}get basename(){return typeof this.path=="string"?gt.basename(this.path):void 0}set basename(t){Un(t,"basename"),Rn(t,"basename"),this.path=gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?gt.dirname(this.path):void 0}set dirname(t){qs(this.basename,"dirname"),this.path=gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?gt.extname(this.path):void 0}set extname(t){if(Rn(t,"extname"),qs(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hn(t)&&(t=mm(t)),Un(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?gt.basename(this.path,this.extname):void 0}set stem(t){Un(t,"stem"),Rn(t,"stem"),this.path=gt.join(this.dirname||"",t+(this.extname||""))}fail(t,a,l){const n=this.message(t,a,l);throw n.fatal=!0,n}info(t,a,l){const n=this.message(t,a,l);return n.fatal=void 0,n}message(t,a,l){const n=new We(t,a,l);return this.path&&(n.name=this.path+":"+n.name,n.file=this.path),n.fatal=!1,this.messages.push(n),n}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Rn(e,t){if(e&&e.includes(gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+gt.sep+"`")}function Un(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qs(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function gm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Em=(function(e){const l=this.constructor.prototype,n=l[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,l),r}),ym={}.hasOwnProperty;class qn extends Em{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=im()}copy(){const t=new qn;let a=-1;for(;++a<this.attachers.length;){const l=this.attachers[a];t.use(...l)}return t.data(Bn(!0,{},this.namespace)),t}data(t,a){return typeof t=="string"?arguments.length===2?(Gn("data",this.frozen),this.namespace[t]=a,this):ym.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gn("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const n=a.call(t,...l);typeof n=="function"&&this.transformers.use(n)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const a=Il(t),l=this.parser||this.Parser;return zn("parse",l),l(String(a),a)}process(t,a){const l=this;return this.freeze(),zn("process",this.parser||this.Parser),Vn("process",this.compiler||this.Compiler),a?n(void 0,a):new Promise(n);function n(r,i){const s=Il(t),u=l.parse(s);l.run(u,s,function(c,d,h){if(c||!d||!h)return o(c);const f=d,y=l.stringify(f,h);Cm(y)?h.value=y:h.result=y,o(c,h)});function o(c,d){c||!d?i(c):r?r(d):a(void 0,d)}}}processSync(t){let a=!1,l;return this.freeze(),zn("processSync",this.parser||this.Parser),Vn("processSync",this.compiler||this.Compiler),this.process(t,n),Vs("processSync","process",a),l;function n(r,i){a=!0,$s(r),l=i}}run(t,a,l){zs(t),this.freeze();const n=this.transformers;return!l&&typeof a=="function"&&(l=a,a=void 0),l?r(void 0,l):new Promise(r);function r(i,s){const u=Il(a);n.run(t,u,o);function o(c,d,h){const f=d||t;c?s(c):i?i(f):l(void 0,f,h)}}}runSync(t,a){let l=!1,n;return this.run(t,a,r),Vs("runSync","run",l),n;function r(i,s){$s(i),n=s,l=!0}}stringify(t,a){this.freeze();const l=Il(a),n=this.compiler||this.Compiler;return Vn("stringify",n),zs(t),n(t,l)}use(t,...a){const l=this.attachers,n=this.namespace;if(Gn("use",this.frozen),t!=null)if(typeof t=="function")u(t,a);else if(typeof t=="object")Array.isArray(t)?s(t):i(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function r(o){if(typeof o=="function")u(o,[]);else if(typeof o=="object")if(Array.isArray(o)){const[c,...d]=o;u(c,d)}else i(o);else throw new TypeError("Expected usable value, not `"+o+"`")}function i(o){if(!("plugins"in o)&&!("settings"in o))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(o.plugins),o.settings&&(n.settings=Bn(!0,n.settings,o.settings))}function s(o){let c=-1;if(o!=null)if(Array.isArray(o))for(;++c<o.length;){const d=o[c];r(d)}else throw new TypeError("Expected a list of plugins, not `"+o+"`")}function u(o,c){let d=-1,h=-1;for(;++d<l.length;)if(l[d][0]===o){h=d;break}if(h===-1)l.push([o,...c]);else if(c.length>0){let[f,...y]=c;const E=l[h][1];Fn(E)&&Fn(f)&&(f=Bn(!0,E,f)),l[h]=[o,f,...y]}}}}const Tm=new qn().freeze();function zn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vn(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gn(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zs(e){if(!Fn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Vs(e,t,a){if(!a)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Il(e){return xm(e)?e:new Us(e)}function xm(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Cm(e){return typeof e=="string"||Sm(e)}function Sm(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Am="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Gs=[],Ys={allowDangerousHtml:!0},wm=/^(https?|ircs?|mailto|xmpp)$/i,km=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function _m(e){const t=Nm(e),a=Im(e);return Lm(t.runSync(t.parse(a),a),e)}function Nm(e){const t=e.rehypePlugins||Gs,a=e.remarkPlugins||Gs,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ys}:Ys;return Tm().use(ob).use(a).use(lm,l).use(t)}function Im(e){const t=e.children||"",a=new Us;return typeof t=="string"&&(a.value=t),a}function Lm(e,t){const a=t.allowedElements,l=t.allowElement,n=t.components,r=t.disallowedElements,i=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||Om;for(const c of km)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+Am+c.id,void 0);return Nl(e,o),Zf(e,{Fragment:$.Fragment,components:n,ignoreInvalidStyle:!0,jsx:$.jsx,jsxs:$.jsxs,passKeys:!0,passNode:!0});function o(c,d,h){if(c.type==="raw"&&h&&typeof d=="number")return i?h.children.splice(d,1):h.children[d]={type:"text",value:c.value},d;if(c.type==="element"){let f;for(f in xn)if(Object.hasOwn(xn,f)&&Object.hasOwn(c.properties,f)){const y=c.properties[f],E=xn[f];(E===null||E.includes(c.tagName))&&(c.properties[f]=u(String(y||""),f,c))}}if(c.type==="element"){let f=a?!a.includes(c.tagName):r?r.includes(c.tagName):!1;if(!f&&l&&typeof d=="number"&&(f=!l(c,d,h)),f&&h&&typeof d=="number")return s&&c.children?h.children.splice(d,1,...c.children):h.children.splice(d,1),d}}}function Om(e){const t=e.indexOf(":"),a=e.indexOf("?"),l=e.indexOf("#"),n=e.indexOf("/");return t===-1||n!==-1&&t>n||a!==-1&&t>a||l!==-1&&t>l||wm.test(e.slice(0,t))?e:""}const Ws=/[#.]/g;function Dm(e,t){const a=e||"",l={};let n=0,r,i;for(;n<a.length;){Ws.lastIndex=n;const s=Ws.exec(a),u=a.slice(n,s?s.index:a.length);u&&(r?r==="#"?l.id=u:Array.isArray(l.className)?l.className.push(u):l.className=[u]:i=u,n+=u.length),s&&(r=s[0],n++)}return{type:"element",tagName:i||t||"div",properties:l,children:[]}}function js(e,t,a){const l=a?Fm(a):void 0;function n(r,i,...s){let u;if(r==null){u={type:"root",children:[]};const o=i;s.unshift(o)}else{u=Dm(r,t);const o=u.tagName.toLowerCase(),c=l?l.get(o):void 0;if(u.tagName=c||o,Pm(i))s.unshift(i);else for(const[d,h]of Object.entries(i))Mm(e,u.properties,d,h)}for(const o of s)Yn(u.children,o);return u.type==="element"&&u.tagName==="template"&&(u.content={type:"root",children:u.children},u.children=[]),u}return n}function Pm(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,a=Object.keys(e);for(const l of a){const n=t[l];if(n&&typeof n=="object"){if(!Array.isArray(n))return!0;const r=n;for(const i of r)if(typeof i!="number"&&typeof i!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Mm(e,t,a,l){const n=yl(e,a);let r;if(l!=null){if(typeof l=="number"){if(Number.isNaN(l))return;r=l}else typeof l=="boolean"?r=l:typeof l=="string"?n.spaceSeparated?r=Fi(l):n.commaSeparated?r=Si(l):n.commaOrSpaceSeparated?r=Fi(Si(l).join(" ")):r=Ks(n,n.property,l):Array.isArray(l)?r=[...l]:r=n.property==="style"?Bm(l):String(l);if(Array.isArray(r)){const i=[];for(const s of r)i.push(Ks(n,n.property,s));r=i}n.property==="className"&&Array.isArray(t.className)&&(r=t.className.concat(r)),t[n.property]=r}}function Yn(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const a of t)Yn(e,a);else if(typeof t=="object"&&"type"in t)t.type==="root"?Yn(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Ks(e,t,a){if(typeof a=="string"){if(e.number&&a&&!Number.isNaN(Number(a)))return Number(a);if((e.boolean||e.overloadedBoolean)&&(a===""||Aa(a)===Aa(t)))return!0}return a}function Bm(e){const t=[];for(const[a,l]of Object.entries(e))t.push([a,l].join(": "));return t.join("; ")}function Fm(e){const t=new Map;for(const a of e)t.set(a.toLowerCase(),a);return t}const Hm=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],$m=js(wa,"div"),Rm=js(It,"g",Hm);function Um(e){const t=String(e),a=[];return{toOffset:n,toPoint:l};function l(r){if(typeof r=="number"&&r>-1&&r<=t.length){let i=0;for(;;){let s=a[i];if(s===void 0){const u=Xs(t,a[i-1]);s=u===-1?t.length+1:u+1,a[i]=s}if(s>r)return{line:i+1,column:r-(i>0?a[i-1]:0)+1,offset:r};i++}}}function n(r){if(r&&typeof r.line=="number"&&typeof r.column=="number"&&!Number.isNaN(r.line)&&!Number.isNaN(r.column)){for(;a.length<r.line;){const s=a[a.length-1],u=Xs(t,s),o=u===-1?t.length+1:u+1;if(s===o)break;a.push(o)}const i=(r.line>1?a[r.line-2]:0)+r.column-1;if(i<a[r.line-1])return i}}}function Xs(e,t){const a=e.indexOf("\r",t),l=e.indexOf(`
|
|
56
56
|
`,t);return l===-1?a:a===-1||a+1===l?l:a<l?a:l}const Gt={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Qs={}.hasOwnProperty,qm=Object.prototype;function zm(e,t){const a=t||{};return Wn({file:a.file||void 0,location:!1,schema:a.space==="svg"?It:wa,verbose:a.verbose||!1},e)}function Wn(e,t){let a;switch(t.nodeName){case"#comment":{const l=t;return a={type:"comment",value:l.data},Ll(e,l,a),a}case"#document":case"#document-fragment":{const l=t,n="mode"in l?l.mode==="quirks"||l.mode==="limited-quirks":!1;if(a={type:"root",children:Js(e,t.childNodes),data:{quirksMode:n}},e.file&&e.location){const r=String(e.file),i=Um(r),s=i.toPoint(0),u=i.toPoint(r.length);a.position={start:s,end:u}}return a}case"#documentType":{const l=t;return a={type:"doctype"},Ll(e,l,a),a}case"#text":{const l=t;return a={type:"text",value:l.value},Ll(e,l,a),a}default:return a=Vm(e,t),a}}function Js(e,t){let a=-1;const l=[];for(;++a<t.length;){const n=Wn(e,t[a]);l.push(n)}return l}function Vm(e,t){const a=e.schema;e.schema=t.namespaceURI===Gt.svg?It:wa;let l=-1;const n={};for(;++l<t.attrs.length;){const s=t.attrs[l],u=(s.prefix?s.prefix+":":"")+s.name;Qs.call(qm,u)||(n[u]=s.value)}const i=(e.schema.space==="svg"?Rm:$m)(t.tagName,n,Js(e,t.childNodes));if(Ll(e,t,i),i.tagName==="template"){const s=t,u=s.sourceCodeLocation,o=u&&u.startTag&&da(u.startTag),c=u&&u.endTag&&da(u.endTag),d=Wn(e,s.content);o&&c&&e.file&&(d.position={start:o.end,end:c.start}),i.content=d}return e.schema=a,i}function Ll(e,t,a){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const l=Gm(e,a,t.sourceCodeLocation);l&&(e.location=!0,a.position=l)}}function Gm(e,t,a){const l=da(a);if(t.type==="element"){const n=t.children[t.children.length-1];if(l&&!a.endTag&&n&&n.position&&n.position.end&&(l.end=Object.assign({},n.position.end)),e.verbose){const r={};let i;if(a.attrs)for(i in a.attrs)Qs.call(a.attrs,i)&&(r[yl(e.schema,i).property]=da(a.attrs[i]));a.startTag;const s=da(a.startTag),u=a.endTag?da(a.endTag):void 0,o={opening:s};u&&(o.closing=u),o.properties=r,t.data={position:o}}}return l}function da(e){const t=Zs({line:e.startLine,column:e.startCol,offset:e.startOffset}),a=Zs({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||a?{start:t,end:a}:void 0}function Zs(e){return e.line&&e.column?e:void 0}const eu={}.hasOwnProperty;function tu(e,t){const a=t||{};function l(n,...r){let i=l.invalid;const s=l.handlers;if(n&&eu.call(n,e)){const u=String(n[e]);i=eu.call(s,u)?s[u]:l.unknown}if(i)return i.call(this,n,...r)}return l.handlers=a.handlers||{},l.invalid=a.invalid,l.unknown=a.unknown,l}const Ym={},Wm={}.hasOwnProperty,au=tu("type",{handlers:{root:Km,element:e0,text:Jm,comment:Zm,doctype:Qm}});function jm(e,t){const l=(t||Ym).space;return au(e,l==="svg"?It:wa)}function Km(e,t){const a={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return a.childNodes=jn(e.children,a,t),fa(e,a),a}function Xm(e,t){const a={nodeName:"#document-fragment",childNodes:[]};return a.childNodes=jn(e.children,a,t),fa(e,a),a}function Qm(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return fa(e,t),t}function Jm(e){const t={nodeName:"#text",value:e.value,parentNode:null};return fa(e,t),t}function Zm(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return fa(e,t),t}function e0(e,t){const a=t;let l=a;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&a.space==="html"&&(l=It);const n=[];let r;if(e.properties){for(r in e.properties)if(r!=="children"&&Wm.call(e.properties,r)){const u=t0(l,r,e.properties[r]);u&&n.push(u)}}const i=l.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:n,namespaceURI:Gt[i],childNodes:[],parentNode:null};return s.childNodes=jn(e.children,s,l),fa(e,s),e.tagName==="template"&&e.content&&(s.content=Xm(e.content,l)),s}function t0(e,t,a){const l=yl(e,t);if(a===!1||a===null||a===void 0||typeof a=="number"&&Number.isNaN(a)||!a&&l.boolean)return;Array.isArray(a)&&(a=l.commaSeparated?Ai(a):Hi(a));const n={name:l.attribute,value:a===!0?"":String(a)};if(l.space&&l.space!=="html"&&l.space!=="svg"){const r=n.name.indexOf(":");r<0?n.prefix="":(n.name=n.name.slice(r+1),n.prefix=l.attribute.slice(0,r)),n.namespace=Gt[l.space]}return n}function jn(e,t,a){let l=-1;const n=[];if(e)for(;++l<e.length;){const r=au(e[l],a);r.parentNode=t,n.push(r)}return n}function fa(e,t){const a=e.position;a&&a.start&&a.end&&(a.start.offset,a.end.offset,t.sourceCodeLocation={startLine:a.start.line,startCol:a.start.column,startOffset:a.start.offset,endLine:a.end.line,endCol:a.end.column,endOffset:a.end.offset})}const a0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],l0=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Me="�";var B;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(B||(B={}));const at={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function lu(e){return e>=55296&&e<=57343}function n0(e){return e>=56320&&e<=57343}function r0(e,t){return(e-55296)*1024+9216+t}function nu(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ru(e){return e>=64976&&e<=65007||l0.has(e)}var J;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(J||(J={}));const i0=65536;class s0{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=i0,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,a){const{line:l,col:n,offset:r}=this,i=n+a,s=r+a;return{code:t,startLine:l,endLine:l,startCol:i,endCol:i,startOffset:s,endOffset:s}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const a=this.html.charCodeAt(this.pos+1);if(n0(a))return this.pos++,this._addGap(),r0(t,a)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(J.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,a){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=a}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,a){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(a)return this.html.startsWith(t,this.pos);for(let l=0;l<t.length;l++)if((this.html.charCodeAt(this.pos+l)|32)!==t.charCodeAt(l))return!1;return!0}peek(t){const a=this.pos+t;if(a>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;const l=this.html.charCodeAt(a);return l===B.CARRIAGE_RETURN?B.LINE_FEED:l}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;let t=this.html.charCodeAt(this.pos);return t===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):t===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,lu(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===B.LINE_FEED||t===B.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){nu(t)?this._err(J.controlCharacterInInputStream):ru(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(xe||(xe={}));function iu(e,t){for(let a=e.attrs.length-1;a>=0;a--)if(e.attrs[a].name===t)return e.attrs[a].value;return null}const u0=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),o0=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function c0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=o0.get(e))!==null&&t!==void 0?t:e}var qe;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(qe||(qe={}));const d0=32;var Dt;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Dt||(Dt={}));function Kn(e){return e>=qe.ZERO&&e<=qe.NINE}function f0(e){return e>=qe.UPPER_A&&e<=qe.UPPER_F||e>=qe.LOWER_A&&e<=qe.LOWER_F}function p0(e){return e>=qe.UPPER_A&&e<=qe.UPPER_Z||e>=qe.LOWER_A&&e<=qe.LOWER_Z||Kn(e)}function h0(e){return e===qe.EQUALS||p0(e)}var ze;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(ze||(ze={}));var At;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(At||(At={}));class b0{constructor(t,a,l){this.decodeTree=t,this.emitCodePoint=a,this.errors=l,this.state=ze.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=At.Strict}startEntity(t){this.decodeMode=t,this.state=ze.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,a){switch(this.state){case ze.EntityStart:return t.charCodeAt(a)===qe.NUM?(this.state=ze.NumericStart,this.consumed+=1,this.stateNumericStart(t,a+1)):(this.state=ze.NamedEntity,this.stateNamedEntity(t,a));case ze.NumericStart:return this.stateNumericStart(t,a);case ze.NumericDecimal:return this.stateNumericDecimal(t,a);case ze.NumericHex:return this.stateNumericHex(t,a);case ze.NamedEntity:return this.stateNamedEntity(t,a)}}stateNumericStart(t,a){return a>=t.length?-1:(t.charCodeAt(a)|d0)===qe.LOWER_X?(this.state=ze.NumericHex,this.consumed+=1,this.stateNumericHex(t,a+1)):(this.state=ze.NumericDecimal,this.stateNumericDecimal(t,a))}addToNumericResult(t,a,l,n){if(a!==l){const r=l-a;this.result=this.result*Math.pow(n,r)+Number.parseInt(t.substr(a,r),n),this.consumed+=r}}stateNumericHex(t,a){const l=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Kn(n)||f0(n))a+=1;else return this.addToNumericResult(t,l,a,16),this.emitNumericEntity(n,3)}return this.addToNumericResult(t,l,a,16),-1}stateNumericDecimal(t,a){const l=a;for(;a<t.length;){const n=t.charCodeAt(a);if(Kn(n))a+=1;else return this.addToNumericResult(t,l,a,10),this.emitNumericEntity(n,2)}return this.addToNumericResult(t,l,a,10),-1}emitNumericEntity(t,a){var l;if(this.consumed<=a)return(l=this.errors)===null||l===void 0||l.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===qe.SEMI)this.consumed+=1;else if(this.decodeMode===At.Strict)return 0;return this.emitCodePoint(c0(this.result),this.consumed),this.errors&&(t!==qe.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,a){const{decodeTree:l}=this;let n=l[this.treeIndex],r=(n&Dt.VALUE_LENGTH)>>14;for(;a<t.length;a++,this.excess++){const i=t.charCodeAt(a);if(this.treeIndex=m0(l,n,this.treeIndex+Math.max(1,r),i),this.treeIndex<0)return this.result===0||this.decodeMode===At.Attribute&&(r===0||h0(i))?0:this.emitNotTerminatedNamedEntity();if(n=l[this.treeIndex],r=(n&Dt.VALUE_LENGTH)>>14,r!==0){if(i===qe.SEMI)return this.emitNamedEntityData(this.treeIndex,r,this.consumed+this.excess);this.decodeMode!==At.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:a,decodeTree:l}=this,n=(l[a]&Dt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(a,n,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,a,l){const{decodeTree:n}=this;return this.emitCodePoint(a===1?n[t]&~Dt.VALUE_LENGTH:n[t+1],l),a===3&&this.emitCodePoint(n[t+2],l),l}end(){var t;switch(this.state){case ze.NamedEntity:return this.result!==0&&(this.decodeMode!==At.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ze.NumericDecimal:return this.emitNumericEntity(0,2);case ze.NumericHex:return this.emitNumericEntity(0,3);case ze.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ze.EntityStart:return 0}}}function m0(e,t,a,l){const n=(t&Dt.BRANCH_LENGTH)>>7,r=t&Dt.JUMP_TABLE;if(n===0)return r!==0&&l===r?a:-1;if(r){const u=l-r;return u<0||u>=n?-1:e[a+u]-1}let i=a,s=i+n-1;for(;i<=s;){const u=i+s>>>1,o=e[u];if(o<l)i=u+1;else if(o>l)s=u-1;else return e[u+n]}return-1}var te;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(te||(te={}));var Yt;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Yt||(Yt={}));var ot;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ot||(ot={}));var j;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(j||(j={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const v0=new Map([[j.A,p.A],[j.ADDRESS,p.ADDRESS],[j.ANNOTATION_XML,p.ANNOTATION_XML],[j.APPLET,p.APPLET],[j.AREA,p.AREA],[j.ARTICLE,p.ARTICLE],[j.ASIDE,p.ASIDE],[j.B,p.B],[j.BASE,p.BASE],[j.BASEFONT,p.BASEFONT],[j.BGSOUND,p.BGSOUND],[j.BIG,p.BIG],[j.BLOCKQUOTE,p.BLOCKQUOTE],[j.BODY,p.BODY],[j.BR,p.BR],[j.BUTTON,p.BUTTON],[j.CAPTION,p.CAPTION],[j.CENTER,p.CENTER],[j.CODE,p.CODE],[j.COL,p.COL],[j.COLGROUP,p.COLGROUP],[j.DD,p.DD],[j.DESC,p.DESC],[j.DETAILS,p.DETAILS],[j.DIALOG,p.DIALOG],[j.DIR,p.DIR],[j.DIV,p.DIV],[j.DL,p.DL],[j.DT,p.DT],[j.EM,p.EM],[j.EMBED,p.EMBED],[j.FIELDSET,p.FIELDSET],[j.FIGCAPTION,p.FIGCAPTION],[j.FIGURE,p.FIGURE],[j.FONT,p.FONT],[j.FOOTER,p.FOOTER],[j.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[j.FORM,p.FORM],[j.FRAME,p.FRAME],[j.FRAMESET,p.FRAMESET],[j.H1,p.H1],[j.H2,p.H2],[j.H3,p.H3],[j.H4,p.H4],[j.H5,p.H5],[j.H6,p.H6],[j.HEAD,p.HEAD],[j.HEADER,p.HEADER],[j.HGROUP,p.HGROUP],[j.HR,p.HR],[j.HTML,p.HTML],[j.I,p.I],[j.IMG,p.IMG],[j.IMAGE,p.IMAGE],[j.INPUT,p.INPUT],[j.IFRAME,p.IFRAME],[j.KEYGEN,p.KEYGEN],[j.LABEL,p.LABEL],[j.LI,p.LI],[j.LINK,p.LINK],[j.LISTING,p.LISTING],[j.MAIN,p.MAIN],[j.MALIGNMARK,p.MALIGNMARK],[j.MARQUEE,p.MARQUEE],[j.MATH,p.MATH],[j.MENU,p.MENU],[j.META,p.META],[j.MGLYPH,p.MGLYPH],[j.MI,p.MI],[j.MO,p.MO],[j.MN,p.MN],[j.MS,p.MS],[j.MTEXT,p.MTEXT],[j.NAV,p.NAV],[j.NOBR,p.NOBR],[j.NOFRAMES,p.NOFRAMES],[j.NOEMBED,p.NOEMBED],[j.NOSCRIPT,p.NOSCRIPT],[j.OBJECT,p.OBJECT],[j.OL,p.OL],[j.OPTGROUP,p.OPTGROUP],[j.OPTION,p.OPTION],[j.P,p.P],[j.PARAM,p.PARAM],[j.PLAINTEXT,p.PLAINTEXT],[j.PRE,p.PRE],[j.RB,p.RB],[j.RP,p.RP],[j.RT,p.RT],[j.RTC,p.RTC],[j.RUBY,p.RUBY],[j.S,p.S],[j.SCRIPT,p.SCRIPT],[j.SEARCH,p.SEARCH],[j.SECTION,p.SECTION],[j.SELECT,p.SELECT],[j.SOURCE,p.SOURCE],[j.SMALL,p.SMALL],[j.SPAN,p.SPAN],[j.STRIKE,p.STRIKE],[j.STRONG,p.STRONG],[j.STYLE,p.STYLE],[j.SUB,p.SUB],[j.SUMMARY,p.SUMMARY],[j.SUP,p.SUP],[j.TABLE,p.TABLE],[j.TBODY,p.TBODY],[j.TEMPLATE,p.TEMPLATE],[j.TEXTAREA,p.TEXTAREA],[j.TFOOT,p.TFOOT],[j.TD,p.TD],[j.TH,p.TH],[j.THEAD,p.THEAD],[j.TITLE,p.TITLE],[j.TR,p.TR],[j.TRACK,p.TRACK],[j.TT,p.TT],[j.U,p.U],[j.UL,p.UL],[j.SVG,p.SVG],[j.VAR,p.VAR],[j.WBR,p.WBR],[j.XMP,p.XMP]]);function pa(e){var t;return(t=v0.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ae=p,g0={[te.HTML]:new Set([ae.ADDRESS,ae.APPLET,ae.AREA,ae.ARTICLE,ae.ASIDE,ae.BASE,ae.BASEFONT,ae.BGSOUND,ae.BLOCKQUOTE,ae.BODY,ae.BR,ae.BUTTON,ae.CAPTION,ae.CENTER,ae.COL,ae.COLGROUP,ae.DD,ae.DETAILS,ae.DIR,ae.DIV,ae.DL,ae.DT,ae.EMBED,ae.FIELDSET,ae.FIGCAPTION,ae.FIGURE,ae.FOOTER,ae.FORM,ae.FRAME,ae.FRAMESET,ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6,ae.HEAD,ae.HEADER,ae.HGROUP,ae.HR,ae.HTML,ae.IFRAME,ae.IMG,ae.INPUT,ae.LI,ae.LINK,ae.LISTING,ae.MAIN,ae.MARQUEE,ae.MENU,ae.META,ae.NAV,ae.NOEMBED,ae.NOFRAMES,ae.NOSCRIPT,ae.OBJECT,ae.OL,ae.P,ae.PARAM,ae.PLAINTEXT,ae.PRE,ae.SCRIPT,ae.SECTION,ae.SELECT,ae.SOURCE,ae.STYLE,ae.SUMMARY,ae.TABLE,ae.TBODY,ae.TD,ae.TEMPLATE,ae.TEXTAREA,ae.TFOOT,ae.TH,ae.THEAD,ae.TITLE,ae.TR,ae.TRACK,ae.UL,ae.WBR,ae.XMP]),[te.MATHML]:new Set([ae.MI,ae.MO,ae.MN,ae.MS,ae.MTEXT,ae.ANNOTATION_XML]),[te.SVG]:new Set([ae.TITLE,ae.FOREIGN_OBJECT,ae.DESC]),[te.XLINK]:new Set,[te.XML]:new Set,[te.XMLNS]:new Set},Xn=new Set([ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var H;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(H||(H={}));const $e={DATA:H.DATA,RCDATA:H.RCDATA,RAWTEXT:H.RAWTEXT,SCRIPT_DATA:H.SCRIPT_DATA,PLAINTEXT:H.PLAINTEXT,CDATA_SECTION:H.CDATA_SECTION};function E0(e){return e>=B.DIGIT_0&&e<=B.DIGIT_9}function Ha(e){return e>=B.LATIN_CAPITAL_A&&e<=B.LATIN_CAPITAL_Z}function y0(e){return e>=B.LATIN_SMALL_A&&e<=B.LATIN_SMALL_Z}function Pt(e){return y0(e)||Ha(e)}function su(e){return Pt(e)||E0(e)}function Ol(e){return e+32}function uu(e){return e===B.SPACE||e===B.LINE_FEED||e===B.TABULATION||e===B.FORM_FEED}function ou(e){return uu(e)||e===B.SOLIDUS||e===B.GREATER_THAN_SIGN}function T0(e){return e===B.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:lu(e)?J.surrogateCharacterReference:ru(e)?J.noncharacterCharacterReference:nu(e)||e===B.CARRIAGE_RETURN?J.controlCharacterReference:null}class x0{constructor(t,a){this.options=t,this.handler=a,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=H.DATA,this.returnState=H.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new s0(a),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new b0(u0,(l,n)=>{this.preprocessor.pos=this.entityStartPos+n-1,this._flushCodePointConsumedAsCharacterReference(l)},a.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:l=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+l)},validateNumericCharacterReference:l=>{const n=T0(l);n&&this._err(n,1)}}:void 0)}_err(t,a=0){var l,n;(n=(l=this.handler).onParseError)===null||n===void 0||n.call(l,this.preprocessor.getError(t,a))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,a,l){this.active=!0,this.preprocessor.write(t,a),this._runParsingLoop(),this.paused||l?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let a=0;a<t;a++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,a){return this.preprocessor.startsWith(t,a)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:xe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:xe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,a){this.currentCharacterToken={type:t,chars:a,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,a;const l=this.currentToken;if(iu(l,this.currentAttr.name)===null){if(l.attrs.push(this.currentAttr),l.location&&this.currentLocation){const n=(t=(a=l.location).attrs)!==null&&t!==void 0?t:a.attrs=Object.create(null);n[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(J.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=pa(t.tagName),t.type===xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,a){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=a;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,a)}_emitCodePoint(t){const a=uu(t)?xe.WHITESPACE_CHARACTER:t===B.NULL?xe.NULL_CHARACTER:xe.CHARACTER;this._appendCharToCurrentCharacterToken(a,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=H.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?At.Attribute:At.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===H.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===H.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case H.DATA:{this._stateData(t);break}case H.RCDATA:{this._stateRcdata(t);break}case H.RAWTEXT:{this._stateRawtext(t);break}case H.SCRIPT_DATA:{this._stateScriptData(t);break}case H.PLAINTEXT:{this._statePlaintext(t);break}case H.TAG_OPEN:{this._stateTagOpen(t);break}case H.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case H.TAG_NAME:{this._stateTagName(t);break}case H.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case H.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case H.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case H.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case H.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case H.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case H.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case H.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case H.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case H.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case H.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case H.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case H.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case H.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case H.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case H.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case H.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case H.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case H.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case H.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case H.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case H.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case H.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case H.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case H.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case H.BOGUS_COMMENT:{this._stateBogusComment(t);break}case H.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case H.COMMENT_START:{this._stateCommentStart(t);break}case H.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case H.COMMENT:{this._stateComment(t);break}case H.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case H.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case H.COMMENT_END:{this._stateCommentEnd(t);break}case H.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case H.DOCTYPE:{this._stateDoctype(t);break}case H.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case H.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case H.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case H.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case H.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case H.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case H.CDATA_SECTION:{this._stateCdataSection(t);break}case H.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case H.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case H.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case H.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=H.TAG_OPEN;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case B.AMPERSAND:{this._startCharacterReference();break}case B.LESS_THAN_SIGN:{this.state=H.RCDATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case B.LESS_THAN_SIGN:{this.state=H.RAWTEXT_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Pt(t))this._createStartTagToken(),this.state=H.TAG_NAME,this._stateTagName(t);else switch(t){case B.EXCLAMATION_MARK:{this.state=H.MARKUP_DECLARATION_OPEN;break}case B.SOLIDUS:{this.state=H.END_TAG_OPEN;break}case B.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t);break}case B.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=H.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Pt(t))this._createEndTagToken(),this.state=H.TAG_NAME,this._stateTagName(t);else switch(t){case B.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=H.DATA;break}case B.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this.state=H.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.tagName+=Me;break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:a.tagName+=String.fromCodePoint(Ha(t)?Ol(t):t)}}_stateRcdataLessThanSign(t){t===B.SOLIDUS?this.state=H.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=H.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Pt(t)?(this.state=H.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=H.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const a=this.currentToken;switch(a.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=H.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=H.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=H.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===B.SOLIDUS?this.state=H.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Pt(t)?(this.state=H.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case B.SOLIDUS:{this.state=H.SCRIPT_DATA_END_TAG_OPEN;break}case B.EXCLAMATION_MARK:{this.state=H.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=H.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Pt(t)?(this.state=H.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===B.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===B.HYPHEN_MINUS?(this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=H.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.GREATER_THAN_SIGN:{this.state=H.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_ESCAPED,this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===B.SOLIDUS?this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Pt(t)?(this._emitChars("<"),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Pt(t)?(this.state=H.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(at.SCRIPT,!1)&&ou(this.preprocessor.peek(at.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<at.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case B.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case B.HYPHEN_MINUS:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.GREATER_THAN_SIGN:{this.state=H.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Me);break}case B.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===B.SOLIDUS?(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(at.SCRIPT,!1)&&ou(this.preprocessor.peek(at.SCRIPT.length))){this._emitCodePoint(t);for(let a=0;a<at.SCRIPT.length;a++)this._emitCodePoint(this._consume());this.state=H.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=H.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=H.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this._leaveAttrName(),this.state=H.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case B.EQUALS_SIGN:{this._leaveAttrName(),this.state=H.BEFORE_ATTRIBUTE_VALUE;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=Me;break}default:this.currentAttr.name+=String.fromCodePoint(Ha(t)?Ol(t):t)}}_stateAfterAttributeName(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:{this.state=H.SELF_CLOSING_START_TAG;break}case B.EQUALS_SIGN:{this.state=H.BEFORE_ATTRIBUTE_VALUE;break}case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=H.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{this.state=H.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this.state=H.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=H.DATA,this.emitCurrentTagToken();break}default:this.state=H.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case B.QUOTATION_MARK:{this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Me;break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case B.APOSTROPHE:{this.state=H.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Me;break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Me;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=H.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this._leaveAttrValue(),this.state=H.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=H.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case B.GREATER_THAN_SIGN:{const a=this.currentToken;a.selfClosing=!0,this.state=H.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=H.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const a=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentComment(a);break}case B.EOF:{this.emitCurrentComment(a),this._emitEOFToken();break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.data+=Me;break}default:a.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(at.DASH_DASH,!0)?(this._createCommentToken(at.DASH_DASH.length+1),this.state=H.COMMENT_START):this._consumeSequenceIfMatch(at.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(at.DOCTYPE.length+1),this.state=H.DOCTYPE):this._consumeSequenceIfMatch(at.CDATA_START,!0)?this.inForeignNode?this.state=H.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(at.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=H.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=H.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case B.HYPHEN_MINUS:{this.state=H.COMMENT_START_DASH;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=H.DATA;const a=this.currentToken;this.emitCurrentComment(a);break}default:this.state=H.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const a=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=H.COMMENT_END;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=H.DATA,this.emitCurrentComment(a);break}case B.EOF:{this._err(J.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=H.COMMENT,this._stateComment(t)}}_stateComment(t){const a=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=H.COMMENT_END_DASH;break}case B.LESS_THAN_SIGN:{a.data+="<",this.state=H.COMMENT_LESS_THAN_SIGN;break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.data+=Me;break}case B.EOF:{this._err(J.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const a=this.currentToken;switch(t){case B.EXCLAMATION_MARK:{a.data+="!",this.state=H.COMMENT_LESS_THAN_SIGN_BANG;break}case B.LESS_THAN_SIGN:{a.data+="<";break}default:this.state=H.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===B.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=H.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===B.HYPHEN_MINUS?this.state=H.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=H.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==B.GREATER_THAN_SIGN&&t!==B.EOF&&this._err(J.nestedComment),this.state=H.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const a=this.currentToken;switch(t){case B.HYPHEN_MINUS:{this.state=H.COMMENT_END;break}case B.EOF:{this._err(J.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="-",this.state=H.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const a=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentComment(a);break}case B.EXCLAMATION_MARK:{this.state=H.COMMENT_END_BANG;break}case B.HYPHEN_MINUS:{a.data+="-";break}case B.EOF:{this._err(J.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--",this.state=H.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const a=this.currentToken;switch(t){case B.HYPHEN_MINUS:{a.data+="--!",this.state=H.COMMENT_END_DASH;break}case B.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=H.DATA,this.emitCurrentComment(a);break}case B.EOF:{this._err(J.eofInComment),this.emitCurrentComment(a),this._emitEOFToken();break}default:a.data+="--!",this.state=H.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case B.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=H.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ha(t))this._createDoctypeToken(String.fromCharCode(Ol(t))),this.state=H.DOCTYPE_NAME;else switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(Me),this.state=H.DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const a=this.currentToken;a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=H.DOCTYPE_NAME}}_stateDoctypeName(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.AFTER_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.name+=Me;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.name+=String.fromCodePoint(Ha(t)?Ol(t):t)}}_stateAfterDoctypeName(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(at.PUBLIC,!1)?this.state=H.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(at.SYSTEM,!1)?this.state=H.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{a.publicId="",this.state=H.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.publicId+=Me;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=H.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.publicId+=Me;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case B.GREATER_THAN_SIGN:{this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.QUOTATION_MARK:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=H.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{a.systemId="",this.state=H.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.DATA,this.emitCurrentDoctype(a);break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),a.forceQuirks=!0,this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const a=this.currentToken;switch(t){case B.QUOTATION_MARK:{this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.systemId+=Me;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const a=this.currentToken;switch(t){case B.APOSTROPHE:{this.state=H.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(J.unexpectedNullCharacter),a.systemId+=Me;break}case B.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),a.forceQuirks=!0,this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:a.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const a=this.currentToken;switch(t){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.EOF:{this._err(J.eofInDoctype),a.forceQuirks=!0,this.emitCurrentDoctype(a),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=H.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const a=this.currentToken;switch(t){case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(a),this.state=H.DATA;break}case B.NULL:{this._err(J.unexpectedNullCharacter);break}case B.EOF:{this.emitCurrentDoctype(a),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case B.RIGHT_SQUARE_BRACKET:{this.state=H.CDATA_SECTION_BRACKET;break}case B.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===B.RIGHT_SQUARE_BRACKET?this.state=H.CDATA_SECTION_END:(this._emitChars("]"),this.state=H.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case B.GREATER_THAN_SIGN:{this.state=H.DATA;break}case B.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=H.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&su(this.preprocessor.peek(1))?H.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){su(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===B.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const cu=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),du=new Set([...cu,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Dl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),C0=new Set([...Dl,p.OL,p.UL]),S0=new Set([...Dl,p.BUTTON]),fu=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),pu=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),A0=new Set([p.TR,p.TEMPLATE,p.HTML]),w0=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),k0=new Set([p.TABLE,p.TEMPLATE,p.HTML]),_0=new Set([p.TD,p.TH]);class N0{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,a,l){this.treeAdapter=a,this.handler=l,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===te.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,a){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=a,this.currentTagId=a,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,a,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,a){const l=this._indexOf(t);this.items[l]=a,l===this.stackTop&&(this.current=a)}insertAfter(t,a,l){const n=this._indexOf(t)+1;this.items.splice(n,0,a),this.tagIDs.splice(n,0,l),this.stackTop++,n===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,n===this.stackTop)}popUntilTagNamePopped(t){let a=this.stackTop+1;do a=this.tagIDs.lastIndexOf(t,a-1);while(a>0&&this.treeAdapter.getNamespaceURI(this.items[a])!==te.HTML);this.shortenToLength(Math.max(a,0))}shortenToLength(t){for(;this.stackTop>=t;){const a=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(a,this.stackTop<t)}}popUntilElementPopped(t){const a=this._indexOf(t);this.shortenToLength(Math.max(a,0))}popUntilPopped(t,a){const l=this._indexOfTagNames(t,a);this.shortenToLength(Math.max(l,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Xn,te.HTML)}popUntilTableCellPopped(){this.popUntilPopped(_0,te.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,a){for(let l=this.stackTop;l>=0;l--)if(t.has(this.tagIDs[l])&&this.treeAdapter.getNamespaceURI(this.items[l])===a)return l;return-1}clearBackTo(t,a){const l=this._indexOfTagNames(t,a);this.shortenToLength(l+1)}clearBackToTableContext(){this.clearBackTo(k0,te.HTML)}clearBackToTableBodyContext(){this.clearBackTo(w0,te.HTML)}clearBackToTableRowContext(){this.clearBackTo(A0,te.HTML)}remove(t){const a=this._indexOf(t);a>=0&&(a===this.stackTop?this.pop():(this.items.splice(a,1),this.tagIDs.splice(a,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===p.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const a=this._indexOf(t)-1;return a>=0?this.items[a]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===p.HTML}hasInDynamicScope(t,a){for(let l=this.stackTop;l>=0;l--){const n=this.tagIDs[l];switch(this.treeAdapter.getNamespaceURI(this.items[l])){case te.HTML:{if(n===t)return!0;if(a.has(n))return!1;break}case te.SVG:{if(pu.has(n))return!1;break}case te.MATHML:{if(fu.has(n))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Dl)}hasInListItemScope(t){return this.hasInDynamicScope(t,C0)}hasInButtonScope(t){return this.hasInDynamicScope(t,S0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const a=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case te.HTML:{if(Xn.has(a))return!0;if(Dl.has(a))return!1;break}case te.SVG:{if(pu.has(a))return!1;break}case te.MATHML:{if(fu.has(a))return!1;break}}}return!0}hasInTableScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===te.HTML)switch(this.tagIDs[a]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===te.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let a=this.stackTop;a>=0;a--)if(this.treeAdapter.getNamespaceURI(this.items[a])===te.HTML)switch(this.tagIDs[a]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&cu.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&du.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&du.has(this.currentTagId);)this.pop()}}const Qn=3;var Et;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Et||(Et={}));const hu={type:Et.Marker};class I0{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,a){const l=[],n=a.length,r=this.treeAdapter.getTagName(t),i=this.treeAdapter.getNamespaceURI(t);for(let s=0;s<this.entries.length;s++){const u=this.entries[s];if(u.type===Et.Marker)break;const{element:o}=u;if(this.treeAdapter.getTagName(o)===r&&this.treeAdapter.getNamespaceURI(o)===i){const c=this.treeAdapter.getAttrList(o);c.length===n&&l.push({idx:s,attrs:c})}}return l}_ensureNoahArkCondition(t){if(this.entries.length<Qn)return;const a=this.treeAdapter.getAttrList(t),l=this._getNoahArkConditionCandidates(t,a);if(l.length<Qn)return;const n=new Map(a.map(i=>[i.name,i.value]));let r=0;for(let i=0;i<l.length;i++){const s=l[i];s.attrs.every(u=>n.get(u.name)===u.value)&&(r+=1,r>=Qn&&this.entries.splice(s.idx,1))}}insertMarker(){this.entries.unshift(hu)}pushElement(t,a){this._ensureNoahArkCondition(t),this.entries.unshift({type:Et.Element,element:t,token:a})}insertElementAfterBookmark(t,a){const l=this.entries.indexOf(this.bookmark);this.entries.splice(l,0,{type:Et.Element,element:t,token:a})}removeEntry(t){const a=this.entries.indexOf(t);a!==-1&&this.entries.splice(a,1)}clearToLastMarker(){const t=this.entries.indexOf(hu);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const a=this.entries.find(l=>l.type===Et.Marker||this.treeAdapter.getTagName(l.element)===t);return a&&a.type===Et.Element?a:null}getElementEntry(t){return this.entries.find(a=>a.type===Et.Element&&a.element===t)}}const Mt={createDocument(){return{nodeName:"#document",mode:ot.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,a){return{nodeName:e,tagName:e,attrs:a,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,a){const l=e.childNodes.indexOf(a);e.childNodes.splice(l,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,a,l){const n=e.childNodes.find(r=>r.nodeName==="#documentType");if(n)n.name=t,n.publicId=a,n.systemId=l;else{const r={nodeName:"#documentType",name:t,publicId:a,systemId:l,parentNode:null};Mt.appendChild(e,r)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const a=e.childNodes[e.childNodes.length-1];if(Mt.isTextNode(a)){a.value+=t;return}}Mt.appendChild(e,Mt.createTextNode(t))},insertTextBefore(e,t,a){const l=e.childNodes[e.childNodes.indexOf(a)-1];l&&Mt.isTextNode(l)?l.value+=t:Mt.insertBefore(e,Mt.createTextNode(t),a)},adoptAttributes(e,t){const a=new Set(e.attrs.map(l=>l.name));for(let l=0;l<t.length;l++)a.has(t[l].name)||e.attrs.push(t[l])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},bu="html",L0="about:legacy-compat",O0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",mu=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],D0=[...mu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],P0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),vu=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],M0=[...vu,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function gu(e,t){return t.some(a=>e.startsWith(a))}function B0(e){return e.name===bu&&e.publicId===null&&(e.systemId===null||e.systemId===L0)}function F0(e){if(e.name!==bu)return ot.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===O0)return ot.QUIRKS;let{publicId:a}=e;if(a!==null){if(a=a.toLowerCase(),P0.has(a))return ot.QUIRKS;let l=t===null?D0:mu;if(gu(a,l))return ot.QUIRKS;if(l=t===null?vu:M0,gu(a,l))return ot.LIMITED_QUIRKS}return ot.NO_QUIRKS}const Eu={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},H0="definitionurl",$0="definitionURL",R0=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),U0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:te.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:te.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:te.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:te.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:te.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:te.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:te.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:te.XML}],["xml:space",{prefix:"xml",name:"space",namespace:te.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:te.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:te.XMLNS}]]),q0=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),z0=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function V0(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:l})=>l===Yt.COLOR||l===Yt.SIZE||l===Yt.FACE)||z0.has(t)}function yu(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===H0){e.attrs[t].name=$0;break}}function Tu(e){for(let t=0;t<e.attrs.length;t++){const a=R0.get(e.attrs[t].name);a!=null&&(e.attrs[t].name=a)}}function Jn(e){for(let t=0;t<e.attrs.length;t++){const a=U0.get(e.attrs[t].name);a&&(e.attrs[t].prefix=a.prefix,e.attrs[t].name=a.name,e.attrs[t].namespace=a.namespace)}}function G0(e){const t=q0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=pa(e.tagName))}function Y0(e,t){return t===te.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function W0(e,t,a){if(t===te.MATHML&&e===p.ANNOTATION_XML){for(let l=0;l<a.length;l++)if(a[l].name===Yt.ENCODING){const n=a[l].value.toLowerCase();return n===Eu.TEXT_HTML||n===Eu.APPLICATION_XML}}return t===te.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function j0(e,t,a,l){return(!l||l===te.HTML)&&W0(e,t,a)||(!l||l===te.MATHML)&&Y0(e,t)}const K0="hidden",X0=8,Q0=3;var q;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(q||(q={}));const J0={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},xu=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),Cu={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Mt,onParseError:null};class Su{constructor(t,a,l=null,n=null){this.fragmentContext=l,this.scriptHandler=n,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Cu,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=a??this.treeAdapter.createDocument(),this.tokenizer=new x0(this.options,this),this.activeFormattingElements=new I0(this.treeAdapter),this.fragmentContextID=l?pa(this.treeAdapter.getTagName(l)):p.UNKNOWN,this._setContextModes(l??this.document,this.fragmentContextID),this.openElements=new N0(this.document,this.treeAdapter,this)}static parse(t,a){const l=new this(a);return l.tokenizer.write(t,!0),l.document}static getFragmentParser(t,a){const l={...Cu,...a};t??(t=l.treeAdapter.createElement(j.TEMPLATE,te.HTML,[]));const n=l.treeAdapter.createElement("documentmock",te.HTML,[]),r=new this(l,n,t);return r.fragmentContextID===p.TEMPLATE&&r.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),r._initTokenizerForFragmentParsing(),r._insertFakeRootElement(),r._resetInsertionMode(),r._findFormInFragmentContext(),r}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),a=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,a),a}_err(t,a,l){var n;if(!this.onParseError)return;const r=(n=t.location)!==null&&n!==void 0?n:J0,i={code:a,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:l?r.startLine:r.endLine,endCol:l?r.startCol:r.endCol,endOffset:l?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(t,a,l){var n,r;(r=(n=this.treeAdapter).onItemPush)===null||r===void 0||r.call(n,t),l&&this.openElements.stackTop>0&&this._setContextModes(t,a)}onItemPop(t,a){var l,n;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(n=(l=this.treeAdapter).onItemPop)===null||n===void 0||n.call(l,t,this.openElements.current),a){let r,i;this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,i=this.fragmentContextID):{current:r,currentTagId:i}=this.openElements,this._setContextModes(r,i)}}_setContextModes(t,a){const l=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===te.HTML;this.currentNotInHTML=!l,this.tokenizer.inForeignNode=!l&&t!==void 0&&a!==void 0&&!this._isIntegrationPoint(a,t)}_switchToTextParsing(t,a){this._insertElement(t,te.HTML),this.tokenizer.state=a,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=$e.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==te.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=$e.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=$e.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=$e.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=$e.PLAINTEXT;break}}}_setDocumentType(t){const a=t.name||"",l=t.publicId||"",n=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,a,l,n),t.location){const i=this.treeAdapter.getChildNodes(this.document).find(s=>this.treeAdapter.isDocumentTypeNode(s));i&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}}_attachElementToTree(t,a){if(this.options.sourceCodeLocationInfo){const l=a&&{...a,startTag:a};this.treeAdapter.setNodeSourceCodeLocation(t,l)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const l=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(l??this.document,t)}}_appendElement(t,a){const l=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(l,t.location)}_insertElement(t,a){const l=this.treeAdapter.createElement(t.tagName,a,t.attrs);this._attachElementToTree(l,t.location),this.openElements.push(l,t.tagID)}_insertFakeElement(t,a){const l=this.treeAdapter.createElement(t,te.HTML,[]);this._attachElementToTree(l,null),this.openElements.push(l,a)}_insertTemplate(t){const a=this.treeAdapter.createElement(t.tagName,te.HTML,t.attrs),l=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(a,l),this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(j.HTML,te.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,a){const l=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(a,l),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_insertCharacters(t){let a,l;if(this._shouldFosterParentOnInsertion()?({parent:a,beforeElement:l}=this._findFosterParentingLocation(),l?this.treeAdapter.insertTextBefore(a,t.chars,l):this.treeAdapter.insertText(a,t.chars)):(a=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(a,t.chars)),!t.location)return;const n=this.treeAdapter.getChildNodes(a),r=l?n.lastIndexOf(l):n.length,i=n[r-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){const{endLine:u,endCol:o,endOffset:c}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:u,endCol:o,endOffset:c})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_adoptNodes(t,a){for(let l=this.treeAdapter.getFirstChild(t);l;l=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(l),this.treeAdapter.appendChild(a,l)}_setEndLocation(t,a){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&a.location){const l=a.location,n=this.treeAdapter.getTagName(t),r=a.type===xe.END_TAG&&n===a.tagName?{endTag:{...l},endLine:l.endLine,endCol:l.endCol,endOffset:l.endOffset}:{endLine:l.startLine,endCol:l.startCol,endOffset:l.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,r)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let a,l;return this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,l=this.fragmentContextID):{current:a,currentTagId:l}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(a)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(a)===te.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&l!==void 0&&!this._isIntegrationPoint(l,a,te.HTML)}_processToken(t){switch(t.type){case xe.CHARACTER:{this.onCharacter(t);break}case xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case xe.COMMENT:{this.onComment(t);break}case xe.DOCTYPE:{this.onDoctype(t);break}case xe.START_TAG:{this._processStartTag(t);break}case xe.END_TAG:{this.onEndTag(t);break}case xe.EOF:{this.onEof(t);break}case xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,a,l){const n=this.treeAdapter.getNamespaceURI(a),r=this.treeAdapter.getAttrList(a);return j0(t,n,r,l)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const a=this.activeFormattingElements.entries.findIndex(n=>n.type===Et.Marker||this.openElements.contains(n.element)),l=a===-1?t-1:a-1;for(let n=l;n>=0;n--){const r=this.activeFormattingElements.entries[n];this._insertElement(r.token,this.treeAdapter.getNamespaceURI(r.element)),r.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=q.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=q.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=q.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=q.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=q.IN_TABLE;return}case p.BODY:{this.insertionMode=q.IN_BODY;return}case p.FRAMESET:{this.insertionMode=q.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=q.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=q.IN_HEAD;return}break}}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let a=t-1;a>0;a--){const l=this.openElements.tagIDs[a];if(l===p.TEMPLATE)break;if(l===p.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(t){return xu.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const a=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(a)===te.HTML)return{parent:this.treeAdapter.getTemplateContent(a),beforeElement:null};break}case p.TABLE:{const l=this.treeAdapter.getParentNode(a);return l?{parent:l,beforeElement:a}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const a=this._findFosterParentingLocation();a.beforeElement?this.treeAdapter.insertBefore(a.parent,t,a.beforeElement):this.treeAdapter.appendChild(a.parent,t)}_isSpecialElement(t,a){const l=this.treeAdapter.getNamespaceURI(t);return g0[l].has(a)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){_g(this,t);return}switch(this.insertionMode){case q.INITIAL:{$a(this,t);break}case q.BEFORE_HTML:{Ra(this,t);break}case q.BEFORE_HEAD:{Ua(this,t);break}case q.IN_HEAD:{qa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{za(this,t);break}case q.AFTER_HEAD:{Va(this,t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:{wu(this,t);break}case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ar(this,t);break}case q.IN_TABLE_TEXT:{Pu(this,t);break}case q.IN_COLUMN_GROUP:{Bl(this,t);break}case q.AFTER_BODY:{$l(this,t);break}case q.AFTER_AFTER_BODY:{Rl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){kg(this,t);return}switch(this.insertionMode){case q.INITIAL:{$a(this,t);break}case q.BEFORE_HTML:{Ra(this,t);break}case q.BEFORE_HEAD:{Ua(this,t);break}case q.IN_HEAD:{qa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{za(this,t);break}case q.AFTER_HEAD:{Va(this,t);break}case q.TEXT:{this._insertCharacters(t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ar(this,t);break}case q.IN_COLUMN_GROUP:{Bl(this,t);break}case q.AFTER_BODY:{$l(this,t);break}case q.AFTER_AFTER_BODY:{Rl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){er(this,t);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{er(this,t);break}case q.IN_TABLE_TEXT:{Wa(this,t);break}case q.AFTER_BODY:{rv(this,t);break}case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{iv(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:{sv(this,t);break}case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case q.IN_TABLE_TEXT:{Wa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Ng(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{$a(this,t);break}case q.BEFORE_HTML:{uv(this,t);break}case q.BEFORE_HEAD:{cv(this,t);break}case q.IN_HEAD:{ft(this,t);break}case q.IN_HEAD_NO_SCRIPT:{pv(this,t);break}case q.AFTER_HEAD:{bv(this,t);break}case q.IN_BODY:{je(this,t);break}case q.IN_TABLE:{ha(this,t);break}case q.IN_TABLE_TEXT:{Wa(this,t);break}case q.IN_CAPTION:{dg(this,t);break}case q.IN_COLUMN_GROUP:{lr(this,t);break}case q.IN_TABLE_BODY:{Fl(this,t);break}case q.IN_ROW:{Hl(this,t);break}case q.IN_CELL:{hg(this,t);break}case q.IN_SELECT:{Fu(this,t);break}case q.IN_SELECT_IN_TABLE:{mg(this,t);break}case q.IN_TEMPLATE:{gg(this,t);break}case q.AFTER_BODY:{yg(this,t);break}case q.IN_FRAMESET:{Tg(this,t);break}case q.AFTER_FRAMESET:{Cg(this,t);break}case q.AFTER_AFTER_BODY:{Ag(this,t);break}case q.AFTER_AFTER_FRAMESET:{wg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Ig(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case q.INITIAL:{$a(this,t);break}case q.BEFORE_HTML:{ov(this,t);break}case q.BEFORE_HEAD:{dv(this,t);break}case q.IN_HEAD:{fv(this,t);break}case q.IN_HEAD_NO_SCRIPT:{hv(this,t);break}case q.AFTER_HEAD:{mv(this,t);break}case q.IN_BODY:{Ml(this,t);break}case q.TEXT:{tg(this,t);break}case q.IN_TABLE:{Ga(this,t);break}case q.IN_TABLE_TEXT:{Wa(this,t);break}case q.IN_CAPTION:{fg(this,t);break}case q.IN_COLUMN_GROUP:{pg(this,t);break}case q.IN_TABLE_BODY:{nr(this,t);break}case q.IN_ROW:{Bu(this,t);break}case q.IN_CELL:{bg(this,t);break}case q.IN_SELECT:{Hu(this,t);break}case q.IN_SELECT_IN_TABLE:{vg(this,t);break}case q.IN_TEMPLATE:{Eg(this,t);break}case q.AFTER_BODY:{Ru(this,t);break}case q.IN_FRAMESET:{xg(this,t);break}case q.AFTER_FRAMESET:{Sg(this,t);break}case q.AFTER_AFTER_BODY:{Rl(this,t);break}}}onEof(t){switch(this.insertionMode){case q.INITIAL:{$a(this,t);break}case q.BEFORE_HTML:{Ra(this,t);break}case q.BEFORE_HEAD:{Ua(this,t);break}case q.IN_HEAD:{qa(this,t);break}case q.IN_HEAD_NO_SCRIPT:{za(this,t);break}case q.AFTER_HEAD:{Va(this,t);break}case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{Ou(this,t);break}case q.TEXT:{ag(this,t);break}case q.IN_TABLE_TEXT:{Wa(this,t);break}case q.IN_TEMPLATE:{$u(this,t);break}case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{tr(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===B.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{this._insertCharacters(t);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{Au(this,t);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ar(this,t);break}case q.IN_TABLE_TEXT:{Du(this,t);break}}}}function Z0(e,t){let a=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return a?e.openElements.contains(a.element)?e.openElements.hasInScope(t.tagID)||(a=null):(e.activeFormattingElements.removeEntry(a),a=null):Lu(e,t),a}function ev(e,t){let a=null,l=e.openElements.stackTop;for(;l>=0;l--){const n=e.openElements.items[l];if(n===t.element)break;e._isSpecialElement(n,e.openElements.tagIDs[l])&&(a=n)}return a||(e.openElements.shortenToLength(Math.max(l,0)),e.activeFormattingElements.removeEntry(t)),a}function tv(e,t,a){let l=t,n=e.openElements.getCommonAncestor(t);for(let r=0,i=n;i!==a;r++,i=n){n=e.openElements.getCommonAncestor(i);const s=e.activeFormattingElements.getElementEntry(i),u=s&&r>=Q0;!s||u?(u&&e.activeFormattingElements.removeEntry(s),e.openElements.remove(i)):(i=av(e,s),l===t&&(e.activeFormattingElements.bookmark=s),e.treeAdapter.detachNode(l),e.treeAdapter.appendChild(i,l),l=i)}return l}function av(e,t){const a=e.treeAdapter.getNamespaceURI(t.element),l=e.treeAdapter.createElement(t.token.tagName,a,t.token.attrs);return e.openElements.replace(t.element,l),t.element=l,l}function lv(e,t,a){const l=e.treeAdapter.getTagName(t),n=pa(l);if(e._isElementCausesFosterParenting(n))e._fosterParentElement(a);else{const r=e.treeAdapter.getNamespaceURI(t);n===p.TEMPLATE&&r===te.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,a)}}function nv(e,t,a){const l=e.treeAdapter.getNamespaceURI(a.element),{token:n}=a,r=e.treeAdapter.createElement(n.tagName,l,n.attrs);e._adoptNodes(t,r),e.treeAdapter.appendChild(t,r),e.activeFormattingElements.insertElementAfterBookmark(r,n),e.activeFormattingElements.removeEntry(a),e.openElements.remove(a.element),e.openElements.insertAfter(t,r,n.tagID)}function Zn(e,t){for(let a=0;a<X0;a++){const l=Z0(e,t);if(!l)break;const n=ev(e,l);if(!n)break;e.activeFormattingElements.bookmark=l;const r=tv(e,n,l.element),i=e.openElements.getCommonAncestor(l.element);e.treeAdapter.detachNode(r),i&&lv(e,i,r),nv(e,n,l)}}function er(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function rv(e,t){e._appendCommentNode(t,e.openElements.items[0])}function iv(e,t){e._appendCommentNode(t,e.document)}function tr(e,t){if(e.stopped=!0,t.location){const a=e.fragmentContext?0:2;for(let l=e.openElements.stackTop;l>=a;l--)e._setEndLocation(e.openElements.items[l],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const l=e.openElements.items[0],n=e.treeAdapter.getNodeSourceCodeLocation(l);if(n&&!n.endTag&&(e._setEndLocation(l,t),e.openElements.stackTop>=1)){const r=e.openElements.items[1],i=e.treeAdapter.getNodeSourceCodeLocation(r);i&&!i.endTag&&e._setEndLocation(r,t)}}}}function sv(e,t){e._setDocumentType(t);const a=t.forceQuirks?ot.QUIRKS:F0(t);B0(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,a),e.insertionMode=q.BEFORE_HTML}function $a(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ot.QUIRKS),e.insertionMode=q.BEFORE_HTML,e._processToken(t)}function uv(e,t){t.tagID===p.HTML?(e._insertElement(t,te.HTML),e.insertionMode=q.BEFORE_HEAD):Ra(e,t)}function ov(e,t){const a=t.tagID;(a===p.HTML||a===p.HEAD||a===p.BODY||a===p.BR)&&Ra(e,t)}function Ra(e,t){e._insertFakeRootElement(),e.insertionMode=q.BEFORE_HEAD,e._processToken(t)}function cv(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.HEAD:{e._insertElement(t,te.HTML),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD;break}default:Ua(e,t)}}function dv(e,t){const a=t.tagID;a===p.HEAD||a===p.BODY||a===p.HTML||a===p.BR?Ua(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ua(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=q.IN_HEAD,e._processToken(t)}function ft(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,$e.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,$e.RAWTEXT):(e._insertElement(t,te.HTML),e.insertionMode=q.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,$e.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,$e.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=q.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break}case p.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:qa(e,t)}}function fv(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=q.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{qa(e,t);break}case p.TEMPLATE:{Wt(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Wt(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function qa(e,t){e.openElements.pop(),e.insertionMode=q.AFTER_HEAD,e._processToken(t)}function pv(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{ft(e,t);break}case p.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:za(e,t)}}function hv(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=q.IN_HEAD;break}case p.BR:{za(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function za(e,t){const a=t.type===xe.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,a),e.openElements.pop(),e.insertionMode=q.IN_HEAD,e._processToken(t)}function bv(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.BODY:{e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=q.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,te.HTML),e.insertionMode=q.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),ft(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Va(e,t)}}function mv(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Va(e,t);break}case p.TEMPLATE:{Wt(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Va(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=q.IN_BODY,Pl(e,t)}function Pl(e,t){switch(t.type){case xe.CHARACTER:{wu(e,t);break}case xe.WHITESPACE_CHARACTER:{Au(e,t);break}case xe.COMMENT:{er(e,t);break}case xe.START_TAG:{je(e,t);break}case xe.END_TAG:{Ml(e,t);break}case xe.EOF:{Ou(e,t);break}}}function Au(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function wu(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function gv(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(a,t.attrs))}function Ev(e,t){const a=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&a&&(e.treeAdapter.detachNode(a),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_FRAMESET)}function yv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function Tv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Xn.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,te.HTML)}function xv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Cv(e,t){const a=e.openElements.tmplCount>0;(!e.formElement||a)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),a||(e.formElement=e.openElements.current))}function Sv(e,t){e.framesetOk=!1;const a=t.tagID;for(let l=e.openElements.stackTop;l>=0;l--){const n=e.openElements.tagIDs[l];if(a===p.LI&&n===p.LI||(a===p.DD||a===p.DT)&&(n===p.DD||n===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n);break}if(n!==p.ADDRESS&&n!==p.DIV&&n!==p.P&&e._isSpecialElement(e.openElements.items[l],n))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML)}function Av(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.tokenizer.state=$e.PLAINTEXT}function wv(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1}function kv(e,t){const a=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);a&&(Zn(e,t),e.openElements.remove(a.element),e.activeFormattingElements.removeEntry(a)),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _v(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Nv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(Zn(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,te.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Iv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Lv(e,t){e.treeAdapter.getDocumentMode(e.document)!==ot.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=q.IN_TABLE}function ku(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _u(e){const t=iu(e,Yt.TYPE);return t!=null&&t.toLowerCase()===K0}function Ov(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,te.HTML),_u(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function Dv(e,t){e._appendElement(t,te.HTML),t.ackSelfClosing=!0}function Pv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,te.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Mv(e,t){t.tagName=j.IMG,t.tagID=p.IMG,ku(e,t)}function Bv(e,t){e._insertElement(t,te.HTML),e.skipNextNewLine=!0,e.tokenizer.state=$e.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=q.TEXT}function Fv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function Hv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,$e.RAWTEXT)}function Nu(e,t){e._switchToTextParsing(t,$e.RAWTEXT)}function $v(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===q.IN_TABLE||e.insertionMode===q.IN_CAPTION||e.insertionMode===q.IN_TABLE_BODY||e.insertionMode===q.IN_ROW||e.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function Rv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function Uv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,te.HTML)}function qv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,te.HTML)}function zv(e,t){e._reconstructActiveFormattingElements(),yu(t),Jn(t),t.selfClosing?e._appendElement(t,te.MATHML):e._insertElement(t,te.MATHML),t.ackSelfClosing=!0}function Vv(e,t){e._reconstructActiveFormattingElements(),Tu(t),Jn(t),t.selfClosing?e._appendElement(t,te.SVG):e._insertElement(t,te.SVG),t.ackSelfClosing=!0}function Iu(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,te.HTML)}function je(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{_v(e,t);break}case p.A:{kv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Tv(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{yv(e,t);break}case p.LI:case p.DD:case p.DT:{Sv(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{ku(e,t);break}case p.HR:{Pv(e,t);break}case p.RB:case p.RTC:{Uv(e,t);break}case p.RT:case p.RP:{qv(e,t);break}case p.PRE:case p.LISTING:{xv(e,t);break}case p.XMP:{Fv(e,t);break}case p.SVG:{Vv(e,t);break}case p.HTML:{vv(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{ft(e,t);break}case p.BODY:{gv(e,t);break}case p.FORM:{Cv(e,t);break}case p.NOBR:{Nv(e,t);break}case p.MATH:{zv(e,t);break}case p.TABLE:{Lv(e,t);break}case p.INPUT:{Ov(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{Dv(e,t);break}case p.IMAGE:{Mv(e,t);break}case p.BUTTON:{wv(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{Iv(e,t);break}case p.IFRAME:{Hv(e,t);break}case p.SELECT:{$v(e,t);break}case p.OPTION:case p.OPTGROUP:{Rv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{Nu(e,t);break}case p.FRAMESET:{Ev(e,t);break}case p.TEXTAREA:{Bv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?Nu(e,t):Iu(e,t);break}case p.PLAINTEXT:{Av(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:Iu(e,t)}}function Gv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=q.AFTER_BODY,e.options.sourceCodeLocationInfo)){const a=e.openElements.tryPeekProperlyNestedBodyElement();a&&e._setEndLocation(a,t)}}function Yv(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=q.AFTER_BODY,Ru(e,t))}function Wv(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a))}function jv(e){const t=e.openElements.tmplCount>0,{formElement:a}=e;t||(e.formElement=null),(a||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):a&&e.openElements.remove(a))}function Kv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function Xv(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function Qv(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a))}function Jv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Zv(e,t){const a=t.tagID;e.openElements.hasInScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker())}function eg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function Lu(e,t){const a=t.tagName,l=t.tagID;for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n],i=e.openElements.tagIDs[n];if(l===i&&(l!==p.UNKNOWN||e.treeAdapter.getTagName(r)===a)){e.openElements.generateImpliedEndTagsWithExclusion(l),e.openElements.stackTop>=n&&e.openElements.shortenToLength(n);break}if(e._isSpecialElement(r,i))break}}function Ml(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{Zn(e,t);break}case p.P:{Kv(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Wv(e,t);break}case p.LI:{Xv(e);break}case p.DD:case p.DT:{Qv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Jv(e);break}case p.BR:{eg(e);break}case p.BODY:{Gv(e,t);break}case p.HTML:{Yv(e,t);break}case p.FORM:{jv(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{Zv(e,t);break}case p.TEMPLATE:{Wt(e,t);break}default:Lu(e,t)}}function Ou(e,t){e.tmplInsertionModeStack.length>0?$u(e,t):tr(e,t)}function tg(e,t){var a;t.tagID===p.SCRIPT&&((a=e.scriptHandler)===null||a===void 0||a.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function ag(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ar(e,t){if(e.openElements.currentTagId!==void 0&&xu.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=q.IN_TABLE_TEXT,t.type){case xe.CHARACTER:{Pu(e,t);break}case xe.WHITESPACE_CHARACTER:{Du(e,t);break}}else Ya(e,t)}function lg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_CAPTION}function ng(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_COLUMN_GROUP}function rg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=q.IN_COLUMN_GROUP,lr(e,t)}function ig(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_TABLE_BODY}function sg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=q.IN_TABLE_BODY,Fl(e,t)}function ug(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function og(e,t){_u(t)?e._appendElement(t,te.HTML):Ya(e,t),t.ackSelfClosing=!0}function cg(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,te.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ha(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{sg(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{ft(e,t);break}case p.COL:{rg(e,t);break}case p.FORM:{cg(e,t);break}case p.TABLE:{ug(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{ig(e,t);break}case p.INPUT:{og(e,t);break}case p.CAPTION:{lg(e,t);break}case p.COLGROUP:{ng(e,t);break}default:Ya(e,t)}}function Ga(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Wt(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Ya(e,t)}}function Ya(e,t){const a=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Pl(e,t),e.fosterParentingEnabled=a}function Du(e,t){e.pendingCharacterTokens.push(t)}function Pu(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wa(e,t){let a=0;if(e.hasNonWhitespacePendingCharacterToken)for(;a<e.pendingCharacterTokens.length;a++)Ya(e,e.pendingCharacterTokens[a]);else for(;a<e.pendingCharacterTokens.length;a++)e._insertCharacters(e.pendingCharacterTokens[a]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Mu=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function dg(e,t){const a=t.tagID;Mu.has(a)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,ha(e,t)):je(e,t)}function fg(e,t){const a=t.tagID;switch(a){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_TABLE,a===p.TABLE&&Ga(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Ml(e,t)}}function lr(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.COL:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{ft(e,t);break}default:Bl(e,t)}}function pg(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case p.TEMPLATE:{Wt(e,t);break}case p.COL:break;default:Bl(e,t)}}function Bl(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=q.IN_TABLE,e._processToken(t))}function Fl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,p.TR),e.insertionMode=q.IN_ROW,Hl(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,ha(e,t));break}default:ha(e,t)}}function nr(e,t){const a=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(a)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE,Ga(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:Ga(e,t)}}function Hl(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,te.HTML),e.insertionMode=q.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,Fl(e,t));break}default:ha(e,t)}}function Bu(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,nr(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=q.IN_TABLE_BODY,nr(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:Ga(e,t)}}function hg(e,t){const a=t.tagID;Mu.has(a)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),Hl(e,t)):je(e,t)}function bg(e,t){const a=t.tagID;switch(a){case p.TD:case p.TH:{e.openElements.hasInTableScope(a)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(a),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=q.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(a)&&(e._closeTableCell(),Bu(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Ml(e,t)}}function Fu(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,te.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{ft(e,t);break}}}function Hu(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{Wt(e,t);break}}}function mg(e,t){const a=t.tagID;a===p.CAPTION||a===p.TABLE||a===p.TBODY||a===p.TFOOT||a===p.THEAD||a===p.TR||a===p.TD||a===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Fu(e,t)}function vg(e,t){const a=t.tagID;a===p.CAPTION||a===p.TABLE||a===p.TBODY||a===p.TFOOT||a===p.THEAD||a===p.TR||a===p.TD||a===p.TH?e.openElements.hasInTableScope(a)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Hu(e,t)}function gg(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{ft(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=q.IN_TABLE,e.insertionMode=q.IN_TABLE,ha(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,e.insertionMode=q.IN_COLUMN_GROUP,lr(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,e.insertionMode=q.IN_TABLE_BODY,Fl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=q.IN_ROW,e.insertionMode=q.IN_ROW,Hl(e,t);break}default:e.tmplInsertionModeStack[0]=q.IN_BODY,e.insertionMode=q.IN_BODY,je(e,t)}}function Eg(e,t){t.tagID===p.TEMPLATE&&Wt(e,t)}function $u(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tr(e,t)}function yg(e,t){t.tagID===p.HTML?je(e,t):$l(e,t)}function Ru(e,t){var a;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=q.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const l=e.openElements.items[1];l&&!(!((a=e.treeAdapter.getNodeSourceCodeLocation(l))===null||a===void 0)&&a.endTag)&&e._setEndLocation(l,t)}}else $l(e,t)}function $l(e,t){e.insertionMode=q.IN_BODY,Pl(e,t)}function Tg(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.FRAMESET:{e._insertElement(t,te.HTML);break}case p.FRAME:{e._appendElement(t,te.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{ft(e,t);break}}}function xg(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=q.AFTER_FRAMESET))}function Cg(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.NOFRAMES:{ft(e,t);break}}}function Sg(e,t){t.tagID===p.HTML&&(e.insertionMode=q.AFTER_AFTER_FRAMESET)}function Ag(e,t){t.tagID===p.HTML?je(e,t):Rl(e,t)}function Rl(e,t){e.insertionMode=q.IN_BODY,Pl(e,t)}function wg(e,t){switch(t.tagID){case p.HTML:{je(e,t);break}case p.NOFRAMES:{ft(e,t);break}}}function kg(e,t){t.chars=Me,e._insertCharacters(t)}function _g(e,t){e._insertCharacters(t),e.framesetOk=!1}function Uu(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==te.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Ng(e,t){if(V0(t))Uu(e),e._startTagOutsideForeignContent(t);else{const a=e._getAdjustedCurrentElement(),l=e.treeAdapter.getNamespaceURI(a);l===te.MATHML?yu(t):l===te.SVG&&(G0(t),Tu(t)),Jn(t),t.selfClosing?e._appendElement(t,l):e._insertElement(t,l),t.ackSelfClosing=!0}}function Ig(e,t){if(t.tagID===p.P||t.tagID===p.BR){Uu(e),e._endTagOutsideForeignContent(t);return}for(let a=e.openElements.stackTop;a>0;a--){const l=e.openElements.items[a];if(e.treeAdapter.getNamespaceURI(l)===te.HTML){e._endTagOutsideForeignContent(t);break}const n=e.treeAdapter.getTagName(l);if(n.toLowerCase()===t.tagName){t.tagName=n,e.openElements.shortenToLength(a);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const Lg=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Og=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),qu={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function zu(e,t){const a=qg(e),l=tu("type",{handlers:{root:Dg,element:Pg,text:Mg,comment:Gu,doctype:Bg,raw:Hg},unknown:$g}),n={parser:a?new Su(qu):Su.getFragmentParser(void 0,qu),handle(s){l(s,n)},stitches:!1,options:t||{}};l(e,n),ba(n,bt());const r=a?n.parser.document:n.parser.getFragment(),i=zm(r,{file:n.options.file});return n.stitches&&Nl(i,"comment",function(s,u,o){const c=s;if(c.value.stitch&&o&&u!==void 0){const d=o.children;return d[u]=c.value.stitch,u}}),i.type==="root"&&i.children.length===1&&i.children[0].type===e.type?i.children[0]:i}function Vu(e,t){let a=-1;if(e)for(;++a<e.length;)t.handle(e[a])}function Dg(e,t){Vu(e.children,t)}function Pg(e,t){Rg(e,t),Vu(e.children,t),Ug(e,t)}function Mg(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const a={type:xe.CHARACTER,chars:e.value,location:ja(e)};ba(t,bt(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function Bg(e,t){const a={type:xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ja(e)};ba(t,bt(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function Fg(e,t){t.stitches=!0;const a=zg(e);if("children"in e&&"children"in a){const l=zu({type:"root",children:e.children},t.options);a.children=l.children}Gu({type:"comment",value:{stitch:a}},t)}function Gu(e,t){const a=e.value,l={type:xe.COMMENT,data:a,location:ja(e)};ba(t,bt(e)),t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken)}function Hg(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Yu(t,bt(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Lg,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const a=t.parser.tokenizer._consume();t.parser.tokenizer._callState(a)}}function $g(e,t){const a=e;if(t.options.passThrough&&t.options.passThrough.includes(a.type))Fg(a,t);else{let l="";throw Og.has(a.type)&&(l=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+a.type+"` node"+l)}}function ba(e,t){Yu(e,t);const a=e.parser.tokenizer.currentCharacterToken;a&&a.location&&(a.location.endLine=e.parser.tokenizer.preprocessor.line,a.location.endCol=e.parser.tokenizer.preprocessor.col+1,a.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=a,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=$e.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Yu(e,t){if(t&&t.offset!==void 0){const a={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=a}}function Rg(e,t){const a=e.tagName.toLowerCase();if(t.parser.tokenizer.state===$e.PLAINTEXT)return;ba(t,bt(e));const l=t.parser.openElements.current;let n="namespaceURI"in l?l.namespaceURI:Gt.html;n===Gt.html&&a==="svg"&&(n=Gt.svg);const r=jm({...e,children:[]},{space:n===Gt.svg?"svg":"html"}),i={type:xe.START_TAG,tagName:a,tagID:pa(a),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in r?r.attrs:[],location:ja(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=a}function Ug(e,t){const a=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&a0.includes(a)||t.parser.tokenizer.state===$e.PLAINTEXT)return;ba(t,Tl(e));const l={type:xe.END_TAG,tagName:a,tagID:pa(a),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ja(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),a===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===$e.RCDATA||t.parser.tokenizer.state===$e.RAWTEXT||t.parser.tokenizer.state===$e.SCRIPT_DATA)&&(t.parser.tokenizer.state=$e.DATA)}function qg(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ja(e){const t=bt(e)||{line:void 0,column:void 0,offset:void 0},a=Tl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:a.line,endCol:a.column,endOffset:a.offset}}function zg(e){return"children"in e?Vt({...e,children:[]}):Vt(e)}function Vg(e){return function(t,a){return zu(t,{...e,file:a})}}const jt=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ma={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...jt,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...jt],h2:[["className","sr-only"]],img:[...jt,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...jt,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...jt],table:[...jt],ul:[...jt,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Bt={}.hasOwnProperty;function Gg(e,t){let a={type:"root",children:[]};const l={schema:t?{...ma,...t}:ma,stack:[]},n=Wu(l,e);return n&&(Array.isArray(n)?n.length===1?a=n[0]:a.children=n:a=n),a}function Wu(e,t){if(t&&typeof t=="object"){const a=t;switch(typeof a.type=="string"?a.type:""){case"comment":return Yg(e,a);case"doctype":return Wg(e,a);case"element":return jg(e,a);case"root":return Kg(e,a);case"text":return Xg(e,a)}}}function Yg(e,t){if(e.schema.allowComments){const a=typeof t.value=="string"?t.value:"",l=a.indexOf("-->"),r={type:"comment",value:l<0?a:a.slice(0,l)};return Ka(r,t),r}}function Wg(e,t){if(e.schema.allowDoctypes){const a={type:"doctype"};return Ka(a,t),a}}function jg(e,t){const a=typeof t.tagName=="string"?t.tagName:"";e.stack.push(a);const l=ju(e,t.children),n=Qg(e,t.properties);e.stack.pop();let r=!1;if(a&&a!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(a))&&(r=!0,e.schema.ancestors&&Bt.call(e.schema.ancestors,a))){const s=e.schema.ancestors[a];let u=-1;for(r=!1;++u<s.length;)e.stack.includes(s[u])&&(r=!0)}if(!r)return e.schema.strip&&!e.schema.strip.includes(a)?l:void 0;const i={type:"element",tagName:a,properties:n,children:l};return Ka(i,t),i}function Kg(e,t){const l={type:"root",children:ju(e,t.children)};return Ka(l,t),l}function Xg(e,t){const l={type:"text",value:typeof t.value=="string"?t.value:""};return Ka(l,t),l}function ju(e,t){const a=[];if(Array.isArray(t)){const l=t;let n=-1;for(;++n<l.length;){const r=Wu(e,l[n]);r&&(Array.isArray(r)?a.push(...r):a.push(r))}}return a}function Qg(e,t){const a=e.stack[e.stack.length-1],l=e.schema.attributes,n=e.schema.required,r=l&&Bt.call(l,a)?l[a]:void 0,i=l&&Bt.call(l,"*")?l["*"]:void 0,s=t&&typeof t=="object"?t:{},u={};let o;for(o in s)if(Bt.call(s,o)){const c=s[o];let d=Ku(e,Qu(r,o),o,c);d==null&&(d=Ku(e,Qu(i,o),o,c)),d!=null&&(u[o]=d)}if(n&&Bt.call(n,a)){const c=n[a];for(o in c)Bt.call(c,o)&&!Bt.call(u,o)&&(u[o]=c[o])}return u}function Ku(e,t,a,l){return t?Array.isArray(l)?Jg(e,t,a,l):Xu(e,t,a,l):void 0}function Jg(e,t,a,l){let n=-1;const r=[];for(;++n<l.length;){const i=Xu(e,t,a,l[n]);(typeof i=="number"||typeof i=="string")&&r.push(i)}return r}function Xu(e,t,a,l){if(!(typeof l!="boolean"&&typeof l!="number"&&typeof l!="string")&&Zg(e,a,l)){if(typeof t=="object"&&t.length>1){let n=!1,r=0;for(;++r<t.length;){const i=t[r];if(i&&typeof i=="object"&&"flags"in i){if(i.test(String(l))){n=!0;break}}else if(i===l){n=!0;break}}if(!n)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(a)?e.schema.clobberPrefix+l:l}}function Zg(e,t,a){const l=e.schema.protocols&&Bt.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!l||l.length===0)return!0;const n=String(a),r=n.indexOf(":"),i=n.indexOf("?"),s=n.indexOf("#"),u=n.indexOf("/");if(r<0||u>-1&&r>u||i>-1&&r>i||s>-1&&r>s)return!0;let o=-1;for(;++o<l.length;){const c=l[o];if(r===c.length&&n.slice(0,c.length)===c)return!0}return!1}function Ka(e,t){const a=Vi(t);t.data&&(e.data=Vt(t.data)),a&&(e.position=a)}function Qu(e,t){let a,l=-1;if(e)for(;++l<e.length;){const n=e[l],r=typeof n=="string"?n:n[0];if(r===t)return n;r==="data*"&&(a=n)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return a}function eE(e){return function(t){return Gg(t,e)}}function Ju(e,t){const a=String(e);if(typeof t!="string")throw new TypeError("Expected character");let l=0,n=a.indexOf(t);for(;n!==-1;)l++,n=a.indexOf(t,n+t.length);return l}const tE=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Zu={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function eo(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function aE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function lE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function to(e){return lE(e)||eo(e)}const nE=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function rr(e,t){const a=t||{},l=typeof a.additional=="string"?a.additional.charCodeAt(0):a.additional,n=[];let r=0,i=-1,s="",u,o;a.position&&("start"in a.position||"indent"in a.position?(o=a.position.indent,u=a.position.start):u=a.position);let c=(u?u.line:0)||1,d=(u?u.column:0)||1,h=y(),f;for(r--;++r<=e.length;)if(f===10&&(d=(o?o[i]:0)||1),f=e.charCodeAt(r),f===38){const v=e.charCodeAt(r+1);if(v===9||v===10||v===12||v===32||v===38||v===60||Number.isNaN(v)||l&&v===l){s+=String.fromCharCode(f),d++;continue}const m=r+1;let b=m,T=m,C;if(v===35){T=++b;const M=e.charCodeAt(T);M===88||M===120?(C="hexadecimal",T=++b):C="decimal"}else C="named";let A="",N="",k="";const S=C==="named"?to:C==="decimal"?eo:aE;for(T--;++T<=e.length;){const M=e.charCodeAt(T);if(!S(M))break;k+=String.fromCharCode(M),C==="named"&&tE.includes(k)&&(A=k,N=La(k))}let L=e.charCodeAt(T)===59;if(L){T++;const M=C==="named"?La(k):!1;M&&(A=k,N=M)}let D=1+T-m,F="";if(!(!L&&a.nonTerminated===!1))if(!k)C!=="named"&&E(4,D);else if(C==="named"){if(L&&!N)E(5,1);else if(A!==k&&(T=b+A.length,D=1+T-b,L=!1),!L){const M=A?1:3;if(a.attribute){const I=e.charCodeAt(T);I===61?(E(M,D),N=""):to(I)?N="":E(M,D)}else E(M,D)}F=N}else{L||E(2,D);let M=Number.parseInt(k,C==="hexadecimal"?16:10);if(rE(M))E(7,D),F="�";else if(M in Zu)E(6,D),F=Zu[M];else{let I="";iE(M)&&E(6,D),M>65535&&(M-=65536,I+=String.fromCharCode(M>>>10|55296),M=56320|M&1023),F=I+String.fromCharCode(M)}}if(F){g(),h=y(),r=T-1,d+=T-m+1,n.push(F);const M=y();M.offset++,a.reference&&a.reference.call(a.referenceContext||void 0,F,{start:h,end:M},e.slice(m-1,T)),h=M}else k=e.slice(m-1,T),s+=k,d+=k.length,r=T-1}else f===10&&(c++,i++,d=0),Number.isNaN(f)?g():(s+=String.fromCharCode(f),d++);return n.join("");function y(){return{line:c,column:d,offset:r+((u?u.offset:0)||0)}}function E(v,m){let b;a.warning&&(b=y(),b.column+=m,b.offset+=m,a.warning.call(a.warningContext||void 0,nE[v],b,v))}function g(){s&&(n.push(s),a.text&&a.text.call(a.textContext||void 0,s,{start:h,end:y()}),s="")}}function rE(e){return e>=55296&&e<=57343||e>1114111}function iE(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}const sE=/["&'<>`]/g,uE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,oE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,cE=/[|\\{}()[\]^$+*?.]/g,ao=new WeakMap;function dE(e,t){if(e=e.replace(t.subset?fE(t.subset):sE,l),t.subset||t.escapeOnly)return e;return e.replace(uE,a).replace(oE,l);function a(n,r,i){return t.format((n.charCodeAt(0)-55296)*1024+n.charCodeAt(1)-56320+65536,i.charCodeAt(r+2),t)}function l(n,r,i){return t.format(n.charCodeAt(0),i.charCodeAt(r+1),t)}}function fE(e){let t=ao.get(e);return t||(t=pE(e),ao.set(e,t)),t}function pE(e){const t=[];let a=-1;for(;++a<e.length;)t.push(e[a].replace(cE,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function hE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function bE(e,t){return dE(e,Object.assign({format:hE},t))}const mE={}.hasOwnProperty,vE={},lo=/^[^\t\n\r "#'.<=>`}]+$/,gE=/^[^\t\n\r "'<=>`}]+$/;function EE(){return{canContainEols:["textDirective"],enter:{directiveContainer:TE,directiveContainerAttributes:ur,directiveContainerLabel:SE,directiveLeaf:xE,directiveLeafAttributes:ur,directiveText:CE,directiveTextAttributes:ur},exit:{directiveContainer:hr,directiveContainerAttributeClassValue:cr,directiveContainerAttributeIdValue:or,directiveContainerAttributeName:fr,directiveContainerAttributeValue:dr,directiveContainerAttributes:pr,directiveContainerLabel:AE,directiveContainerName:sr,directiveLeaf:hr,directiveLeafAttributeClassValue:cr,directiveLeafAttributeIdValue:or,directiveLeafAttributeName:fr,directiveLeafAttributeValue:dr,directiveLeafAttributes:pr,directiveLeafName:sr,directiveText:hr,directiveTextAttributeClassValue:cr,directiveTextAttributeIdValue:or,directiveTextAttributeName:fr,directiveTextAttributeValue:dr,directiveTextAttributes:pr,directiveTextName:sr}}}function yE(e){const t=vE;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return a.peek=wE,{handlers:{containerDirective:a,leafDirective:a,textDirective:a},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
|
|
57
57
|
`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function a(r,i,s,u){const o=s.createTracker(u),c=kE(r),d=s.enter(r.type);let h=o.move(c+(r.name||"")),f;if(r.type==="containerDirective"){const y=(r.children||[])[0];f=no(y)?y:void 0}else f=r;if(f&&f.children&&f.children.length>0){const y=s.enter("label"),E=`${r.type}Label`,g=s.enter(E);h+=o.move("["),h+=o.move(s.containerPhrasing(f,{...o.current(),before:h,after:"]"})),h+=o.move("]"),g(),y()}if(h+=o.move(l(r,s)),r.type==="containerDirective"){const y=(r.children||[])[0];let E=r;no(y)&&(E=Object.assign({},r,{children:r.children.slice(1)})),E&&E.children&&E.children.length>0&&(h+=o.move(`
|
|
58
58
|
`),h+=o.move(s.containerFlow(E,o.current()))),h+=o.move(`
|
|
@@ -61,7 +61,7 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
61
61
|
`).trim():""}catch{z=U.trim()}}else{const U=(x.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
62
62
|
`);z=U.replace(/\n/g,"").trim().length>0?U:""}if(z)f.current.add(P);else if(f.current.has(P)){L.add(P);const U=x.getAttribute("data-node-type");U==="report-url"?L.add(`${P}__url`):U==="markdown-name"&&L.add(`${P}__name`)}})}const M=e.current.__tempVariableValues;if(M?(k=M,setTimeout(()=>{if(e.current){const I=e.current;I.__tempVariableValues===M&&delete I.__tempVariableValues}},100)):N||(e.current.querySelectorAll('[data-type="variable"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=G.getAttribute("data-report-url");if(O){const X=G.dataset.multiKey,W=X?`${X}::${Y}`:Y;S[W]={url:O,name:G.getAttribute("data-report-name")||G.innerText.replace(/\u200B/g,"").trim(),multiKey:X}}const R=()=>{if(G.dataset.variableRender==="antd-textarea"){const ee=(G.getAttribute("data-value")||"").trim();if(!ee)return"";try{return decodeURIComponent(ee).replace(/\r\n/g,`
|
|
63
63
|
`).trim()}catch{return ee.trim()}}const X=(G.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
64
|
-
`);return X.replace(/\n/g,"").trim().length>0?X:""},K=G.getAttribute("data-node-type");if(K==="report-url")if(O)k[`${Y}__url`]=O;else{const X=R().replace(/\n/g,"").trim();X&&(k[`${Y}__url`]=X)}else{const X=R();X&&(K==="markdown-name"?k[`${Y}__name`]=X:k[Y]=X)}}}),e.current.querySelectorAll('[data-type="select"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=G.value.replace(/[\u200B]/g,"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=G.getAttribute("data-node-type")||"",R=O==="report-module"||O==="markdown-module",K=R?(G.innerHTML||"").replace(/[\u200B]/g,"").trim():(G.textContent||"").replace(/[\u200B]/g,"").trim();if(R){const X=Number.parseInt(G.getAttribute("data-module-index")||"0",10);k[`${Y}__module_${Number.isFinite(X)?X:0}`]=K}else K&&(k[Y]=K)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.value||"").trim();O&&(k[Y]=O)}})),o&&Object.keys(o).length>0){const I={};N||Object.entries(o).forEach(([x,P])=>{if(!Array.isArray(P))return;let z=0;for(let V=0;V<P.length;V++)`${x}_${V}`in k&&z++;let U=-1;for(let V=0;V<P.length;V++)f.current.has(`${x}_${V}`)&&(U=V);if(U>=z&&z<P.length)for(let V=z;V<P.length;V++)L.add(`${x}_${V}`)}),Object.entries(o).forEach(([x,P])=>{mo(t,x)||(Array.isArray(P)?P.forEach((z,U)=>{z!=null&&String(z).trim()!==""&&(I[`${x}_${U}`]=String(z))}):P!=null&&String(P).trim()!==""&&(t.find(U=>U.key===x&&U.type==="report-url")?I[`${x}__url`]=String(P):I[x]=String(P)))}),Object.entries(I).forEach(([x,P])=>{const z=x in k,U=L.has(x),V=v.current[x]!==P;!U&&(!z||V)&&(k[x]=P)});for(const x of Object.keys(v.current))!(x in I)&&x in k&&delete k[x];v.current=I}if($1(e,t,a,l,k,n,s,u,c,d),g.current=b,h&&e.current)for(const[I,{name:x,url:P}]of Object.entries(h.current)){const z=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(!z)continue;const U=z.querySelector(".rte-report-dropdown-host");U&&(U.style.display="",U.style.visibility="",U.classList.remove("hidden"),U.classList.add("rte-report-dropdown-host-quiet"));const V=[document.createTextNode(x)];U&&V.push(U),z.setAttribute("data-report-url",P),z.setAttribute("data-report-name",x),z.removeAttribute("data-tooltip"),z.contentEditable="false",z.classList.add("rte-report-name-chip"),z.classList.remove("show-placeholder","rte-variable-with-icon"),z.replaceChildren(...V),Xl(z)}if(N&&(E.current=!1),setTimeout(()=>{if(aa(e),h?.current)for(const[I,x]of Object.entries(h.current))S[I]||(S[I]=x);if(Object.keys(S).length>0&&e.current)for(const[I,x]of Object.entries(S)){let P=null;if(x.multiKey){const V=I.split("::")[1];P=e.current.querySelector(`[data-type="variable"][data-multi-key="${x.multiKey}"][data-key="${V}"]`)}else P=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(!P)continue;const z=P.querySelector(".rte-report-dropdown-host");z&&(z.style.display="",z.style.visibility="",z.classList.remove("hidden"),z.classList.add("rte-report-dropdown-host-quiet"));const U=[document.createTextNode(x.name)];z&&U.push(z),P.classList.remove("show-placeholder","rte-variable-with-icon"),P.classList.add("rte-report-name-chip"),P.setAttribute("data-report-url",x.url),P.setAttribute("data-report-name",x.name),P.contentEditable="false",P.replaceChildren(...U),Xl(P)}ya(e,t,a,c)},0),r?.current){const{key:I,offset:x}=r.current;setTimeout(()=>{if(!e.current)return;const P=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(P){if(P.dataset.variableRender==="antd-textarea"){const z=P.querySelector("textarea");if(z){z.focus();try{const U=z.value?.length??0;z.setSelectionRange(Math.min(x,U),Math.min(x,U))}catch{}r.current=null;return}}try{const z=document.createRange(),U=document.createTreeWalker(P,NodeFilter.SHOW_TEXT,null);let V=0,_=null,G=0;for(;U.nextNode();){const Y=U.currentNode,O=Y.textContent?.length||0;if(V+O>=x){_=Y,G=x-V;break}V+=O}if(_){z.setStart(_,Math.min(G,_.textContent?.length||0)),z.collapse(!0);const Y=window.getSelection();Y&&(Y.removeAllRanges(),Y.addRange(z),P.focus())}else{z.selectNodeContents(P),z.collapse(!1);const Y=window.getSelection();Y&&(Y.removeAllRanges(),Y.addRange(z),P.focus())}}catch{const z=document.createRange();z.selectNodeContents(P),z.collapse(!1);const U=window.getSelection();U&&(U.removeAllRanges(),U.addRange(z),P.focus())}r.current=null}},0)}},[t,a,l,e,n,r,i,s,u,o,c,d]);w.useEffect(()=>{m()},[m])}function V1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=o=>typeof o=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(o):o.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(o.name||""),s=o=>{if(o.target?.closest(".rte-tutorial-btn"))return;const d=o.target?.closest(".upload-info-icon");if(d&&d.classList.contains("upload-info-icon")){const f=d.dataset.uploadKey;if(f){const y=d.closest('[data-type="upload"], [data-type="video-upload"]');l({key:f,anchorEl:y||d,type:"upload"})}return}const h=o.target?.closest('[data-type="upload"]');if(h){const f=h.dataset.key;if(f){const y=a[f];y&&i(y)&&l({key:f,anchorEl:h,type:"upload-preview"})}}},u=o=>{if(n)return;const c=o.relatedTarget;if(c?.closest?.(".rte-tooltip-overlay")||o.target?.closest(".rte-tutorial-btn"))return;const h=o.target?.closest(".upload-info-icon");if(h&&h.classList.contains("upload-info-icon")){const y=h.closest('[data-type="upload"], [data-type="video-upload"]');if(c&&y&&y.contains(c))return;if(!c||!r.contains(c))l(null);else{const E=c.closest('[data-type="upload"], [data-type="video-upload"]');(!E||E!==y)&&l(null)}return}const f=o.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(f){const y=c;if(y?.closest?.(".rte-tooltip-overlay")||y&&f.contains(y))return;l(null)}};return r.addEventListener("mouseover",s,!0),r.addEventListener("mouseout",u,!0),()=>{r.removeEventListener("mouseover",s,!0),r.removeEventListener("mouseout",u,!0)}},[t,a,e,l,n])}function G1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=c=>{if(l==="hideTagClose")return;const d=c.currentTarget,h=d.dataset.tooltip,f=d.dataset.tagKey||"";h&&a({key:f,anchorEl:d,type:"tag"})},s=c=>{n||c.relatedTarget?.closest?.(".rte-tooltip-overlay")||a(null)};let u;const o=()=>{r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.addEventListener("mouseenter",i),d.addEventListener("mouseleave",s)})};return u=requestAnimationFrame(()=>{u=requestAnimationFrame(o)}),()=>{cancelAnimationFrame(u),r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.removeEventListener("mouseenter",i),d.removeEventListener("mouseleave",s)})}},[t,e,a,l,n])}function Y1(e,t,a,l){w.useEffect(()=>{const n=e.current;if(!n)return;const r=s=>{if(s.target?.closest(".rte-report-dropdown-host"))return;const o=s.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const c=o.dataset.variableKey;c&&a({key:c,anchorEl:o,type:"variable"});return}},i=s=>{if(l)return;const u=s.target,o=s.relatedTarget;if(o?.closest?.(".rte-tooltip-overlay"))return;if(u?.closest?.(".variable-info-icon")){if(!o||!n.contains(o)){a(null);return}!!o.closest?.(".variable-info-icon")||a(null)}};return n.addEventListener("mouseover",r,!0),n.addEventListener("mouseout",i,!0),()=>{n.removeEventListener("mouseover",r,!0),n.removeEventListener("mouseout",i,!0)}},[t,e,a,l])}function W1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=d=>typeof d=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(d):d.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(d.name||""),s=d=>{const h=d.currentTarget,f=h.dataset.fileName,y=h.closest('[data-type="upload"]'),E=y?.dataset.key||"",g=E?a[E]:null;if(g&&i(g)){l({key:E,anchorEl:y||h,type:"upload-preview"});return}f&&l({key:E,anchorEl:y||h,type:"upload-label"})},u=d=>{n||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||l(null)};let o;const c=()=>{r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.addEventListener("mouseenter",s),h.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(c)}),()=>{cancelAnimationFrame(o),r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.removeEventListener("mouseenter",s),h.removeEventListener("mouseleave",u)})}},[t,a,e,l,n])}function j1(e,t,a,l,n,r,i,s){w.useEffect(()=>{const u=setTimeout(()=>{ya(e,t,a,n),Jl(e,t,a,l,n,{reportAnalyzeState:i,requireReportUrlAnalyze:s})},0);return()=>clearTimeout(u)},[a,t,e,l,n,r,i,s])}function K1(e,t){const a=w.useRef(0),l=w.useRef(0);w.useEffect(()=>{if(!e.current)return;let n=!1,r=0;const i=m=>m instanceof HTMLElement?!!(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker")||m.closest(".ant-picker-dropdown")):!1,s=m=>m instanceof HTMLElement?!!(m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown")):!1,u=m=>{n=!0,i(m.target)&&(a.current=Date.now()),s(m.target)&&(l.current=Date.now())},o=()=>{n=!1,r=Date.now()};let c=!1,d=0;const h=()=>{c=!0},f=()=>{c=!1,d=Date.now()},y=()=>{d=Date.now()},E=m=>{i(m.target)&&(a.current=Date.now()),s(m.target)&&(l.current=Date.now())},g=()=>{if(Date.now()-a.current<800||Date.now()-l.current<800)return;const m=document.activeElement;if(m&&(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker-dropdown")||m.tagName==="INPUT"&&m.closest(".ant-picker")||m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown"))||!e.current)return;const b=window.getSelection();if(!b||b.rangeCount===0||t.current||n||c||Date.now()-d<500)return;const T=b.getRangeAt(0);if(!T.collapsed)return e.current.contains(T.commonAncestorContainer),void 0;const C=b.anchorNode;if(!C||!e.current.contains(C))return;let A=!1,N=!1;if(C.nodeType===Node.ELEMENT_NODE){const S=C;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(N=!0)}else if(C.parentElement){const S=C.parentElement;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(N=!0)}if(A||N)return;let k=null;if(C.nodeType===Node.ELEMENT_NODE?k=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(k=C.parentElement.closest('[data-type="variable"]')),!k){if(Date.now()-r>500)return;const S=e.current.querySelectorAll('[data-type="variable"]');if(S.length>0){let L=null;for(const D of Array.from(S))if(D.style.display!=="none"){L=D;break}if(!L&&S.length>0&&(L=S[0]),L){const D=document.createRange();D.selectNodeContents(L),D.collapse(!1),b.removeAllRanges(),b.addRange(D),L.focus()}else b.removeAllRanges()}else b.removeAllRanges()}},v=e.current;return v&&(v.addEventListener("compositionstart",h),v.addEventListener("compositionend",f),v.addEventListener("input",y)),document.addEventListener("mousedown",u),document.addEventListener("mouseup",o),document.addEventListener("focusin",E),document.addEventListener("selectionchange",g),()=>{v&&(v.removeEventListener("compositionstart",h),v.removeEventListener("compositionend",f),v.removeEventListener("input",y)),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",o),document.removeEventListener("focusin",E),document.removeEventListener("selectionchange",g)}},[e,t])}var ql={exports:{}},X1=ql.exports,go;function Eo(){return go||(go=1,function(e,t){(function(a,l){e.exports=l()})(X1,function(){var a=1e3,l=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",o="day",c="week",d="month",h="quarter",f="year",y="date",E="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var x=["th","st","nd","rd"],P=I%100;return"["+I+(x[(P-20)%10]||x[P]||x[0])+"]"}},b=function(I,x,P){var z=String(I);return!z||z.length>=x?I:""+Array(x+1-z.length).join(P)+I},T={s:b,z:function(I){var x=-I.utcOffset(),P=Math.abs(x),z=Math.floor(P/60),U=P%60;return(x<=0?"+":"-")+b(z,2,"0")+":"+b(U,2,"0")},m:function I(x,P){if(x.date()<P.date())return-I(P,x);var z=12*(P.year()-x.year())+(P.month()-x.month()),U=x.clone().add(z,d),V=P-U<0,_=x.clone().add(z+(V?-1:1),d);return+(-(z+(P-U)/(V?U-_:_-U))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:d,y:f,w:c,d:o,D:y,h:u,m:s,s:i,ms:r,Q:h}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},C="en",A={};A[C]=m;var N="$isDayjsObject",k=function(I){return I instanceof F||!(!I||!I[N])},S=function I(x,P,z){var U;if(!x)return C;if(typeof x=="string"){var V=x.toLowerCase();A[V]&&(U=V),P&&(A[V]=P,U=V);var _=x.split("-");if(!U&&_.length>1)return I(_[0])}else{var G=x.name;A[G]=x,U=G}return!z&&U&&(C=U),U||!z&&C},L=function(I,x){if(k(I))return I.clone();var P=typeof x=="object"?x:{};return P.date=I,P.args=arguments,new F(P)},D=T;D.l=S,D.i=k,D.w=function(I,x){return L(I,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var F=function(){function I(P){this.$L=S(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[N]=!0}var x=I.prototype;return x.parse=function(P){this.$d=function(z){var U=z.date,V=z.utc;if(U===null)return new Date(NaN);if(D.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var _=U.match(g);if(_){var G=_[2]-1||0,Y=(_[7]||"0").substring(0,3);return V?new Date(Date.UTC(_[1],G,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)):new Date(_[1],G,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)}}return new Date(U)}(P),this.init()},x.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},x.$utils=function(){return D},x.isValid=function(){return this.$d.toString()!==E},x.isSame=function(P,z){var U=L(P);return this.startOf(z)<=U&&U<=this.endOf(z)},x.isAfter=function(P,z){return L(P)<this.startOf(z)},x.isBefore=function(P,z){return this.endOf(z)<L(P)},x.$g=function(P,z,U){return D.u(P)?this[z]:this.set(U,P)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(P,z){var U=this,V=!!D.u(z)||z,_=D.p(P),G=function(ie,ce){var me=D.w(U.$u?Date.UTC(U.$y,ce,ie):new Date(U.$y,ce,ie),U);return V?me:me.endOf(o)},Y=function(ie,ce){return D.w(U.toDate()[ie].apply(U.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ce)),U)},O=this.$W,R=this.$M,K=this.$D,X="set"+(this.$u?"UTC":"");switch(_){case f:return V?G(1,0):G(31,11);case d:return V?G(1,R):G(0,R+1);case c:var W=this.$locale().weekStart||0,ee=(O<W?O+7:O)-W;return G(V?K-ee:K+(6-ee),R);case o:case y:return Y(X+"Hours",0);case u:return Y(X+"Minutes",1);case s:return Y(X+"Seconds",2);case i:return Y(X+"Milliseconds",3);default:return this.clone()}},x.endOf=function(P){return this.startOf(P,!1)},x.$set=function(P,z){var U,V=D.p(P),_="set"+(this.$u?"UTC":""),G=(U={},U[o]=_+"Date",U[y]=_+"Date",U[d]=_+"Month",U[f]=_+"FullYear",U[u]=_+"Hours",U[s]=_+"Minutes",U[i]=_+"Seconds",U[r]=_+"Milliseconds",U)[V],Y=V===o?this.$D+(z-this.$W):z;if(V===d||V===f){var O=this.clone().set(y,1);O.$d[G](Y),O.init(),this.$d=O.set(y,Math.min(this.$D,O.daysInMonth())).$d}else G&&this.$d[G](Y);return this.init(),this},x.set=function(P,z){return this.clone().$set(P,z)},x.get=function(P){return this[D.p(P)]()},x.add=function(P,z){var U,V=this;P=Number(P);var _=D.p(z),G=function(R){var K=L(V);return D.w(K.date(K.date()+Math.round(R*P)),V)};if(_===d)return this.set(d,this.$M+P);if(_===f)return this.set(f,this.$y+P);if(_===o)return G(1);if(_===c)return G(7);var Y=(U={},U[s]=l,U[u]=n,U[i]=a,U)[_]||1,O=this.$d.getTime()+P*Y;return D.w(O,this)},x.subtract=function(P,z){return this.add(-1*P,z)},x.format=function(P){var z=this,U=this.$locale();if(!this.isValid())return U.invalidDate||E;var V=P||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),G=this.$H,Y=this.$m,O=this.$M,R=U.weekdays,K=U.months,X=U.meridiem,W=function(ce,me,Pe,Ne){return ce&&(ce[me]||ce(z,V))||Pe[me].slice(0,Ne)},ee=function(ce){return D.s(G%12||12,ce,"0")},ie=X||function(ce,me,Pe){var Ne=ce<12?"AM":"PM";return Pe?Ne.toLowerCase():Ne};return V.replace(v,function(ce,me){return me||function(Pe){switch(Pe){case"YY":return String(z.$y).slice(-2);case"YYYY":return D.s(z.$y,4,"0");case"M":return O+1;case"MM":return D.s(O+1,2,"0");case"MMM":return W(U.monthsShort,O,K,3);case"MMMM":return W(K,O);case"D":return z.$D;case"DD":return D.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return W(U.weekdaysMin,z.$W,R,2);case"ddd":return W(U.weekdaysShort,z.$W,R,3);case"dddd":return R[z.$W];case"H":return String(G);case"HH":return D.s(G,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ie(G,Y,!0);case"A":return ie(G,Y,!1);case"m":return String(Y);case"mm":return D.s(Y,2,"0");case"s":return String(z.$s);case"ss":return D.s(z.$s,2,"0");case"SSS":return D.s(z.$ms,3,"0");case"Z":return _}return null}(ce)||_.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(P,z,U){var V,_=this,G=D.p(z),Y=L(P),O=(Y.utcOffset()-this.utcOffset())*l,R=this-Y,K=function(){return D.m(_,Y)};switch(G){case f:V=K()/12;break;case d:V=K();break;case h:V=K()/3;break;case c:V=(R-O)/6048e5;break;case o:V=(R-O)/864e5;break;case u:V=R/n;break;case s:V=R/l;break;case i:V=R/a;break;default:V=R}return U?V:D.a(V)},x.daysInMonth=function(){return this.endOf(d).$D},x.$locale=function(){return A[this.$L]},x.locale=function(P,z){if(!P)return this.$L;var U=this.clone(),V=S(P,z,!0);return V&&(U.$L=V),U},x.clone=function(){return D.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},I}(),M=F.prototype;return L.prototype=M,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",o],["$M",d],["$y",f],["$D",y]].forEach(function(I){M[I[1]]=function(x){return this.$g(x,I[0],I[1])}}),L.extend=function(I,x){return I.$i||(I(x,F,L),I.$i=!0),L},L.locale=S,L.isDayjs=k,L.unix=function(I){return L(1e3*I)},L.en=A[C],L.Ls=A,L.p={},L})}(ql)),ql.exports}var Q1=Eo();const zl=mn(Q1);var Vl={exports:{}},J1=Vl.exports,yo;function Z1(){return yo||(yo=1,function(e,t){(function(a,l){e.exports=l(Eo())})(J1,function(a){function l(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var n=l(a),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(i,s){return s==="W"?i+"周":i+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(i,s){var u=100*i+s;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r})}(Vl)),Vl.exports}Z1();function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function ey(e,t){if(Xa(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var l=a.call(e,t);if(Xa(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ty(e){var t=ey(e,"string");return Xa(t)=="symbol"?t:t+""}function ay(e,t,a){return(t=ty(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function To(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function xo(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?To(Object(a),!0).forEach(function(l){ay(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):To(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}var ly={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},ny=xo(xo({},ly),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const ry={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Co={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},ny),timePickerLocale:Object.assign({},ry)};Co.lang.ok="确定",zl.locale("zh-cn");const{RangePicker:iy}=Ee.DatePicker,sy=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.value,n=e.dataset.placeholder,r=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,i=e.dataset.disableFuture==="true",[s,u]=w.useState(()=>{if(!l)return null;const E=l.split(",");return E.length===2&&E[0]&&E[1]?[zl(E[0]),zl(E[1])]:null}),[o,c]=w.useState(null),d=E=>E?i&&E.isAfter(zl(),"day")?!0:!r||!o||!o[0]?!1:Math.abs(E.diff(o[0],"days"))>r:!1,h=E=>{c(E)},f=E=>{if(u(E),c(null),E&&E[0]&&E[1]){const g=`${E[0].format("YYYY-MM-DD")},${E[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",g),t(a,g)}else e.setAttribute("data-value",""),t(a,"")},y=E=>{c(E?s:null)};return dt.createPortal($.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:$.jsx(iy,{value:s,disabledDate:d,onCalendarChange:h,onChange:f,onOpenChange:y,placeholder:[n||"开始日期",n||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:Co,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},uy=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-datepicker-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(sy,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`datepicker-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},So=({config:e,onSend:t,isProcessing:a=!1,disabled:l=!1,width:n,lockStructure:r=!1,agentOptions:i=[],onAgentSelect:s,onAgentExit:u,loading:o=!1,placeholder:c,border:d,background:h="transparent",hideButtons:f,maxHeight:y,minHeight:E,editorMinHeight:g,editorPadding:v,footerPadding:m,collapsed:b=!1,reportAnalyze:T,markdownAnalyze:C,markdownNameAnalyze:A,onCollapsedChange:N,collapseTransitionMs:k=260,debugTooltipSticky:S=!1,nodeValues:L,onFilesChange:D,onFooterFilesChange:F,showFooterUpload:M=!0,footerFiles:I,videoUrlParse:x,videoUpload:P,reportListFetch:z,onReportGoGenerate:U,onViewReport:V,hideCurrentSessionReport:_,reportNameResolve:G})=>{const[Y,O]=Ee.message.useMessage(),R=w.useRef(null),K=w.useRef(null),X=w.useRef(null),W=w.useRef(null),ee=w.useRef(null),ie=w.useRef(null),[ce,me]=w.useState(!1),Pe=w.useRef("");if(!Pe.current){const Q=Math.random().toString(36).slice(2,8);Pe.current=`rte_${Q}`}const[Ne,ct]=w.useState({});w.useEffect(()=>{D?.(Ne)},[Ne,D]);const[Ve,Ge]=w.useState([]),Qe=w.useRef(!1);w.useEffect(()=>{if(!I)return;if(!(I.length===Ve.length&&I.every((se,re)=>{const he=Ve[re];return he&&se.name===he.name&&se.size===he.size&&se.lastModified===he.lastModified})))if(I.reduce((he,be)=>he+be.size,0)>52428800){const he=[];let be=0;for(const ue of I){if(be+ue.size>52428800)break;he.push(ue),be+=ue.size}Y.error("文件总大小不能超过 50MB"),Ge(he)}else Qe.current=!0,Ge(I)},[I]),w.useEffect(()=>{if(Qe.current){Qe.current=!1;return}F?.(Ve)},[Ve,F]);const[Kt,yt]=w.useState(null),[wt,Ft]=w.useState(null),[Za,ke]=w.useState(null),[Be,el]=w.useState({}),[Z,ne]=w.useState(""),[ge,Te]=w.useState(!1),_e=w.useRef(null),Je=w.useRef(null),{tooltipPortal:kt,setPopoverVisible:Ke,openStepsPreview:Ht,stepsPreviewPortal:Xt}=a1({config:e,files:Ne,debugTooltipSticky:S,videoState:Be}),{handleFileChange:Ze,handleRemoveFile:$t}=Dc({config:e,messageApi:Y,activeBatchKey:wt,activeFileKey:Kt,activeBatchStartIndex:Za,setActiveFileKey:yt,setActiveBatchKey:Ft,setActiveBatchStartIndex:ke,setFiles:ct}),lt=w.useRef(null),[Do,xy]=w.useState({showLeft:!1,showRight:!1}),tl=w.useCallback(()=>{const Q=lt.current;Q&&xy({showLeft:Q.scrollLeft>0,showRight:Q.scrollLeft+Q.clientWidth<Q.scrollWidth-1})},[]),Cy=w.useCallback(Q=>{if(!Q.target.files||Q.target.files.length===0)return;const se=10*1024*1024,re=50*1024*1024,he=ue=>ue.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(ue.name||""),be=Array.from(Q.target.files).filter(ue=>he(ue)&&ue.size>se?(Y.error("图片大小不能超过 10MB"),!1):!0);Ge(ue=>{const Le=ue.reduce((ve,Ie)=>ve+Ie.size,0),de=[];let pe=Le;for(const ve of be){if(pe+ve.size>re){Y.error("文件总大小不能超过 50MB");break}de.push(ve),pe+=ve.size}return de.length>0?[...ue,...de]:ue}),Q.target.value="",setTimeout(tl,0)},[Y,tl]),Sy=w.useCallback(Q=>{Ge(se=>se.filter((re,he)=>he!==Q)),setTimeout(tl,0)},[tl]),Ay=w.useCallback(()=>{const Q=lt.current;Q&&Q.scrollBy({left:200,behavior:"smooth"})},[]),wy=w.useCallback(()=>{const Q=lt.current;Q&&Q.scrollBy({left:-200,behavior:"smooth"})},[]),Po=w.useCallback(()=>{l||me(!0)},[l]);w.useEffect(()=>{l&&me(!1)},[l]),w.useEffect(()=>{const Q=he=>he instanceof Element?!!he.closest([".rte-agent-dropdown",".rte-report-dropdown-overlay",".rte-tooltip-overlay",".ant-picker-dropdown",".ant-select-dropdown",".ant-image-preview-root"].join(",")):!1,se=he=>{const be=R.current,ue=he.target;be&&(ue instanceof Node&&be.contains(ue)||Q(ue)||me(!1))},re=he=>{const be=R.current,ue=he.target;if(be){if(ue instanceof Node&&be.contains(ue)){l||me(!0);return}Q(ue)||me(!1)}};return document.addEventListener("mousedown",se,!0),document.addEventListener("focusin",re,!0),()=>{document.removeEventListener("mousedown",se,!0),document.removeEventListener("focusin",re,!0)}},[l]);const Ar=w.useRef(!1),ky=w.useRef(null),{handleMouseDown:_y,handleMouseMove:Ny,handleMouseUp:Iy,handleDoubleClick:Ly}=Xc({lockStructure:r,onAgentExit:u,editorRef:W,setPopoverVisible:Ke,isDraggingRef:Ar,mouseDownPosRef:ky}),[Mo,Gl]=w.useState(!1),wr=w.useRef(null),[Bo,Fo]=w.useState(!0),Oy=w.useRef(0),[Ho,Dy]=w.useState(58),[Py,My]=w.useState(58),[kr,By]=w.useState(!1),[Fy,Hy]=w.useState(!1),[al,_r]=w.useState(null),ll=w.useRef(!1),nl=w.useRef(!1),Tt=w.useRef(null),[ga,rl]=w.useState({}),Rt=w.useRef(()=>{}),Qt=w.useRef({}),Nr=w.useRef(!1),Yl=w.useRef(null),il=w.useCallback(()=>{Nr.current=!0,Yl.current!==null&&window.clearTimeout(Yl.current),Yl.current=window.setTimeout(()=>{Nr.current=!1,Yl.current=null},50)},[]),[Jt,Wl]=w.useState({}),$o=w.useRef(()=>{}),$y=w.useRef({}),Ir=w.useRef(Jt);w.useEffect(()=>{Ir.current=Jt},[Jt]);const[Zt,Lr]=w.useState({}),Ro=w.useRef(()=>{}),Uo=w.useRef(Zt);w.useEffect(()=>{Uo.current=Zt},[Zt]);const[xt,sl]=w.useState(()=>{const Q={};return e.forEach(se=>{Ye(se.type)&&se.key&&(Q[se.key]=1)}),Q});Rc({config:e,editorRef:W,files:Ne,setFiles:ct,multiVariableCounts:xt,setMultiVariableCounts:sl,reportAnalyzeState:ga,setReportAnalyzeState:rl,markdownAnalyzeState:Jt,setMarkdownAnalyzeState:Wl,markdownNameAnalyzeState:Zt,setMarkdownNameAnalyzeState:Lr,nodeValues:L,resolvedReportNamesRef:Qt});const qo=w.useRef(L);if(L!==qo.current&&(qo.current=L,L)){const Q={};let se=!1;e.forEach(re=>{if(Ye(re.type)&&re.key){const he=L[re.key],be=Array.isArray(he)?he.filter(ue=>String(ue??"").trim().length>0):he;if(Array.isArray(be)&&be.length>0){const ue=re.maxCount??9,Le=Math.min(be.length+1,ue);xt[re.key]!==Le&&(Q[re.key]=Le,se=!0)}}}),se&&(il(),sl(re=>({...re,...Q})))}const De=Gc({config:e,reportAnalyzeState:ga,markdownAnalyzeState:Jt,markdownNameAnalyzeState:Zt}),jl=w.useRef(()=>{}),{handleReportUrlBlur:Ry,handleMarkdownBlur:Uy,handleMarkdownNameBlur:qy,handleMultiVariableNameResolve:zo}=qc({reportAnalyze:T,markdownAnalyze:C,markdownNameAnalyze:A,reportAnalyzeState:ga,setReportAnalyzeState:rl,markdownAnalyzeState:Jt,setMarkdownAnalyzeState:Wl,markdownNameAnalyzeState:Zt,setMarkdownNameAnalyzeState:Lr,editorRef:W,reportAnalyzeRef:Rt,markdownAnalyzeRef:$o,markdownNameAnalyzeRef:Ro,markdownAnalyzeStateRef:Ir,markdownNameAnalyzeStateRef:Uo,reportNameResolve:G,applyReportNameChipRef:jl});Ec(W,Ry,[De]),kc(W,qy,[De]),_c(W,Uy,[De]),w.useEffect(()=>{const Q=W.current;if(!Q||!G)return;const se=re=>{const he=re.target;if(!he)return;const be=he.closest?.('[data-type="variable"][data-multi-key]');if(!be)return;const ue=be.dataset.key;if(!ue)return;const Le=wr.current?.key===ue;if(Nr.current&&(Le||!Q.contains(be)))return;const de=Q.contains(be)?be:Q.querySelector(`[data-type="variable"][data-key="${ue}"]`);if(!de||de.getAttribute("data-report-url"))return;const pe=(de.innerText||"").replace(/[\u200B\n]/g,"").trim(),ve=de.dataset.multiKey,Ae=(ve?De.find(Fe=>Ye(Fe.type)&&Fe.key===ve):void 0)?.type==="multi-variable-select"?"multi-variable-select":"multi-variable";zo(ue,pe,Ae)};return Q.addEventListener("focusout",se),()=>Q.removeEventListener("focusout",se)},[W,zo,De,G]),gc(W,[De]),w.useEffect(()=>{const Q=W.current;if(!Q)return;const se=re=>{const he=re.target?.closest?.(".rte-tutorial-btn");if(!he)return;re.preventDefault(),re.stopPropagation();const be=he.dataset.tooltip;be&&Ht(be)};return Q.addEventListener("click",se,!0),()=>Q.removeEventListener("click",se,!0)},[Ht]),jl.current=(Q,se,re,he)=>{const be=W.current;if(!be)return;let ue=be.querySelector(`[data-type="variable"][data-key="${Q}"]`);if(ue&&!document.body.contains(ue)){const pe=document.querySelectorAll(`.rte-editor [data-type="variable"][data-key="${Q}"]`);let ve=null;pe.forEach(Ie=>{!ve&&document.body.contains(Ie)&&(ve=Ie)}),ue=ve}if(!ue){Qt.current[Q]={name:se,url:re};return}if(ue.getAttribute("data-report-url")===re){Qt.current[Q]={name:se,url:re};return}if(!he?.forceApply){const pe=ue.getAttribute("data-report-url"),ve=(ue.innerText||"").replace(/[\u200B\n]/g,"").trim();if(!(!pe&&ve==="")&&!(pe===re||ve===re))return}Qt.current[Q]={name:se,url:re};const Le=ue.querySelector(".rte-report-dropdown-host");Le&&(Le.style.display="",Le.style.visibility="",Le.classList.remove("hidden"),Le.classList.add("rte-report-dropdown-host-quiet"));const de=[document.createTextNode(se)];Le&&de.push(Le),ue.classList.remove("show-placeholder","rte-variable-with-icon"),ue.classList.add("rte-report-name-chip"),ue.setAttribute("data-report-url",re),ue.setAttribute("data-report-name",se),ue.contentEditable="false",ue.replaceChildren(...de),Xl(ue),document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:{key:Q}})),setTimeout(()=>{Pr.current()},0)};const zy=w.useCallback((Q,se,re)=>{W.current&&(se==="report-url"?(jl.current(Q,re.name,re.url,{forceApply:!0}),setTimeout(()=>{Rt.current(Q,re.url)},0)):(se==="multi-variable"||se==="multi-variable-select")&&(jl.current(Q,re.name,re.url,{forceApply:!0}),se==="multi-variable-select"&&setTimeout(()=>{Rt.current(Q,re.url)},0)))},[W,Rt]),Vy=De.map(Q=>`${Q.type}:${Q.key??""}:${Q.placeholder??""}`).join("|"),Gy=Cc(W,z,zy,U,V,`${Vy}::${JSON.stringify(xt)}`,_);z1(W,De,Ne,r,xt,wr,void 0,f,void 0,L,Be,!!z,Qt);const Or=w.useRef(new Set),Vo=w.useRef(De),Go=w.useRef(L);(Vo.current!==De||Go.current!==L)&&(Vo.current=De,Go.current=L,Or.current=new Set),w.useEffect(()=>{if(!L||!De||De.length===0)return;const Q=De.filter(de=>de.type==="upload"&&de.key);if(Q.length===0)return;const se={},re=new Set,he=(de,pe)=>{if(pe)if(pe instanceof File){if(fl(pe)){re.add(de);return}se[de]=pe}else typeof pe=="string"&&pe.trim()&&(se[de]=pe.trim())};for(const de of Q){const pe=de.key;if(Or.current.has(pe))continue;const ve=L[pe],Ie=typeof de.maxCount=="number"&&de.maxCount>1;if(Array.isArray(ve)&&ve.length>0){Ie?ve.forEach((Ae,Fe)=>he(`${pe}-${Fe}`,Ae)):he(pe,ve[0]);continue}if(ve&&!Array.isArray(ve)){he(pe,ve);continue}if(Ie)for(let Ae=0;Ae<de.maxCount;Ae++){const Fe=`${pe}-${Ae}`,pt=L[Fe];pt&&he(Fe,pt)}}for(const de of Q){const pe=de.key;if(!(typeof de.maxCount=="number"&&de.maxCount>1))continue;const Ie=[];for(let Ae=0;Ae<de.maxCount;Ae++){const Fe=`${pe}-${Ae}`,pt=se[Fe];pt!=null&&Ie.push(pt),delete se[Fe]}Ie.forEach((Ae,Fe)=>{se[`${pe}-${Fe}`]=Ae})}if(Object.keys(se).length===0&&re.size===0)return;for(const de of Q){const pe=de.key,ve=Object.prototype.hasOwnProperty.call(se,pe)||Object.keys(se).some(Ae=>Ae.startsWith(`${pe}-`)),Ie=re.has(pe)||Array.from(re).some(Ae=>Ae.startsWith(`${pe}-`));(L[pe]!==void 0||ve||Ie)&&Or.current.add(pe)}ct(de=>{const pe={...de};let ve=!1;for(const Ie of Q){const Ae=Ie.key;if(L[Ae]===void 0)continue;if(typeof Ie.maxCount=="number"&&Ie.maxCount>1)for(let pt=0;pt<Ie.maxCount;pt++){const ta=`${Ae}-${pt}`;Object.prototype.hasOwnProperty.call(se,ta)||(re.has(ta)?de[ta]!==null&&(pe[ta]=null,ve=!0):!se[ta]&&de[ta]&&(pe[ta]=null,ve=!0))}else re.has(Ae)&&de[Ae]!==null&&(pe[Ae]=null,ve=!0)}for(const[Ie,Ae]of Object.entries(se))de[Ie]!==Ae&&(pe[Ie]=Ae,ve=!0);return ve?pe:de});const be=Object.entries(se).filter(([,de])=>typeof de=="string");if(be.length===0)return;const ue=async de=>{const pe=de.split("/").pop()?.split("?")[0]||"file",ve=decodeURIComponent(pe),Ie=async Ae=>{const Fe=await Ae.blob();return new File([Fe],ve,{type:Fe.type||"application/octet-stream"})};try{const Ae=`/api/image-proxy?url=${encodeURIComponent(de)}`,Fe=await fetch(Ae);if(Fe.ok)return Ie(Fe)}catch{}return null};let Le=!1;return Promise.all(be.map(async([de,pe])=>{const ve=await ue(pe);return ve&&fl(ve)?null:ve?{key:de,file:ve}:null})).then(de=>{if(Le)return;const pe={};for(const ve of de)ve&&(pe[ve.key]=ve.file);Object.keys(pe).length>0&&ct(ve=>{const Ie={...ve};let Ae=!1;for(const[Fe,pt]of Object.entries(pe))typeof Ie[Fe]=="string"&&(Ie[Fe]=pt,Ae=!0);return Ae?Ie:ve})}),()=>{Le=!0}},[L,De]);const ul=w.useRef(new Map),Yo=w.useRef(""),Wo=((e||[]).find(Q=>Q.type==="tag")?.text||"")+"||"+(e||[]).filter(Q=>Q.key&&Q.type!=="report-module"&&Q.type!=="markdown-module").map(Q=>`${Q.type}:${Q.key}`).join("|");Yo.current!==Wo&&(Yo.current=Wo,ul.current=new Map),w.useEffect(()=>{if(!L||!e||e.length===0)return;const Q=e.filter(re=>re.type==="report-url"&&re.key),se=e.filter(re=>re.type==="multi-variable-select"&&re.key);if(!(Q.length===0&&se.length===0)){for(const re of Q){const he=re.key,be=L[he]??L[`${he}__url`];if(!be||typeof be=="string"&&!be.trim())continue;const ue=Array.isArray(be)?String(be[0]??""):String(be);ue&&ul.current.get(he)!==ue&&(ul.current.set(he,ue),setTimeout(()=>{Rt.current(he,ue)},100))}for(const re of se){const he=re.key,be=L[he];!Array.isArray(be)||be.length===0||be.forEach((ue,Le)=>{const de=typeof ue=="string"?ue.trim():"";if(!de)return;const pe=`${he}_${Le}`;ul.current.get(pe)!==de&&(ul.current.set(pe,de),setTimeout(()=>{Rt.current(pe,de)},100))})}}},[L,e,Rt]),vc(W),V1(W,De,Ne,Ke,S),G1(W,De,Ke,f,S),W1(W,De,Ne,Ke,S),Y1(W,De,Ke,S);const Dr=!!T;j1(W,De,Ne,Gl,Be,L,ga,Dr),Fc(W,x,Be,el,[De]);const Yy=Hc(P,el,W);$c(W,Be,Ke,S),K1(W,Ar);const jo=rc(W),Wy=sc(W),jy=oc(W),Ko=hc(W);w.useEffect(()=>{if(!W.current)return;W.current.querySelectorAll(".rte-richtext-toggle").forEach(se=>{const re=se.getAttribute("data-expanded")==="true";se.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[De,W]);const Xo=uy(W),{measureExpandedContentHeight:ol}=zc({collapsed:b,collapseTransitionMs:k,contentRef:K,contentBodyRef:X,editorRef:W,debugIdRef:Pe,setCollapsedContentMaxHeightPx:Dy,setExpandedContentMaxHeightPx:My,setIsCollapseAnimating:By,effectiveConfig:De,files:Ne,multiVariableCounts:xt,selectPortalsLength:jo.length,datePickerPortalsLength:Xo.length,variablePortalsLength:Ko.length}),Ky=()=>{if(b)return;const Q=X.current;if(!Q)return;const se=Math.ceil(Q.getBoundingClientRect().height||0);se>0&&_r(se),ll.current=!0,nl.current=!1,Tt.current&&(window.clearTimeout(Tt.current),Tt.current=null)};w.useEffect(()=>{const Q=()=>{ll.current&&(nl.current=!0,Tt.current&&window.clearTimeout(Tt.current),Tt.current=window.setTimeout(()=>{Tt.current=null,ll.current=!1,nl.current=!1,_r(null),window.requestAnimationFrame(()=>ol())},450))};return window.addEventListener("focus",Q),()=>window.removeEventListener("focus",Q)},[ol]),w.useEffect(()=>{!ll.current||!nl.current||(Tt.current&&(window.clearTimeout(Tt.current),Tt.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{_r(null),ol(),ll.current=!1,nl.current=!1})}))},[Ne,ol]),Vc({config:e,editorRef:W,setIsEmpty:Fo,setIsFormValid:Gl});const Xy=Wc({disabled:l,collapsed:b,onCollapsedChange:N,config:e,lockStructure:r,editorRef:W,containerRef:R,fileInputRef:ee,onBeforeFilePickerOpen:Ky,files:Ne,setFiles:ct,handleRemoveFile:$t,setActiveBatchKey:Ft,setActiveBatchStartIndex:ke,setActiveFileKey:yt,isDraggingRef:Ar,richtextPrevScrollTopRef:Oy,videoState:Be,setVideoState:el,videoFileInputRef:_e,activeVideoKeyRef:Je,onImagePreview:Q=>{ne(Q),Te(!0)}}),cl=jc({config:e,editorRef:W,setIsEmpty:Fo,setIsFormValid:Gl,setReportAnalyzeState:rl,setMarkdownAnalyzeState:Wl,setMarkdownNameAnalyzeState:Lr,collapsed:b,measureExpandedContentHeight:ol,effectiveConfig:De,files:Ne,multiVariableCounts:xt,setMultiVariableCounts:sl,savedCursorRef:wr,videoState:Be,resolvedReportNamesRef:Qt,reportAnalyzeState:ga,requireReportUrlAnalyze:Dr}),Pr=w.useRef(cl);Pr.current=cl;const Qy=Qc({disabled:l,config:e,multiVariableCounts:xt,setMultiVariableCounts:sl,editorRef:W,handleInput:cl,markdownAnalyzeRef:$o,reportAnalyzeRef:Rt,markdownNameAnalyzeRef:Ro,markdownAnalyzeStateRef:Ir,markdownRawTextRef:$y,setMarkdownAnalyzeState:Wl,setFooterFiles:Ge,footerFiles:Ve,messageApi:Y,onPasteUnsupported:()=>Y.warning("暂不支持上传该文件类型")});Yc({config:e,effectiveConfig:De,files:Ne,editorRef:W,setIsFormValid:Gl,multiVariableCounts:xt,setMultiVariableCounts:sl,videoState:Be,reportAnalyzeState:ga,requireReportUrlAnalyze:Dr});const Mr=w.useCallback((Q,se)=>{delete Qt.current[Q],Ea({keys:[Q]}),se==="report-url"&&rl(re=>({...re,[Q]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}))},[rl]),Jy=w.useCallback(Q=>{il();const{nodeKey:se,nodeType:re}=wc(Q);Mr(se,re),Q.focus(),Pr.current()},[Mr,il]),Zy=Ac(W,Jy,xt),Qo=Jc({config:e,files:Ne,footerFiles:Ve,onFooterFilesClear:()=>Ge([]),onSend:t,isProcessing:a,disabled:l,loading:o,isFormValid:Mo,editorRef:W,markdownAnalyzeState:Jt,markdownNameAnalyzeState:Zt,videoState:Be}),eT=Kc({disabled:l,lockStructure:r,config:e,editorRef:W,handleInput:cl,onEnterSend:Qo,onReportChipDeleted:Mr}),tT={...n?{width:typeof n=="number"?`${n}px`:n}:{},...d?{border:d}:{},...h?{background:h}:{},...y?{maxHeight:typeof y=="number"?`${y}px`:y}:{},...E&&!b?{minHeight:typeof E=="number"?`${E}px`:E}:{},...Ve.length>0?{minHeight:"220px"}:{},...y?{"--rte-richtext-fullscreen-height":typeof y=="number"?`${y}px`:y}:{},...g?{"--rte-editor-min-height":typeof g=="number"?`${g}px`:g}:{},...v?{"--rte-editor-padding":v}:{},...m?{"--rte-footer-padding":m}:{}},aT=typeof k=="number"&&Number.isFinite(k)&&k>=0?k:260,lT={overflow:"hidden"},Jo=al!=null?`${al}px`:b?`${Ho}px`:`${Math.max(Py,Ho)}px`,nT=e.length===0&&Bo&&!b,rT=al!=null||b||kr||nT?"hidden":Fy?"auto":"hidden",Zo=w.useRef(b),ec=Zo.current!==b;ec&&(Zo.current=b);const iT=al!=null?"none":ec||kr?`max-height ${aT}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none";w.useLayoutEffect(()=>{const Q=X.current;if(!Q)return;const se=Q.scrollHeight>Q.clientHeight+1;Hy(re=>re===se?re:se)},[Jo,b,kr,al,De,Ne,xt,Ve.length]);const sT={maxHeight:Jo,minHeight:b?0:void 0,overflow:rT,overscrollBehavior:ce?"contain":"auto",transition:iT,willChange:"max-height"},tc=e.find(Q=>Q.type==="tag"),ea=tc?.text?i.find(Q=>Q.label===tc.text):void 0;return $.jsxs("div",{className:`rich-text-editor ${ce?"rte-editor-selected":""}`,style:tT,"data-disabled":l,ref:R,onMouseDownCapture:Po,onFocusCapture:Po,children:[O,$.jsxs("div",{className:"rich-text-editor-content",ref:K,style:lT,onMouseDown:Q=>{if(e.length!==0)return;const se=Q.target,re=W.current;if(!re||re.contains(se)||se.closest('button, input, a, svg, [role="button"], .rte-footer-files-wrapper'))return;if(Q.preventDefault(),re.childNodes.length===0){re.appendChild(document.createElement("br")),re.focus();const Le=document.createRange();Le.setStart(re,0),Le.collapse(!0);const de=window.getSelection();de?.removeAllRanges(),de?.addRange(Le);return}const be=window.getSelection(),ue=!!be&&be.rangeCount>0&&re.contains(be.anchorNode);if(re.focus(),!ue){const Le=document.createRange();Le.selectNodeContents(re),Le.collapse(!1);const de=window.getSelection();de?.removeAllRanges(),de?.addRange(Le)}},children:[Ve.length>0&&$.jsxs("div",{className:"rte-footer-files-wrapper",children:[Do.showLeft&&$.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-left",children:$.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-left",onClick:wy,children:$.jsx("svg",{style:{width:"16px",height:"16px",transform:"rotate(180deg)"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})}),$.jsx("div",{className:"rte-footer-files-list",ref:lt,onScroll:tl,children:Ve.map((Q,se)=>{const re=Q.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(Q.name||""),he=Q.size<1024?`${Q.size}B`:Q.size<1024*1024?`${Math.round(Q.size/1024)}KB`:`${(Q.size/(1024*1024)).toFixed(1)}MB`,be=re?URL.createObjectURL(Q):"";return $.jsxs("div",{className:"rte-footer-file-chip",style:re?{cursor:"pointer"}:void 0,onClick:re?()=>{ne(be),Te(!0)}:void 0,children:[re?$.jsx("img",{style:{width:"32px",height:"32px",objectFit:"contain",background:"#ffffff",border:"0.5px solid #EDF0F2",boxShadow:"0 2px 6px 1px rgba(174, 176, 180, 0.08)",boxSizing:"border-box"},className:"rte-footer-file-thumb",src:be,alt:Q.name}):$.jsx("div",{className:"rte-footer-file-icon",children:$.jsx("svg",{style:{width:"18px",height:"18px"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:`#${(()=>{const ue=(Q.name||"").split(".").pop()?.toLowerCase()||"";return["xls","xla","xlb","xlc","xlm","xlsx","xlt","xlw","csv","tsv","iif"].includes(ue)?"icon-a-xlsxcsv":["doc","docx","dot","odt","rtf","wiz"].includes(ue)?"icon-docx":["ppt","pptx","pot","ppa","pps","pwz"].includes(ue)?"icon-ppt":["txt","asm","bat","c","cc","conf","cpp","css","cxx","def","dic","eml","h","hh","in","js","ksh","php","pkl","rb","tar","tex","ts","xml"].includes(ue)?"icon-txt":ue==="pdf"?"icon-pdf":["html","htm","json","ics","ifb"].includes(ue)?"icon-a-htmljson":ue==="md"?"icon-md":"icon-lianjie"})()}`})})}),$.jsxs("div",{className:"rte-footer-file-info",children:[$.jsx("span",{className:"rte-footer-file-name",title:Q.name,children:Q.name}),$.jsx("span",{className:"rte-footer-file-size",children:he})]}),$.jsx("span",{className:"rte-footer-file-remove",onClick:ue=>{ue.stopPropagation(),Sy(se)},children:$.jsx("i",{className:"iconfont icon-guanbi ",style:{width:"8px",height:"8px",fontSize:"8px",display:"flex",alignItems:"center"}})})]},`${Q.name}-${Q.size}-${se}`)})}),Do.showRight&&$.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-right",children:$.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-right",onClick:Ay,children:$.jsx("svg",{style:{width:"16px",height:"16px"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})})]}),$.jsxs("div",{ref:X,className:`rich-text-editor-content-body ${e.length===0?"rich-text-editor-content-body-default":""}`,style:sT,children:[$.jsx("div",{ref:W,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${Bo&&c?"rte-editor-empty":""} ${e.some(Q=>Q.type==="tag")?"rte-editor-with-agent":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":c,onMouseDown:_y,onMouseMove:Ny,onMouseUp:Iy,onClick:Xy,onDoubleClick:Ly,onInput:()=>{il(),cl()},onKeyDown:eT,onPaste:Q=>{il(),Qy(Q)}}),$.jsx("input",{type:"file",ref:ee,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:Ze}),$.jsx("input",{type:"file",ref:_e,className:"rte-file-input",accept:"video/*",onChange:Q=>{const se=Q.target.files?.[0],re=Je.current;se&&se.size>1024*1024*1024?Y.warning("视频文件不能超过1GB"):se&&re&&Yy(re,se),Je.current=null,_e.current&&(_e.current.value="")}})]})]}),$.jsxs("div",{className:"rich-text-editor-footer",children:[$.jsxs("div",{className:"rich-text-editor-footer-left",children:[$.jsx("div",{className:"rich-text-editor-brand",children:f!=="hideAgent"&&$.jsx(Ee.Dropdown,{placement:"topLeft",menu:{selectedKeys:ea?[String(ea.key)]:[],items:i.filter(Q=>Q.isShowNew!==1).map(Q=>({key:Q.key,label:$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[Q.icon&&$.jsx("i",{className:Q.icon}),$.jsx("span",{children:Q.label})]}),onClick:()=>{s?.(Q)}}))},trigger:["click"],disabled:l||a,overlayClassName:"rte-agent-dropdown",children:$.jsxs("div",{className:"rte-agent-badge",style:{cursor:i.length>0?"pointer":"default"},children:[$.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),$.jsx("span",{className:"rte-agent-text",children:"智能体asfsafsafsafasf"})]})})}),!e.find(Q=>Q.type==="tag")&&$.jsxs($.Fragment,{children:[$.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>ie.current?.click(),title:"上传文件",children:$.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),$.jsx("input",{type:"file",ref:ie,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Cy})]})]}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[$.jsxs("div",{className:"rte-brand-badge",children:[$.jsx("div",{className:"rte-brand-badge",children:$.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),$.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),!ea||ea.points===void 0||ea.points===null?null:$.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[$.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),$.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ea.points)]}),ea.labelValue===2&&$.jsx("div",{className:"rte-limited-free-badge",children:$.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]}),$.jsx("button",{type:"button",onClick:Qo,disabled:a||l||o||!Mo,className:"rich-text-editor-send-button",children:a||o?$.jsx("span",{className:"rte-send-spinner"}):$.jsx("i",{className:"iconfont icon-fasong"})})]})]}),kt,Xt,$.jsx(Ee.Image,{style:{display:"none"},src:Z,preview:{visible:ge,onVisibleChange:Q=>Te(Q)}}),Xo,jo,Wy,jy,Ko,Gy,Zy]})};So.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const Ao="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",oy=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],cy=({autoLoading:e,batchSize:t,loadingProgress:a,loadIcon:l,onBatchSizeChange:n,onLoadNextPage:r,onStartAutoLoad:i,onStopLoad:s})=>e&&a?$.jsxs("div",{className:"auto_load_progress",children:[l||$.jsx("img",{src:Ao,alt:"自动加载",width:14,height:14}),$.jsxs("span",{children:["正在加载第",a.currentPage,"/",a.totalPages,"页"]}),$.jsx(Ee.Progress,{percent:a.percentage,type:"line",size:[160,8]}),$.jsx("span",{onClick:s,className:"auto_load_stop_btn",children:"停止加载"})]}):$.jsxs("div",{className:"auto_load_container",children:[$.jsx("div",{onClick:r,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),$.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[$.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:i,children:[l||$.jsx("img",{src:Ao,alt:"自动加载",width:14,height:14}),$.jsx("span",{children:"自动加载"})]}),$.jsx(Ee.Select,{value:t,onChange:n,options:oy,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),dy=({current:e,loadIcon:t,pageSize:a,total:l,cachedPages:n,loadedCount:r,autoLoading:i=!1,loadingProgress:s,onChange:u,onLoadNextPage:o,onStartAutoLoad:c,onStopLoading:d})=>{const[h,f]=w.useState(5),y=Math.ceil(l/a),E=w.useMemo(()=>n.length>=y,[n,y]),g=()=>Array.from({length:y},(b,T)=>T+1).filter(b=>!n.includes(b)).slice(0,h),v=(m,b,T)=>{const C=n.includes(m);return b==="prev"||b==="next"||b==="jump-prev"||b==="jump-next"?$.jsx("div",{className:"pageBox",children:T}):$.jsxs("div",{className:"pageBox",style:{backgroundColor:e===m?"#2563EB":"#f5f5f5",color:e===m?"#fff":C?"#171717":"#a3a3a3"},children:[m,!C&&$.jsx("span",{className:"unload_spot"})]})};return $.jsxs("div",{className:"pagination_footer",children:[$.jsxs("div",{className:"pagination_leftWrap",children:[$.jsxs("span",{className:"pagination_total",children:[$.jsx(Ct.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",r,"/",l,"条数据"]}),!E&&$.jsx(cy,{loadIcon:t||void 0,autoLoading:i,batchSize:h,loadingProgress:s,disabled:!o||!c,onBatchSizeChange:f,onLoadNextPage:()=>o?.(),onStartAutoLoad:()=>{const m=g();c?.(m)},onStopLoad:()=>d?.()})]}),$.jsx(Ee.Pagination,{current:e,pageSize:a,total:l,onChange:m=>u(m),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:v})]})},wo=e=>{const{loading:t,autoLoading:a,loadingProgress:l,columns:n=[],dataSource:r=[],total:i,current:s,pageSize:u,cachedPages:o,onChangePage:c,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f,...y}=e,E=w.useRef(null),g=w.useCallback(v=>{c(v),o.includes(v)&&E.current?.scrollTo({key:`${(v-1)*u+1}`})},[o,c,u]);return $.jsxs("div",{className:"flex flex-col",children:[$.jsx(Ee.Table,{ref:E,...y,columns:n,dataSource:r,pagination:!1,virtual:!0}),$.jsx(dy,{loading:t,autoLoading:a,loadingProgress:l,current:s,pageSize:u,total:i,loadedCount:r.length,cachedPages:o,onChange:g,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f})]})};wo.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const ko=({texts:e=[],placeholder:t="请输入内容",animationSpeed:a=100,autoPlay:l=!0,value:n,onChange:r,...i})=>{const[s,u]=w.useState(""),[o,c]=w.useState(0),[d,h]=w.useState(!1),[f,y]=w.useState(!1),[E,g]=w.useState(!1),v=w.useRef(void 0),m=w.useRef(void 0),b=w.useRef(e),T=w.useRef(o),C=w.useRef(f),A=w.useRef(s);w.useEffect(()=>{b.current=e,T.current=o,C.current=f,A.current=s});const N=w.useCallback((I,x)=>{let P=0;g(!0);const z=()=>{P<I.length?(u(I.slice(0,P+1)),P++,m.current=window.setTimeout(z,a)):(g(!1),x?.())};z()},[a]),k=w.useCallback(I=>{let x=A.current.length;const P=()=>{x>0?(u(A.current.slice(0,x-1)),x--,m.current=window.setTimeout(P,a/2)):I?.()};P()},[a]),S=w.useCallback(()=>{if(b.current.length===0||C.current)return;h(!0);const I=b.current[T.current];A.current?k(()=>{N(I,()=>{v.current=window.setTimeout(()=>{c(x=>(x+1)%b.current.length),h(!1)},2e3)})}):N(I,()=>{v.current=window.setTimeout(()=>{c(x=>(x+1)%b.current.length),h(!1)},2e3)})},[k,N]);w.useEffect(()=>(l&&e.length>0&&!f&&S(),()=>{v.current&&window.clearTimeout(v.current),m.current&&window.clearTimeout(m.current)}),[o,f,l,e.length,S]),w.useEffect(()=>{!d&&l&&e.length>0&&!f&&S()},[o,d,l,e.length,f,S]);const L=I=>{y(!0),v.current&&window.clearTimeout(v.current),m.current&&window.clearTimeout(m.current),h(!1),g(!1),i.onFocus?.(I)},D=I=>{y(!1),!n&&e.length>0&&(u(""),c(0)),i.onBlur?.(I)},F=I=>{r?.(I.target.value),i.onChange?.(I)},M=()=>f||n?t:s||t;return $.jsxs("div",{style:{position:"relative"},children:[$.jsx(Ee.Input,{...i,value:n,onChange:F,onFocus:L,onBlur:D,placeholder:M(),style:{...i.style,position:"relative",zIndex:1}}),!f&&!n&&s&&$.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[$.jsx("span",{children:s}),E&&$.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),$.jsx("style",{children:`
|
|
64
|
+
`);return X.replace(/\n/g,"").trim().length>0?X:""},K=G.getAttribute("data-node-type");if(K==="report-url")if(O)k[`${Y}__url`]=O;else{const X=R().replace(/\n/g,"").trim();X&&(k[`${Y}__url`]=X)}else{const X=R();X&&(K==="markdown-name"?k[`${Y}__name`]=X:k[Y]=X)}}}),e.current.querySelectorAll('[data-type="select"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="searchable-select"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=G.value.replace(/[\u200B]/g,"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=G.getAttribute("data-node-type")||"",R=O==="report-module"||O==="markdown-module",K=R?(G.innerHTML||"").replace(/[\u200B]/g,"").trim():(G.textContent||"").replace(/[\u200B]/g,"").trim();if(R){const X=Number.parseInt(G.getAttribute("data-module-index")||"0",10);k[`${Y}__module_${Number.isFinite(X)?X:0}`]=K}else K&&(k[Y]=K)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.getAttribute("data-value")||"").trim();O&&(k[Y]=O)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(G=>{const Y=G.dataset.key;if(Y){const O=(G.value||"").trim();O&&(k[Y]=O)}})),o&&Object.keys(o).length>0){const I={};N||Object.entries(o).forEach(([x,P])=>{if(!Array.isArray(P))return;let z=0;for(let V=0;V<P.length;V++)`${x}_${V}`in k&&z++;let U=-1;for(let V=0;V<P.length;V++)f.current.has(`${x}_${V}`)&&(U=V);if(U>=z&&z<P.length)for(let V=z;V<P.length;V++)L.add(`${x}_${V}`)}),Object.entries(o).forEach(([x,P])=>{mo(t,x)||(Array.isArray(P)?P.forEach((z,U)=>{z!=null&&String(z).trim()!==""&&(I[`${x}_${U}`]=String(z))}):P!=null&&String(P).trim()!==""&&(t.find(U=>U.key===x&&U.type==="report-url")?I[`${x}__url`]=String(P):I[x]=String(P)))}),Object.entries(I).forEach(([x,P])=>{const z=x in k,U=L.has(x),V=v.current[x]!==P;!U&&(!z||V)&&(k[x]=P)});for(const x of Object.keys(v.current))!(x in I)&&x in k&&delete k[x];v.current=I}if($1(e,t,a,l,k,n,s,u,c,d),g.current=b,h&&e.current)for(const[I,{name:x,url:P}]of Object.entries(h.current)){const z=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(!z)continue;const U=z.querySelector(".rte-report-dropdown-host");U&&(U.style.display="",U.style.visibility="",U.classList.remove("hidden"),U.classList.add("rte-report-dropdown-host-quiet"));const V=[document.createTextNode(x)];U&&V.push(U),z.setAttribute("data-report-url",P),z.setAttribute("data-report-name",x),z.removeAttribute("data-tooltip"),z.contentEditable="false",z.classList.add("rte-report-name-chip"),z.classList.remove("show-placeholder","rte-variable-with-icon"),z.replaceChildren(...V),Xl(z)}if(N&&(E.current=!1),setTimeout(()=>{if(aa(e),h?.current)for(const[I,x]of Object.entries(h.current))S[I]||(S[I]=x);if(Object.keys(S).length>0&&e.current)for(const[I,x]of Object.entries(S)){let P=null;if(x.multiKey){const V=I.split("::")[1];P=e.current.querySelector(`[data-type="variable"][data-multi-key="${x.multiKey}"][data-key="${V}"]`)}else P=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(!P)continue;const z=P.querySelector(".rte-report-dropdown-host");z&&(z.style.display="",z.style.visibility="",z.classList.remove("hidden"),z.classList.add("rte-report-dropdown-host-quiet"));const U=[document.createTextNode(x.name)];z&&U.push(z),P.classList.remove("show-placeholder","rte-variable-with-icon"),P.classList.add("rte-report-name-chip"),P.setAttribute("data-report-url",x.url),P.setAttribute("data-report-name",x.name),P.contentEditable="false",P.replaceChildren(...U),Xl(P)}ya(e,t,a,c)},0),r?.current){const{key:I,offset:x}=r.current;setTimeout(()=>{if(!e.current)return;const P=e.current.querySelector(`[data-type="variable"][data-key="${I}"]`);if(P){if(P.dataset.variableRender==="antd-textarea"){const z=P.querySelector("textarea");if(z){z.focus();try{const U=z.value?.length??0;z.setSelectionRange(Math.min(x,U),Math.min(x,U))}catch{}r.current=null;return}}try{const z=document.createRange(),U=document.createTreeWalker(P,NodeFilter.SHOW_TEXT,null);let V=0,_=null,G=0;for(;U.nextNode();){const Y=U.currentNode,O=Y.textContent?.length||0;if(V+O>=x){_=Y,G=x-V;break}V+=O}if(_){z.setStart(_,Math.min(G,_.textContent?.length||0)),z.collapse(!0);const Y=window.getSelection();Y&&(Y.removeAllRanges(),Y.addRange(z),P.focus())}else{z.selectNodeContents(P),z.collapse(!1);const Y=window.getSelection();Y&&(Y.removeAllRanges(),Y.addRange(z),P.focus())}}catch{const z=document.createRange();z.selectNodeContents(P),z.collapse(!1);const U=window.getSelection();U&&(U.removeAllRanges(),U.addRange(z),P.focus())}r.current=null}},0)}},[t,a,l,e,n,r,i,s,u,o,c,d]);w.useEffect(()=>{m()},[m])}function V1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=o=>typeof o=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(o):o.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(o.name||""),s=o=>{if(o.target?.closest(".rte-tutorial-btn"))return;const d=o.target?.closest(".upload-info-icon");if(d&&d.classList.contains("upload-info-icon")){const f=d.dataset.uploadKey;if(f){const y=d.closest('[data-type="upload"], [data-type="video-upload"]');l({key:f,anchorEl:y||d,type:"upload"})}return}const h=o.target?.closest('[data-type="upload"]');if(h){const f=h.dataset.key;if(f){const y=a[f];y&&i(y)&&l({key:f,anchorEl:h,type:"upload-preview"})}}},u=o=>{if(n)return;const c=o.relatedTarget;if(c?.closest?.(".rte-tooltip-overlay")||o.target?.closest(".rte-tutorial-btn"))return;const h=o.target?.closest(".upload-info-icon");if(h&&h.classList.contains("upload-info-icon")){const y=h.closest('[data-type="upload"], [data-type="video-upload"]');if(c&&y&&y.contains(c))return;if(!c||!r.contains(c))l(null);else{const E=c.closest('[data-type="upload"], [data-type="video-upload"]');(!E||E!==y)&&l(null)}return}const f=o.target?.closest('[data-type="upload"], [data-type="video-upload"]');if(f){const y=c;if(y?.closest?.(".rte-tooltip-overlay")||y&&f.contains(y))return;l(null)}};return r.addEventListener("mouseover",s,!0),r.addEventListener("mouseout",u,!0),()=>{r.removeEventListener("mouseover",s,!0),r.removeEventListener("mouseout",u,!0)}},[t,a,e,l,n])}function G1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=c=>{if(l==="hideTagClose")return;const d=c.currentTarget,h=d.dataset.tooltip,f=d.dataset.tagKey||"";h&&a({key:f,anchorEl:d,type:"tag"})},s=c=>{n||c.relatedTarget?.closest?.(".rte-tooltip-overlay")||a(null)};let u;const o=()=>{r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.addEventListener("mouseenter",i),d.addEventListener("mouseleave",s)})};return u=requestAnimationFrame(()=>{u=requestAnimationFrame(o)}),()=>{cancelAnimationFrame(u),r.querySelectorAll(".tag-node[data-tooltip]").forEach(d=>{d.removeEventListener("mouseenter",i),d.removeEventListener("mouseleave",s)})}},[t,e,a,l,n])}function Y1(e,t,a,l){w.useEffect(()=>{const n=e.current;if(!n)return;const r=s=>{if(s.target?.closest(".rte-report-dropdown-host"))return;const o=s.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const c=o.dataset.variableKey;c&&a({key:c,anchorEl:o,type:"variable"});return}},i=s=>{if(l)return;const u=s.target,o=s.relatedTarget;if(o?.closest?.(".rte-tooltip-overlay"))return;if(u?.closest?.(".variable-info-icon")){if(!o||!n.contains(o)){a(null);return}o.closest?.(".variable-info-icon")||a(null)}};return n.addEventListener("mouseover",r,!0),n.addEventListener("mouseout",i,!0),()=>{n.removeEventListener("mouseover",r,!0),n.removeEventListener("mouseout",i,!0)}},[t,e,a,l])}function W1(e,t,a,l,n){w.useEffect(()=>{const r=e.current;if(!r)return;const i=d=>typeof d=="string"?/\.(png|jpe?g|gif|webp|bmp|svg)(\?.*)?$/i.test(d):d.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(d.name||""),s=d=>{const h=d.currentTarget,f=h.dataset.fileName,y=h.closest('[data-type="upload"]'),E=y?.dataset.key||"",g=E?a[E]:null;if(g&&i(g)){l({key:E,anchorEl:y||h,type:"upload-preview"});return}f&&l({key:E,anchorEl:y||h,type:"upload-label"})},u=d=>{n||d.relatedTarget?.closest?.(".rte-tooltip-overlay")||l(null)};let o;const c=()=>{r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.addEventListener("mouseenter",s),h.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(c)}),()=>{cancelAnimationFrame(o),r.querySelectorAll(".upload-label[data-file-name]").forEach(h=>{h.removeEventListener("mouseenter",s),h.removeEventListener("mouseleave",u)})}},[t,a,e,l,n])}function j1(e,t,a,l,n,r,i,s){w.useEffect(()=>{const u=setTimeout(()=>{ya(e,t,a,n),Jl(e,t,a,l,n,{reportAnalyzeState:i,requireReportUrlAnalyze:s})},0);return()=>clearTimeout(u)},[a,t,e,l,n,r,i,s])}function K1(e,t){const a=w.useRef(0),l=w.useRef(0);w.useEffect(()=>{if(!e.current)return;let n=!1,r=0;const i=m=>m instanceof HTMLElement?!!(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker")||m.closest(".ant-picker-dropdown")):!1,s=m=>m instanceof HTMLElement?!!(m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown")):!1,u=m=>{n=!0,i(m.target)&&(a.current=Date.now()),s(m.target)&&(l.current=Date.now())},o=()=>{n=!1,r=Date.now()};let c=!1,d=0;const h=()=>{c=!0},f=()=>{c=!1,d=Date.now()},y=()=>{d=Date.now()},E=m=>{i(m.target)&&(a.current=Date.now()),s(m.target)&&(l.current=Date.now())},g=()=>{if(Date.now()-a.current<800||Date.now()-l.current<800)return;const m=document.activeElement;if(m&&(m.closest(".rte-datepicker-wrapper")||m.closest(".rte-datepicker-host")||m.closest(".ant-picker-dropdown")||m.tagName==="INPUT"&&m.closest(".ant-picker")||m.closest(".rte-select-wrapper")||m.closest(".rte-select-host")||m.closest(".ant-select")||m.closest(".ant-select-dropdown"))||!e.current)return;const b=window.getSelection();if(!b||b.rangeCount===0||t.current||n||c||Date.now()-d<500)return;const T=b.getRangeAt(0);if(!T.collapsed)return e.current.contains(T.commonAncestorContainer),void 0;const C=b.anchorNode;if(!C||!e.current.contains(C))return;let A=!1,N=!1;if(C.nodeType===Node.ELEMENT_NODE){const S=C;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(N=!0)}else if(C.parentElement){const S=C.parentElement;(S.closest('[data-type="datepicker"]')||S.closest(".rte-datepicker-wrapper")||S.closest(".rte-datepicker-host"))&&(A=!0),(S.closest('[data-type="select"]')||S.closest(".rte-select-wrapper")||S.closest(".rte-select-host"))&&(N=!0)}if(A||N)return;let k=null;if(C.nodeType===Node.ELEMENT_NODE?k=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(k=C.parentElement.closest('[data-type="variable"]')),!k){if(Date.now()-r>500)return;const S=e.current.querySelectorAll('[data-type="variable"]');if(S.length>0){let L=null;for(const D of Array.from(S))if(D.style.display!=="none"){L=D;break}if(!L&&S.length>0&&(L=S[0]),L){const D=document.createRange();D.selectNodeContents(L),D.collapse(!1),b.removeAllRanges(),b.addRange(D),L.focus()}else b.removeAllRanges()}else b.removeAllRanges()}},v=e.current;return v&&(v.addEventListener("compositionstart",h),v.addEventListener("compositionend",f),v.addEventListener("input",y)),document.addEventListener("mousedown",u),document.addEventListener("mouseup",o),document.addEventListener("focusin",E),document.addEventListener("selectionchange",g),()=>{v&&(v.removeEventListener("compositionstart",h),v.removeEventListener("compositionend",f),v.removeEventListener("input",y)),document.removeEventListener("mousedown",u),document.removeEventListener("mouseup",o),document.removeEventListener("focusin",E),document.removeEventListener("selectionchange",g)}},[e,t])}var ql={exports:{}},X1=ql.exports,go;function Eo(){return go||(go=1,(function(e,t){(function(a,l){e.exports=l()})(X1,(function(){var a=1e3,l=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",o="day",c="week",d="month",h="quarter",f="year",y="date",E="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var x=["th","st","nd","rd"],P=I%100;return"["+I+(x[(P-20)%10]||x[P]||x[0])+"]"}},b=function(I,x,P){var z=String(I);return!z||z.length>=x?I:""+Array(x+1-z.length).join(P)+I},T={s:b,z:function(I){var x=-I.utcOffset(),P=Math.abs(x),z=Math.floor(P/60),U=P%60;return(x<=0?"+":"-")+b(z,2,"0")+":"+b(U,2,"0")},m:function I(x,P){if(x.date()<P.date())return-I(P,x);var z=12*(P.year()-x.year())+(P.month()-x.month()),U=x.clone().add(z,d),V=P-U<0,_=x.clone().add(z+(V?-1:1),d);return+(-(z+(P-U)/(V?U-_:_-U))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:d,y:f,w:c,d:o,D:y,h:u,m:s,s:i,ms:r,Q:h}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},C="en",A={};A[C]=m;var N="$isDayjsObject",k=function(I){return I instanceof F||!(!I||!I[N])},S=function I(x,P,z){var U;if(!x)return C;if(typeof x=="string"){var V=x.toLowerCase();A[V]&&(U=V),P&&(A[V]=P,U=V);var _=x.split("-");if(!U&&_.length>1)return I(_[0])}else{var G=x.name;A[G]=x,U=G}return!z&&U&&(C=U),U||!z&&C},L=function(I,x){if(k(I))return I.clone();var P=typeof x=="object"?x:{};return P.date=I,P.args=arguments,new F(P)},D=T;D.l=S,D.i=k,D.w=function(I,x){return L(I,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var F=(function(){function I(P){this.$L=S(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[N]=!0}var x=I.prototype;return x.parse=function(P){this.$d=(function(z){var U=z.date,V=z.utc;if(U===null)return new Date(NaN);if(D.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var _=U.match(g);if(_){var G=_[2]-1||0,Y=(_[7]||"0").substring(0,3);return V?new Date(Date.UTC(_[1],G,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)):new Date(_[1],G,_[3]||1,_[4]||0,_[5]||0,_[6]||0,Y)}}return new Date(U)})(P),this.init()},x.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},x.$utils=function(){return D},x.isValid=function(){return this.$d.toString()!==E},x.isSame=function(P,z){var U=L(P);return this.startOf(z)<=U&&U<=this.endOf(z)},x.isAfter=function(P,z){return L(P)<this.startOf(z)},x.isBefore=function(P,z){return this.endOf(z)<L(P)},x.$g=function(P,z,U){return D.u(P)?this[z]:this.set(U,P)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(P,z){var U=this,V=!!D.u(z)||z,_=D.p(P),G=function(ie,ce){var me=D.w(U.$u?Date.UTC(U.$y,ce,ie):new Date(U.$y,ce,ie),U);return V?me:me.endOf(o)},Y=function(ie,ce){return D.w(U.toDate()[ie].apply(U.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(ce)),U)},O=this.$W,R=this.$M,K=this.$D,X="set"+(this.$u?"UTC":"");switch(_){case f:return V?G(1,0):G(31,11);case d:return V?G(1,R):G(0,R+1);case c:var W=this.$locale().weekStart||0,ee=(O<W?O+7:O)-W;return G(V?K-ee:K+(6-ee),R);case o:case y:return Y(X+"Hours",0);case u:return Y(X+"Minutes",1);case s:return Y(X+"Seconds",2);case i:return Y(X+"Milliseconds",3);default:return this.clone()}},x.endOf=function(P){return this.startOf(P,!1)},x.$set=function(P,z){var U,V=D.p(P),_="set"+(this.$u?"UTC":""),G=(U={},U[o]=_+"Date",U[y]=_+"Date",U[d]=_+"Month",U[f]=_+"FullYear",U[u]=_+"Hours",U[s]=_+"Minutes",U[i]=_+"Seconds",U[r]=_+"Milliseconds",U)[V],Y=V===o?this.$D+(z-this.$W):z;if(V===d||V===f){var O=this.clone().set(y,1);O.$d[G](Y),O.init(),this.$d=O.set(y,Math.min(this.$D,O.daysInMonth())).$d}else G&&this.$d[G](Y);return this.init(),this},x.set=function(P,z){return this.clone().$set(P,z)},x.get=function(P){return this[D.p(P)]()},x.add=function(P,z){var U,V=this;P=Number(P);var _=D.p(z),G=function(R){var K=L(V);return D.w(K.date(K.date()+Math.round(R*P)),V)};if(_===d)return this.set(d,this.$M+P);if(_===f)return this.set(f,this.$y+P);if(_===o)return G(1);if(_===c)return G(7);var Y=(U={},U[s]=l,U[u]=n,U[i]=a,U)[_]||1,O=this.$d.getTime()+P*Y;return D.w(O,this)},x.subtract=function(P,z){return this.add(-1*P,z)},x.format=function(P){var z=this,U=this.$locale();if(!this.isValid())return U.invalidDate||E;var V=P||"YYYY-MM-DDTHH:mm:ssZ",_=D.z(this),G=this.$H,Y=this.$m,O=this.$M,R=U.weekdays,K=U.months,X=U.meridiem,W=function(ce,me,Pe,Ne){return ce&&(ce[me]||ce(z,V))||Pe[me].slice(0,Ne)},ee=function(ce){return D.s(G%12||12,ce,"0")},ie=X||function(ce,me,Pe){var Ne=ce<12?"AM":"PM";return Pe?Ne.toLowerCase():Ne};return V.replace(v,(function(ce,me){return me||(function(Pe){switch(Pe){case"YY":return String(z.$y).slice(-2);case"YYYY":return D.s(z.$y,4,"0");case"M":return O+1;case"MM":return D.s(O+1,2,"0");case"MMM":return W(U.monthsShort,O,K,3);case"MMMM":return W(K,O);case"D":return z.$D;case"DD":return D.s(z.$D,2,"0");case"d":return String(z.$W);case"dd":return W(U.weekdaysMin,z.$W,R,2);case"ddd":return W(U.weekdaysShort,z.$W,R,3);case"dddd":return R[z.$W];case"H":return String(G);case"HH":return D.s(G,2,"0");case"h":return ee(1);case"hh":return ee(2);case"a":return ie(G,Y,!0);case"A":return ie(G,Y,!1);case"m":return String(Y);case"mm":return D.s(Y,2,"0");case"s":return String(z.$s);case"ss":return D.s(z.$s,2,"0");case"SSS":return D.s(z.$ms,3,"0");case"Z":return _}return null})(ce)||_.replace(":","")}))},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(P,z,U){var V,_=this,G=D.p(z),Y=L(P),O=(Y.utcOffset()-this.utcOffset())*l,R=this-Y,K=function(){return D.m(_,Y)};switch(G){case f:V=K()/12;break;case d:V=K();break;case h:V=K()/3;break;case c:V=(R-O)/6048e5;break;case o:V=(R-O)/864e5;break;case u:V=R/n;break;case s:V=R/l;break;case i:V=R/a;break;default:V=R}return U?V:D.a(V)},x.daysInMonth=function(){return this.endOf(d).$D},x.$locale=function(){return A[this.$L]},x.locale=function(P,z){if(!P)return this.$L;var U=this.clone(),V=S(P,z,!0);return V&&(U.$L=V),U},x.clone=function(){return D.w(this.$d,this)},x.toDate=function(){return new Date(this.valueOf())},x.toJSON=function(){return this.isValid()?this.toISOString():null},x.toISOString=function(){return this.$d.toISOString()},x.toString=function(){return this.$d.toUTCString()},I})(),M=F.prototype;return L.prototype=M,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",o],["$M",d],["$y",f],["$D",y]].forEach((function(I){M[I[1]]=function(x){return this.$g(x,I[0],I[1])}})),L.extend=function(I,x){return I.$i||(I(x,F,L),I.$i=!0),L},L.locale=S,L.isDayjs=k,L.unix=function(I){return L(1e3*I)},L.en=A[C],L.Ls=A,L.p={},L}))})(ql)),ql.exports}var Q1=Eo();const zl=mn(Q1);var Vl={exports:{}},J1=Vl.exports,yo;function Z1(){return yo||(yo=1,(function(e,t){(function(a,l){e.exports=l(Eo())})(J1,(function(a){function l(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var n=l(a),r={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(i,s){return s==="W"?i+"周":i+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(i,s){var u=100*i+s;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return n.default.locale(r,null,!0),r}))})(Vl)),Vl.exports}Z1();var ey={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};function Xa(e){"@babel/helpers - typeof";return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(e)}function To(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),a.push.apply(a,l)}return a}function xo(e){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?To(Object(a),!0).forEach(function(l){ty(e,l,a[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):To(Object(a)).forEach(function(l){Object.defineProperty(e,l,Object.getOwnPropertyDescriptor(a,l))})}return e}function ty(e,t,a){return t=ay(t),t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function ay(e){var t=ly(e,"string");return Xa(t)=="symbol"?t:String(t)}function ly(e,t){if(Xa(e)!="object"||!e)return e;var a=e[Symbol.toPrimitive];if(a!==void 0){var l=a.call(e,t);if(Xa(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ny=xo(xo({},ey),{},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",week:"周",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪",yearFormat:"YYYY年",cellDateFormat:"D",monthBeforeYear:!1});const ry={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},Co={lang:{placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"],...ny},timePickerLocale:{...ry}};Co.lang.ok="确定",zl.locale("zh-cn");const{RangePicker:iy}=Ee.DatePicker,sy=({host:e,onChange:t})=>{const a=e.dataset.key,l=e.dataset.value,n=e.dataset.placeholder,r=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,i=e.dataset.disableFuture==="true",[s,u]=w.useState(()=>{if(!l)return null;const E=l.split(",");return E.length===2&&E[0]&&E[1]?[zl(E[0]),zl(E[1])]:null}),[o,c]=w.useState(null),d=E=>E?i&&E.isAfter(zl(),"day")?!0:!r||!o||!o[0]?!1:Math.abs(E.diff(o[0],"days"))>r:!1,h=E=>{c(E)},f=E=>{if(u(E),c(null),E&&E[0]&&E[1]){const g=`${E[0].format("YYYY-MM-DD")},${E[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",g),t(a,g)}else e.setAttribute("data-value",""),t(a,"")},y=E=>{c(E?s:null)};return dt.createPortal($.jsx("div",{className:"rte-datepicker-wrapper",contentEditable:!1,style:{display:"inline-block",verticalAlign:"middle",width:"260px",marginLeft:"4px",marginRight:"4px",fontSize:"16px",height:"30px",lineHeight:"30px"},children:$.jsx(iy,{value:s,disabledDate:d,onCalendarChange:h,onChange:f,onOpenChange:y,placeholder:[n||"开始日期",n||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:Co,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},uy=e=>{const[t,a]=w.useState([]);return w.useEffect(()=>{const l=e.current;if(!l)return;const n=()=>{const i=l.querySelectorAll(".rte-datepicker-host"),s=[];i.forEach(u=>{const o=u.getAttribute("data-key");o&&s.push($.jsx(sy,{host:u,onChange:()=>{if(e.current){const c=new Event("input",{bubbles:!0});e.current.dispatchEvent(c)}}},`datepicker-${o}`))}),a(s)};n();const r=new MutationObserver(i=>{let s=!1;for(const u of i)if(u.type==="childList"){let o=!1;if(u.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),u.removedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const d=c;(d.classList?.contains("rte-datepicker-host")||d.querySelector?.(".rte-datepicker-host"))&&(o=!0)}}),o){s=!0;break}}s&&n()});return r.observe(l,{childList:!0,subtree:!0}),()=>r.disconnect()},[e]),t},So=({config:e,onSend:t,isProcessing:a=!1,disabled:l=!1,width:n,lockStructure:r=!1,agentOptions:i=[],onAgentSelect:s,onAgentExit:u,loading:o=!1,placeholder:c,border:d,background:h="transparent",hideButtons:f,maxHeight:y,minHeight:E,editorMinHeight:g,editorPadding:v,footerPadding:m,collapsed:b=!1,reportAnalyze:T,markdownAnalyze:C,markdownNameAnalyze:A,onCollapsedChange:N,collapseTransitionMs:k=260,debugTooltipSticky:S=!1,nodeValues:L,onFilesChange:D,onFooterFilesChange:F,showFooterUpload:M=!0,footerFiles:I,videoUrlParse:x,videoUpload:P,reportListFetch:z,onReportGoGenerate:U,onViewReport:V,hideCurrentSessionReport:_,reportNameResolve:G})=>{const[Y,O]=Ee.message.useMessage(),R=w.useRef(null),K=w.useRef(null),X=w.useRef(null),W=w.useRef(null),ee=w.useRef(null),ie=w.useRef(null),[ce,me]=w.useState(!1),Pe=w.useRef("");if(!Pe.current){const Q=Math.random().toString(36).slice(2,8);Pe.current=`rte_${Q}`}const[Ne,ct]=w.useState({});w.useEffect(()=>{D?.(Ne)},[Ne,D]);const[Ve,Ge]=w.useState([]),Qe=w.useRef(!1);w.useEffect(()=>{if(!I)return;if(!(I.length===Ve.length&&I.every((se,re)=>{const he=Ve[re];return he&&se.name===he.name&&se.size===he.size&&se.lastModified===he.lastModified})))if(I.reduce((he,be)=>he+be.size,0)>52428800){const he=[];let be=0;for(const ue of I){if(be+ue.size>52428800)break;he.push(ue),be+=ue.size}Y.error("文件总大小不能超过 50MB"),Ge(he)}else Qe.current=!0,Ge(I)},[I]),w.useEffect(()=>{if(Qe.current){Qe.current=!1;return}F?.(Ve)},[Ve,F]);const[Kt,yt]=w.useState(null),[wt,Ft]=w.useState(null),[Za,ke]=w.useState(null),[Be,el]=w.useState({}),[Z,ne]=w.useState(""),[ge,Te]=w.useState(!1),_e=w.useRef(null),Je=w.useRef(null),{tooltipPortal:kt,setPopoverVisible:Ke,openStepsPreview:Ht,stepsPreviewPortal:Xt}=a1({config:e,files:Ne,debugTooltipSticky:S,videoState:Be}),{handleFileChange:Ze,handleRemoveFile:$t}=Dc({config:e,messageApi:Y,activeBatchKey:wt,activeFileKey:Kt,activeBatchStartIndex:Za,setActiveFileKey:yt,setActiveBatchKey:Ft,setActiveBatchStartIndex:ke,setFiles:ct}),lt=w.useRef(null),[Do,xy]=w.useState({showLeft:!1,showRight:!1}),tl=w.useCallback(()=>{const Q=lt.current;Q&&xy({showLeft:Q.scrollLeft>0,showRight:Q.scrollLeft+Q.clientWidth<Q.scrollWidth-1})},[]),Cy=w.useCallback(Q=>{if(!Q.target.files||Q.target.files.length===0)return;const se=10*1024*1024,re=50*1024*1024,he=ue=>ue.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(ue.name||""),be=Array.from(Q.target.files).filter(ue=>he(ue)&&ue.size>se?(Y.error("图片大小不能超过 10MB"),!1):!0);Ge(ue=>{const Le=ue.reduce((ve,Ie)=>ve+Ie.size,0),de=[];let pe=Le;for(const ve of be){if(pe+ve.size>re){Y.error("文件总大小不能超过 50MB");break}de.push(ve),pe+=ve.size}return de.length>0?[...ue,...de]:ue}),Q.target.value="",setTimeout(tl,0)},[Y,tl]),Sy=w.useCallback(Q=>{Ge(se=>se.filter((re,he)=>he!==Q)),setTimeout(tl,0)},[tl]),Ay=w.useCallback(()=>{const Q=lt.current;Q&&Q.scrollBy({left:200,behavior:"smooth"})},[]),wy=w.useCallback(()=>{const Q=lt.current;Q&&Q.scrollBy({left:-200,behavior:"smooth"})},[]),Po=w.useCallback(()=>{l||me(!0)},[l]);w.useEffect(()=>{l&&me(!1)},[l]),w.useEffect(()=>{const Q=he=>he instanceof Element?!!he.closest([".rte-agent-dropdown",".rte-report-dropdown-overlay",".rte-tooltip-overlay",".ant-picker-dropdown",".ant-select-dropdown",".ant-image-preview-root"].join(",")):!1,se=he=>{const be=R.current,ue=he.target;be&&(ue instanceof Node&&be.contains(ue)||Q(ue)||me(!1))},re=he=>{const be=R.current,ue=he.target;if(be){if(ue instanceof Node&&be.contains(ue)){l||me(!0);return}Q(ue)||me(!1)}};return document.addEventListener("mousedown",se,!0),document.addEventListener("focusin",re,!0),()=>{document.removeEventListener("mousedown",se,!0),document.removeEventListener("focusin",re,!0)}},[l]);const Ar=w.useRef(!1),ky=w.useRef(null),{handleMouseDown:_y,handleMouseMove:Ny,handleMouseUp:Iy,handleDoubleClick:Ly}=Xc({lockStructure:r,onAgentExit:u,editorRef:W,setPopoverVisible:Ke,isDraggingRef:Ar,mouseDownPosRef:ky}),[Mo,Gl]=w.useState(!1),wr=w.useRef(null),[Bo,Fo]=w.useState(!0),Oy=w.useRef(0),[Ho,Dy]=w.useState(58),[Py,My]=w.useState(58),[kr,By]=w.useState(!1),[Fy,Hy]=w.useState(!1),[al,_r]=w.useState(null),ll=w.useRef(!1),nl=w.useRef(!1),Tt=w.useRef(null),[ga,rl]=w.useState({}),Rt=w.useRef(()=>{}),Qt=w.useRef({}),Nr=w.useRef(!1),Yl=w.useRef(null),il=w.useCallback(()=>{Nr.current=!0,Yl.current!==null&&window.clearTimeout(Yl.current),Yl.current=window.setTimeout(()=>{Nr.current=!1,Yl.current=null},50)},[]),[Jt,Wl]=w.useState({}),$o=w.useRef(()=>{}),$y=w.useRef({}),Ir=w.useRef(Jt);w.useEffect(()=>{Ir.current=Jt},[Jt]);const[Zt,Lr]=w.useState({}),Ro=w.useRef(()=>{}),Uo=w.useRef(Zt);w.useEffect(()=>{Uo.current=Zt},[Zt]);const[xt,sl]=w.useState(()=>{const Q={};return e.forEach(se=>{Ye(se.type)&&se.key&&(Q[se.key]=1)}),Q});Rc({config:e,editorRef:W,files:Ne,setFiles:ct,multiVariableCounts:xt,setMultiVariableCounts:sl,reportAnalyzeState:ga,setReportAnalyzeState:rl,markdownAnalyzeState:Jt,setMarkdownAnalyzeState:Wl,markdownNameAnalyzeState:Zt,setMarkdownNameAnalyzeState:Lr,nodeValues:L,resolvedReportNamesRef:Qt});const qo=w.useRef(L);if(L!==qo.current&&(qo.current=L,L)){const Q={};let se=!1;e.forEach(re=>{if(Ye(re.type)&&re.key){const he=L[re.key],be=Array.isArray(he)?he.filter(ue=>String(ue??"").trim().length>0):he;if(Array.isArray(be)&&be.length>0){const ue=re.maxCount??9,Le=Math.min(be.length+1,ue);xt[re.key]!==Le&&(Q[re.key]=Le,se=!0)}}}),se&&(il(),sl(re=>({...re,...Q})))}const De=Gc({config:e,reportAnalyzeState:ga,markdownAnalyzeState:Jt,markdownNameAnalyzeState:Zt}),jl=w.useRef(()=>{}),{handleReportUrlBlur:Ry,handleMarkdownBlur:Uy,handleMarkdownNameBlur:qy,handleMultiVariableNameResolve:zo}=qc({reportAnalyze:T,markdownAnalyze:C,markdownNameAnalyze:A,reportAnalyzeState:ga,setReportAnalyzeState:rl,markdownAnalyzeState:Jt,setMarkdownAnalyzeState:Wl,markdownNameAnalyzeState:Zt,setMarkdownNameAnalyzeState:Lr,editorRef:W,reportAnalyzeRef:Rt,markdownAnalyzeRef:$o,markdownNameAnalyzeRef:Ro,markdownAnalyzeStateRef:Ir,markdownNameAnalyzeStateRef:Uo,reportNameResolve:G,applyReportNameChipRef:jl});Ec(W,Ry,[De]),kc(W,qy,[De]),_c(W,Uy,[De]),w.useEffect(()=>{const Q=W.current;if(!Q||!G)return;const se=re=>{const he=re.target;if(!he)return;const be=he.closest?.('[data-type="variable"][data-multi-key]');if(!be)return;const ue=be.dataset.key;if(!ue)return;const Le=wr.current?.key===ue;if(Nr.current&&(Le||!Q.contains(be)))return;const de=Q.contains(be)?be:Q.querySelector(`[data-type="variable"][data-key="${ue}"]`);if(!de||de.getAttribute("data-report-url"))return;const pe=(de.innerText||"").replace(/[\u200B\n]/g,"").trim(),ve=de.dataset.multiKey,Ae=(ve?De.find(Fe=>Ye(Fe.type)&&Fe.key===ve):void 0)?.type==="multi-variable-select"?"multi-variable-select":"multi-variable";zo(ue,pe,Ae)};return Q.addEventListener("focusout",se),()=>Q.removeEventListener("focusout",se)},[W,zo,De,G]),gc(W,[De]),w.useEffect(()=>{const Q=W.current;if(!Q)return;const se=re=>{const he=re.target?.closest?.(".rte-tutorial-btn");if(!he)return;re.preventDefault(),re.stopPropagation();const be=he.dataset.tooltip;be&&Ht(be)};return Q.addEventListener("click",se,!0),()=>Q.removeEventListener("click",se,!0)},[Ht]),jl.current=(Q,se,re,he)=>{const be=W.current;if(!be)return;let ue=be.querySelector(`[data-type="variable"][data-key="${Q}"]`);if(ue&&!document.body.contains(ue)){const pe=document.querySelectorAll(`.rte-editor [data-type="variable"][data-key="${Q}"]`);let ve=null;pe.forEach(Ie=>{!ve&&document.body.contains(Ie)&&(ve=Ie)}),ue=ve}if(!ue){Qt.current[Q]={name:se,url:re};return}if(ue.getAttribute("data-report-url")===re){Qt.current[Q]={name:se,url:re};return}if(!he?.forceApply){const pe=ue.getAttribute("data-report-url"),ve=(ue.innerText||"").replace(/[\u200B\n]/g,"").trim();if(!(!pe&&ve==="")&&!(pe===re||ve===re))return}Qt.current[Q]={name:se,url:re};const Le=ue.querySelector(".rte-report-dropdown-host");Le&&(Le.style.display="",Le.style.visibility="",Le.classList.remove("hidden"),Le.classList.add("rte-report-dropdown-host-quiet"));const de=[document.createTextNode(se)];Le&&de.push(Le),ue.classList.remove("show-placeholder","rte-variable-with-icon"),ue.classList.add("rte-report-name-chip"),ue.setAttribute("data-report-url",re),ue.setAttribute("data-report-name",se),ue.contentEditable="false",ue.replaceChildren(...de),Xl(ue),document.dispatchEvent(new CustomEvent("rte-report-dropdown-force-close",{detail:{key:Q}})),setTimeout(()=>{Pr.current()},0)};const zy=w.useCallback((Q,se,re)=>{W.current&&(se==="report-url"?(jl.current(Q,re.name,re.url,{forceApply:!0}),setTimeout(()=>{Rt.current(Q,re.url)},0)):(se==="multi-variable"||se==="multi-variable-select")&&(jl.current(Q,re.name,re.url,{forceApply:!0}),se==="multi-variable-select"&&setTimeout(()=>{Rt.current(Q,re.url)},0)))},[W,Rt]),Vy=De.map(Q=>`${Q.type}:${Q.key??""}:${Q.placeholder??""}`).join("|"),Gy=Cc(W,z,zy,U,V,`${Vy}::${JSON.stringify(xt)}`,_);z1(W,De,Ne,r,xt,wr,void 0,f,void 0,L,Be,!!z,Qt);const Or=w.useRef(new Set),Vo=w.useRef(De),Go=w.useRef(L);(Vo.current!==De||Go.current!==L)&&(Vo.current=De,Go.current=L,Or.current=new Set),w.useEffect(()=>{if(!L||!De||De.length===0)return;const Q=De.filter(de=>de.type==="upload"&&de.key);if(Q.length===0)return;const se={},re=new Set,he=(de,pe)=>{if(pe)if(pe instanceof File){if(fl(pe)){re.add(de);return}se[de]=pe}else typeof pe=="string"&&pe.trim()&&(se[de]=pe.trim())};for(const de of Q){const pe=de.key;if(Or.current.has(pe))continue;const ve=L[pe],Ie=typeof de.maxCount=="number"&&de.maxCount>1;if(Array.isArray(ve)&&ve.length>0){Ie?ve.forEach((Ae,Fe)=>he(`${pe}-${Fe}`,Ae)):he(pe,ve[0]);continue}if(ve&&!Array.isArray(ve)){he(pe,ve);continue}if(Ie)for(let Ae=0;Ae<de.maxCount;Ae++){const Fe=`${pe}-${Ae}`,pt=L[Fe];pt&&he(Fe,pt)}}for(const de of Q){const pe=de.key;if(!(typeof de.maxCount=="number"&&de.maxCount>1))continue;const Ie=[];for(let Ae=0;Ae<de.maxCount;Ae++){const Fe=`${pe}-${Ae}`,pt=se[Fe];pt!=null&&Ie.push(pt),delete se[Fe]}Ie.forEach((Ae,Fe)=>{se[`${pe}-${Fe}`]=Ae})}if(Object.keys(se).length===0&&re.size===0)return;for(const de of Q){const pe=de.key,ve=Object.prototype.hasOwnProperty.call(se,pe)||Object.keys(se).some(Ae=>Ae.startsWith(`${pe}-`)),Ie=re.has(pe)||Array.from(re).some(Ae=>Ae.startsWith(`${pe}-`));(L[pe]!==void 0||ve||Ie)&&Or.current.add(pe)}ct(de=>{const pe={...de};let ve=!1;for(const Ie of Q){const Ae=Ie.key;if(L[Ae]===void 0)continue;if(typeof Ie.maxCount=="number"&&Ie.maxCount>1)for(let pt=0;pt<Ie.maxCount;pt++){const ta=`${Ae}-${pt}`;Object.prototype.hasOwnProperty.call(se,ta)||(re.has(ta)?de[ta]!==null&&(pe[ta]=null,ve=!0):!se[ta]&&de[ta]&&(pe[ta]=null,ve=!0))}else re.has(Ae)&&de[Ae]!==null&&(pe[Ae]=null,ve=!0)}for(const[Ie,Ae]of Object.entries(se))de[Ie]!==Ae&&(pe[Ie]=Ae,ve=!0);return ve?pe:de});const be=Object.entries(se).filter(([,de])=>typeof de=="string");if(be.length===0)return;const ue=async de=>{const pe=de.split("/").pop()?.split("?")[0]||"file",ve=decodeURIComponent(pe),Ie=async Ae=>{const Fe=await Ae.blob();return new File([Fe],ve,{type:Fe.type||"application/octet-stream"})};try{const Ae=`/api/image-proxy?url=${encodeURIComponent(de)}`,Fe=await fetch(Ae);if(Fe.ok)return Ie(Fe)}catch{}return null};let Le=!1;return Promise.all(be.map(async([de,pe])=>{const ve=await ue(pe);return ve&&fl(ve)?null:ve?{key:de,file:ve}:null})).then(de=>{if(Le)return;const pe={};for(const ve of de)ve&&(pe[ve.key]=ve.file);Object.keys(pe).length>0&&ct(ve=>{const Ie={...ve};let Ae=!1;for(const[Fe,pt]of Object.entries(pe))typeof Ie[Fe]=="string"&&(Ie[Fe]=pt,Ae=!0);return Ae?Ie:ve})}),()=>{Le=!0}},[L,De]);const ul=w.useRef(new Map),Yo=w.useRef(""),Wo=((e||[]).find(Q=>Q.type==="tag")?.text||"")+"||"+(e||[]).filter(Q=>Q.key&&Q.type!=="report-module"&&Q.type!=="markdown-module").map(Q=>`${Q.type}:${Q.key}`).join("|");Yo.current!==Wo&&(Yo.current=Wo,ul.current=new Map),w.useEffect(()=>{if(!L||!e||e.length===0)return;const Q=e.filter(re=>re.type==="report-url"&&re.key),se=e.filter(re=>re.type==="multi-variable-select"&&re.key);if(!(Q.length===0&&se.length===0)){for(const re of Q){const he=re.key,be=L[he]??L[`${he}__url`];if(!be||typeof be=="string"&&!be.trim())continue;const ue=Array.isArray(be)?String(be[0]??""):String(be);ue&&ul.current.get(he)!==ue&&(ul.current.set(he,ue),setTimeout(()=>{Rt.current(he,ue)},100))}for(const re of se){const he=re.key,be=L[he];!Array.isArray(be)||be.length===0||be.forEach((ue,Le)=>{const de=typeof ue=="string"?ue.trim():"";if(!de)return;const pe=`${he}_${Le}`;ul.current.get(pe)!==de&&(ul.current.set(pe,de),setTimeout(()=>{Rt.current(pe,de)},100))})}}},[L,e,Rt]),vc(W),V1(W,De,Ne,Ke,S),G1(W,De,Ke,f,S),W1(W,De,Ne,Ke,S),Y1(W,De,Ke,S);const Dr=!!T;j1(W,De,Ne,Gl,Be,L,ga,Dr),Fc(W,x,Be,el,[De]);const Yy=Hc(P,el,W);$c(W,Be,Ke,S),K1(W,Ar);const jo=rc(W),Wy=sc(W),jy=oc(W),Ko=hc(W);w.useEffect(()=>{if(!W.current)return;W.current.querySelectorAll(".rte-richtext-toggle").forEach(se=>{const re=se.getAttribute("data-expanded")==="true";se.innerHTML=re?'<i class="iconfont icon-shouqi1"></i><span class="rte-richtext-toggle-label">收起</span>':'<i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span>'})},[De,W]);const Xo=uy(W),{measureExpandedContentHeight:ol}=zc({collapsed:b,collapseTransitionMs:k,contentRef:K,contentBodyRef:X,editorRef:W,debugIdRef:Pe,setCollapsedContentMaxHeightPx:Dy,setExpandedContentMaxHeightPx:My,setIsCollapseAnimating:By,effectiveConfig:De,files:Ne,multiVariableCounts:xt,selectPortalsLength:jo.length,datePickerPortalsLength:Xo.length,variablePortalsLength:Ko.length}),Ky=()=>{if(b)return;const Q=X.current;if(!Q)return;const se=Math.ceil(Q.getBoundingClientRect().height||0);se>0&&_r(se),ll.current=!0,nl.current=!1,Tt.current&&(window.clearTimeout(Tt.current),Tt.current=null)};w.useEffect(()=>{const Q=()=>{ll.current&&(nl.current=!0,Tt.current&&window.clearTimeout(Tt.current),Tt.current=window.setTimeout(()=>{Tt.current=null,ll.current=!1,nl.current=!1,_r(null),window.requestAnimationFrame(()=>ol())},450))};return window.addEventListener("focus",Q),()=>window.removeEventListener("focus",Q)},[ol]),w.useEffect(()=>{!ll.current||!nl.current||(Tt.current&&(window.clearTimeout(Tt.current),Tt.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{_r(null),ol(),ll.current=!1,nl.current=!1})}))},[Ne,ol]),Vc({config:e,editorRef:W,setIsEmpty:Fo,setIsFormValid:Gl});const Xy=Wc({disabled:l,collapsed:b,onCollapsedChange:N,config:e,lockStructure:r,editorRef:W,containerRef:R,fileInputRef:ee,onBeforeFilePickerOpen:Ky,files:Ne,setFiles:ct,handleRemoveFile:$t,setActiveBatchKey:Ft,setActiveBatchStartIndex:ke,setActiveFileKey:yt,isDraggingRef:Ar,richtextPrevScrollTopRef:Oy,videoState:Be,setVideoState:el,videoFileInputRef:_e,activeVideoKeyRef:Je,onImagePreview:Q=>{ne(Q),Te(!0)}}),cl=jc({config:e,editorRef:W,setIsEmpty:Fo,setIsFormValid:Gl,setReportAnalyzeState:rl,setMarkdownAnalyzeState:Wl,setMarkdownNameAnalyzeState:Lr,collapsed:b,measureExpandedContentHeight:ol,effectiveConfig:De,files:Ne,multiVariableCounts:xt,setMultiVariableCounts:sl,savedCursorRef:wr,videoState:Be,resolvedReportNamesRef:Qt,reportAnalyzeState:ga,requireReportUrlAnalyze:Dr}),Pr=w.useRef(cl);Pr.current=cl;const Qy=Qc({disabled:l,config:e,multiVariableCounts:xt,setMultiVariableCounts:sl,editorRef:W,handleInput:cl,markdownAnalyzeRef:$o,reportAnalyzeRef:Rt,markdownNameAnalyzeRef:Ro,markdownAnalyzeStateRef:Ir,markdownRawTextRef:$y,setMarkdownAnalyzeState:Wl,setFooterFiles:Ge,footerFiles:Ve,messageApi:Y,onPasteUnsupported:()=>Y.warning("暂不支持上传该文件类型")});Yc({config:e,effectiveConfig:De,files:Ne,editorRef:W,setIsFormValid:Gl,multiVariableCounts:xt,setMultiVariableCounts:sl,videoState:Be,reportAnalyzeState:ga,requireReportUrlAnalyze:Dr});const Mr=w.useCallback((Q,se)=>{delete Qt.current[Q],Ea({keys:[Q]}),se==="report-url"&&rl(re=>({...re,[Q]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}))},[rl]),Jy=w.useCallback(Q=>{il();const{nodeKey:se,nodeType:re}=wc(Q);Mr(se,re),Q.focus(),Pr.current()},[Mr,il]),Zy=Ac(W,Jy,xt),Qo=Jc({config:e,files:Ne,footerFiles:Ve,onFooterFilesClear:()=>Ge([]),onSend:t,isProcessing:a,disabled:l,loading:o,isFormValid:Mo,editorRef:W,markdownAnalyzeState:Jt,markdownNameAnalyzeState:Zt,videoState:Be}),eT=Kc({disabled:l,lockStructure:r,config:e,editorRef:W,handleInput:cl,onEnterSend:Qo,onReportChipDeleted:Mr}),tT={...n?{width:typeof n=="number"?`${n}px`:n}:{},...d?{border:d}:{},...h?{background:h}:{},...y?{maxHeight:typeof y=="number"?`${y}px`:y}:{},...E&&!b?{minHeight:typeof E=="number"?`${E}px`:E}:{},...Ve.length>0?{minHeight:"220px"}:{},...y?{"--rte-richtext-fullscreen-height":typeof y=="number"?`${y}px`:y}:{},...g?{"--rte-editor-min-height":typeof g=="number"?`${g}px`:g}:{},...v?{"--rte-editor-padding":v}:{},...m?{"--rte-footer-padding":m}:{}},aT=typeof k=="number"&&Number.isFinite(k)&&k>=0?k:260,lT={overflow:"hidden"},Jo=al!=null?`${al}px`:b?`${Ho}px`:`${Math.max(Py,Ho)}px`,nT=e.length===0&&Bo&&!b,rT=al!=null||b||kr||nT?"hidden":Fy?"auto":"hidden",Zo=w.useRef(b),ec=Zo.current!==b;ec&&(Zo.current=b);const iT=al!=null?"none":ec||kr?`max-height ${aT}ms cubic-bezier(0.4, 0, 0.2, 1)`:"none";w.useLayoutEffect(()=>{const Q=X.current;if(!Q)return;const se=Q.scrollHeight>Q.clientHeight+1;Hy(re=>re===se?re:se)},[Jo,b,kr,al,De,Ne,xt,Ve.length]);const sT={maxHeight:Jo,minHeight:b?0:void 0,overflow:rT,overscrollBehavior:ce?"contain":"auto",transition:iT,willChange:"max-height"},tc=e.find(Q=>Q.type==="tag"),ea=tc?.text?i.find(Q=>Q.label===tc.text):void 0;return $.jsxs("div",{className:`rich-text-editor ${ce?"rte-editor-selected":""}`,style:tT,"data-disabled":l,ref:R,onMouseDownCapture:Po,onFocusCapture:Po,children:[O,$.jsxs("div",{className:"rich-text-editor-content",ref:K,style:lT,onMouseDown:Q=>{if(e.length!==0)return;const se=Q.target,re=W.current;if(!re||re.contains(se)||se.closest('button, input, a, svg, [role="button"], .rte-footer-files-wrapper'))return;if(Q.preventDefault(),re.childNodes.length===0){re.appendChild(document.createElement("br")),re.focus();const Le=document.createRange();Le.setStart(re,0),Le.collapse(!0);const de=window.getSelection();de?.removeAllRanges(),de?.addRange(Le);return}const be=window.getSelection(),ue=!!be&&be.rangeCount>0&&re.contains(be.anchorNode);if(re.focus(),!ue){const Le=document.createRange();Le.selectNodeContents(re),Le.collapse(!1);const de=window.getSelection();de?.removeAllRanges(),de?.addRange(Le)}},children:[Ve.length>0&&$.jsxs("div",{className:"rte-footer-files-wrapper",children:[Do.showLeft&&$.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-left",children:$.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-left",onClick:wy,children:$.jsx("svg",{style:{width:"16px",height:"16px",transform:"rotate(180deg)"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})}),$.jsx("div",{className:"rte-footer-files-list",ref:lt,onScroll:tl,children:Ve.map((Q,se)=>{const re=Q.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(Q.name||""),he=Q.size<1024?`${Q.size}B`:Q.size<1024*1024?`${Math.round(Q.size/1024)}KB`:`${(Q.size/(1024*1024)).toFixed(1)}MB`,be=re?URL.createObjectURL(Q):"";return $.jsxs("div",{className:"rte-footer-file-chip",style:re?{cursor:"pointer"}:void 0,onClick:re?()=>{ne(be),Te(!0)}:void 0,children:[re?$.jsx("img",{style:{width:"32px",height:"32px",objectFit:"contain",background:"#ffffff",border:"0.5px solid #EDF0F2",boxShadow:"0 2px 6px 1px rgba(174, 176, 180, 0.08)",boxSizing:"border-box"},className:"rte-footer-file-thumb",src:be,alt:Q.name}):$.jsx("div",{className:"rte-footer-file-icon",children:$.jsx("svg",{style:{width:"18px",height:"18px"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:`#${(()=>{const ue=(Q.name||"").split(".").pop()?.toLowerCase()||"";return["xls","xla","xlb","xlc","xlm","xlsx","xlt","xlw","csv","tsv","iif"].includes(ue)?"icon-a-xlsxcsv":["doc","docx","dot","odt","rtf","wiz"].includes(ue)?"icon-docx":["ppt","pptx","pot","ppa","pps","pwz"].includes(ue)?"icon-ppt":["txt","asm","bat","c","cc","conf","cpp","css","cxx","def","dic","eml","h","hh","in","js","ksh","php","pkl","rb","tar","tex","ts","xml"].includes(ue)?"icon-txt":ue==="pdf"?"icon-pdf":["html","htm","json","ics","ifb"].includes(ue)?"icon-a-htmljson":ue==="md"?"icon-md":"icon-lianjie"})()}`})})}),$.jsxs("div",{className:"rte-footer-file-info",children:[$.jsx("span",{className:"rte-footer-file-name",title:Q.name,children:Q.name}),$.jsx("span",{className:"rte-footer-file-size",children:he})]}),$.jsx("span",{className:"rte-footer-file-remove",onClick:ue=>{ue.stopPropagation(),Sy(se)},children:$.jsx("i",{className:"iconfont icon-guanbi ",style:{width:"8px",height:"8px",fontSize:"8px",display:"flex",alignItems:"center"}})})]},`${Q.name}-${Q.size}-${se}`)})}),Do.showRight&&$.jsx("div",{className:"rte-footer-files-mask rte-footer-files-mask-right",children:$.jsx("span",{className:"rte-footer-files-arrow rte-footer-files-arrow-right",onClick:Ay,children:$.jsx("svg",{style:{width:"16px",height:"16px"},"aria-hidden":"true",children:$.jsx("use",{xlinkHref:"#icon-fanhuijiantou"})})})})]}),$.jsxs("div",{ref:X,className:`rich-text-editor-content-body ${e.length===0?"rich-text-editor-content-body-default":""}`,style:sT,children:[$.jsx("div",{ref:W,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${Bo&&c?"rte-editor-empty":""} ${e.some(Q=>Q.type==="tag")?"rte-editor-with-agent":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":c,onMouseDown:_y,onMouseMove:Ny,onMouseUp:Iy,onClick:Xy,onDoubleClick:Ly,onInput:()=>{il(),cl()},onKeyDown:eT,onPaste:Q=>{il(),Qy(Q)}}),$.jsx("input",{type:"file",ref:ee,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:Ze}),$.jsx("input",{type:"file",ref:_e,className:"rte-file-input",accept:"video/*",onChange:Q=>{const se=Q.target.files?.[0],re=Je.current;se&&se.size>1024*1024*1024?Y.warning("视频文件不能超过1GB"):se&&re&&Yy(re,se),Je.current=null,_e.current&&(_e.current.value="")}})]})]}),$.jsxs("div",{className:"rich-text-editor-footer",children:[$.jsxs("div",{className:"rich-text-editor-footer-left",children:[$.jsx("div",{className:"rich-text-editor-brand",children:f!=="hideAgent"&&$.jsx(Ee.Dropdown,{placement:"topLeft",menu:{selectedKeys:ea?[String(ea.key)]:[],items:i.filter(Q=>Q.isShowNew!==1).map(Q=>({key:Q.key,label:$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[Q.icon&&$.jsx("i",{className:Q.icon}),$.jsx("span",{children:Q.label})]}),onClick:()=>{s?.(Q)}}))},trigger:["click"],disabled:l||a,overlayClassName:"rte-agent-dropdown",children:$.jsxs("div",{className:"rte-agent-badge",style:{cursor:i.length>0?"pointer":"default"},children:[$.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),$.jsx("span",{className:"rte-agent-text",children:"智能体呀啦嗦jhjkhkhkhhjk"})]})})}),!e.find(Q=>Q.type==="tag")&&$.jsxs($.Fragment,{children:[$.jsx("div",{className:"rte-footer-upload-btn",onClick:()=>ie.current?.click(),title:"上传文件",children:$.jsx("i",{className:"iconfont icon-lianjie",style:{fontSize:"16px"}})}),$.jsx("input",{type:"file",ref:ie,className:"rte-file-input",accept:".pdf,.xla,.xlb,.xlc,.xlm,.xls,.xlsx,.xlt,.xlw,.csv,.tsv,.iif,.doc,.docx,.dot,.odt,.rtf,.pot,.ppa,.pps,.ppt,.pptx,.pwz,.wiz,.asm,.bat,.c,.cc,.conf,.cpp,.css,.cxx,.def,.dic,.eml,.h,.hh,.htm,.html,.ics,.ifb,.in,.js,.json,.ksh,.png,.jpeg,.jpg,.gif,.webp,.md,.php,.pkl,.rb,.tar,.tex,.ts,.txt,.xml,",multiple:!0,onChange:Cy})]})]}),$.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[$.jsxs("div",{className:"rte-brand-badge",children:[$.jsx("div",{className:"rte-brand-badge",children:$.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""})}),$.jsx("span",{className:"rte-brand-text",style:{marginLeft:"4px"},children:"SealSeek 2.0"})]}),!ea||ea.points===void 0||ea.points===null?null:$.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[$.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),$.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ea.points)]}),ea.labelValue===2&&$.jsx("div",{className:"rte-limited-free-badge",children:$.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]}),$.jsx("button",{type:"button",onClick:Qo,disabled:a||l||o||!Mo,className:"rich-text-editor-send-button",children:a||o?$.jsx("span",{className:"rte-send-spinner"}):$.jsx("i",{className:"iconfont icon-fasong"})})]})]}),kt,Xt,$.jsx(Ee.Image,{style:{display:"none"},src:Z,preview:{visible:ge,onVisibleChange:Q=>Te(Q)}}),Xo,jo,Wy,jy,Ko,Gy,Zy]})};So.__docgenInfo={displayName:"RichTextEditor",description:"结构化富文本输入组件,支持标签、变量输入块、文件上传以及互斥显示逻辑。",props:{config:{name:"config",required:!0,description:"结构化输入配置节点数组",type:{name:"InputNode[]",raw:"InputNode[]"}},onSend:{name:"onSend",required:!0,description:"点击发送按钮时的回调,返回数据与拼接后的 Prompt",type:{name:"function",raw:"(data: Record<string, any>, fullPrompt: string) => void"}},isProcessing:{name:"isProcessing",required:!1,description:"是否处于处理状态(禁用输入与发送)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}}}};const Ao="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",oy=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],cy=({autoLoading:e,batchSize:t,loadingProgress:a,loadIcon:l,onBatchSizeChange:n,onLoadNextPage:r,onStartAutoLoad:i,onStopLoad:s})=>e&&a?$.jsxs("div",{className:"auto_load_progress",children:[l||$.jsx("img",{src:Ao,alt:"自动加载",width:14,height:14}),$.jsxs("span",{children:["正在加载第",a.currentPage,"/",a.totalPages,"页"]}),$.jsx(Ee.Progress,{percent:a.percentage,type:"line",size:[160,8]}),$.jsx("span",{onClick:s,className:"auto_load_stop_btn",children:"停止加载"})]}):$.jsxs("div",{className:"auto_load_container",children:[$.jsx("div",{onClick:r,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),$.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[$.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:i,children:[l||$.jsx("img",{src:Ao,alt:"自动加载",width:14,height:14}),$.jsx("span",{children:"自动加载"})]}),$.jsx(Ee.Select,{value:t,onChange:n,options:oy,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),dy=({current:e,loadIcon:t,pageSize:a,total:l,cachedPages:n,loadedCount:r,autoLoading:i=!1,loadingProgress:s,onChange:u,onLoadNextPage:o,onStartAutoLoad:c,onStopLoading:d})=>{const[h,f]=w.useState(5),y=Math.ceil(l/a),E=w.useMemo(()=>n.length>=y,[n,y]),g=()=>Array.from({length:y},(b,T)=>T+1).filter(b=>!n.includes(b)).slice(0,h),v=(m,b,T)=>{const C=n.includes(m);return b==="prev"||b==="next"||b==="jump-prev"||b==="jump-next"?$.jsx("div",{className:"pageBox",children:T}):$.jsxs("div",{className:"pageBox",style:{backgroundColor:e===m?"#2563EB":"#f5f5f5",color:e===m?"#fff":C?"#171717":"#a3a3a3"},children:[m,!C&&$.jsx("span",{className:"unload_spot"})]})};return $.jsxs("div",{className:"pagination_footer",children:[$.jsxs("div",{className:"pagination_leftWrap",children:[$.jsxs("span",{className:"pagination_total",children:[$.jsx(Ct.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",r,"/",l,"条数据"]}),!E&&$.jsx(cy,{loadIcon:t||void 0,autoLoading:i,batchSize:h,loadingProgress:s,disabled:!o||!c,onBatchSizeChange:f,onLoadNextPage:()=>o?.(),onStartAutoLoad:()=>{const m=g();c?.(m)},onStopLoad:()=>d?.()})]}),$.jsx(Ee.Pagination,{current:e,pageSize:a,total:l,onChange:m=>u(m),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:v})]})},wo=e=>{const{loading:t,autoLoading:a,loadingProgress:l,columns:n=[],dataSource:r=[],total:i,current:s,pageSize:u,cachedPages:o,onChangePage:c,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f,...y}=e,E=w.useRef(null),g=w.useCallback(v=>{c(v),o.includes(v)&&E.current?.scrollTo({key:`${(v-1)*u+1}`})},[o,c,u]);return $.jsxs("div",{className:"flex flex-col",children:[$.jsx(Ee.Table,{ref:E,...y,columns:n,dataSource:r,pagination:!1,virtual:!0}),$.jsx(dy,{loading:t,autoLoading:a,loadingProgress:l,current:s,pageSize:u,total:i,loadedCount:r.length,cachedPages:o,onChange:g,onLoadNextPage:d,onStartAutoLoad:h,onStopLoading:f})]})};wo.__docgenInfo={displayName:"VirtualTable",description:"虚拟滚动表格组件,支持分页、数据缓存和自动加载功能。",props:{loading:{description:"加载状态",name:"loading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},total:{description:"总数据条数",name:"total",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"0"}},current:{description:"当前页码",name:"current",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"1"}},pageSize:{description:"每页数据条数",name:"pageSize",required:!0,type:{name:"number",raw:"number"},defaultValue:{value:"10"}},cachedPages:{description:"已缓存的页码数组",name:"cachedPages",required:!0,type:{name:"number[]",raw:"number[]"},defaultValue:{value:"[]"}},dataSource:{description:"数据源",name:"dataSource",required:!0,type:{name:"Array<T>",raw:"Array<T>"},defaultValue:{value:"[]"}},onChangePage:{description:"页码变更回调函数",name:"onChangePage",required:!0,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},autoLoading:{description:"是否正在自动加载",name:"autoLoading",required:!0,type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},loadingProgress:{description:"加载进度信息",name:"loadingProgress",required:!0,type:{name:"object",raw:"{percentage: 0, currentPage: 1, totalPages: 5}"},defaultValue:{value:"-"}},onLoadNextPage:{description:"加载下一页回调函数",name:"onLoadNextPage",required:!1,type:{name:"function",raw:"function(page: number): void"},defaultValue:{value:"-"}},onStartAutoLoad:{description:"开始自动加载回调函数",name:"onStartAutoLoad",required:!1,type:{name:"function",raw:"function(loadNextPages: number[]): void"},defaultValue:{value:"-"}},onStopLoading:{description:"停止加载回调函数",name:"onStopLoading",required:!1,type:{name:"function",raw:"function(): void"},defaultValue:{value:"-"}},columns:{description:"表格列配置",name:"columns",required:!0,type:{name:"Array<object>",raw:"Array<object>"},defaultValue:{value:"[]"}}}};const ko=({texts:e=[],placeholder:t="请输入内容",animationSpeed:a=100,autoPlay:l=!0,value:n,onChange:r,...i})=>{const[s,u]=w.useState(""),[o,c]=w.useState(0),[d,h]=w.useState(!1),[f,y]=w.useState(!1),[E,g]=w.useState(!1),v=w.useRef(void 0),m=w.useRef(void 0),b=w.useRef(e),T=w.useRef(o),C=w.useRef(f),A=w.useRef(s);w.useEffect(()=>{b.current=e,T.current=o,C.current=f,A.current=s});const N=w.useCallback((I,x)=>{let P=0;g(!0);const z=()=>{P<I.length?(u(I.slice(0,P+1)),P++,m.current=window.setTimeout(z,a)):(g(!1),x?.())};z()},[a]),k=w.useCallback(I=>{let x=A.current.length;const P=()=>{x>0?(u(A.current.slice(0,x-1)),x--,m.current=window.setTimeout(P,a/2)):I?.()};P()},[a]),S=w.useCallback(()=>{if(b.current.length===0||C.current)return;h(!0);const I=b.current[T.current];A.current?k(()=>{N(I,()=>{v.current=window.setTimeout(()=>{c(x=>(x+1)%b.current.length),h(!1)},2e3)})}):N(I,()=>{v.current=window.setTimeout(()=>{c(x=>(x+1)%b.current.length),h(!1)},2e3)})},[k,N]);w.useEffect(()=>(l&&e.length>0&&!f&&S(),()=>{v.current&&window.clearTimeout(v.current),m.current&&window.clearTimeout(m.current)}),[o,f,l,e.length,S]),w.useEffect(()=>{!d&&l&&e.length>0&&!f&&S()},[o,d,l,e.length,f,S]);const L=I=>{y(!0),v.current&&window.clearTimeout(v.current),m.current&&window.clearTimeout(m.current),h(!1),g(!1),i.onFocus?.(I)},D=I=>{y(!1),!n&&e.length>0&&(u(""),c(0)),i.onBlur?.(I)},F=I=>{r?.(I.target.value),i.onChange?.(I)},M=()=>f||n?t:s||t;return $.jsxs("div",{style:{position:"relative"},children:[$.jsx(Ee.Input,{...i,value:n,onChange:F,onFocus:L,onBlur:D,placeholder:M(),style:{...i.style,position:"relative",zIndex:1}}),!f&&!n&&s&&$.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",paddingLeft:11,paddingRight:11,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit"},children:[$.jsx("span",{children:s}),E&&$.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),$.jsx("style",{children:`
|
|
65
65
|
@keyframes blink {
|
|
66
66
|
0%, 50% { opacity: 1; }
|
|
67
67
|
51%, 100% { opacity: 0; }
|
|
@@ -73,5 +73,5 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
73
73
|
}
|
|
74
74
|
`})]})};_o.__docgenInfo={displayName:"DynamicTextArea",description:"动态文案文本域组件,支持流式文字动画效果",props:{texts:{name:"texts",required:!0,description:"动态展示的文案数组",type:{name:"string[]",raw:"string[]"}},placeholder:{name:"placeholder",required:!1,description:"输入框占位符",type:{name:"string",raw:"string"},defaultValue:{value:'"请输入内容"'}},animationSpeed:{name:"animationSpeed",required:!1,description:"动画速度(毫秒)",type:{name:"number",raw:"number"},defaultValue:{value:"100"}},autoPlay:{name:"autoPlay",required:!1,description:"是否自动播放动画",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},value:{name:"value",required:!1,description:"输入框值",type:{name:"string",raw:"string"}},onChange:{name:"onChange",required:!1,description:"输入框变化回调",type:{name:"function",raw:"(value: string) => void"}},onSubmit:{name:"onSubmit",required:!1,description:"提交回调",type:{name:"function",raw:"(value: string) => void"}},maxLength:{name:"maxLength",required:!1,description:"最大输入字数",type:{name:"number",raw:"number"},defaultValue:{value:"500"}},showCount:{name:"showCount",required:!1,description:"是否显示字数统计",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},submitText:{name:"submitText",required:!1,description:"提交按钮文本",type:{name:"string",raw:"string"},defaultValue:{value:'"发送"'}},disabled:{name:"disabled",required:!1,description:"是否禁用提交按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"false"}},rows:{name:"rows",required:!1,description:"文本域行数",type:{name:"number",raw:"number"},defaultValue:{value:"4"}}}};const Sr=({src:e,poster:t,width:a=300,height:l,videoWidth:n,videoHeight:r,showPlayButton:i=!0,autoPlayOnHover:s=!0,onClick:u,onVideoLoaded:o,onVideoPlay:c,onVideoPause:d,onVideoEnded:h,className:f,style:y,...E})=>{const g=w.useRef(null),[v,m]=w.useState(!1),[b,T]=w.useState(!1),[C,A]=w.useState(!1),N=w.useCallback(()=>{g.current&&(g.current.play(),m(!0),c?.())},[c]),k=w.useCallback(()=>{g.current&&(g.current.pause(),m(!1),d?.())},[d]),S=w.useCallback(z=>{z.stopPropagation(),v?k():N()},[v,N,k]),L=w.useCallback(()=>{T(!0),s&&!v&&N()},[s,v,N]),D=w.useCallback(()=>{T(!1),s&&v&&k()},[s,v,k]),F=w.useCallback(()=>{A(!0),o?.()},[o]),M=w.useCallback(()=>{m(!0),c?.()},[c]),I=w.useCallback(()=>{m(!1),d?.()},[d]),x=w.useCallback(()=>{m(!1),h?.()},[h]),P=w.useCallback(z=>{u?.(z)},[u]);return $.jsx(Ee.Card,{...E,className:`video-card ${f||""}`,style:{width:a,height:l,padding:0,overflow:"hidden",cursor:u?"pointer":"default",border:"none",borderRadius:0,...y},bordered:!1,onMouseEnter:L,onMouseLeave:D,onClick:P,children:$.jsxs("div",{className:"video-card-container",children:[$.jsx("video",{ref:g,src:e,poster:t,preload:"metadata",onLoadedData:F,onPlay:M,onPause:I,onEnded:x,muted:!0,loop:!0}),i&&$.jsx("div",{className:`video-play-button ${b?"hovered":""}`,onClick:S,children:v?$.jsx(Ct.PauseCircleOutlined,{className:"play-icon"}):$.jsx(Ct.PlayCircleOutlined,{className:"play-icon"})}),!C&&$.jsx("div",{className:"video-loading-mask",children:$.jsx("div",{className:"loading-spinner"})})]})})};Sr.__docgenInfo={displayName:"VideoCard",description:"视频卡片组件,支持鼠标悬浮播放控制",props:{src:{name:"src",required:!0,description:"视频源地址",type:{name:"string",raw:"string"}},poster:{name:"poster",required:!1,description:"视频海报图片",type:{name:"string",raw:"string"}},width:{name:"width",required:!1,description:"卡片宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:"300"}},height:{name:"height",required:!1,description:"卡片高度",type:{name:"number | string",raw:"number | string"}},videoWidth:{name:"videoWidth",required:!1,description:"视频宽度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},videoHeight:{name:"videoHeight",required:!1,description:"视频高度",type:{name:"number | string",raw:"number | string"},defaultValue:{value:'"100%"'}},showPlayButton:{name:"showPlayButton",required:!1,description:"是否显示播放按钮",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},autoPlayOnHover:{name:"autoPlayOnHover",required:!1,description:"是否自动播放(鼠标悬浮时)",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},onClick:{name:"onClick",required:!1,description:"点击事件",type:{name:"function",raw:"(event: React.MouseEvent<HTMLDivElement>) => void"}},onVideoLoaded:{name:"onVideoLoaded",required:!1,description:"视频加载完成事件",type:{name:"function",raw:"() => void"}},onVideoPlay:{name:"onVideoPlay",required:!1,description:"视频播放事件",type:{name:"function",raw:"() => void"}},onVideoPause:{name:"onVideoPause",required:!1,description:"视频暂停事件",type:{name:"function",raw:"() => void"}},onVideoEnded:{name:"onVideoEnded",required:!1,description:"视频结束事件",type:{name:"function",raw:"() => void"}},className:{name:"className",required:!1,description:"自定义样式类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}}}};const fy=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(a=>e.toLowerCase().includes(a)),py=e=>e.type?e.type:fy(e.url)?"video":"image",No=({items:e,columns:t,gap:a=0,responsive:l=!0,breakpoints:n={xs:1,sm:2,md:3,lg:4,xl:5,xxl:6},className:r,style:i,onClick:s})=>{const u=w.useRef(null),[o,c]=w.useState(t||n.md||3),d=w.useRef(new Map),h=w.useCallback(()=>{if(!l||t)return t||n.md||3;const g=window.innerWidth;return g<576?n.xs||1:g<768?n.sm||2:g<992?n.md||3:g<1200?n.lg||4:g<1600?n.xl||5:n.xxl||6},[l,t,n]),f=w.useCallback(()=>{if(!u.current)return;const g=o,v=u.current,b=(v.offsetWidth-a*(g-1))/g,T=new Array(g).fill(0);e.forEach((A,N)=>{const k=A.id||N,S=d.current.get(k);if(!S)return;const L=Math.min(...T),D=T.indexOf(L),F=D*(b+a),M=T[D];S.style.position="absolute",S.style.left=`${F}px`,S.style.top=`${M}px`,S.style.width=`${b}px`,T[D]+=S.offsetHeight+a});const C=Math.max(...T);v.style.height=`${C}px`},[e,o,a]);w.useEffect(()=>{const g=()=>{const v=h();v!==o&&c(v)};if(l)return window.addEventListener("resize",g),g(),()=>window.removeEventListener("resize",g)},[l,h,o]),w.useEffect(()=>{const g=setTimeout(()=>{f()},100);return()=>clearTimeout(g)},[e,o,f]);const y=w.useCallback(()=>{f()},[f]),E=w.useCallback(g=>{s&&s(g),g.onClick?.(g)},[s]);return $.jsx("div",{ref:u,className:`waterfall-container ${r||""}`,style:{position:"relative",width:"100%",...i},children:e.map((g,v)=>{const m=g.id||v,b=py(g);return $.jsx("div",{ref:T=>{T?d.current.set(m,T):d.current.delete(m)},className:"waterfall-item",children:b==="video"?$.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:s||g.onClick?"pointer":"default"},children:$.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:$.jsx(Sr,{src:g.url,poster:g.poster,width:"100%",height:"100%",onClick:()=>E(g),onVideoLoaded:y,autoPlayOnHover:!0,showPlayButton:!1})})}):$.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>E(g),style:{cursor:s||g.onClick?"pointer":"default"},children:$.jsx("img",{src:g.url,alt:`瀑布流图片 ${v+1}`,className:"waterfall-image",onLoad:y,onError:y,style:{display:"block",width:"100%",height:"auto"}})})},m)})})};No.__docgenInfo={displayName:"Waterfall",description:"瀑布流布局组件,支持图片和视频混合展示",props:{items:{name:"items",required:!0,description:"媒体资源数组",type:{name:"WaterfallItem[]",raw:"WaterfallItem[]"}},columns:{name:"columns",required:!1,description:"列数(默认会根据屏幕宽度自动响应)",type:{name:"number",raw:"number"}},gap:{name:"gap",required:!1,description:"间隔大小",type:{name:"number",raw:"number"},defaultValue:{value:"0"}},responsive:{name:"responsive",required:!1,description:"是否启用响应式布局",type:{name:"boolean",raw:"boolean"},defaultValue:{value:"true"}},breakpoints:{name:"breakpoints",required:!1,description:"响应式断点配置",type:{name:"object",raw:"{ xs?: number; sm?: number; md?: number; lg?: number; xl?: number; xxl?: number; }"}},className:{name:"className",required:!1,description:"自定义类名",type:{name:"string",raw:"string"}},style:{name:"style",required:!1,description:"自定义样式",type:{name:"CSSProperties",raw:"React.CSSProperties"}},onClick:{name:"onClick",required:!1,description:"点击回调",type:{name:"function",raw:"(item: any) => void"}}}};const Qa=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),va={日期:"date",展现量:"impressions",点击量:"clicks","花费(元)":"cost",点击率:"clickRate","平均点击花费(元)":"avgClickCost","千次展现花费(元)":"cpm","总成交金额(元)":"totalTransactionAmount",总成交笔数:"totalTransactionCount",点击转化率:"clickConversionRate","直接成交金额(元)":"directTransactionAmount","间接成交金额(元)":"indirectTransactionAmount",直接成交笔数:"directTransactionCount",间接成交笔数:"indirectTransactionCount",投入产出比:"roi",含预售投产比:"roiWithPresale","总成交成本(元)":"totalTransactionCost","总预售成交金额(元)":"totalPresaleAmount",总预售成交笔数:"totalPresaleCount","直接预售成交金额(元)":"directPresaleAmount",直接预售成交笔数:"directPresaleCount","间接预售成交金额(元)":"indirectPresaleAmount",间接预售成交笔数:"indirectPresaleCount",拍下订单笔数:"orderCount","拍下订单金额(元)":"orderAmount",总购物车数:"totalCartCount",直接购物车数:"directCartCount",间接购物车数:"indirectCartCount",加购率:"addToCartRate","加购成本(元)":"addToCartCost",收藏宝贝数:"productCollectionCount",收藏店铺数:"shopCollectionCount",总收藏数:"totalCollectionCount",直接收藏宝贝数:"directProductCollectionCount",间接收藏宝贝数:"indirectProductCollectionCount",宝贝收藏率:"productCollectionRate","宝贝收藏成本(元)":"productCollectionCost","店铺收藏成本(元)":"shopCollectionCost",总收藏加购数:"totalCollectionAndCartCount","总收藏加购成本(元)":"totalCollectionAndCartCost",宝贝收藏加购数:"productCollectionAndCartCount","宝贝收藏加购成本(元)":"productCollectionAndCartCost",引导访问量:"guidedVisitCount",引导访问人数:"guidedVisitorCount",引导访问潜客数:"guidedPotentialCustomerCount",引导访问潜客占比:"guidedPotentialCustomerRate",引导访问率:"guidedVisitRate",深度访问量:"deepVisitCount",平均访问页面数:"avgPageViews",成交人数:"transactionCustomerCount",成交新客数:"newCustomerCount",成交新客占比:"newCustomerRate",人均成交笔数:"avgTransactionPerCustomer",人均成交金额:"avgAmountPerCustomer",优惠券领取量:"couponClaimCount",购物金充值笔数:"shoppingCreditRechargeCount","购物金充值金额(元)":"shoppingCreditRechargeAmount",旺旺咨询量:"wangwangConsultationCount",自然流量转化金额:"organicTrafficAmount",自然流量曝光量:"organicTrafficImpressions"},hy=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],Ja=e=>va[e]??e,by=e=>e?!!(va[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,my=e=>{const t=e.trim();if(!t)return[];const a=t.split(/[\r\n]+/).map(i=>i.trim()).filter(Boolean);if(a.length===0)return[];const l=a[0];if(l.includes(" ")){const i=l.split(/\t/).map(u=>u.trim()).filter(Boolean),s=i.some(u=>va[u]!==void 0);if(i.length>=2&&s)return i}if(a.length===1){let i=l.split(/\s{2,}/).map(u=>u.trim()).filter(Boolean);i.length<=1&&(i=l.split(/\s+/).filter(Boolean));const s=i.some(u=>va[u]!==void 0);return i.length>=2&&s?i:[]}const n=a.filter(by);return n.some(i=>va[i]!==void 0)&&n.length>=2&&n.length/a.length>=.5?n:[]},vy=e=>{if(!e||e.trim()==="")return"";const t=e.trim();if(t.toLowerCase()==="nan")return"NaN";const a=t.match(/^(.+?)([+-]\d)/);return a?a[1].trim():t},gy=e=>e.replace(/[\u00a0\u3000]/g," ").replace(/[–—]/g,"-").replace(/%(\d)/g,"% $1").replace(/NaN(\d)/gi,"NaN $1").replace(/(\.\d+)(\d,\d{3})/g,"$1 $2").replace(/(\.\d+)(\d+\.)/g,"$1 $2").replace(/(\.\d{2})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").replace(/(,\d{3})(\d+[+-]\d+\.?\d*%)/g,"$1 $2").split(/\s+/).map(a=>a.trim()).filter(a=>a!==""),Io=e=>{const t=(e||"").replace(/[\u00a0\u3000]/g," "),a=/20\d{2}-\d{2}-\d{2}/g,l=t.match(a)||[];if(l.length===0)return{markdown:"",jsonData:[]};const n=t.split(a).filter(v=>v.trim()!==""),r=n.length>0?my(n[0]):[],i=r.length>=2,s=i?r:hy,u=i||n.length>0&&n[0].includes("展现量")?1:0,o=s.filter(v=>v!=="日期"),c=o.length,d=[];l.forEach((v,m)=>{const b=m+u;if(b>=n.length)return;const T=n[b];let C=T.split(/[\r\n]+/).map(k=>k.trim()).filter(k=>k!=="");C.length<c&&(C=gy(T));const A=k=>C.length===c*2?C[k*2]??"":C[k]??"",N={};N[Ja("日期")]=v,o.forEach((k,S)=>{const L=A(S),D=vy(L),F=Ja(k);N[F]=D}),d.push(N)});const h=s.filter(v=>{const m=Ja(v);return d.some(b=>{const T=b[m];return T!==void 0&&String(T).trim()!==""})}),f=`| ${h.join(" | ")} |`,y=`| ${h.map(()=>"---").join(" | ")} |`,E=d.map(v=>`| ${h.map(b=>{const T=Ja(b);return v[T]??"-"}).join(" | ")} |`);return{markdown:[f,y,...E].join(`
|
|
75
75
|
`),jsonData:d}},Lo=e=>{if(!e)return"";const t=e.trim().split(`
|
|
76
|
-
`);if(t.length<2)return Qa(e);const a=t[1],n=/^\|[\s-|]+\|$/.test(a.trim());if(!a||!n)return Qa(e);const i=t[0].split("|").map(d=>d.trim()).filter(d=>d!==""),s=t.slice(2).map(d=>d.split("|").map(h=>h.trim()).filter((h,f,y)=>f>0&&f<y.length)),u="border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;",o="border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";let c='<div style="overflow-x:auto;max-width:100%;">';return c+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',c+="<thead><tr>",i.forEach(d=>{c+=`<th style="${u}">${Qa(d)}</th>`}),c+="</tr></thead>",c+="<tbody>",s.forEach(d=>{c+="<tr>",i.forEach((h,f)=>{const y=d[f]||"-";c+=`<td style="${o}">${Qa(y)}</td>`}),c+="</tr>"}),c+="</tbody></table></div>",c},Oo=e=>{const t=[],a=e.querySelector("thead tr");if(!a)return t;const l=[];return a.querySelectorAll("th").forEach(r=>{l.push(r.textContent?.trim()||"")}),e.querySelectorAll("tbody tr").forEach(r=>{const i={};r.querySelectorAll("td").forEach((u,o)=>{const c=l[o];if(c==null)return;const d=Ja(c),h=u.textContent?.trim()||"";i[d]=h==="-"?"":h}),Object.keys(i).length>0&&t.push(i)}),t},Ey=e=>async t=>{const a=Io(t.text);return e&&e(a.jsonData),{modules:[{title:"推广分析表格",content:Lo(a.markdown),markdown:a.markdown}]}},yy=(e,t,a)=>{const l=parseFloat(String(e.get("grossProfitMargin")||"0"))||0,n=parseFloat(String(e.get("refundRate")||"0"))||0;let r=[];if(t){const i=Oo(t);i.length>0&&(r=i)}return r.length===0&&a&&a.length>0&&(r=a),{grossProfitMargin:l,refundRate:n,tableData:r}},Ty={algorithm:Ee.theme.defaultAlgorithm,token:{colorPrimary:"#3b82f6",colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#ef4444",colorInfo:"#3b82f6",colorBgBase:"#ffffff",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBgLayout:"#f8fafc",colorTextBase:"#1e293b",colorText:"#1e293b",colorTextSecondary:"#64748b",colorTextTertiary:"#94a3b8",colorTextQuaternary:"#cbd5e1",colorBorder:"#e2e8f0",colorBorderSecondary:"#f1f5f9",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",borderRadius:8,borderRadiusLG:12,borderRadiusSM:6,fontFamily:"Inter, system-ui, Arial, sans-serif",fontSize:14,fontSizeLG:16,fontSizeSM:12,padding:16,paddingLG:24,paddingSM:12,paddingXS:8,controlHeight:32,controlHeightLG:40,controlHeightSM:24},components:{Button:{borderRadius:8,controlHeight:32,fontWeight:500},Card:{borderRadiusLG:12,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},Input:{borderRadius:8,controlHeight:32},Table:{borderRadiusLG:8,headerBg:"#f8fafc",headerColor:"#374151"}}};we.AdvancedTable=Vr,we.AppModal=Hr,we.BackButton=qr,we.Button=Br,we.Card=Fr,we.DynamicInput=ko,we.DynamicTextArea=_o,we.EmptyAndSpin=Ur,we.HEADER_TO_FIELD=va,we.LinkButton=zr,we.PageTable=$r,we.RichTextEditor=So,we.VideoCard=Sr,we.VirtualTable=wo,we.Waterfall=No,we.XcIcon=Rr,we.buildPromotionSendPayload=yy,we.createMarkdownAnalyze=Ey,we.escapeHtml=Qa,we.extractTableDataFromHtml=Oo,we.lightTheme=Ty,we.parsePromotionTableMarkdown=Io,we.renderMarkdownToHtml=Lo,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})});
|
|
76
|
+
`);if(t.length<2)return Qa(e);const a=t[1],n=/^\|[\s-|]+\|$/.test(a.trim());if(!a||!n)return Qa(e);const i=t[0].split("|").map(d=>d.trim()).filter(d=>d!==""),s=t.slice(2).map(d=>d.split("|").map(h=>h.trim()).filter((h,f,y)=>f>0&&f<y.length)),u="border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;",o="border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";let c='<div style="overflow-x:auto;max-width:100%;">';return c+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',c+="<thead><tr>",i.forEach(d=>{c+=`<th style="${u}">${Qa(d)}</th>`}),c+="</tr></thead>",c+="<tbody>",s.forEach(d=>{c+="<tr>",i.forEach((h,f)=>{const y=d[f]||"-";c+=`<td style="${o}">${Qa(y)}</td>`}),c+="</tr>"}),c+="</tbody></table></div>",c},Oo=e=>{const t=[],a=e.querySelector("thead tr");if(!a)return t;const l=[];return a.querySelectorAll("th").forEach(r=>{l.push(r.textContent?.trim()||"")}),e.querySelectorAll("tbody tr").forEach(r=>{const i={};r.querySelectorAll("td").forEach((u,o)=>{const c=l[o];if(c==null)return;const d=Ja(c),h=u.textContent?.trim()||"";i[d]=h==="-"?"":h}),Object.keys(i).length>0&&t.push(i)}),t},Ey=e=>async t=>{const a=Io(t.text);return e&&e(a.jsonData),{modules:[{title:"推广分析表格",content:Lo(a.markdown),markdown:a.markdown}]}},yy=(e,t,a)=>{const l=parseFloat(String(e.get("grossProfitMargin")||"0"))||0,n=parseFloat(String(e.get("refundRate")||"0"))||0;let r=[];if(t){const i=Oo(t);i.length>0&&(r=i)}return r.length===0&&a&&a.length>0&&(r=a),{grossProfitMargin:l,refundRate:n,tableData:r}},Ty={algorithm:Ee.theme.defaultAlgorithm,token:{colorPrimary:"#3b82f6",colorSuccess:"#10b981",colorWarning:"#f59e0b",colorError:"#ef4444",colorInfo:"#3b82f6",colorBgBase:"#ffffff",colorBgContainer:"#ffffff",colorBgElevated:"#ffffff",colorBgLayout:"#f8fafc",colorTextBase:"#1e293b",colorText:"#1e293b",colorTextSecondary:"#64748b",colorTextTertiary:"#94a3b8",colorTextQuaternary:"#cbd5e1",colorBorder:"#e2e8f0",colorBorderSecondary:"#f1f5f9",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",boxShadowSecondary:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",borderRadius:8,borderRadiusLG:12,borderRadiusSM:6,fontFamily:"Inter, system-ui, Arial, sans-serif",fontSize:14,fontSizeLG:16,fontSizeSM:12,padding:16,paddingLG:24,paddingSM:12,paddingXS:8,controlHeight:32,controlHeightLG:40,controlHeightSM:24},components:{Button:{borderRadius:8,controlHeight:32,fontWeight:500},Card:{borderRadiusLG:12,boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)"},Input:{borderRadius:8,controlHeight:32},Table:{borderRadiusLG:8,headerBg:"#f8fafc",headerColor:"#374151"}}};we.AdvancedTable=Vr,we.AppModal=Hr,we.BackButton=qr,we.Button=Br,we.Card=Fr,we.DynamicInput=ko,we.DynamicTextArea=_o,we.EmptyAndSpin=Ur,we.HEADER_TO_FIELD=va,we.LinkButton=zr,we.PageTable=$r,we.RichTextEditor=So,we.VideoCard=Sr,we.VirtualTable=wo,we.Waterfall=No,we.XcIcon=Rr,we.buildPromotionSendPayload=yy,we.createMarkdownAnalyze=Ey,we.escapeHtml=Qa,we.extractTableDataFromHtml=Oo,we.lightTheme=Ty,we.parsePromotionTableMarkdown=Io,we.renderMarkdownToHtml=Lo,Object.defineProperty(we,Symbol.toStringTag,{value:"Module"})}));
|
|
77
77
|
//# sourceMappingURL=index.umd.js.map
|