bi-components-library 1.1.38 → 1.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2501 -2502
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +38 -38
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
(function(he,z){typeof exports=="object"&&typeof module<"u"?z(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"],z):(he=typeof globalThis<"u"?globalThis:he||self,z(he.SealSeekBIComponents={},he.React,he.React,he.antd,he.AntdIcons,he.ReactDOM))})(this,function(he,z,M,se,st,kn){"use strict";const Ga=({variant:e="primary",loading:t=!1,children:n,...r})=>{const a=i=>{switch(i){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return z.jsx(se.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ga.__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 Ya=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>z.jsx(se.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});Ya.__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 Wa=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>z.jsxs(z.Fragment,{children:[z.jsx(a,{}),z.jsx(i,{})]}):null;return z.jsx(se.Modal,{...t,footer:n})};Wa.__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 ja=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>z.jsx(se.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});ja.__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 Pu=st.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),Xa=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return z.jsx(Pu,{...a,type:e,style:i})};Xa.__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 Ka=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?z.jsxs(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[z.jsx(se.Spin,{size:"large"}),a&&z.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):z.jsx(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:z.jsx(se.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});Ka.__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 Qa=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>z.jsx(se.Button,{size:r,type:a,icon:z.jsx(st.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});Qa.__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 Ja=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return z.jsx(se.Button,{type:"link",...n,className:r,children:n.children})};Ja.__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:Mu}=se.Select,Za=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:u=!0,externalParams:o={},...l})=>{const[m,p]=M.useState([]),[b,g]=M.useState(!1),[c,f]=M.useState({current:1,pageSize:i,total:0}),[E,h]=M.useState({}),[T,y]=M.useState({}),[C]=se.Form.useForm(),S=M.useRef(c);S.current=c;const A=M.useRef(o);A.current=o;const w=M.useRef(!1),_=M.useMemo(()=>e.map(v=>{const{sortable:x,render:P,...$}=v;return{...$,sorter:x?!0:void 0,render:P||(U=>U)}}),[e]),L=M.useCallback(async(v={})=>{if(t){g(!0);try{const x={page:S.current.current,pageSize:S.current.pageSize,sortField:T.field,sortOrder:T.order,searchParams:{...E,...A.current},...v},P=await t(x);P.success&&(p(P.data),f($=>({...$,total:P.total,current:x.page||$.current})))}catch(x){console.error("加载数据失败:",x)}finally{g(!1)}}},[t,T,E]),O=M.useCallback(v=>{h(v),f(x=>({...x,current:1}))},[]),I=M.useCallback(()=>{C.resetFields(),h({}),f(v=>({...v,current:1}))},[C]),B=M.useCallback(()=>{L()},[L]),H=M.useCallback((v,x,P)=>{const $={current:v.current||1,pageSize:v.pageSize||i,total:v.total||0},U={field:P?.field,order:P?.order};f($),y(U)},[i]);return M.useEffect(()=>{const v=Object.keys(o).length>0;(u&&!w.current||v)&&(L(),w.current=!0)},[u,o,L]),z.jsxs("div",{children:[r&&n.length>0&&z.jsx(se.Card,{size:"small",style:{marginBottom:16},children:z.jsxs(se.Form,{form:C,layout:"inline",onFinish:O,initialValues:n.reduce((v,x)=>(x.defaultValue!==void 0&&(v[x.key]=x.defaultValue),v),{}),children:[n.map(v=>z.jsx(se.Form.Item,{name:v.key,label:v.label,children:v.type==="input"?z.jsx(se.Input,{placeholder:v.placeholder||`请输入${v.label}`,style:{width:200}}):z.jsx(se.Select,{placeholder:v.placeholder||`请选择${v.label}`,style:{width:200},allowClear:!0,children:v.options?.map(x=>z.jsx(Mu,{value:x.value,children:x.label},x.value))})},v.key)),z.jsx(se.Form.Item,{children:z.jsxs(se.Space,{children:[z.jsx(se.Button,{type:"primary",htmlType:"submit",icon:z.jsx(st.SearchOutlined,{}),children:"查询"}),z.jsx(se.Button,{onClick:I,children:"重置"}),a&&z.jsx(se.Button,{icon:z.jsx(st.ReloadOutlined,{}),onClick:B,children:"刷新"})]})})]})}),z.jsx(se.Table,{...l,columns:_,dataSource:m,loading:b,pagination:{...c,showSizeChanger:!0,showQuickJumper:!0,showTotal:(v,x)=>`第 ${x[0]}-${x[1]} 条/共 ${v} 条`,pageSizeOptions:s},onChange:H,scroll:{x:"max-content",y:"50vh"}})]})};Za.__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 Bu=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",u=M.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[o,l]=M.useState(s||void 0),[m,p]=M.useState(64),b=M.useRef(null),g=E=>{l(E),e.setAttribute("data-value",E),t(n,E)};M.useEffect(()=>{l(s||void 0)},[s]);const c=M.useCallback(()=>{if(o!=null&&o!==""){const E=u.find(h=>String(h.value)===String(o));return E?typeof E.label=="string"?E.label:String(E.label??o):String(o)}return r||"请选择"},[o,u,r]),f=M.useCallback(()=>{const E=b.current;if(!E)return;const h=E.querySelector(".ant-select-selection-item"),T=E.querySelector(".ant-select-selection-placeholder"),y=h||T,C=(y?.textContent||"").trim()||c(),S=E.querySelector(".ant-select-selector"),A=y||S||E,w=window.getComputedStyle(A),_=y?w.fontSize:"16px",L=w.fontFamily||"sans-serif",O=w.fontWeight||"400",B=`${w.fontStyle||"normal"} ${O} ${_} ${L}`,v=document.createElement("canvas").getContext("2d"),x=v?Math.ceil((v.font=B,v.measureText(C).width||0)):0;let P=0;if(S){const J=window.getComputedStyle(S);P=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const $=E.querySelector(".ant-select-arrow"),U=$?Math.ceil($.getBoundingClientRect().width):12,G=E.querySelector(".ant-select-clear");let k=0;if(G){const J=window.getComputedStyle(G);J.display!=="none"&&J.visibility!=="hidden"&&(k=Math.ceil(G.getBoundingClientRect().width))}const j=Math.max(36,x+P+U+k+6);p(J=>J===j?J:j)},[c]);return M.useLayoutEffect(()=>{const E=window.requestAnimationFrame(()=>{f()}),h=window.setTimeout(()=>{f()},60);return()=>{window.cancelAnimationFrame(E),window.clearTimeout(h)}},[f]),M.useEffect(()=>{if(!("fonts"in document))return;let E=!1;const h=document.fonts;if(h?.ready)return h.ready.then(()=>{E||f()}),()=>{E=!0}},[f]),kn.createPortal(z.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:b,style:{display:"inline-block",width:m},children:z.jsx(se.Select,{value:o,onChange:g,placeholder:r||"请选择",style:{width:"100%"},options:u,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:z.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},Ru=e=>{const[t,n]=M.useState([]);return M.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Bu,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`select-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Fu(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function Hu(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function $u(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const u=e.split(`
|
|
2
|
-
`);let o=0;for(const
|
|
3
|
-
`);
|
|
1
|
+
(function(he,z){typeof exports=="object"&&typeof module<"u"?z(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"],z):(he=typeof globalThis<"u"?globalThis:he||self,z(he.SealSeekBIComponents={},he.React,he.React,he.antd,he.AntdIcons,he.ReactDOM))})(this,function(he,z,D,se,st,kn){"use strict";const Ga=({variant:e="primary",loading:t=!1,children:n,...r})=>{const a=i=>{switch(i){case"primary":return"primary";case"ghost":return"default";case"dashed":return"dashed";case"link":return"link";case"text":return"text";default:return"primary"}};return z.jsx(se.Button,{...r,type:a(e),loading:t,ghost:e==="ghost",children:n})};Ga.__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 Ya=({title:e,children:t,bordered:n=!0,hoverable:r=!1,size:a="default",...i})=>z.jsx(se.Card,{...i,title:e,bordered:n,hoverable:r,size:a,children:t});Ya.__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 Wa=({showDefaultFooter:e=!0,...t})=>{const n=t.footer!==void 0?t.footer:e?(r,{OkBtn:a,CancelBtn:i})=>z.jsxs(z.Fragment,{children:[z.jsx(a,{}),z.jsx(i,{})]}):null;return z.jsx(se.Modal,{...t,footer:n})};Wa.__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 ja=({scrollX:e,showPagination:t=!0,defaultPageSize:n=10,...r})=>z.jsx(se.Table,{...r,scroll:{x:e||"max-content",y:"50vh"},pagination:t?{hideOnSinglePage:!0,showSizeChanger:!0,showQuickJumper:!0,defaultPageSize:n,...r.pagination}:!1});ja.__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 Pu=st.createFromIconfontCN({scriptUrl:["//at.alicdn.com/t/c/font_5037819_a72xy7yjoj.js"]}),Xa=({name:e,size:t,color:n,style:r,...a})=>{const i={fontSize:t,color:n,...r};return z.jsx(Pu,{...a,type:e,style:i})};Xa.__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 Ka=({loading:e,description:t="暂无数据",className:n,emptyChildren:r,loadingText:a,emptyImage:i})=>e?z.jsxs(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",vertical:!0,children:[z.jsx(se.Spin,{size:"large"}),a&&z.jsx("div",{className:"mt-4 text-gray-500",children:a})]}):z.jsx(se.Flex,{className:`pt-10 w-full ${n||""}`,align:"center",justify:"center",children:z.jsx(se.Empty,{image:i,description:t,imageStyle:{height:180},children:r})});Ka.__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 Qa=({onClick:e,showText:t=!1,className:n,size:r="small",type:a="default"})=>z.jsx(se.Button,{size:r,type:a,icon:z.jsx(st.LeftOutlined,{}),className:`cursor-pointer ${n||""}`,onClick:e,children:t&&"返回"});Qa.__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 Ja=({removePadding:e=!0,className:t,...n})=>{const r=e?`px-0 h-auto ${t||""}`:t;return z.jsx(se.Button,{type:"link",...n,className:r,children:n.children})};Ja.__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:Mu}=se.Select,Za=({columns:e,request:t,searchFields:n=[],showSearch:r=!0,showRefresh:a=!0,defaultPageSize:i=10,pageSizeOptions:s=["10","20","50","100"],autoLoad:u=!0,externalParams:o={},...l})=>{const[m,p]=D.useState([]),[E,h]=D.useState(!1),[c,f]=D.useState({current:1,pageSize:i,total:0}),[b,g]=D.useState({}),[T,y]=D.useState({}),[C]=se.Form.useForm(),S=D.useRef(c);S.current=c;const A=D.useRef(o);A.current=o;const w=D.useRef(!1),_=D.useMemo(()=>e.map(v=>{const{sortable:x,render:M,...$}=v;return{...$,sorter:x?!0:void 0,render:M||(U=>U)}}),[e]),N=D.useCallback(async(v={})=>{if(t){h(!0);try{const x={page:S.current.current,pageSize:S.current.pageSize,sortField:T.field,sortOrder:T.order,searchParams:{...b,...A.current},...v},M=await t(x);M.success&&(p(M.data),f($=>({...$,total:M.total,current:x.page||$.current})))}catch(x){console.error("加载数据失败:",x)}finally{h(!1)}}},[t,T,b]),O=D.useCallback(v=>{g(v),f(x=>({...x,current:1}))},[]),L=D.useCallback(()=>{C.resetFields(),g({}),f(v=>({...v,current:1}))},[C]),B=D.useCallback(()=>{N()},[N]),H=D.useCallback((v,x,M)=>{const $={current:v.current||1,pageSize:v.pageSize||i,total:v.total||0},U={field:M?.field,order:M?.order};f($),y(U)},[i]);return D.useEffect(()=>{const v=Object.keys(o).length>0;(u&&!w.current||v)&&(N(),w.current=!0)},[u,o,N]),z.jsxs("div",{children:[r&&n.length>0&&z.jsx(se.Card,{size:"small",style:{marginBottom:16},children:z.jsxs(se.Form,{form:C,layout:"inline",onFinish:O,initialValues:n.reduce((v,x)=>(x.defaultValue!==void 0&&(v[x.key]=x.defaultValue),v),{}),children:[n.map(v=>z.jsx(se.Form.Item,{name:v.key,label:v.label,children:v.type==="input"?z.jsx(se.Input,{placeholder:v.placeholder||`请输入${v.label}`,style:{width:200}}):z.jsx(se.Select,{placeholder:v.placeholder||`请选择${v.label}`,style:{width:200},allowClear:!0,children:v.options?.map(x=>z.jsx(Mu,{value:x.value,children:x.label},x.value))})},v.key)),z.jsx(se.Form.Item,{children:z.jsxs(se.Space,{children:[z.jsx(se.Button,{type:"primary",htmlType:"submit",icon:z.jsx(st.SearchOutlined,{}),children:"查询"}),z.jsx(se.Button,{onClick:L,children:"重置"}),a&&z.jsx(se.Button,{icon:z.jsx(st.ReloadOutlined,{}),onClick:B,children:"刷新"})]})})]})}),z.jsx(se.Table,{...l,columns:_,dataSource:m,loading:E,pagination:{...c,showSizeChanger:!0,showQuickJumper:!0,showTotal:(v,x)=>`第 ${x[0]}-${x[1]} 条/共 ${v} 条`,pageSizeOptions:s},onChange:H,scroll:{x:"max-content",y:"50vh"}})]})};Za.__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 Bu=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.placeholder,a=e.dataset.options?decodeURIComponent(e.dataset.options):"[]",i=e.dataset.required==="true",s=e.dataset.value||"",u=D.useMemo(()=>{try{return JSON.parse(a)}catch{return[]}},[a]),[o,l]=D.useState(s||void 0),[m,p]=D.useState(64),E=D.useRef(null),h=b=>{l(b),e.setAttribute("data-value",b),t(n,b)};D.useEffect(()=>{l(s||void 0)},[s]);const c=D.useCallback(()=>{if(o!=null&&o!==""){const b=u.find(g=>String(g.value)===String(o));return b?typeof b.label=="string"?b.label:String(b.label??o):String(o)}return r||"请选择"},[o,u,r]),f=D.useCallback(()=>{const b=E.current;if(!b)return;const g=b.querySelector(".ant-select-selection-item"),T=b.querySelector(".ant-select-selection-placeholder"),y=g||T,C=(y?.textContent||"").trim()||c(),S=b.querySelector(".ant-select-selector"),A=y||S||b,w=window.getComputedStyle(A),_=y?w.fontSize:"16px",N=w.fontFamily||"sans-serif",O=w.fontWeight||"400",B=`${w.fontStyle||"normal"} ${O} ${_} ${N}`,v=document.createElement("canvas").getContext("2d"),x=v?Math.ceil((v.font=B,v.measureText(C).width||0)):0;let M=0;if(S){const J=window.getComputedStyle(S);M=(Number.parseFloat(J.paddingLeft)||0)+(Number.parseFloat(J.paddingRight)||0)}const $=b.querySelector(".ant-select-arrow"),U=$?Math.ceil($.getBoundingClientRect().width):12,G=b.querySelector(".ant-select-clear");let k=0;if(G){const J=window.getComputedStyle(G);J.display!=="none"&&J.visibility!=="hidden"&&(k=Math.ceil(G.getBoundingClientRect().width))}const j=Math.max(36,x+M+U+k+6);p(J=>J===j?J:j)},[c]);return D.useLayoutEffect(()=>{const b=window.requestAnimationFrame(()=>{f()}),g=window.setTimeout(()=>{f()},60);return()=>{window.cancelAnimationFrame(b),window.clearTimeout(g)}},[f]),D.useEffect(()=>{if(!("fonts"in document))return;let b=!1;const g=document.fonts;if(g?.ready)return g.ready.then(()=>{b||f()}),()=>{b=!0}},[f]),kn.createPortal(z.jsx("div",{className:"rte-select-wrapper",contentEditable:!1,ref:E,style:{display:"inline-block",width:m},children:z.jsx(se.Select,{value:o,onChange:h,placeholder:r||"请选择",style:{width:"100%"},options:u,allowClear:!i,size:"small",dropdownClassName:"rte-select-dropdown",getPopupContainer:()=>document.body,dropdownMatchSelectWidth:!1,suffixIcon:z.jsx("i",{className:"iconfont icon-qiehuan-xiayizhang",style:{fontSize:"10px",color:"#7C3AED"}})})}),e)},Ru=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-select-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Bu,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`select-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-select-host")||p.querySelector?.(".rte-select-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function Fu(e){if(!e)return"";try{return decodeURIComponent(e)}catch{return e}}function Hu(e){if(!e)return"";try{return encodeURIComponent(e)}catch{return e}}function $u(e,t,n,r,a){const s=document.createElement("canvas").getContext("2d");if(!s)return 0;s.font=t;const u=e.split(`
|
|
2
|
+
`);let o=0;for(const h of u){const c=s.measureText(h||" ").width||0;o=Math.max(o,c)}const l=Number.parseFloat(n),m=Number.isFinite(l)?l:0,p=u.reduce((h,c)=>h.length>=c.length?h:c,""),E=m>0?m*Math.max(0,(p||"").length-1):0;return Math.ceil(o+E+r+a)}const Uu=({host:e,onChange:t})=>{const n=e.dataset.key||"",r=e.dataset.placeholder||"",a=e.dataset.tooltip||"",i=e.dataset.allowNewline!=="0",s=D.useMemo(()=>Fu(e.dataset.value||""),[e]),[u,o]=D.useState(s),l=D.useRef(s),m=D.useMemo(()=>{const C=Number.parseFloat(e.dataset.estimatedWidth||"");return Number.isFinite(C)&&C>0?C:64},[e]),[p,E]=D.useState(m),h=D.useRef(null),c=(u||"").trim().length>0,f=!!a&&!c,b=(u||"").includes(`
|
|
3
|
+
`);D.useEffect(()=>{o(s),l.current=s},[s]),D.useEffect(()=>{l.current=u},[u]),D.useEffect(()=>{e.classList.toggle("rte-variable-multiline",b)},[e,b]);const g=D.useCallback(()=>{const C=h.current;if(!C)return;const S=C.querySelector("textarea");if(!S)return;const A=window.getComputedStyle(S),w=A.fontStyle||"normal",_=A.fontWeight||"400",N=A.fontSize||"16px",O=A.fontFamily||"sans-serif",L=`${w} ${_} ${N} ${O}`,B=Number.parseFloat(A.paddingLeft)||0,H=Number.parseFloat(A.paddingRight)||0,v=(u&&u.length>0?u:r)||" ",x=$u(v,L,A.letterSpacing||"0",B,H),$=Math.max(24,Math.min(600,x+2));E(U=>U===$?U:$)},[r,u]);D.useEffect(()=>{const C=h.current;if(!C||typeof ResizeObserver>"u")return;let S=0;const A=new ResizeObserver(()=>{S&&window.cancelAnimationFrame(S),S=window.requestAnimationFrame(()=>{t(n,l.current)})});return A.observe(C),()=>{S&&window.cancelAnimationFrame(S),A.disconnect()}},[n,t]),D.useLayoutEffect(()=>{const C=window.requestAnimationFrame(()=>{g()});return()=>{window.cancelAnimationFrame(C)}},[g]),D.useEffect(()=>{if(!("fonts"in document))return;let C=!1;const S=document.fonts;if(S?.ready)return S.ready.then(()=>{C||g()}),()=>{C=!0}},[g]);const T=C=>{const S=C.target.value??"";o(S),e.setAttribute("data-value",Hu(S)),t(n,S)},y=C=>{C.key==="Enter"&&!i&&C.preventDefault()};return kn.createPortal(z.jsxs("div",{className:`rte-variable-v2-wrapper ${f?"rte-variable-v2-with-icon":""}`,contentEditable:!1,ref:h,"data-placeholder":r,"data-has-value":c?"1":"0",style:{verticalAlign:"middle",width:b?"100%":p,lineHeight:"30px"},children:[z.jsx(se.Input.TextArea,{value:u,onChange:T,onKeyDown:y,placeholder:r,autoSize:{minRows:1,maxRows:8},className:"rte-variable-v2-textarea"}),a?z.jsx("i",{contentEditable:!1,style:{fontWeight:100},className:`iconfont icon-tishi variable-info-icon ${f?"":"hidden"}`,"data-variable-key":n,"data-tooltip":a}):null]}),e)},qu=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll('[data-variable-render="antd-textarea"]'),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(Uu,{host:o,onChange:()=>{const m=()=>{if(!e.current)return;const p=new Event("input",{bubbles:!0});e.current.dispatchEvent(p)};m(),window.requestAnimationFrame(m)}},`variable-v2-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s){if(o.type!=="childList")continue;const l=m=>{m.forEach(p=>{if(p.nodeType!==Node.ELEMENT_NODE)return;const E=p;(E.matches?.('[data-variable-render="antd-textarea"]')||E.querySelector?.('[data-variable-render="antd-textarea"]'))&&(u=!0)})};if(l(o.addedNodes),l(o.removedNodes),u)break}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t};function zu(e,t=[]){D.useLayoutEffect(()=>{if(!e.current)return;const n=new Map,r=new Map,a=p=>{const E=p.value||p.placeholder||"",h=window.getComputedStyle(p),c=Number.parseFloat(h.paddingLeft)||0,f=Number.parseFloat(h.paddingRight)||0,b=document.createElement("span");b.style.cssText=`
|
|
4
4
|
position: absolute;
|
|
5
5
|
visibility: hidden;
|
|
6
6
|
white-space: nowrap;
|
|
7
|
-
font-size: ${
|
|
8
|
-
font-family: ${
|
|
9
|
-
font-weight: ${
|
|
10
|
-
letter-spacing: ${
|
|
7
|
+
font-size: ${h.fontSize||"16px"};
|
|
8
|
+
font-family: ${h.fontFamily||"inherit"};
|
|
9
|
+
font-weight: ${h.fontWeight||"inherit"};
|
|
10
|
+
letter-spacing: ${h.letterSpacing||"normal"};
|
|
11
11
|
padding-left: ${c}px;
|
|
12
12
|
padding-right: ${f}px;
|
|
13
|
-
`,
|
|
13
|
+
`,b.textContent=E||"0",document.body.appendChild(b);const T=Math.max(24,Math.min(600,Math.ceil(b.offsetWidth)+2));return document.body.removeChild(b),T},i=p=>{const E=p.target;if(!E)return;let h=E.value;if(h=h.replace(/[^\d]/g,""),h!==""&&h!=="0"){const f=parseInt(h,10);if(Number.isNaN(f))E.value="";else{const b=E.getAttribute("min"),g=E.getAttribute("max"),T=b!==null?parseInt(b,10):0,y=g!==null?parseInt(g,10):1/0,C=Math.min(Math.max(f,T),y);E.value=String(C)}}else if(h==="0"){const f=E.getAttribute("min");0<(f!==null?parseInt(f,10):0)?E.value="":E.value="0"}E.style.width=`${a(E)}px`;const c=E.closest(".rte-number-input-wrap");c&&(c.dataset.hasValue=E.value?"1":"0")},s=p=>{const E=p.key;(E==="-"||E==="."||E===","||E==="e"||E==="E"||E==="+"||E==="="||E===" ")&&p.preventDefault()},u=()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="number-input"]').forEach(E=>{const h=E.closest(".rte-number-input-wrap");h&&(h.dataset.hasValue=E.value?"1":"0",h.dataset.placeholder===void 0&&(h.dataset.placeholder=E.placeholder||""));const c=document.activeElement===E,f=a(E),b=Number.parseFloat(E.style.width||""),g=Number.isFinite(b),T=g?Math.abs(b-f):1/0;E.dataset.rteWidthInited==="1"?!c&&(!g||T>8)&&(E.style.width=`${f}px`):(E.dataset.rteWidthInited="1",!c&&(!g||T>2)&&(E.style.width=`${f}px`)),n.has(E)||(E.addEventListener("input",i,!1),E.addEventListener("keydown",s,!1),n.set(E,i),r.set(E,s))})};u();let o=!1;const l=()=>{o||(o=!0,queueMicrotask(()=>{o=!1,u()}))},m=new MutationObserver(p=>{let E=!1;p.forEach(h=>{h.type==="childList"&&h.addedNodes.forEach(c=>{if(c.nodeType===Node.ELEMENT_NODE){const f=c;f.matches&&(f.matches('[data-type="number-input"]')||f.querySelector('[data-type="number-input"]'))&&(E=!0)}})}),E&&l()});return e.current&&m.observe(e.current,{childList:!0,subtree:!0}),()=>{o=!1,m.disconnect(),n.forEach((p,E)=>{E.removeEventListener("input",p,!1)}),n.clear(),r.forEach((p,E)=>{E.removeEventListener("keydown",p,!1)}),r.clear()}},[e,...t])}function Vu(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="report-url"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function Gu(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="markdown-name"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();console.log("接受到了卧槽",m),t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}function Yu(e,t,n=[]){D.useLayoutEffect(()=>{if(!e.current)return;const r=new Map,a=window.setTimeout(()=>{if(!e.current)return;r.forEach((u,o)=>o.removeEventListener("blur",u,!1)),r.clear();const i=e.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]'),s=u=>{u.stopPropagation(),u.stopImmediatePropagation();const o=u.target?.closest('[data-type="variable"][data-node-type="markdown"]');if(!o||!e.current||!e.current.contains(o))return;const l=o.dataset.key;if(!l)return;const m=o.innerText.replace(/[\u200B\n]/g,"").trim();t(l,m)};i.forEach(u=>{u.addEventListener("blur",s,!1),r.set(u,s)})},0);return()=>{window.clearTimeout(a),r.forEach((i,s)=>s.removeEventListener("blur",i,!1)),r.clear()}},[e,t,...n])}const le=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Ye=e=>e?typeof e=="string"?e:JSON.stringify(e):"",dr=e=>{const t=(e?.name||"").toLowerCase(),n=/\.(png|jpe?g|gif|webp|bmp|svg)$/.test(t),r=(e?.type||"").toLowerCase();return n||(r==="image/png"||r==="image/jpeg"||r==="image/gif"||r==="image/webp"||r==="image/bmp"||r==="image/svg+xml")},vn=e=>{const t=(e||"").trim()||" ";let n=0;for(let r=0;r<t.length;r++){const a=t.charCodeAt(r);a>19968||a>=65280&&a<=65519?n+=16:n+=8}return Math.max(24,Math.min(600,n+22))},ei=e=>`\`\`\`
|
|
14
14
|
${(e||"").replace(/\r\n/g,`
|
|
15
15
|
`)}
|
|
16
16
|
\`\`\``,ti=e=>{const t=(e||"").replace(/\r\n/g,`
|
|
17
|
-
`).trim(),n=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return n?`<pre><code>${le(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${le(t)}</div>`},Wu=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:u,setFiles:o})=>{const l=
|
|
17
|
+
`).trim(),n=t.match(/^```[a-zA-Z0-9_-]*\n([\s\S]*?)\n```$/);return n?`<pre><code>${le(n[1]||"")}</code></pre>`:`<div style="white-space:pre-wrap;">${le(t)}</div>`},Wu=({config:e,messageApi:t,activeBatchKey:n,activeFileKey:r,activeBatchStartIndex:a,setActiveFileKey:i,setActiveBatchKey:s,setActiveBatchStartIndex:u,setFiles:o})=>{const l=D.useCallback(p=>{if(!p.target.files){p.target&&(p.target.value=""),i(null),s(null),u(null);return}const E=10*1024*1024,h=f=>f.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(f.name||""),c=f=>h(f)&&f.size>E;if(n&&p.target.files&&p.target.files.length>0){const f=n,b=e.find(C=>C.type==="upload"&&C.key===f),g=Array.from(p.target.files),T=g.filter(C=>!c(C)),y=g.length-T.length;if(y>0&&t.error(`已自动过滤 ${y} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`),b&&typeof b.maxCount=="number"&&typeof b.minCount=="number"){const C=b.maxCount,S=typeof a=="number"?a:0;o(A=>{const w={...A};let _=Math.min(Math.max(S,0),C-1);for(const N of T){for(;_<C&&w[`${f}-${_}`]!=null;)_+=1;if(_>=C)break;w[`${f}-${_}`]=N,_+=1}return w})}}else if(r&&p.target.files[0]){const f=p.target.files[0],b=r;c(f)?t.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)"):o(g=>({...g,[b]:f}))}p.target&&(p.target.value=""),i(null),s(null),u(null)},[n,a,r,e,t,s,u,i,o]),m=D.useCallback(p=>{o(E=>{const h={...E};return delete h[p],h})},[o]);return{handleFileChange:l,handleRemoveFile:m}},ju=e=>{const t=e.trim();if(!t)return{url:""};let n=null;try{n=new URL(t)}catch{try{n=new URL(`https://${t}`)}catch{return{url:t}}}const r=n.pathname.split("/").filter(Boolean),a=r.findIndex(o=>o==="report"),i=a>=0?r[a+1]:void 0,s=r[0]&&r[0].length<=5?r[0]:void 0,u=n.searchParams.get("agentId")||void 0;return{url:t,reportId:i,agentId:u,lang:s}},Xu=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.content||"").trim();return{title:r,content:a.length>0?a:`请补充:${r}`}}),fr=e=>(e?.modules||[]).map((t,n)=>{const r=(t?.title||`模块${n+1}`).trim()||`模块${n+1}`,a=(t?.markdown||"").trim(),i=(t?.content||"").trim()||(a?ti(a):"");return{title:r,content:i.length>0?i:`请补充:${r}`,markdown:a}}),Ku=({config:e,editorRef:t,files:n,setFiles:r,multiVariableCounts:a,setMultiVariableCounts:i})=>{const s=D.useRef({}),u=D.useRef({}),o=D.useRef({}),l=D.useCallback(E=>E.find(c=>c.type==="tag")?.text||null,[]),m=D.useRef(e),p=D.useRef(null);D.useEffect(()=>{u.current=n},[n]),D.useEffect(()=>{o.current=a},[a]),D.useEffect(()=>{const E=l(m.current),h=l(e);if(E&&E!==h&&t.current){const c={};t.current.querySelectorAll('[data-type="variable"]').forEach(T=>{const y=T.dataset.key;if(y){const C=T.innerText.replace(/[\u200B\n]/g,"").trim();C&&(c[y]=C)}}),t.current.querySelectorAll('[data-type="select"]').forEach(T=>{const y=T.dataset.key;if(y){const C=(T.getAttribute("data-value")||"").trim();C&&(c[y]=C)}}),t.current.querySelectorAll('[data-type="textarea"]').forEach(T=>{const y=T.dataset.key;if(y){const C=T.value.replace(/[\u200B]/g,"").trim();C&&(c[y]=C)}}),s.current[E]={variableValues:c,files:{...u.current},multiVariableCounts:{...o.current}}}if(h&&s.current[h]){const c=s.current[h];p.current=c,r(c.files),i(c.multiVariableCounts)}else if(h){p.current=null;const c={};e.forEach(f=>{f.type==="multi-variable"&&f.key&&(c[f.key]=1)}),i(c),r({})}else p.current=null,i({}),r({});m.current=e},[e,t,l,r,i]),D.useLayoutEffect(()=>{p.current&&t.current&&(t.current.__tempVariableValues=p.current.variableValues,setTimeout(()=>{p.current&&(p.current=null)},0))})},Qu=e=>{const t={},n=e.current;return n&&(n.querySelectorAll('[data-type="variable"]').forEach(r=>{const a=r.dataset.key;if(!a)return;if(r.dataset.variableRender==="antd-textarea"){const s=(r.getAttribute("data-value")||"").trim();if(!s)return;try{const o=(decodeURIComponent(s)||"").replace(/\r\n/g,`
|
|
18
18
|
`).trim();o&&(t[a]=o)}catch{const u=s.trim();u&&(t[a]=u)}return}const i=(r.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
19
|
-
`).trim();if(i){const s=r.getAttribute("data-node-type")||"";s==="report-url"?t[`${a}__url`]=i:s==="markdown-name"?t[`${a}__name`]=i:t[a]=i}}),n.querySelectorAll('[data-type="select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="textarea"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.value.replace(/[\u200B]/g,"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="richtext"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.getAttribute("data-node-type")||"";if(i==="report-module"||i==="markdown-module"){const u=Number.parseInt(r.getAttribute("data-module-index")||"0",10),o=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(u)?u:0}`]=o;return}const s=(r.textContent||"").replace(/[\u200B]/g,"").trim();s&&(t[a]=s)}),n.querySelectorAll('[data-type="datepicker"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="number-input"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.value||"").trim();i&&(t[a]=i)})),t},Ju=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:u,setMarkdownNameAnalyzeState:o,editorRef:l,reportAnalyzeRef:m,markdownAnalyzeRef:p,markdownNameAnalyzeRef:
|
|
20
|
-
(reportId=${B.reportId||"unknown"}, agentId=${B.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(O).then(B=>{const H=Xu(B);if(l.current){const v=f();H.forEach((x,
|
|
19
|
+
`).trim();if(i){const s=r.getAttribute("data-node-type")||"";s==="report-url"?t[`${a}__url`]=i:s==="markdown-name"?t[`${a}__name`]=i:t[a]=i}}),n.querySelectorAll('[data-type="select"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="textarea"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.value.replace(/[\u200B]/g,"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="richtext"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=r.getAttribute("data-node-type")||"";if(i==="report-module"||i==="markdown-module"){const u=Number.parseInt(r.getAttribute("data-module-index")||"0",10),o=(r.innerHTML||"").replace(/[\u200B]/g,"").trim();t[`${a}__module_${Number.isFinite(u)?u:0}`]=o;return}const s=(r.textContent||"").replace(/[\u200B]/g,"").trim();s&&(t[a]=s)}),n.querySelectorAll('[data-type="datepicker"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.getAttribute("data-value")||"").trim();i&&(t[a]=i)}),n.querySelectorAll('[data-type="number-input"]').forEach(r=>{const a=r.dataset.key;if(!a)return;const i=(r.value||"").trim();i&&(t[a]=i)})),t},Ju=({reportAnalyze:e,markdownAnalyze:t,markdownNameAnalyze:n,reportAnalyzeState:r,setReportAnalyzeState:a,markdownAnalyzeState:i,setMarkdownAnalyzeState:s,markdownNameAnalyzeState:u,setMarkdownNameAnalyzeState:o,editorRef:l,reportAnalyzeRef:m,markdownAnalyzeRef:p,markdownNameAnalyzeRef:E,markdownAnalyzeStateRef:h,markdownNameAnalyzeStateRef:c})=>{const f=D.useCallback(()=>Qu(l),[l]),b=D.useCallback((A,w)=>{const _=(w||"").trim();if(!A)return;if(!_){a(B=>({...B,[A]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}));return}const N=r[A];if(N?.lastParsedUrl&&N.lastParsedUrl===_&&N.status==="loading")return;a(B=>({...B,[A]:{...B[A],status:"loading",error:void 0,lastParsedUrl:_}}));const O=ju(_);(e||(async B=>({modules:[{title:"第1张:人群+场景直击图",content:`视觉要求:养宠人在客厅场景中,宠物(猫/狗)自然趴在旁;画面聚焦“人+宠+整洁氛围”。
|
|
20
|
+
(reportId=${B.reportId||"unknown"}, agentId=${B.agentId||"1"})`},{title:"第2张:痛点放大对比图",content:"左侧:杂乱堆放、难清理;右侧:分区收纳、拿取方便。文案≤15字,绑定人群+场景+需求。"}]})))(O).then(B=>{const H=Xu(B);if(l.current){const v=f();H.forEach((x,M)=>{v[`${A}__module_${M}`]=x.content}),l.current.__tempVariableValues=v}a(v=>({...v,[A]:{status:"success",error:void 0,lastParsedUrl:_,modules:H}}))}).catch(B=>{const H=B instanceof Error?B.message:String(B);a(v=>({...v,[A]:{...v[A]||{modules:[]},status:"error",error:H||"解析失败",lastParsedUrl:_,modules:[]}}))})},[f,l,e,r,a]),g=D.useCallback((A,w)=>{const _=(w||"").trim();if(!A)return;if(!_){s(v=>({...v,[A]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const N=i[A];if(N?.lastParsedText&&N.lastParsedText===_&&N.status==="success")return;if(!t){const v=ei(_),x=fr({modules:[{title:"内容",content:ti(v),markdown:v}]});if(l.current){const M=f();x.forEach(($,U)=>{M[`${A}__module_${U}`]=$.content}),l.current.__tempVariableValues=M}s(M=>({...M,[A]:{status:"success",error:void 0,lastParsedText:_,modules:x}}));return}const O=h.current[A]?.status==="loading";O||s(v=>({...v,[A]:{...v[A],status:"loading",error:void 0,lastParsedText:_}}));const L=500,B=Date.now();setTimeout(()=>{t({text:_}).then(x=>{const M=fr(x),$=Date.now()-B,U=Math.max(0,L-$);setTimeout(()=>{if(l.current){const G=f();M.forEach((k,j)=>{G[`${A}__module_${j}`]=k.content}),l.current.__tempVariableValues=G}s(G=>({...G,[A]:{status:"success",error:void 0,lastParsedText:_,modules:M}}))},U)}).catch(x=>{const M=x instanceof Error?x.message:String(x);s($=>({...$,[A]:{...$[A]||{modules:[]},status:"error",error:M,lastParsedText:_}}))})},O?0:50)},[f,l,t,i,h,s]),T=D.useCallback((A,w)=>{const _=(w||"").trim();if(!A)return;if(!_){o(v=>({...v,[A]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}));return}const N=c.current[A];if(N?.lastParsedText&&N.lastParsedText===_&&N.status==="success"||!n)return;const O=c.current[A]?.status==="loading";O||o(v=>({...v,[A]:{...v[A],status:"loading",error:void 0,lastParsedText:_}}));const L=500,B=Date.now();setTimeout(()=>{n({text:_}).then(x=>{const M=fr(x),$=Date.now()-B,U=Math.max(0,L-$);setTimeout(()=>{if(l.current){const G=f();M.forEach((k,j)=>{G[`${A}__module_${j}`]=k.content}),l.current.__tempVariableValues=G}o(G=>({...G,[A]:{status:"success",error:void 0,lastParsedText:_,modules:M}}))},U)}).catch(x=>{const M=x instanceof Error?x.message:String(x);o($=>({...$,[A]:{...$[A]||{modules:[]},status:"error",error:M,lastParsedText:_}}))})},O?0:50)},[f,l,n,c,o]);D.useEffect(()=>{m.current=b},[m,b]),D.useEffect(()=>{p.current=g},[p,g]),D.useLayoutEffect(()=>{E.current=T},[E,T]);const y=D.useCallback((A,w)=>{m.current(A,w)},[m]),C=D.useCallback((A,w)=>{p.current(A,w)},[p]),S=D.useCallback((A,w)=>{E.current(A,w)},[E]);return{handleReportUrlBlur:y,handleMarkdownBlur:C,handleMarkdownNameBlur:S}},Zu=({collapsed:e,collapseTransitionMs:t,contentRef:n,contentBodyRef:r,editorRef:a,debugIdRef:i,setCollapsedContentMaxHeightPx:s,setExpandedContentMaxHeightPx:u,setIsCollapseAnimating:o,effectiveConfig:l,files:m,multiVariableCounts:p,selectPortalsLength:E,datePickerPortalsLength:h,variablePortalsLength:c})=>{const f=D.useCallback(()=>{const g=r.current;if(!g)return;const T=Math.max(0,Math.ceil(g.scrollHeight||0));!Number.isFinite(T)||T<=0||u(y=>y===T?y:T)},[r,u]);D.useLayoutEffect(()=>{if(!e)return;const g=n.current,T=a.current;if(!(!g||!T))try{const y=window.getComputedStyle(T),C=Number.parseFloat(y.paddingTop)||0,S=Number.parseFloat(y.lineHeight)||34,A=Math.max(0,Math.ceil(C+S)),w=T.getBoundingClientRect(),_=document.createRange();_.selectNodeContents(T);const N=Array.from(_.getClientRects());let O=A>0?A:58;if(N.length>0){const L=Math.min(...N.map(v=>v.top)),B=2;let H=0;for(const v of N)Math.abs(v.top-L)<=B&&(H=Math.max(H,v.bottom));if(H>0){const v=Math.max(0,Math.ceil(H-w.top));O=A>0?Math.max(v,A):v}}else O=A>0?A:58;if(!Number.isFinite(O)||O<=0)return;s(L=>L===O?L:O)}catch{}},[e,n,a,l,m,p,E,h,c,s]);const b=D.useRef({ts:0,contentScrollTop:0,bodyScrollTop:0,editorScrollTop:0});return D.useEffect(()=>{if(e)return;const g=n.current,T=r.current,y=a.current;if(!g)return;const C=()=>{b.current={ts:Date.now(),contentScrollTop:g.scrollTop||0,bodyScrollTop:T?.scrollTop||0,editorScrollTop:y?.scrollTop||0}};C();const S=()=>{C(),console.log(`[RTE collapse debug][${i.current}] (expanded) content scroll`,b.current)},A=()=>{C(),console.log(`[RTE collapse debug][${i.current}] (expanded) body scroll`,b.current)};return g.addEventListener("scroll",S,{passive:!0}),T?.addEventListener("scroll",A,{passive:!0}),()=>{g.removeEventListener("scroll",S),T?.removeEventListener("scroll",A)}},[e,r,n,i,a]),D.useEffect(()=>{if(typeof window>"u")return;const g=i.current,T=window;return T.__rteDebug=T.__rteDebug||{},T.__rteDebug[g]={contentEl:n.current,contentBodyEl:r.current,editorEl:a.current},()=>{T.__rteDebug&&T.__rteDebug[g]&&delete T.__rteDebug[g]}},[r,n,i,a]),D.useLayoutEffect(()=>{if(!e)return;const g=n.current,T=r.current,y=a.current;if(!g)return;const C=()=>({content:{scrollTop:g.scrollTop,scrollLeft:g.scrollLeft,scrollHeight:g.scrollHeight,clientHeight:g.clientHeight},body:T?{scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,scrollHeight:T.scrollHeight,clientHeight:T.clientHeight}:void 0,editor:y?{scrollTop:y.scrollTop,scrollLeft:y.scrollLeft,scrollHeight:y.scrollHeight,clientHeight:y.clientHeight}:void 0,style:(()=>{try{const x=window.getComputedStyle(g),M=T?window.getComputedStyle(T):void 0;return{contentOverflow:`${x.overflow}/${x.overflowY}`,bodyOverflow:M?`${M.overflow}/${M.overflowY}`:void 0,bodyMaxHeight:M?.maxHeight,bodyHeight:M?.height}}catch{return}})()}),S=()=>{g.scrollTop=0,g.scrollLeft=0,T&&(T.scrollTop=0,T.scrollLeft=0),y&&(y.scrollTop=0,y.scrollLeft=0)},w=(typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260)+220;console.log(`[RTE collapse debug][${i.current}] pre-collapse lastScrollStateRef`,b.current),console.log(`[RTE collapse debug][${i.current}] lock start (before reset)`,C()),S(),console.log(`[RTE collapse debug][${i.current}] lock start (after reset)`,C()),window.requestAnimationFrame(()=>{console.log(`[RTE collapse debug][${i.current}] lock start (after rAF)`,C())});const _=x=>{x.preventDefault(),x.stopPropagation(),S(),console.log(`[RTE collapse debug][${i.current}] prevented scroll event`,{type:x.type},C())},N=()=>console.log(`[RTE collapse debug][${i.current}] content scroll event`,C()),O=()=>console.log(`[RTE collapse debug][${i.current}] body scroll event`,C());g.addEventListener("wheel",_,{passive:!1}),g.addEventListener("touchmove",_,{passive:!1}),g.addEventListener("scroll",N,{passive:!0}),T&&(T.addEventListener("wheel",_,{passive:!1}),T.addEventListener("touchmove",_,{passive:!1}),T.addEventListener("scroll",O,{passive:!0}));const L=performance.now();let B=0;const H=x=>{S(),x-L<w&&(B=window.requestAnimationFrame(H))};B=window.requestAnimationFrame(H);const v=window.setTimeout(()=>{S(),console.log(`[RTE collapse debug][${i.current}] lock end (after timeout)`,C())},w);return()=>{g.removeEventListener("wheel",_),g.removeEventListener("touchmove",_),g.removeEventListener("scroll",N),T&&(T.removeEventListener("wheel",_),T.removeEventListener("touchmove",_),T.removeEventListener("scroll",O)),window.cancelAnimationFrame(B),window.clearTimeout(v),console.log(`[RTE collapse debug][${i.current}] lock cleanup`,C())}},[e,t,r,n,i,a]),D.useEffect(()=>{if(e)return;let g=0;return g=window.requestAnimationFrame(()=>{f()}),()=>window.cancelAnimationFrame(g)},[e,l,m,p,E,h,c,f]),D.useEffect(()=>{const g=typeof t=="number"&&Number.isFinite(t)&&t>=0?t:260;if(g<=0){o(!1);return}o(!0);const T=window.setTimeout(()=>o(!1),g);return()=>window.clearTimeout(T)},[e,t,o]),{measureExpandedContentHeight:f}},el=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r})=>{D.useEffect(()=>{if(e.length>0){n(!1);return}const a=()=>{if(!t.current){n(!0);return}const s=t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"",u=t.current.querySelectorAll('[data-type="variable"]'),o=t.current.querySelectorAll('[data-type="upload"]');let l=!1;u.forEach(p=>{(p.textContent?.replace(/[\u200B\n]/g,"").trim()||"")&&(l=!0)}),o.forEach(p=>{p.querySelector(".upload-inner-wrapper.has-file")&&(l=!0)});const m=!s&&!l;n(m),e.length===0&&r(!m)};a();const i=new MutationObserver(a);return t.current&&i.observe(t.current,{childList:!0,subtree:!0,characterData:!0}),()=>{i.disconnect()}},[e,t,n,r])},tl=({config:e,reportAnalyzeState:t,markdownAnalyzeState:n,markdownNameAnalyzeState:r})=>D.useMemo(()=>{if(e.length===0)return e;const a=[];for(const i of e){if(i.type==="markdown"&&i.key==="tableData"||a.push(i),i.type==="report-url"&&i.key){const s=t[i.key],u=s?.status??"idle",o=s?.modules??[];u==="loading"&&a.push({type:"text",className:"rte-report-parsing",text:`解析中...
|
|
21
21
|
`}),u==="error"&&s?.error&&a.push({type:"text",className:"rte-report-error",text:`解析失败:${le(s.error)}
|
|
22
22
|
`}),o.length>0&&(o.forEach((l,m)=>{a.push({type:"report-module",key:i.key,moduleIndex:m,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:l.content})}),a.push({type:"text",text:`
|
|
23
23
|
`}))}if(i.type==="markdown"&&i.key){const s=n[i.key],u=s?.status??"idle",o=s?.modules??[];i.key==="tableData"?u==="loading"?(a.push({type:"text",className:"rte-markdown-parsing",text:"解析中..."}),a.push({type:"text",text:`
|
|
@@ -30,48 +30,48 @@ ${(e||"").replace(/\r\n/g,`
|
|
|
30
30
|
`}),o.length>0&&u!=="loading"&&(o.forEach((l,m)=>{a.push({type:"markdown-module",key:i.key,moduleIndex:m,placeholder:"可编辑,内容不能为空",required:!0,minHeight:80,maxHeight:260,text:l.content})}),a.push({type:"text",text:`
|
|
31
31
|
`}))}}return a},[e,n,r,t]);function nl(e,t){const r=document.createElement("canvas").getContext("2d");if(!r)return 0;const a=window.getComputedStyle(t),i=a.fontStyle||"normal",s=a.fontWeight||"400",u=a.fontSize||"16px",o=a.fontFamily||"sans-serif";r.font=`${i} ${s} ${u} ${o}`;const m=(e||"").replace(/\r\n/g,`
|
|
32
32
|
`).split(`
|
|
33
|
-
`);let p=0;for(const c of m){const f=r.measureText(c||" ").width||0;p=Math.max(p,f)}const
|
|
34
|
-
`),u=r.offsetHeight>32,o=s||u;r.classList.toggle("rte-variable-multiline",o),r.classList.toggle("rte-variable-force-block",o);const l=r.closest(".rte-inline-group");l&&l.classList.toggle("rte-inline-group-force-block",o);const m=r.closest(".required-upload-group, .required-multi-first");m&&m.classList.toggle("rte-required-group-force-block",o);const p=m?m.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");p&&p!==m&&p.classList.toggle("rte-exclusion-force-block",o)})}function pr(e,t,n){if(!e.current)return;const r=c=>{c.classList.contains("rte-richtext-host-expanded")&&(c.style.setProperty("display","flex","important"),c.style.setProperty("flex-direction","column","important"),c.style.setProperty("flex","1 1 auto","important"),c.style.setProperty("min-height","0","important"),c.style.setProperty("width","100%","important"),c.style.setProperty("align-self","stretch","important"))},a=c=>{if(!c.closest('[data-rte-force-hidden="1"]')){if(c.classList.contains("rte-richtext-host-expanded")){r(c);return}if(c.classList.contains("required-upload-group")){c.style.setProperty("display","inline-flex","important");return}if(c.classList.contains("exclusion-wrapper")){c.classList.contains("rte-exclusion-force-block")?c.style.setProperty("display","block","important"):c.style.setProperty("display","inline-block","important");return}c.style.setProperty("display","inline-block","important")}},i=c=>{c.closest('[data-rte-force-hidden="1"]')||(c.style.display="none",c.style.setProperty("display","none","important"))},s=t.some(c=>c.exclusionGroup==="separator");if(s){const c=[];let f=[];for(const w of t){if(w.exclusionGroup==="separator"){f.length&&c.push(f),f=[];continue}!w.exclusionGroup||w.exclusionGroup==="separator"||(w.type==="upload"&&w.key?f.push({type:"upload",key:w.key}):(w.type==="variable"||w.type==="multi-variable"||w.type==="markdown"||w.type==="markdown-name")&&w.key?f.push({type:w.type==="multi-variable"?"multi-variable":"variable",key:w.key}):f.push({type:"other",nodeType:w.type}))}f.length&&c.push(f);const
|
|
35
|
-
`).trim()||E},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const f=t[c];if((f.type==="variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"||f.type==="upload"||f.type==="multi-variable"||f.type==="select"||f.type==="textarea"||f.type==="richtext"||f.type==="report-module"||f.type==="markdown-module"||f.type==="datepicker"||f.type==="number-input")&&f.required&&f.key){s.push({exclusionGroup:f.exclusionGroup||"",key:f.key,type:f.type==="multi-variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"?"variable":f.type==="report-module"||f.type==="markdown-module"?"richtext":f.type,isMultiVariable:f.type==="multi-variable",minCount:f.type==="multi-variable"||f.type==="upload"&&typeof f.minCount=="number"?f.minCount:void 0,moduleIndex:f.type==="report-module"||f.type==="markdown-module"?f.moduleIndex:void 0,__index:c});continue}if(f.type==="text"&&f.className?.includes("rte-text-required"))if(f.exclusionGroup)for(let E=c+1;E<t.length;E++){const h=t[E];if(h.exclusionGroup===f.exclusionGroup&&(h.type==="variable"||h.type==="markdown"||h.type==="upload"||h.type==="select"||h.type==="textarea"||h.type==="richtext"||h.type==="datepicker"||h.type==="number-input")&&h.key){s.push({exclusionGroup:f.exclusionGroup,key:h.key,type:h.type==="markdown"?"variable":h.type,__index:E});break}}else for(let E=c+1;E<t.length;E++){const h=t[E];if((h.type==="variable"||h.type==="markdown"||h.type==="upload"||h.type==="select"||h.type==="textarea"||h.type==="richtext"||h.type==="datepicker"||h.type==="number-input")&&h.key){s.push({exclusionGroup:h.exclusionGroup||"",key:h.key,type:h.type==="markdown"?"variable":h.type,__index:E});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((f,E)=>{f.exclusionGroup==="separator"&&c.push(E)});for(const f of c){const h=s.filter(C=>typeof C.__index=="number"&&C.__index<f).sort((C,S)=>(S.__index??0)-(C.__index??0))[0],y=s.filter(C=>typeof C.__index=="number"&&C.__index>f).sort((C,S)=>(C.__index??0)-(S.__index??0))[0];h&&y&&o.push([h,y])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const f=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(f.length>0){const E=f[0];return i(E)?!0:E.style.display!=="none"}}if(c.type==="upload"&&c.key){const f=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(f.length>0){const E=f[0],h=E.closest("[data-group]")||E.parentElement;return i(h)?!0:h?h.style.display!=="none":!0}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,E=e.current.querySelector(f);if(E){const h=E.closest("[data-group]")||E.parentElement;return i(h)?!0:h?h.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(f){const E=f.closest("[data-group]")||f.parentElement;return i(E)?!0:E?E.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(f=>{f.key&&m.add(f.key)})});const p=l.filter(c=>!c.key||!m.has(c.key));let b=(o.length===0,!0);for(const c of o){const f=c.filter(h=>{if(!e.current)return!1;if(h.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${h.exclusionGroup}"]`);if(T.length>0){const y=T[0];return i(y)?!0:y.style.display!=="none"}}return!0});if(f.length===0)continue;let E=!1;for(const h of f)if(h.type==="upload"&&h.key){if(h.minCount&&h.minCount>0){let T=0;const y=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${h.key}"]`);if(y.length===0)continue;for(let C=0;C<y.length;C++){const A=y[C].dataset.key;A&&n[A]!=null&&(T+=1)}if(T>=h.minCount){E=!0;break}}else if(n[h.key]!==null&&n[h.key]!==void 0){E=!0;break}}else if(h.type==="variable"&&h.key)if(h.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${h.key}"]`);let y=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(y+=1)}const C=h.minCount&&h.minCount>0?h.minCount:1;if(y>=C){E=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${h.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){E=!0;break}}}else if(h.type==="select"&&h.key){const T=e.current.querySelector(`[data-type="select"][data-key="${h.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){E=!0;break}}else if(h.type==="textarea"&&h.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${h.key}"]`);if(T&&(T.value||"").trim().length>0){E=!0;break}}else if(h.type==="richtext"&&h.key){const T=typeof h.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${h.key}"][data-module-index="${h.moduleIndex}"]`:`[data-type="richtext"][data-key="${h.key}"]`,y=e.current.querySelector(T);if(y&&a(y).length>0){E=!0;break}}else if(h.type==="datepicker"&&h.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${h.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){E=!0;break}}else if(h.type==="number-input"&&h.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${h.key}"]`);if(T&&(T.value||"").trim().length>0){E=!0;break}}if(!E){b=!1;break}}let g=!0;for(const c of p)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let f=0;const E=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(E.length===0){g=!1;break}for(let h=0;h<E.length;h++){const y=E[h].dataset.key;y&&n[y]!=null&&(f+=1)}if(f<c.minCount){g=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){g=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let E=0;for(const T of Array.from(f)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(E+=1)}const h=c.minCount&&c.minCount>0?c.minCount:1;if(E<h){g=!1;break}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!f){g=!1;break}if(f.classList.contains("show-placeholder")){g=!1;break}if(f.innerText.replace(/[\u200B\n]/g,"").trim().length===0){g=!1;break}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){g=!1;break}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){g=!1;break}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,E=e.current.querySelector(f);if(!E||a(E).length===0){g=!1;break}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){g=!1;break}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){g=!1;break}}r(b&&g)}const rl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s})=>{M.useLayoutEffect(()=>{const u=r.current;if(!u)return;const o=new Map,l=b=>{const g=b.target,c=b.relatedTarget;!g||!r.current||!r.current.contains(g)||c&&r.current.contains(c)||setTimeout(()=>{if(r.current){if(e.length===0){const f=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(f.length>0);return}Nn(r),pr(r,t,n),ni(r,t,n,a)}},0)};u.addEventListener("blur",l,!0);const m=()=>{if(!r.current)return;o.forEach((c,f)=>{f.removeEventListener("blur",c,!1)}),o.clear();const b=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),g=c=>{c.stopPropagation(),c.stopImmediatePropagation();const f=c.target;if(!f||!r.current||!r.current.contains(f))return;const E=f.closest('[data-type="variable"][data-multi-key]');if(!E||!r.current.contains(E))return;let h=!1;if(o.forEach((L,O)=>{(O===E||O.contains(f))&&(h=!0)}),!h)return;const T=E.dataset.multiKey,y=E.dataset.key,C=E.dataset.index;if(!T||!y||C===void 0)return;const S=c.relatedTarget;if(!(!S||!r.current.contains(S)))return;const w=E.innerText.replace(/[\u200B\n]/g,"").trim(),_=/[、,,\s]+/;if(_.test(w)){const I=w.split(_).map(B=>B.trim()).filter(B=>B.length>0).slice(0,9);if(I.length>1){const B=e.find(H=>H.type==="multi-variable"&&H.key===T);if(B){const H=i[T]||1,v=parseInt(C,10),x=B.maxCount||9,P=[];for(let j=0;j<H;j++){const J=`${T}_${j}`,R=r.current.querySelector(`[data-type="variable"][data-key="${J}"][data-multi-key="${T}"]`);if(R){const te=R.innerText.replace(/[\u200B\n]/g,"").trim();P.push(te)}}P.splice(v,1,...I);const $=P.slice(0,x);$.length>0&&$[$.length-1]!==""&&$.length<x&&$.push("");const U=Math.max($.length,1),G={};$.forEach((j,J)=>{j&&(G[`${T}_${J}`]=j)}),r.current.querySelectorAll('[data-type="variable"]').forEach(j=>{const J=j.dataset.key,R=j.dataset.multiKey;if(J&&R!==T){const te=j.innerText.replace(/[\u200B\n]/g,"").trim();te&&(G[J]=te)}}),r.current.__tempVariableValues=G,s(j=>({...j,[T]:U}))}}}};b.forEach(c=>{c.addEventListener("blur",g,!1),o.set(c,g)})},p=setTimeout(()=>{m()},0);return()=>{clearTimeout(p),u.removeEventListener("blur",l,!0),o.forEach((b,g)=>{g.removeEventListener("blur",b,!1)}),o.clear()}},[e,t,r,n,i,a,s])},al=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:u,onBeforeFilePickerOpen:o,files:l,setFiles:m,handleRemoveFile:p,setActiveBatchKey:b,setActiveBatchStartIndex:g,setActiveFileKey:c,isDraggingRef:f,richtextPrevScrollTopRef:E})=>{const h=(...y)=>{},T=y=>{try{const C=window.getSelection();if(!C)return h(y,"no selection");const S=C.rangeCount>0?C.getRangeAt(0):null;h(y,{rangeCount:C.rangeCount,isCollapsed:C.isCollapsed,anchorNode:C.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":C.anchorNode?.nodeName,anchorOffset:C.anchorOffset,focusNode:C.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":C.focusNode?.nodeName,focusOffset:C.focusOffset,range:S?{startContainer:S.startContainer.nodeType===Node.TEXT_NODE?"TEXT":S.startContainer.nodeName,startOffset:S.startOffset,endContainer:S.endContainer.nodeType===Node.TEXT_NODE?"TEXT":S.endContainer.nodeName,endOffset:S.endOffset}:null})}catch{}};return M.useCallback(y=>{if(e)return;t&&n?.(!1);const C=y.target;if(h("click",{tag:C.tagName,cls:C.className}),T("before click"),C.closest('[data-type="datepicker"]'))return;if(C.closest(".tag-close-btn")){y.preventDefault(),y.stopPropagation();return}if(r.length===0)return;const w=(v,x)=>{if(!i.current)return;Array.from(i.current.children).forEach($=>{if($!==v)if(x)$.dataset.prevDisplay===void 0&&($.dataset.prevDisplay=$.style.display||""),$.dataset.rteForceHidden="1",$.style.setProperty("display","none","important");else{if($.dataset.prevDisplay!==void 0){const U=$.dataset.prevDisplay;U?$.style.display=U:$.style.removeProperty("display"),delete $.dataset.prevDisplay}else $.style.removeProperty("display");delete $.dataset.rteForceHidden}})},_=C.closest(".rte-textarea-toggle");if(_){y.preventDefault(),y.stopPropagation();const v=_.closest(".rte-textarea-wrapper"),x=v?.querySelector('[data-type="textarea"]'),$=!(_.getAttribute("data-expanded")==="true");_.setAttribute("data-expanded",String($)),_.textContent=$?"收起":"展开",v&&v.classList.toggle("rte-textarea-expanded",$);const U=v?.closest(".rte-textarea-required");if(U?U.classList.toggle("rte-textarea-overlay",$):v&&v.classList.toggle("rte-textarea-overlay",$),x)if($)x.classList.add("rte-textarea-expanded"),x.style.maxHeight="none",x.style.height="100%";else{x.classList.remove("rte-textarea-expanded");const G=x.dataset.maxHeight||"252";x.style.maxHeight=`${G}px`,x.style.height="auto"}i.current&&($?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const L=C.closest(".rte-richtext-toggle");if(L){y.preventDefault(),y.stopPropagation();const v=L.closest(".rte-richtext-wrapper"),x=v?.querySelector('[data-type="richtext"]'),$=!(L.getAttribute("data-expanded")==="true");((j,J)=>{j.setAttribute("data-expanded",String(J)),j.innerHTML=J?'<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>'})(L,$);const G=v?.closest(".rte-richtext-required");G?G.classList.toggle("rte-richtext-expanded",$):v&&v.classList.toggle("rte-richtext-expanded",$);const k=v?.closest(".exclusion-wrapper")||v?.parentElement;if(x&&($?(x.style.height="100%",x.style.overflow="auto"):(x.style.height="",x.style.overflow="")),k&&(k.classList.toggle("rte-richtext-host-expanded",$),w(k,$)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",$),s.current?.classList.toggle("rte-richtext-container-expanded",$),s.current)if($){const j=Math.ceil(s.current.getBoundingClientRect().height||0);j>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${j}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if($)E.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const j=E.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=j)},0)}}return}if(C.closest('[data-type="text"]')){y.preventDefault(),y.stopPropagation();const v=window.getSelection();v&&v.removeAllRanges();return}if(a&&C.closest(".tag-node")){y.preventDefault(),y.stopPropagation();const x=window.getSelection();x&&x.removeAllRanges();return}const I=C.closest('[data-type="variable"]');if(I){if(f.current)return;if(I.dataset.variableRender!=="antd-textarea"){const v=!!C.closest(".variable-info-icon"),x=I.classList.contains("show-placeholder")||(I.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(h("v1 variable click",{key:I.dataset.key,isPlaceholder:x,isOnIcon:v,classes:I.className,innerText:I.innerText}),x&&!v){y.preventDefault();const P=()=>{try{I.focus();const $=window.getSelection();if(!$)return;const U=document.createTreeWalker(I,NodeFilter.SHOW_TEXT),G=U.nextNode()?U.currentNode:null,k=document.createRange();G?(k.setStart(G,0),k.collapse(!0)):(k.selectNodeContents(I),k.collapse(!0)),$.removeAllRanges(),$.addRange(k),T("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(P),window.requestAnimationFrame(()=>T("post-raf (click)"))},0)}}setTimeout(()=>{const v=window.getSelection();v&&!v.isCollapsed||Nn(i)},10);return}const B=C.closest(".file-remove-btn");if(B){y.preventDefault(),y.stopPropagation();const v=B.closest('[data-type="upload"]'),x=v?.dataset.key,P=v?.dataset.batchKey;if(x)if(P){const $=r.find(U=>U.type==="upload"&&U.key===P);if($&&typeof $.maxCount=="number"&&typeof $.minCount=="number"){const U=$.maxCount;m(G=>{const k={...G},j=[];for(let J=0;J<U;J++){const R=`${P}-${J}`,te=k[R];te!=null&&R!==x&&j.push(te)}for(let J=0;J<U;J++)delete k[`${P}-${J}`];return j.forEach((J,R)=>{k[`${P}-${R}`]=J}),k})}else p(x)}else p(x);return}const H=C.closest('[data-type="upload"]');if(H){const v=H.dataset.key,x=H.dataset.batchKey,P=H.dataset.batchIndex;if(v){const $=x||v,U=r.find(G=>G.type==="upload"&&G.key===$);if(u.current&&(U?.accept?u.current.accept=U.accept:U?.acceptType==="image"?u.current.accept="image/*":U?.acceptType==="file"?u.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":u.current.accept=""),x){const G=r.find(k=>k.type==="upload"&&k.key===x);if(G&&typeof G.maxCount=="number"&&typeof G.minCount=="number"){const k=G.maxCount,j=l[v]!=null,J=P!=null?Number.parseInt(P,10):NaN;if(j){u.current&&(u.current.multiple=!1),b(null),g(null),c(v),o?.(),u.current?.click();return}let R=0;for(let te=0;te<k;te++)l[`${x}-${te}`]!=null&&(R+=1);R<k&&u.current?(u.current.multiple=!0,b(x),g(Number.isFinite(J)?J:null),c(null),o?.(),u.current.click()):(u.current&&(u.current.multiple=!1),b(null),g(null),c(v),o?.(),u.current?.click())}else u.current&&(u.current.multiple=!1),b(null),g(null),c(v),o?.(),u.current?.click()}else u.current&&(u.current.multiple=!1),b(null),g(null),c(v),o?.(),u.current?.click()}return}},[t,r,s,e,i,u,o,l,p,f,a,n,E,b,g,c,m])},il=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:u,measureExpandedContentHeight:o,effectiveConfig:l,files:m,multiVariableCounts:p,setMultiVariableCounts:b,savedCursorRef:g})=>M.useCallback(()=>{if(e.length===0){if(t.current){const E=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(E),r(!E)}return}if(Nn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(E=>{const h=E.dataset.key;if(!h)return;E.innerText.replace(/[\u200B\n]/g,"").trim()||a(y=>{const C=y[h];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:{...y,[h]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(E=>{const h=E.dataset.key;if(!h)return;E.innerText.replace(/[\u200B\n]/g,"").trim()||i(y=>{const C=y[h];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:{...y,[h]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(E=>{const h=E.dataset.key;if(!h)return;const T=E.innerText.replace(/[\u200B\n]/g,"").trim();s(y=>{const C=y[h];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:!T||C.lastParsedText&&T!==C.lastParsedText?{...y,[h]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}:y})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(E=>{const h=E.dataset.key;if(!h)return;E.innerText.replace(/[\u200B\n]/g,"").trim()||(i(y=>{const C=y[h];return!C||C.status==="idle"?y:{...y,[h]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(y=>{const C=y[h];return!C||C.status==="idle"?y:{...y,[h]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(E=>{if(E.dataset.variableRender==="antd-textarea")return;const h=!!E.querySelector("br")||(E.innerText||"").includes(`
|
|
36
|
-
`),T=
|
|
37
|
-
`).trim();T.push(O)}}const C=(T[T.length-1]||"")==="";let S=!1,A=-1;for(let w=0;w<T.length-1;w++)if(T[w]===""){S=!0,A=w;break}if(S&&A>=0){const w=window.getSelection();if(w&&w.rangeCount>0){const B=w.getRangeAt(0),H=B.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const x=v.dataset.key;if(x){const
|
|
38
|
-
`).trim();x&&(
|
|
39
|
-
`).trim().length>0&&
|
|
40
|
-
`).replace(/\n+$/g,""),
|
|
41
|
-
`);for(let P=0;P<v.length;P++)B.appendChild(document.createTextNode(v[P])),L&&P<v.length-1&&B.appendChild(document.createElement("br"));I.insertNode(B),O.removeAllRanges();const x=document.createRange();x.selectNodeContents(S),x.collapse(!1),O.addRange(x)}i();return}}}}let h=!1,T="";const y=window.getSelection();if(y&&y.rangeCount>0){const C=y.anchorNode;if(C){let S=null;if(C.nodeType===Node.ELEMENT_NODE?S=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(S=C.parentElement.closest('[data-type="variable"]')),S){const A=S.getAttribute("data-node-type")||"",w=S.dataset.key;if(A==="markdown"&&w&&/20\d{2}-\d{2}-\d{2}/.test(f))h=!0,T=w,m.current[w]=f,p(_=>({..._,[w]:{..._[w],status:"loading",error:void 0}}));else if(A==="report-url"&&w){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();u.current(w,_)},0);return}else if(A==="markdown-name"&&w){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();o.current(w,_)},0);return}}}}if(h&&T){setTimeout(()=>{s.current(T,f)},0);return}document.execCommand("insertText",!1,f),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(f)&&l.current.tableData?.status==="success"&&(p(S=>({...S,tableData:{status:"loading",modules:[],lastParsedText:f,error:void 0}})),setTimeout(()=>{m.current.tableData=f,s.current("tableData",f)},0))},0)},[t,e,a,i,s,l,m,n,u,p,r]),ll=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:u,markdownAnalyzeState:o,markdownNameAnalyzeState:l})=>M.useCallback(()=>{if(r||a||i||!s||!u.current)return;if(e.length===0){const f=u.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!f)return;if(n(f,f),u.current){u.current.textContent="";const E=new Event("input",{bubbles:!0});u.current.dispatchEvent(E)}return}const m=u.current;let p="";const b={},g=f=>{if(!(f.nodeType===Node.ELEMENT_NODE&&f.style.display==="none")){if(f.nodeType===Node.TEXT_NODE)p+=(f.textContent||"").replace(/\u200B/g,"");else if(f.nodeType===Node.ELEMENT_NODE){const E=f,h=E.dataset.type,T=E.dataset.key;if(h==="variable"&&T){let y="";const C=document.createTreeWalker(E,NodeFilter.SHOW_TEXT,{acceptNode:A=>{const w=E.querySelector(".variable-info-icon");return w&&w.contains(A)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;C.nextNode();)y+=C.currentNode.textContent||"";const S=y.replace(/[\u200B\n]/g,"").trim();if(S){const A=E.dataset.multiKey;if(A){(!b[A]||!Array.isArray(b[A]))&&(b[A]=[]);const w=b[A];w.push(S),w.length>1&&(p+=" "),p+=S}else b[T]=S,p+=S;if(E.dataset.nodeType==="report-url")if(b.url===void 0)b.url=S;else{const w=b.url;Array.isArray(w)?w.push(S):b.url=[String(w),S]}if(E.dataset.nodeType==="markdown-name"){const w=`${T}__sourceText`;b[w]===void 0&&(b[w]=S)}if(E.dataset.nodeType==="markdown"){const w=E.dataset.sourceTextKey||`${T}__sourceText`;if(b[w]===void 0)b[w]=S;else{const L=b[w];Array.isArray(L)?L.push(S):b[w]=[String(L),S]}const _=`${T}__markdown`;b[_]===void 0&&(b[_]=[ei(S)])}}}else if(h==="select"&&T){const y=(E.getAttribute("data-value")||"").trim();y&&(b[T]=y,p+=y)}else if(h==="textarea"&&T){const C=(E.value||"").replace(/\u200B/g,"").trim();C&&(b[T]=C,p+=C)}else if(h==="richtext"&&T){const y=E,C=y.dataset.nodeType,S=(y.textContent||"").replace(/\u200B/g,"").trim();if(S)if(C==="report-module"||C==="markdown-module"){(!b[T]||!Array.isArray(b[T]))&&(b[T]=[]);const A=b[T];A.push(S),A.length>1&&(p+=" "),p+=S}else b[T]=S,p+=S}else if(h==="datepicker"&&T){const C=(E.getAttribute("data-value")||"").trim();if(C)if(C.includes(",")){const S=C.split(",");S.length===2?(b[T]=S,p+=`[${S[0]}, ${S[1]}]`):(b[T]=C,p+=C)}else b[T]=C,p+=C}else if(h==="number-input"&&T){const C=(E.value||"").trim();C&&(b[T]=C,p+=C)}else if(h==="upload"&&T){const y=E.dataset.batchKey;if(y){const C=e.find(S=>S.type==="upload"&&S.key===y);if(C&&typeof C.maxCount=="number"&&typeof C.minCount=="number"){const S=[];for(let A=0;A<C.maxCount;A++){const w=`${y}-${A}`,_=t[w];_&&S.push(_)}b[y]||(b[y]=S.length>0?S:null,S.length>0&&(p+=` [附带${S.length}个文件: ${S.map(A=>A.name).join(", ")}] `))}else b[T]=t[T]??null,t[T]&&(p+=` [附带文件: ${t[T]?.name}] `)}else b[T]=t[T]??null,t[T]&&(p+=` [附带文件: ${t[T]?.name}] `)}else{if(E.classList.contains("tag-close-btn")||E.classList.contains("file-remove-btn"))return;E.getAttribute("contenteditable")==="false"&&!h&&E.classList.contains("tag-node")?p+=E.innerText:E.childNodes.forEach(g)}}}};if(m.childNodes.forEach(g),p=p.trim(),!p)return;Object.keys(o).forEach(f=>{const E=o[f];if(!E||!E.modules||E.modules.length===0)return;const h=E.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);h.length!==0&&(b[`${f}__markdown`]=h)}),Object.keys(l).forEach(f=>{const E=l[f];if(!E||!E.modules||E.modules.length===0)return;const h=E.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);h.length!==0&&(b[`${f}__markdown`]=h)});const c=new FormData;c.append("fullPrompt",p),Object.keys(b).forEach(f=>{const E=b[f];if(E!=null)if(E instanceof File)c.append(f,E);else if(Array.isArray(E)){const h=e.some(S=>S.type==="multi-variable"&&S.key===f),T=e.some(S=>S.type==="report-url"&&S.key===f),y=f.endsWith("__markdown");h||T||y||f==="url"?E.forEach(S=>{S!=null&&S!==""&&c.append(f,String(S))}):E.forEach((S,A)=>{S!=null&&(S instanceof File?c.append(`${f}[${A}]`,S):typeof S=="string"?c.append(`${f}[${A}]`,S):c.append(`${f}[${A}]`,String(S)))})}else typeof E=="string"?c.append(f,E):c.append(f,String(E))}),n(c,p)},[e,t,n,r,a,i,s,u,o,l]);function ri(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function hr(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:ri(t[r])&&ri(e[r])&&Object.keys(t[r]).length>0&&hr(e[r],t[r])})}const ai={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 Et(){const e=typeof document<"u"?document:{};return hr(e,ai),e}const cl={document:ai,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 Ie(){const e=typeof window<"u"?window:{};return hr(e,cl),e}function dl(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function fl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function ii(e,t=0){return setTimeout(e,t)}function wn(){return Date.now()}function pl(e){const t=Ie();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function hl(e,t="x"){const n=Ie();let r,a,i;const s=pl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(u=>u.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix(a==="none"?"":a)):(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?a=i.m41:r.length===16?a=parseFloat(r[12]):a=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?a=i.m42:r.length===16?a=parseFloat(r[13]):a=parseFloat(r[5])),a||0}function In(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function ml(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Re(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let r=1;r<e.length;r+=1){const a=e[r];if(a!=null&&!ml(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,u=i.length;s<u;s+=1){const o=i[s],l=Object.getOwnPropertyDescriptor(a,o);l!==void 0&&l.enumerable&&(In(t[o])&&In(a[o])?a[o].__swiper__?t[o]=a[o]:Re(t[o],a[o]):!In(t[o])&&In(a[o])?(t[o]={},a[o].__swiper__?t[o]=a[o]:Re(t[o],a[o])):t[o]=a[o])}}}return t}function kt(e,t,n){e.style.setProperty(t,n)}function si({swiper:e,targetPosition:t,side:n}){const r=Ie(),a=-e.translate;let i=null,s;const u=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const o=t>a?"next":"prev",l=(p,b)=>o==="next"&&p>=b||o==="prev"&&p<=b,m=()=>{s=new Date().getTime(),i===null&&(i=s);const p=Math.max(Math.min((s-i)/u,1),0),b=.5-Math.cos(p*Math.PI)/2;let g=a+b*(t-a);if(l(g,t)&&(g=t),e.wrapperEl.scrollTo({[n]:g}),l(g,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:g})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(m)};m()}function We(e,t=""){const n=Ie(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function gl(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function El(e,t){const n=Ie();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=gl(e,t))),r}function Ln(e){try{console.warn(e);return}catch{}}function On(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:dl(t)),n}function bl(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Tl(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ot(e,t){return Ie().getComputedStyle(e,null).getPropertyValue(t)}function Dn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function oi(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function mr(e,t,n){const r=Ie();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ae(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function zt(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let gr;function yl(){const e=Ie(),t=Et();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ui(){return gr||(gr=yl()),gr}let Er;function xl({userAgent:e}={}){const t=ui(),n=Ie(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,u=n.screen.height,o=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const m=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),b=r==="Win32";let g=r==="MacIntel";const c=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&g&&t.touch&&c.indexOf(`${s}x${u}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),g=!1),o&&!b&&(i.os="android",i.android=!0),(l||p||m)&&(i.os="ios",i.ios=!0),i}function li(e={}){return Er||(Er=xl(e)),Er}let br;function Cl(){const e=Ie(),t=li();let n=!1;function r(){const u=e.navigator.userAgent.toLowerCase();return u.indexOf("safari")>=0&&u.indexOf("chrome")<0&&u.indexOf("android")<0}if(r()){const u=String(e.navigator.userAgent);if(u.includes("Version/")){const[o,l]=u.split("Version/")[1].split(" ")[0].split(".").map(m=>Number(m));n=o<16||o===16&&l<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r(),s=i||a&&t.ios;return{isSafari:n||i,needPerspectiveFix:n,need3dFix:s,isWebView:a}}function ci(){return br||(br=Cl()),br}function Sl({swiper:e,on:t,emit:n}){const r=Ie();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},u=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(m=>{i=r.requestAnimationFrame(()=>{const{width:p,height:b}=e;let g=p,c=b;m.forEach(({contentBoxSize:f,contentRect:E,target:h})=>{h&&h!==e.el||(g=E?E.width:(f[0]||f).inlineSize,c=E?E.height:(f[0]||f).blockSize)}),(g!==p||c!==b)&&s()})}),a.observe(e.el))},o=()=>{i&&r.cancelAnimationFrame(i),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null)},l=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof r.ResizeObserver<"u"){u();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{o(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function Al({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=Ie(),s=(l,m={})=>{const p=i.MutationObserver||i.WebkitMutationObserver,b=new p(g=>{if(e.__preventObserver__)return;if(g.length===1){r("observerUpdate",g[0]);return}const c=function(){r("observerUpdate",g[0])};i.requestAnimationFrame?i.requestAnimationFrame(c):i.setTimeout(c,0)});b.observe(l,{attributes:typeof m.attributes>"u"?!0:m.attributes,childList:e.isElement||(typeof m.childList>"u"?!0:m).childList,characterData:typeof m.characterData>"u"?!0:m.characterData}),a.push(b)},u=()=>{if(e.params.observer){if(e.params.observeParents){const l=oi(e.hostEl);for(let m=0;m<l.length;m+=1)s(l[m])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},o=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",u),n("destroy",o)}var _l={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const a=n?"unshift":"push";return e.split(" ").forEach(i=>{r.eventsListeners[i]||(r.eventsListeners[i]=[]),r.eventsListeners[i][a](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function a(...i){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(r,i)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&n.eventsListeners[r].splice(i,1)})}),n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let n,r,a;return typeof e[0]=="string"||Array.isArray(e[0])?(n=e[0],r=e.slice(1,e.length),a=t):(n=e[0].events,r=e[0].data,a=e[0].context||t),r.unshift(a),(Array.isArray(n)?n:n.split(" ")).forEach(s=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(u=>{u.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(u=>{u.apply(a,r)})}),t}};function kl(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(ot(r,"padding-left")||0,10)-parseInt(ot(r,"padding-right")||0,10),n=n-parseInt(ot(r,"padding-top")||0,10)-parseInt(ot(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function vl(){const e=this;function t(O,I){return parseFloat(O.getPropertyValue(e.getDirectionLabel(I))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,u=e.virtual&&n.virtual.enabled,o=u?e.virtual.slides.length:e.slides.length,l=We(a,`.${e.params.slideClass}, swiper-slide`),m=u?e.virtual.slides.length:l.length;let p=[];const b=[],g=[];let c=n.slidesOffsetBefore;typeof c=="function"&&(c=n.slidesOffsetBefore.call(e));let f=n.slidesOffsetAfter;typeof f=="function"&&(f=n.slidesOffsetAfter.call(e));const E=e.snapGrid.length,h=e.slidesGrid.length,T=e.size-c-f;let y=n.spaceBetween,C=-c,S=0,A=0;if(typeof T>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*T:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y-c-f,l.forEach(O=>{i?O.style.marginLeft="":O.style.marginRight="",O.style.marginBottom="",O.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(kt(r,"--swiper-centered-offset-before",""),kt(r,"--swiper-centered-offset-after","")),n.cssMode&&(kt(r,"--swiper-slides-offset-before",`${c}px`),kt(r,"--swiper-slides-offset-after",`${f}px`));const w=n.grid&&n.grid.rows>1&&e.grid;w?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let _;const L=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(O=>typeof n.breakpoints[O].slidesPerView<"u").length>0;for(let O=0;O<m;O+=1){_=0;const I=l[O];if(!(I&&(w&&e.grid.updateSlide(O,I,l),ot(I,"display")==="none"))){if(u&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(_=n.virtual.slidesPerViewAutoSlideSize),_&&I&&(n.roundLengths&&(_=Math.floor(_)),I.style[e.getDirectionLabel("width")]=`${_}px`);else if(n.slidesPerView==="auto"){L&&(I.style[e.getDirectionLabel("width")]="");const B=getComputedStyle(I),H=I.style.transform,v=I.style.webkitTransform;if(H&&(I.style.transform="none"),v&&(I.style.webkitTransform="none"),n.roundLengths)_=e.isHorizontal()?mr(I,"width"):mr(I,"height");else{const x=t(B,"width"),P=t(B,"padding-left"),$=t(B,"padding-right"),U=t(B,"margin-left"),G=t(B,"margin-right"),k=B.getPropertyValue("box-sizing");if(k&&k==="border-box")_=x+U+G;else{const{clientWidth:j,offsetWidth:J}=I;_=x+P+$+U+G+(J-j)}}H&&(I.style.transform=H),v&&(I.style.webkitTransform=v),n.roundLengths&&(_=Math.floor(_))}else _=(T-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(_=Math.floor(_)),I&&(I.style[e.getDirectionLabel("width")]=`${_}px`);I&&(I.swiperSlideSize=_),g.push(_),n.centeredSlides?(C=C+_/2+S/2+y,S===0&&O!==0&&(C=C-T/2-y),O===0&&(C=C-T/2-y),Math.abs(C)<1/1e3&&(C=0),n.roundLengths&&(C=Math.floor(C)),A%n.slidesPerGroup===0&&p.push(C),b.push(C)):(n.roundLengths&&(C=Math.floor(C)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&p.push(C),b.push(C),C=C+_+y),e.virtualSize+=_+y,S=_,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,T)+f,i&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),w&&e.grid.updateWrapperSize(_,p),!n.centeredSlides){const O=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,I=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||O);let B=p.length;if(I){let v;if(n.slidesPerView==="auto"){v=1;let x=0;for(let P=g.length-1;P>=0&&(x+=g[P]+(P<g.length-1?y:0),x<=T);P-=1)v=g.length-P}else v=Math.floor(n.slidesPerView);B=Math.max(m-v,0)}const H=[];for(let v=0;v<p.length;v+=1){let x=p[v];n.roundLengths&&(x=Math.floor(x)),I?v<=B&&H.push(x):p[v]<=e.virtualSize-T&&H.push(x)}p=H,Math.floor(e.virtualSize-T)-Math.floor(p[p.length-1])>1&&(I||p.push(e.virtualSize-T))}if(u&&n.loop){const O=g[0]+y;if(n.slidesPerGroup>1){const I=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),B=O*n.slidesPerGroup;for(let H=0;H<I;H+=1)p.push(p[p.length-1]+B)}for(let I=0;I<e.virtual.slidesBefore+e.virtual.slidesAfter;I+=1)n.slidesPerGroup===1&&p.push(p[p.length-1]+O),b.push(b[b.length-1]+O),e.virtualSize+=O}if(p.length===0&&(p=[0]),y!==0){const O=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((I,B)=>!n.cssMode||n.loop?!0:B!==l.length-1).forEach(I=>{I.style[O]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let O=0;g.forEach(B=>{O+=B+(y||0)}),O-=y;const I=O>T?O-T:0;p=p.map(B=>B<=0?-c:B>I?I+f:B)}if(n.centerInsufficientSlides){let O=0;g.forEach(B=>{O+=B+(y||0)}),O-=y;const I=(c||0)+(f||0);if(O+I<T){const B=(T-O-I)/2;p.forEach((H,v)=>{p[v]=H-B}),b.forEach((H,v)=>{b[v]=H+B})}}if(Object.assign(e,{slides:l,snapGrid:p,slidesGrid:b,slidesSizesGrid:g}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){kt(r,"--swiper-centered-offset-before",`${-p[0]}px`),kt(r,"--swiper-centered-offset-after",`${e.size/2-g[g.length-1]/2}px`);const O=-e.snapGrid[0],I=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(B=>B+O),e.slidesGrid=e.slidesGrid.map(B=>B+I)}if(m!==o&&e.emit("slidesLengthChange"),p.length!==E&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),b.length!==h&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!u&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const O=`${n.containerModifierClass}backface-hidden`,I=e.el.classList.contains(O);m<=n.maxBackfaceHiddenSlides?I||e.el.classList.add(O):I&&e.el.classList.remove(O)}}function Nl(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=u=>r?t.slides[t.getSlideIndexByData(u)]:t.slides[u];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(u=>{n.push(u)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const u=t.activeIndex+i;if(u>t.slides.length&&!r)break;n.push(s(u))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const u=n[i].offsetHeight;a=u>a?u:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function wl(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const di=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Il(e=this&&this.translate||0){const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:i}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;a&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let u=n.spaceBetween;typeof u=="string"&&u.indexOf("%")>=0?u=parseFloat(u.replace("%",""))/100*t.size:typeof u=="string"&&(u=parseFloat(u));for(let o=0;o<r.length;o+=1){const l=r[o];let m=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(m-=r[0].swiperSlideOffset);const p=(s+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),b=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),g=-(s-m),c=g+t.slidesSizesGrid[o],f=g>=0&&g<=t.size-t.slidesSizesGrid[o],E=g>=0&&g<t.size-1||c>1&&c<=t.size||g<=0&&c>=t.size;E&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(o)),di(l,E,n.slideVisibleClass),di(l,f,n.slideFullyVisibleClass),l.progress=a?-p:p,l.originalProgress=a?-b:b}}function Ll(e){const t=this;if(typeof e>"u"){const m=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*m||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:u}=t;const o=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const m=Math.abs(e-t.minTranslate())<1,p=Math.abs(e-t.maxTranslate())<1;i=m||a<=0,s=p||a>=1,m&&(a=0),p&&(a=1)}if(n.loop){const m=t.getSlideIndexByData(0),p=t.getSlideIndexByData(t.slides.length-1),b=t.slidesGrid[m],g=t.slidesGrid[p],c=t.slidesGrid[t.slidesGrid.length-1],f=Math.abs(e);f>=b?u=(f-b)/c:u=(f+c-g)/c,u>1&&(u-=1)}Object.assign(t,{progress:a,progressLoop:u,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!o&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(o&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Tr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Ol(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,i=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,u=p=>We(r,`.${n.slideClass}${p}, swiper-slide${p}`)[0];let o,l,m;if(i)if(n.loop){let p=a-e.virtual.slidesBefore;p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),o=u(`[data-swiper-slide-index="${p}"]`)}else o=u(`[data-swiper-slide-index="${a}"]`);else s?(o=t.find(p=>p.column===a),m=t.find(p=>p.column===a+1),l=t.find(p=>p.column===a-1)):o=t[a];o&&(s||(m=Tl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!m&&(m=t[0]),l=bl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(p=>{Tr(p,p===o,n.slideActiveClass),Tr(p,p===m,n.slideNextClass),Tr(p,p===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Pn=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let a=r.querySelector(`.${e.params.lazyPreloaderClass}`);!a&&e.isElement&&(r.shadowRoot?a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),a&&!a.lazyPreloaderManaged&&a.remove())})),a&&!a.lazyPreloaderManaged&&a.remove()}},yr=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},xr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,u=[s-t];u.push(...Array.from({length:t}).map((o,l)=>s+r+l)),e.slides.forEach((o,l)=>{u.includes(o.column)&&yr(e,l)});return}const i=a+r-1;if(e.params.rewind||e.params.loop)for(let s=a-t;s<=i+t;s+=1){const u=(s%n+n)%n;(u<a||u>i)&&yr(e,u)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&yr(e,s)};function Dl(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let i=0;i<t.length;i+=1)typeof t[i+1]<"u"?r>=t[i]&&r<t[i+1]-(t[i+1]-t[i])/2?a=i:r>=t[i]&&r<t[i+1]&&(a=i+1):r>=t[i]&&(a=i);return n.normalizeSlideIndex&&(a<0||typeof a>"u")&&(a=0),a}function Pl(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:u}=t;let o=e,l;const m=g=>{let c=g-t.virtual.slidesBefore;return c<0&&(c=t.virtual.slides.length+c),c>=t.virtual.slides.length&&(c-=t.virtual.slides.length),c};if(typeof o>"u"&&(o=Dl(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const g=Math.min(a.slidesPerGroupSkip,o);l=g+Math.floor((o-g)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),o===i&&!t.params.loop){l!==u&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(o===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=m(o);return}const p=t.grid&&a.grid&&a.grid.rows>1;let b;if(t.virtual&&a.virtual.enabled)a.loop?b=m(o):b=o;else if(p){const g=t.slides.find(f=>f.column===o);let c=parseInt(g.getAttribute("data-swiper-slide-index"),10);Number.isNaN(c)&&(c=Math.max(t.slides.indexOf(g),0)),b=Math.floor(c/a.grid.rows)}else if(t.slides[o]){const g=t.slides[o].getAttribute("data-swiper-slide-index");g?b=parseInt(g,10):b=o}else b=o;Object.assign(t,{previousSnapIndex:u,snapIndex:l,previousRealIndex:s,realIndex:b,previousIndex:i,activeIndex:o}),t.initialized&&xr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==b&&t.emit("realIndexChange"),t.emit("slideChange"))}function Ml(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(u=>{!a&&u.matches&&u.matches(`.${r.slideClass}, swiper-slide`)&&(a=u)});let i=!1,s;if(a){for(let u=0;u<n.slides.length;u+=1)if(n.slides[u]===a){i=!0,s=u;break}}if(a&&i)n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var Bl={updateSize:kl,updateSlides:vl,updateAutoHeight:Nl,updateSlidesOffset:wl,updateSlidesProgress:Il,updateProgress:Ll,updateSlidesClasses:Ol,updateActiveIndex:Pl,updateClickedSlide:Ml};function Rl(e=this.isHorizontal()?"x":"y"){const t=this,{params:n,rtlTranslate:r,translate:a,wrapperEl:i}=t;if(n.virtualTranslate)return r?-a:a;if(n.cssMode)return a;let s=hl(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function Fl(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let u=0,o=0;const l=0;n.isHorizontal()?u=r?-e:e:o=e,a.roundLengths&&(u=Math.floor(u),o=Math.floor(o)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?u:o,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-u:-o:a.virtualTranslate||(n.isHorizontal()?u-=n.cssOverflowAdjustment():o-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${u}px, ${o}px, ${l}px)`);let m;const p=n.maxTranslate()-n.minTranslate();p===0?m=0:m=(e-n.minTranslate())/p,m!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function Hl(){return-this.snapGrid[0]}function $l(){return-this.snapGrid[this.snapGrid.length-1]}function Ul(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:u}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const o=i.minTranslate(),l=i.maxTranslate();let m;if(r&&e>o?m=o:r&&e<l?m=l:m=e,i.updateProgress(m),s.cssMode){const p=i.isHorizontal();if(t===0)u[p?"scrollLeft":"scrollTop"]=-m;else{if(!i.support.smoothScroll)return si({swiper:i,targetPosition:-m,side:p?"left":"top"}),!0;u.scrollTo({[p?"left":"top"]:-m,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(b){!i||i.destroyed||b.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}var ql={getTranslate:Rl,setTranslate:Fl,minTranslate:Hl,maxTranslate:$l,translateTo:Ul};function zl(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function fi({swiper:e,runCallbacks:t,direction:n,step:r}){const{activeIndex:a,previousIndex:i}=e;let s=n;s||(a>i?s="next":a<i?s="prev":s="reset"),e.emit(`transition${r}`),t&&s==="reset"?e.emit(`slideResetTransition${r}`):t&&a!==i&&(e.emit(`slideChangeTransition${r}`),s==="next"?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`))}function Vl(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),fi({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function Gl(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),fi({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var Yl={setTransition:zl,transitionStart:Vl,transitionEnd:Gl};function Wl(e=0,t,n=!0,r,a){typeof e=="string"&&(e=parseInt(e,10));const i=this;let s=e;s<0&&(s=0);const{params:u,snapGrid:o,slidesGrid:l,previousIndex:m,activeIndex:p,rtlTranslate:b,wrapperEl:g,enabled:c}=i;if(!c&&!r&&!a||i.destroyed||i.animating&&u.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const f=Math.min(i.params.slidesPerGroupSkip,s);let E=f+Math.floor((s-f)/i.params.slidesPerGroup);E>=o.length&&(E=o.length-1);const h=-o[E];if(u.normalizeSlideIndex)for(let w=0;w<l.length;w+=1){const _=-Math.floor(h*100),L=Math.floor(l[w]*100),O=Math.floor(l[w+1]*100);typeof l[w+1]<"u"?_>=L&&_<O-(O-L)/2?s=w:_>=L&&_<O&&(s=w+1):_>=L&&(s=w)}if(i.initialized&&s!==p&&(!i.allowSlideNext&&(b?h>i.translate&&h>i.minTranslate():h<i.translate&&h<i.minTranslate())||!i.allowSlidePrev&&h>i.translate&&h>i.maxTranslate()&&(p||0)!==s))return!1;s!==(m||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(h);let T;s>p?T="next":s<p?T="prev":T="reset";const y=i.virtual&&i.params.virtual.enabled;if(!(y&&a)&&(b&&-h===i.translate||!b&&h===i.translate))return i.updateActiveIndex(s),u.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),u.effect!=="slide"&&i.setTranslate(h),T!=="reset"&&(i.transitionStart(n,T),i.transitionEnd(n,T)),!1;if(u.cssMode){const w=i.isHorizontal(),_=b?h:-h;if(t===0)y&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),y&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{g[w?"scrollLeft":"scrollTop"]=_})):g[w?"scrollLeft":"scrollTop"]=_,y&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return si({swiper:i,targetPosition:_,side:w?"left":"top"}),!0;g.scrollTo({[w?"left":"top"]:_,behavior:"smooth"})}return!0}const A=ci().isSafari;return y&&!a&&A&&i.isElement&&i.virtual.update(!1,!1,s),i.setTransition(t),i.setTranslate(h),i.updateActiveIndex(s),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,T),t===0?i.transitionEnd(n,T):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(_){!i||i.destroyed||_.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,T))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function jl(e=0,t,n=!0,r){typeof e=="string"&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;typeof t>"u"&&(t=a.params.speed);const i=a.grid&&a.params.grid&&a.params.grid.rows>1;let s=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)s=s+a.virtual.slidesBefore;else{let u;if(i){const f=s*a.params.grid.rows;u=a.slides.find(E=>E.getAttribute("data-swiper-slide-index")*1===f).column}else u=a.getSlideIndexByData(s);const o=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:m,slidesOffsetAfter:p}=a.params,b=l||!!m||!!p;let g=a.params.slidesPerView;g==="auto"?g=a.slidesPerViewDynamic():(g=Math.ceil(parseFloat(a.params.slidesPerView,10)),b&&g%2===0&&(g=g+1));let c=o-u<g;if(b&&(c=c||u<Math.ceil(g/2)),r&&b&&a.params.slidesPerView!=="auto"&&!i&&(c=!1),c){const f=b?u<a.activeIndex?"prev":"next":u-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:f,slideTo:!0,activeSlideIndex:f==="next"?u+1:u-o+1,slideRealIndex:f==="next"?a.realIndex:void 0})}if(i){const f=s*a.params.grid.rows;s=a.slides.find(E=>E.getAttribute("data-swiper-slide-index")*1===f).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function Xl(e,t=!0,n){const r=this,{enabled:a,params:i,animating:s}=r;if(!a||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let u=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(u=Math.max(r.slidesPerViewDynamic("current",!0),1));const o=r.activeIndex<i.slidesPerGroupSkip?1:u,l=r.virtual&&i.virtual.enabled;if(i.loop){if(s&&!l&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+o,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+o,e,t,n)}function Kl(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:u,enabled:o,animating:l}=r;if(!o||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const m=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!m&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const p=u?r.translate:-r.translate;function b(T){return T<0?-Math.floor(Math.abs(T)):Math.floor(T)}const g=b(p),c=i.map(T=>b(T)),f=a.freeMode&&a.freeMode.enabled;let E=i[c.indexOf(g)-1];if(typeof E>"u"&&(a.cssMode||f)){let T;i.forEach((y,C)=>{g>=y&&(T=C)}),typeof T<"u"&&(E=f?i[T]:i[T>0?T-1:T])}let h=0;if(typeof E<"u"&&(h=s.indexOf(E),h<0&&(h=r.activeIndex-1),a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(h=h-r.slidesPerViewDynamic("previous",!0)+1,h=Math.max(h,0))),a.rewind&&r.isBeginning){const T=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(T,e,t,n)}else if(a.loop&&r.activeIndex===0&&a.cssMode)return requestAnimationFrame(()=>{r.slideTo(h,e,t,n)}),!0;return r.slideTo(h,e,t,n)}function Ql(e,t=!0,n){const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function Jl(e,t=!0,n,r=.5){const a=this;if(a.destroyed)return;typeof e>"u"&&(e=a.params.speed);let i=a.activeIndex;const s=Math.min(a.params.slidesPerGroupSkip,i),u=s+Math.floor((i-s)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[u]){const l=a.snapGrid[u],m=a.snapGrid[u+1];o-l>(m-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[u-1],m=a.snapGrid[u];o-l<=(m-l)*r&&(i-=a.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,a.slidesGrid.length-1),a.slideTo(i,e,t,n)}function Zl(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let a=e.getSlideIndexWhenGrid(e.clickedIndex),i;const s=e.isElement?"swiper-slide":`.${t.slideClass}`,u=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(u?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(We(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),ii(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var ec={slideTo:Wl,slideToLoop:jl,slideNext:Xl,slidePrev:Kl,slideReset:Ql,slideToClosest:Jl,slideToClickedSlide:Zl};function tc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{We(a,`.${r.slideClass}, swiper-slide`).forEach((c,f)=>{c.setAttribute("data-swiper-slide-index",f)})},s=()=>{const g=We(a,`.${r.slideBlankClass}`);g.forEach(c=>{c.remove()}),g.length>0&&(n.recalcSlides(),n.updateSlides())},u=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||u)&&s();const o=r.slidesPerGroup*(u?r.grid.rows:1),l=n.slides.length%o!==0,m=u&&n.slides.length%r.grid.rows!==0,p=g=>{for(let c=0;c<g;c+=1){const f=n.isElement?On("swiper-slide",[r.slideBlankClass]):On("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(f)}};if(l){if(r.loopAddBlankSlides){const g=o-n.slides.length%o;p(g),n.recalcSlides(),n.updateSlides()}else Ln("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)");i()}else if(m){if(r.loopAddBlankSlides){const g=r.grid.rows-n.slides.length%r.grid.rows;p(g),n.recalcSlides(),n.updateSlides()}else Ln("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)");i()}else i();const b=r.centeredSlides||!!r.slidesOffsetBefore||!!r.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:b?void 0:"next",initial:t})}function nc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:u}={}){const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:l,allowSlidePrev:m,allowSlideNext:p,slidesEl:b,params:g}=o,{centeredSlides:c,slidesOffsetBefore:f,slidesOffsetAfter:E,initialSlide:h}=g,T=c||!!f||!!E;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&&g.virtual.enabled){t&&(!T&&o.snapIndex===0?o.slideTo(o.virtual.slides.length,0,!1,!0):T&&o.snapIndex<g.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&&o.slideTo(o.virtual.slidesBefore,0,!1,!0)),o.allowSlidePrev=m,o.allowSlideNext=p,o.emit("loopFix");return}let y=g.slidesPerView;y==="auto"?y=o.slidesPerViewDynamic():(y=Math.ceil(parseFloat(g.slidesPerView,10)),T&&y%2===0&&(y=y+1));const C=g.slidesPerGroupAuto?y:g.slidesPerGroup;let S=T?Math.max(C,Math.ceil(y/2)):C;S%C!==0&&(S+=C-S%C),S+=g.loopAdditionalSlides,o.loopedSlides=S;const A=o.grid&&g.grid&&g.grid.rows>1;l.length<y+S||o.params.effect==="cards"&&l.length<y+S*2?Ln("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&&g.grid.fill==="row"&&Ln("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const w=[],_=[],L=A?Math.ceil(l.length/g.grid.rows):l.length,O=i&&L-h<y&&!T;let I=O?h:o.activeIndex;typeof a>"u"?a=o.getSlideIndex(l.find(U=>U.classList.contains(g.slideActiveClass))):I=a;const B=n==="next"||!n,H=n==="prev"||!n;let v=0,x=0;const $=(A?l[a].column:a)+(T&&typeof r>"u"?-y/2+.5:0);if($<S){v=Math.max(S-$,C);for(let U=0;U<S-$;U+=1){const G=U-Math.floor(U/L)*L;if(A){const k=L-G-1;for(let j=l.length-1;j>=0;j-=1)l[j].column===k&&w.push(j)}else w.push(L-G-1)}}else if($+y>L-S){x=Math.max($-(L-S*2),C),O&&(x=Math.max(x,y-L+h+1));for(let U=0;U<x;U+=1){const G=U-Math.floor(U/L)*L;A?l.forEach((k,j)=>{k.column===G&&_.push(j)}):_.push(G)}}if(o.__preventObserver__=!0,requestAnimationFrame(()=>{o.__preventObserver__=!1}),o.params.effect==="cards"&&l.length<y+S*2&&(_.includes(a)&&_.splice(_.indexOf(a),1),w.includes(a)&&w.splice(w.indexOf(a),1)),H&&w.forEach(U=>{l[U].swiperLoopMoveDOM=!0,b.prepend(l[U]),l[U].swiperLoopMoveDOM=!1}),B&&_.forEach(U=>{l[U].swiperLoopMoveDOM=!0,b.append(l[U]),l[U].swiperLoopMoveDOM=!1}),o.recalcSlides(),g.slidesPerView==="auto"?o.updateSlides():A&&(w.length>0&&H||_.length>0&&B)&&o.slides.forEach((U,G)=>{o.grid.updateSlide(G,U,o.slides)}),g.watchSlidesProgress&&o.updateSlidesOffset(),t){if(w.length>0&&H){if(typeof e>"u"){const U=o.slidesGrid[I],k=o.slidesGrid[I+v]-U;u?o.setTranslate(o.translate-k):(o.slideTo(I+Math.ceil(v),0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else if(r){const U=A?w.length/g.grid.rows:w.length;o.slideTo(o.activeIndex+U,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(_.length>0&&B)if(typeof e>"u"){const U=o.slidesGrid[I],k=o.slidesGrid[I-x]-U;u?o.setTranslate(o.translate-k):(o.slideTo(I-x,0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else{const U=A?_.length/g.grid.rows:_.length;o.slideTo(o.activeIndex-U,0,!1,!0)}}if(o.allowSlidePrev=m,o.allowSlideNext=p,o.controller&&o.controller.control&&!s){const U={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach(G=>{!G.destroyed&&G.params.loop&&G.loopFix({...U,slideTo:G.params.slidesPerView===g.slidesPerView?t:!1})}):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...U,slideTo:o.controller.control.params.slidesPerView===g.slidesPerView?t:!1})}o.emit("loopFix")}function rc(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(a=>{const i=typeof a.swiperSlideIndex>"u"?a.getAttribute("data-swiper-slide-index")*1:a.swiperSlideIndex;r[i]=a}),e.slides.forEach(a=>{a.removeAttribute("data-swiper-slide-index")}),r.forEach(a=>{n.append(a)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var ac={loopCreate:tc,loopFix:nc,loopDestroy:rc};function ic(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function sc(){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 oc={setGrabCursor:ic,unsetGrabCursor:sc};function uc(e,t=this){function n(r){if(!r||r===Et()||r===Ie())return null;r.assignedSlot&&(r=r.assignedSlot);const a=r.closest(e);return!a&&!r.getRootNode?null:a||n(r.getRootNode().host)}return n(t)}function pi(e,t,n){const r=Ie(),{params:a}=e,i=a.edgeSwipeDetection,s=a.edgeSwipeThreshold;return i&&(n<=s||n>=r.innerWidth-s)?i==="prevent"?(t.preventDefault(),!0):!1:!0}function lc(e){const t=this,n=Et();let r=e;r.originalEvent&&(r=r.originalEvent);const a=t.touchEventsData;if(r.type==="pointerdown"){if(a.pointerId!==null&&a.pointerId!==r.pointerId)return;a.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(a.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){pi(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:u}=t;if(!u||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let o=r.target;if(i.touchEventsTarget==="wrapper"&&!El(o,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||a.isTouched&&a.isMoved)return;const l=!!i.noSwipingClass&&i.noSwipingClass!=="",m=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&m&&(o=m[0]);const p=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,b=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(b?uc(p,o):o.closest(p))){t.allowClick=!0;return}if(i.swipeHandler&&!o.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const g=s.currentX,c=s.currentY;if(!pi(t,r,g))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=g,s.startY=c,a.touchStartTime=wn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let f=!0;o.matches(a.focusableElements)&&(f=!1,o.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==o&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!o.matches(a.focusableElements))&&n.activeElement.blur();const E=f&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||E)&&!o.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function cc(e){const t=Et(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:u}=n;if(!u||!a.simulateTouch&&e.pointerType==="mouse")return;let o=e;if(o.originalEvent&&(o=o.originalEvent),o.type==="pointermove"&&(r.touchId!==null||o.pointerId!==r.pointerId))return;let l;if(o.type==="touchmove"){if(l=[...o.changedTouches].find(S=>S.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=o;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",o);return}const m=l.pageX,p=l.pageY;if(o.preventedByNestedSwiper){i.startX=m,i.startY=p;return}if(!n.allowTouchMove){o.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p}),r.touchStartTime=wn());return}if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(p<i.startY&&n.translate<=n.maxTranslate()||p>i.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(m>i.startX&&-n.translate<=n.maxTranslate()||m<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(m<i.startX&&n.translate<=n.maxTranslate()||m>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==o.target&&o.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&o.target===t.activeElement&&o.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",o),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=m,i.currentY=p;const b=i.currentX-i.startX,g=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(b**2+g**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let S;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:b*b+g*g>=25&&(S=Math.atan2(Math.abs(g),Math.abs(b))*180/Math.PI,r.isScrolling=n.isHorizontal()?S>a.touchAngle:90-S>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",o),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||o.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&o.cancelable&&o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.stopPropagation();let c=n.isHorizontal()?b:g,f=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(c=Math.abs(c)*(s?1:-1),f=Math.abs(f)*(s?1:-1)),i.diff=c,c*=a.touchRatio,s&&(c=-c,f=-f);const E=n.touchesDirection;n.swipeDirection=c>0?"prev":"next",n.touchesDirection=f>0?"prev":"next";const h=n.params.loop&&!a.cssMode,T=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(h&&T&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const S=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(S)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",o)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&E!==n.touchesDirection&&h&&T&&Math.abs(c)>=1){Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",o),r.isMoved=!0,r.currentTranslate=c+r.startTranslate;let y=!0,C=a.resistanceRatio;if(a.touchReleaseOnEdges&&(C=0),c>0?(h&&T&&r.allowThresholdMove&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(y=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+c)**C))):c<0&&(h&&T&&r.allowThresholdMove&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(a.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(y=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-c)**C))),y&&(o.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),a.threshold>0)if(Math.abs(c)>a.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{r.currentTranslate=r.startTranslate;return}!a.followFinger||a.cssMode||((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function dc(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let a;if(r.type==="touchend"||r.type==="touchcancel"){if(a=[...r.changedTouches].find(S=>S.identifier===n.touchId),!a||a.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;a=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:u,rtlTranslate:o,slidesGrid:l,enabled:m}=t;if(!m||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const p=wn(),b=p-n.touchStartTime;if(t.allowClick){const S=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(S&&S[0]||r.target,S),t.emit("tap click",r),b<300&&p-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=wn(),ii(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||u.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let g;if(s.followFinger?g=o?t.translate:-t.translate:g=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:g});return}const c=g>=-t.maxTranslate()&&!t.params.loop;let f=0,E=t.slidesSizesGrid[0];for(let S=0;S<l.length;S+=S<s.slidesPerGroupSkip?1:s.slidesPerGroup){const A=S<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[S+A]<"u"?(c||g>=l[S]&&g<l[S+A])&&(f=S,E=l[S+A]-l[S]):(c||g>=l[S])&&(f=S,E=l[l.length-1]-l[l.length-2])}let h=null,T=null;s.rewind&&(t.isBeginning?T=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(h=0));const y=(g-l[f])/E,C=f<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(b>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?h:f+C):t.slideTo(f)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(f+C):T!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(T):t.slideTo(f))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(f+C):t.slideTo(f):(t.swipeDirection==="next"&&t.slideTo(h!==null?h:f+C),t.swipeDirection==="prev"&&t.slideTo(T!==null?T:f))}}function hi(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const u=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!u?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?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=a,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function fc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function pc(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)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 a;const i=e.maxTranslate()-e.minTranslate();i===0?a=0:a=(e.translate-e.minTranslate())/i,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function hc(e){const t=this;Pn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function mc(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const mi=(e,t)=>{const n=Et(),{params:r,el:a,wrapperEl:i,device:s}=e,u=!!r.nested,o=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:u}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),n[o]("touchmove",e.onTouchMove,{passive:!1,capture:u}),n[o]("pointermove",e.onTouchMove,{passive:!1,capture:u}),n[o]("touchend",e.onTouchEnd,{passive:!0}),n[o]("pointerup",e.onTouchEnd,{passive:!0}),n[o]("pointercancel",e.onTouchEnd,{passive:!0}),n[o]("touchcancel",e.onTouchEnd,{passive:!0}),n[o]("pointerout",e.onTouchEnd,{passive:!0}),n[o]("pointerleave",e.onTouchEnd,{passive:!0}),n[o]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[o]("click",e.onClick,!0),r.cssMode&&i[o]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",hi,!0):e[l]("observerUpdate",hi,!0),a[o]("load",e.onLoad,{capture:!0}))};function gc(){const e=this,{params:t}=e;e.onTouchStart=lc.bind(e),e.onTouchMove=cc.bind(e),e.onTouchEnd=dc.bind(e),e.onDocumentTouchStart=mc.bind(e),t.cssMode&&(e.onScroll=pc.bind(e)),e.onClick=fc.bind(e),e.onLoad=hc.bind(e),mi(e,"on")}function Ec(){mi(this,"off")}var bc={attachEvents:gc,detachEvents:Ec};const gi=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Tc(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,i=r.breakpoints;if(!i||i&&Object.keys(i).length===0)return;const s=Et(),u=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",o=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,u,o);if(!l||e.currentBreakpoint===l)return;const p=(l in i?i[l]:void 0)||e.originalParams,b=gi(e,r),g=gi(e,p),c=e.params.grabCursor,f=p.grabCursor,E=r.enabled;b&&!g?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!b&&g&&(a.classList.add(`${r.containerModifierClass}grid`),(p.grid.fill&&p.grid.fill==="column"||!p.grid.fill&&r.grid.fill==="column")&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),c&&!f?e.unsetGrabCursor():!c&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof p[A]>"u")return;const w=r[A]&&r[A].enabled,_=p[A]&&p[A].enabled;w&&!_&&e[A].disable(),!w&&_&&e[A].enable()});const h=p.direction&&p.direction!==r.direction,T=r.loop&&(p.slidesPerView!==r.slidesPerView||h),y=r.loop;h&&n&&e.changeDirection(),Re(e.params,p);const C=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),E&&!C?e.disable():!E&&C&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",p),n&&(T?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&S?(e.loopCreate(t),e.updateSlides()):y&&!S&&e.loopDestroy()),e.emit("breakpoint",p)}function yc(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=Ie(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(u=>{if(typeof u=="string"&&u.indexOf("@")===0){const o=parseFloat(u.substr(1));return{value:i*o,point:u}}return{value:u,point:u}});s.sort((u,o)=>parseInt(u.value,10)-parseInt(o.value,10));for(let u=0;u<s.length;u+=1){const{point:o,value:l}=s[u];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=o):l<=n.clientWidth&&(r=o)}return r||"max"}var xc={setBreakpoint:Tc,getBreakpoint:yc};function Cc(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(a=>{r[a]&&n.push(t+a)}):typeof r=="string"&&n.push(t+r)}),n}function Sc(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=Cc(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),a.classList.add(...t),e.emitContainerClasses()}function Ac(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var _c={addClasses:Sc,removeClasses:Ac};function kc(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const a=e.slides.length-1,i=e.slidesGrid[a]+e.slidesSizesGrid[a]+r*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var vc={checkOverflow:kc},Cr={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 Nc(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){Re(t,r);return}if(e[a]===!0&&(e[a]={enabled:!0}),a==="navigation"&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),!(a in e&&"enabled"in i)){Re(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),Re(t,r)}}const Sr={eventsEmitter:_l,update:Bl,translate:ql,transition:Yl,slide:ec,loop:ac,grabCursor:oc,events:bc,breakpoints:xc,checkOverflow:vc,classes:_c},Ar={};let _r=class it{constructor(...t){let n,r;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?r=t[0]:[n,r]=t,r||(r={}),r=Re({},r),n&&!r.el&&(r.el=n);const a=Et();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const o=[];return a.querySelectorAll(r.el).forEach(l=>{const m=Re({},r,{el:l});o.push(new it(m))}),o}const i=this;i.__swiper__=!0,i.support=ui(),i.device=li({userAgent:r.userAgent}),i.browser=ci(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(o=>{o({params:r,swiper:i,extendParams:Nc(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const u=Re({},Cr,s);return i.params=Re({},u,Ar,r),i.originalParams=Re({},i.params),i.passedParams=Re({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(o=>{i.on(o,i.params.on[o])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return i.params.direction==="horizontal"},isVertical(){return i.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:i.params.allowSlideNext,allowSlidePrev:i.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:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}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:n,params:r}=this,a=We(n,`.${r.slideClass}, swiper-slide`),i=Dn(a[0]);return Dn(t)-i}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.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:n,params:r}=t;t.slides=We(n,`.${r.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,n){const r=this;t=Math.min(Math.max(t,0),1);const a=r.minTranslate(),s=(r.maxTranslate()-a)*t+a;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const a=t.getSlideClasses(r);n.push({slideEl:r,classNames:a}),t.emit("_slideClass",r,a)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t="current",n=!1){const r=this,{params:a,slides:i,slidesGrid:s,slidesSizesGrid:u,size:o,activeIndex:l}=r;let m=1;if(typeof a.slidesPerView=="number")return a.slidesPerView;if(a.centeredSlides){let p=i[l]?Math.ceil(i[l].swiperSlideSize):0,b;for(let g=l+1;g<i.length;g+=1)i[g]&&!b&&(p+=Math.ceil(i[g].swiperSlideSize),m+=1,p>o&&(b=!0));for(let g=l-1;g>=0;g-=1)i[g]&&!b&&(p+=i[g].swiperSlideSize,m+=1,p>o&&(b=!0))}else if(t==="current")for(let p=l+1;p<i.length;p+=1)(n?s[p]+u[p]-s[l]<o:s[p]-s[l]<o)&&(m+=1);else for(let p=l-1;p>=0;p-=1)s[l]-s[p]<o&&(m+=1);return m}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&Pn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,u=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(u),t.updateActiveIndex(),t.updateSlidesClasses()}let i;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)a(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(s.length-1,0,!1,!0)}else i=t.slideTo(t.activeIndex,0,!1,!0);i||a()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n=!0){const r=this,a=r.params.direction;return t||(t=a==="horizontal"?"vertical":"horizontal"),t===a||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${a}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(i=>{t==="vertical"?i.style.width="":i.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const a=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(a()):We(r,a())[0];return!s&&n.params.createElements&&(s=On("div",n.params.wrapperClass),r.append(s),We(r,`.${n.params.slideClass}`).forEach(u=>{s.append(u)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||ot(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ot(r,"direction")==="rtl"),wrongRTL:ot(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const a=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&a.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),a.forEach(i=>{i.complete?Pn(n,i):i.addEventListener("load",s=>{Pn(n,s.target)})}),xr(n),n.initialized=!0,xr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:u}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),a.loop&&r.loopDestroy(),n&&(r.removeClasses(),i&&typeof i!="string"&&i.removeAttribute("style"),s&&s.removeAttribute("style"),u&&u.length&&u.forEach(o=>{o.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),o.removeAttribute("style"),o.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(o=>{r.off(o)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),fl(r)),r.destroyed=!0),null}static extendDefaults(t){Re(Ar,t)}static get extendedDefaults(){return Ar}static get defaults(){return Cr}static installModule(t){it.prototype.__modules__||(it.prototype.__modules__=[]);const n=it.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>it.installModule(n)),it):(it.installModule(t),it)}};Object.keys(Sr).forEach(e=>{Object.keys(Sr[e]).forEach(t=>{_r.prototype[t]=Sr[e][t]})}),_r.use([Sl,Al]);const Ei=["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 bt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function vt(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:bt(t[r])&&bt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:vt(e[r],t[r]):e[r]=t[r]})}function bi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function Ti(e={}){return e.pagination&&typeof e.pagination.el>"u"}function yi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function xi(e=""){const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function wc(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Ic({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:u}){const o=r.filter(_=>_!=="children"&&_!=="direction"&&_!=="wrapperClass"),{params:l,pagination:m,navigation:p,scrollbar:b,virtual:g,thumbs:c}=e;let f,E,h,T,y,C,S,A;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(f=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(E=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||u)&&(l.pagination||l.pagination===!1)&&m&&!m.el&&(h=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&b&&!b.el&&(T=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||a)&&(l.navigation||l.navigation===!1)&&p&&!p.prevEl&&!p.nextEl&&(y=!0);const w=_=>{e[_]&&(e[_].destroy(),_==="navigation"?(e.isElement&&(e[_].prevEl.remove(),e[_].nextEl.remove()),l[_].prevEl=void 0,l[_].nextEl=void 0,e[_].prevEl=void 0,e[_].nextEl=void 0):(e.isElement&&e[_].el.remove(),l[_].el=void 0,e[_].el=void 0))};r.includes("loop")&&e.isElement&&(l.loop&&!n.loop?C=!0:!l.loop&&n.loop?S=!0:A=!0),o.forEach(_=>{if(bt(l[_])&&bt(n[_]))Object.assign(l[_],n[_]),(_==="navigation"||_==="pagination"||_==="scrollbar")&&"enabled"in n[_]&&!n[_].enabled&&w(_);else{const L=n[_];(L===!0||L===!1)&&(_==="navigation"||_==="pagination"||_==="scrollbar")?L===!1&&w(_):l[_]=n[_]}}),o.includes("controller")&&!E&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&g&&l.virtual.enabled?(g.slides=t,g.update(!0)):r.includes("virtual")&&g&&l.virtual.enabled&&(t&&(g.slides=t),g.update(!0)),r.includes("children")&&t&&l.loop&&(A=!0),f&&c.init()&&c.update(!0),E&&(e.controller.control=l.controller.control),h&&(e.isElement&&(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-pagination"),u.part.add("pagination"),e.el.appendChild(u)),u&&(l.pagination.el=u),m.init(),m.render(),m.update()),T&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),e.el.appendChild(s)),s&&(l.scrollbar.el=s),b.init(),b.updateSize(),b.setTranslate()),y&&(e.isElement&&((!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-next"),zt(a,e.navigation.arrowSvg),a.part.add("button-next"),e.el.appendChild(a)),(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-button-prev"),zt(i,e.navigation.arrowSvg),i.part.add("button-prev"),e.el.appendChild(i))),a&&(l.navigation.nextEl=a),i&&(l.navigation.prevEl=i),p.init(),p.update()),r.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&e.changeDirection(n.direction,!1),(C||A)&&e.loopDestroy(),(S||A)&&e.loopCreate(),e.update()}function Lc(e={},t=!0){const n={on:{}},r={},a={};vt(n,Cr),n._emitClasses=!0,n.init=!1;const i={},s=Ei.map(o=>o.replace(/_/,"")),u=Object.assign({},e);return Object.keys(u).forEach(o=>{typeof e[o]>"u"||(s.indexOf(o)>=0?bt(e[o])?(n[o]={},a[o]={},vt(n[o],e[o]),vt(a[o],e[o])):(n[o]=e[o],a[o]=e[o]):o.search(/on[A-Z]/)===0&&typeof e[o]=="function"?t?r[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:n.on[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:i[o]=e[o])}),["navigation","pagination","scrollbar"].forEach(o=>{n[o]===!0&&(n[o]={}),n[o]===!1&&delete n[o]}),{params:n,passedParams:a,rest:i,events:r}}function Oc({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){bi(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),Ti(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),yi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function Dc(e,t,n,r,a){const i=[];if(!t)return i;const s=o=>{i.indexOf(o)<0&&i.push(o)};if(n&&r){const o=r.map(a),l=n.map(a);o.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return Ei.filter(o=>o[0]==="_").map(o=>o.replace(/_/,"")).forEach(o=>{if(o in e&&o in t)if(bt(e[o])&&bt(t[o])){const l=Object.keys(e[o]),m=Object.keys(t[o]);l.length!==m.length?s(o):(l.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}),m.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}))}else e[o]!==t[o]&&s(o)}),i}const Pc=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 Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}function Ci(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Si(e){const t=[];return M.Children.toArray(e).forEach(n=>{Ci(n)?t.push(n):n.props&&n.props.children&&Si(n.props.children).forEach(r=>t.push(r))}),t}function Mc(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return M.Children.toArray(e).forEach(r=>{if(Ci(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const a=Si(r.props.children);a.length>0?a.forEach(i=>t.push(i)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Bc(e,t,n){if(!n)return null;const r=m=>{let p=m;return m<0?p=t.length+m:p>=t.length&&(p=p-t.length),p},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:i,to:s}=n,u=e.params.loop?-t.length:0,o=e.params.loop?t.length*2:t.length,l=[];for(let m=u;m<o;m+=1)m>=i&&m<=s&&l.push(t[r(m)]);return l.map((m,p)=>M.cloneElement(m,{swiper:e,style:a,key:m.props.virtualIndex||m.key||`slide-${p}`}))}function Vt(e,t){return typeof window>"u"?M.useEffect(e,t):M.useLayoutEffect(e,t)}const Ai=M.createContext(null),Rc=M.createContext(null),_i=M.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let u=!1;const[o,l]=M.useState("swiper"),[m,p]=M.useState(null),[b,g]=M.useState(!1),c=M.useRef(!1),f=M.useRef(null),E=M.useRef(null),h=M.useRef(null),T=M.useRef(null),y=M.useRef(null),C=M.useRef(null),S=M.useRef(null),A=M.useRef(null),{params:w,passedParams:_,rest:L,events:O}=Lc(i),{slides:I,slots:B}=Mc(r),H=()=>{g(!b)};Object.assign(w.on,{_containerClasses(U,G){l(G)}});const v=()=>{Object.assign(w.on,O),u=!0;const U={...w};if(delete U.wrapperClass,E.current=new _r(U),E.current.virtual&&E.current.params.virtual.enabled){E.current.virtual.slides=I;const G={cache:!1,slides:I,renderExternal:p,renderExternalUpdate:!1};vt(E.current.params.virtual,G),vt(E.current.originalParams.virtual,G)}};f.current||v(),E.current&&E.current.on("_beforeBreakpoint",H);const x=()=>{u||!O||!E.current||Object.keys(O).forEach(U=>{E.current.on(U,O[U])})},P=()=>{!O||!E.current||Object.keys(O).forEach(U=>{E.current.off(U,O[U])})};M.useEffect(()=>()=>{E.current&&E.current.off("_beforeBreakpoint",H)}),M.useEffect(()=>{!c.current&&E.current&&(E.current.emitSlidesClasses(),c.current=!0)}),Vt(()=>{if(s&&(s.current=f.current),!!f.current)return E.current.destroyed&&v(),Oc({el:f.current,nextEl:y.current,prevEl:C.current,paginationEl:S.current,scrollbarEl:A.current,swiper:E.current},w),a&&!E.current.destroyed&&a(E.current),()=>{E.current&&!E.current.destroyed&&E.current.destroy(!0,!1)}},[]),Vt(()=>{x();const U=Dc(_,h.current,I,T.current,G=>G.key);return h.current=_,T.current=I,U.length&&E.current&&!E.current.destroyed&&Ic({swiper:E.current,slides:I,passedParams:_,changedParams:U,nextEl:y.current,prevEl:C.current,scrollbarEl:A.current,paginationEl:S.current}),()=>{P()}}),Vt(()=>{Pc(E.current)},[m]);function $(){return w.virtual?Bc(E.current,I,m):I.map((U,G)=>M.cloneElement(U,{swiper:E.current,swiperSlideIndex:G}))}return M.createElement(t,Mn({ref:f,className:xi(`${o}${e?` ${e}`:""}`)},L),M.createElement(Rc.Provider,{value:E.current},B["container-start"],M.createElement(n,{className:wc(w.wrapperClass)},B["wrapper-start"],$(),B["wrapper-end"]),bi(w)&&M.createElement(M.Fragment,null,M.createElement("div",{ref:C,className:"swiper-button-prev"}),M.createElement("div",{ref:y,className:"swiper-button-next"})),yi(w)&&M.createElement("div",{ref:A,className:"swiper-scrollbar"}),Ti(w)&&M.createElement("div",{ref:S,className:"swiper-pagination"}),B["container-end"]))});_i.displayName="Swiper";const ki=M.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:u,...o}={},l)=>{const m=M.useRef(null),[p,b]=M.useState("swiper-slide"),[g,c]=M.useState(!1);function f(y,C,S){C===m.current&&b(S)}Vt(()=>{if(typeof u<"u"&&(m.current.swiperSlideIndex=u),l&&(l.current=m.current),!(!m.current||!r)){if(r.destroyed){p!=="swiper-slide"&&b("swiper-slide");return}return r.on("_slideClass",f),()=>{r&&r.off("_slideClass",f)}}}),Vt(()=>{r&&m.current&&!r.destroyed&&b(r.getSlideClasses(m.current))},[r]);const E={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},h=()=>typeof t=="function"?t(E):t,T=()=>{c(!0)};return M.createElement(e,Mn({ref:m,className:xi(`${p}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:T},o),a&&M.createElement(Ai.Provider,{value:E},M.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},h(),i&&!g&&M.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}}))),!a&&M.createElement(Ai.Provider,{value:E},h(),i&&!g&&M.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}})))});ki.displayName="SwiperSlide";function vi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=We(e.el,`.${r[a]}`)[0];i||(i=On("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const Ni='<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 Fc({swiper:e,extendParams:t,on:n,emit:r}){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:Ni};function a(g){let c;return g&&typeof g=="string"&&e.isElement&&(c=e.el.querySelector(g)||e.hostEl.querySelector(g),c)?c:(g&&(typeof g=="string"&&(c=[...document.querySelectorAll(g)]),e.params.uniqueNavElements&&typeof g=="string"&&c&&c.length>1&&e.el.querySelectorAll(g).length===1?c=e.el.querySelector(g):c&&c.length===1&&(c=c[0])),g&&!c?g:c)}function i(g,c){const f=e.params.navigation;g=Ae(g),g.forEach(E=>{E&&(E.classList[c?"add":"remove"](...f.disabledClass.split(" ")),E.tagName==="BUTTON"&&(E.disabled=c),e.params.watchOverflow&&e.enabled&&E.classList[e.isLocked?"add":"remove"](f.lockClass))})}function s(){const{nextEl:g,prevEl:c}=e.navigation;if(e.params.loop){i(c,!1),i(g,!1);return}i(c,e.isBeginning&&!e.params.rewind),i(g,e.isEnd&&!e.params.rewind)}function u(g){g.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function o(g){g.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const g=e.params.navigation;if(e.params.navigation=vi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(g.nextEl||g.prevEl))return;let c=a(g.nextEl),f=a(g.prevEl);Object.assign(e.navigation,{nextEl:c,prevEl:f}),c=Ae(c),f=Ae(f);const E=(h,T)=>{if(h){if(g.addIcons&&h.matches(".swiper-button-next,.swiper-button-prev")&&!h.querySelector("svg")){const y=document.createElement("div");zt(y,Ni),h.appendChild(y.querySelector("svg")),y.remove()}h.addEventListener("click",T==="next"?o:u)}!e.enabled&&h&&h.classList.add(...g.lockClass.split(" "))};c.forEach(h=>E(h,"next")),f.forEach(h=>E(h,"prev"))}function m(){let{nextEl:g,prevEl:c}=e.navigation;g=Ae(g),c=Ae(c);const f=(E,h)=>{E.removeEventListener("click",h==="next"?o:u),E.classList.remove(...e.params.navigation.disabledClass.split(" "))};g.forEach(E=>f(E,"next")),c.forEach(E=>f(E,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?b():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{m()}),n("enable disable",()=>{let{nextEl:g,prevEl:c}=e.navigation;if(g=Ae(g),c=Ae(c),e.enabled){s();return}[...g,...c].filter(f=>!!f).forEach(f=>f.classList.add(e.params.navigation.lockClass))}),n("click",(g,c)=>{let{nextEl:f,prevEl:E}=e.navigation;f=Ae(f),E=Ae(E);const h=c.target;let T=E.includes(h)||f.includes(h);if(e.isElement&&!T){const y=c.path||c.composedPath&&c.composedPath();y&&(T=y.find(C=>f.includes(C)||E.includes(C)))}if(e.params.navigation.hideOnClick&&!T){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===h||e.pagination.el.contains(h)))return;let y;f.length?y=f[0].classList.contains(e.params.navigation.hiddenClass):E.length&&(y=E[0].classList.contains(e.params.navigation.hiddenClass)),r(y===!0?"navigationShow":"navigationHide"),[...f,...E].filter(C=>!!C).forEach(C=>C.classList.toggle(e.params.navigation.hiddenClass))}});const p=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),l(),s()},b=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(e.navigation,{enable:p,disable:b,update:s,init:l,destroy:m})}function Gt(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Hc({swiper:e,extendParams:t,on:n,emit:r}){const a="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:h=>h,formatFractionTotal:h=>h,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),e.pagination={el:null,bullets:[]};let i,s=0;function u(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function o(h,T){const{bulletActiveClass:y}=e.params.pagination;h&&(h=h[`${T==="prev"?"previous":"next"}ElementSibling`],h&&(h.classList.add(`${y}-${T}`),h=h[`${T==="prev"?"previous":"next"}ElementSibling`],h&&h.classList.add(`${y}-${T}-${T}`)))}function l(h,T,y){if(h=h%y,T=T%y,T===h+1)return"next";if(T===h-1)return"previous"}function m(h){const T=h.target.closest(Gt(e.params.pagination.bulletClass));if(!T)return;h.preventDefault();const y=Dn(T)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;const C=l(e.realIndex,y,e.slides.length);C==="next"?e.slideNext():C==="previous"?e.slidePrev():e.slideToLoop(y)}else e.slideTo(y)}function p(){const h=e.rtl,T=e.params.pagination;if(u())return;let y=e.pagination.el;y=Ae(y);let C,S;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,w=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(S=e.previousRealIndex||0,C=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(C=e.snapIndex,S=e.previousSnapIndex):(S=e.previousIndex||0,C=e.activeIndex||0),T.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const _=e.pagination.bullets;let L,O,I;if(T.dynamicBullets&&(i=mr(_[0],e.isHorizontal()?"width":"height"),y.forEach(B=>{B.style[e.isHorizontal()?"width":"height"]=`${i*(T.dynamicMainBullets+4)}px`}),T.dynamicMainBullets>1&&S!==void 0&&(s+=C-(S||0),s>T.dynamicMainBullets-1?s=T.dynamicMainBullets-1:s<0&&(s=0)),L=Math.max(C-s,0),O=L+(Math.min(_.length,T.dynamicMainBullets)-1),I=(O+L)/2),_.forEach(B=>{const H=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(v=>`${T.bulletActiveClass}${v}`)].map(v=>typeof v=="string"&&v.includes(" ")?v.split(" "):v).flat();B.classList.remove(...H)}),y.length>1)_.forEach(B=>{const H=Dn(B);H===C?B.classList.add(...T.bulletActiveClass.split(" ")):e.isElement&&B.setAttribute("part","bullet"),T.dynamicBullets&&(H>=L&&H<=O&&B.classList.add(...`${T.bulletActiveClass}-main`.split(" ")),H===L&&o(B,"prev"),H===O&&o(B,"next"))});else{const B=_[C];if(B&&B.classList.add(...T.bulletActiveClass.split(" ")),e.isElement&&_.forEach((H,v)=>{H.setAttribute("part",v===C?"bullet-active":"bullet")}),T.dynamicBullets){const H=_[L],v=_[O];for(let x=L;x<=O;x+=1)_[x]&&_[x].classList.add(...`${T.bulletActiveClass}-main`.split(" "));o(H,"prev"),o(v,"next")}}if(T.dynamicBullets){const B=Math.min(_.length,T.dynamicMainBullets+4),H=(i*B-i)/2-I*i,v=h?"right":"left";_.forEach(x=>{x.style[e.isHorizontal()?v:"top"]=`${H}px`})}}y.forEach((_,L)=>{if(T.type==="fraction"&&(_.querySelectorAll(Gt(T.currentClass)).forEach(O=>{O.textContent=T.formatFractionCurrent(C+1)}),_.querySelectorAll(Gt(T.totalClass)).forEach(O=>{O.textContent=T.formatFractionTotal(w)})),T.type==="progressbar"){let O;T.progressbarOpposite?O=e.isHorizontal()?"vertical":"horizontal":O=e.isHorizontal()?"horizontal":"vertical";const I=(C+1)/w;let B=1,H=1;O==="horizontal"?B=I:H=I,_.querySelectorAll(Gt(T.progressbarFillClass)).forEach(v=>{v.style.transform=`translate3d(0,0,0) scaleX(${B}) scaleY(${H})`,v.style.transitionDuration=`${e.params.speed}ms`})}T.type==="custom"&&T.renderCustom?(zt(_,T.renderCustom(e,C+1,w)),L===0&&r("paginationRender",_)):(L===0&&r("paginationRender",_),r("paginationUpdate",_)),e.params.watchOverflow&&e.enabled&&_.classList[e.isLocked?"add":"remove"](T.lockClass)})}function b(){const h=e.params.pagination;if(u())return;const T=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 y=e.pagination.el;y=Ae(y);let C="";if(h.type==="bullets"){let S=e.params.loop?Math.ceil(T/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&S>T&&(S=T);for(let A=0;A<S;A+=1)h.renderBullet?C+=h.renderBullet.call(e,A,h.bulletClass):C+=`<${h.bulletElement} ${e.isElement?'part="bullet"':""} class="${h.bulletClass}"></${h.bulletElement}>`}h.type==="fraction"&&(h.renderFraction?C=h.renderFraction.call(e,h.currentClass,h.totalClass):C=`<span class="${h.currentClass}"></span> / <span class="${h.totalClass}"></span>`),h.type==="progressbar"&&(h.renderProgressbar?C=h.renderProgressbar.call(e,h.progressbarFillClass):C=`<span class="${h.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(S=>{h.type!=="custom"&&zt(S,C||""),h.type==="bullets"&&e.pagination.bullets.push(...S.querySelectorAll(Gt(h.bulletClass)))}),h.type!=="custom"&&r("paginationRender",y[0])}function g(){e.params.pagination=vi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const h=e.params.pagination;if(!h.el)return;let T;typeof h.el=="string"&&e.isElement&&(T=e.el.querySelector(h.el)),!T&&typeof h.el=="string"&&(T=[...document.querySelectorAll(h.el)]),T||(T=h.el),!(!T||T.length===0)&&(e.params.uniqueNavElements&&typeof h.el=="string"&&Array.isArray(T)&&T.length>1&&(T=[...e.el.querySelectorAll(h.el)],T.length>1&&(T=T.find(y=>oi(y,".swiper")[0]===e.el))),Array.isArray(T)&&T.length===1&&(T=T[0]),Object.assign(e.pagination,{el:T}),T=Ae(T),T.forEach(y=>{h.type==="bullets"&&h.clickable&&y.classList.add(...(h.clickableClass||"").split(" ")),y.classList.add(h.modifierClass+h.type),y.classList.add(e.isHorizontal()?h.horizontalClass:h.verticalClass),h.type==="bullets"&&h.dynamicBullets&&(y.classList.add(`${h.modifierClass}${h.type}-dynamic`),s=0,h.dynamicMainBullets<1&&(h.dynamicMainBullets=1)),h.type==="progressbar"&&h.progressbarOpposite&&y.classList.add(h.progressbarOppositeClass),h.clickable&&y.addEventListener("click",m),e.enabled||y.classList.add(h.lockClass)}))}function c(){const h=e.params.pagination;if(u())return;let T=e.pagination.el;T&&(T=Ae(T),T.forEach(y=>{y.classList.remove(h.hiddenClass),y.classList.remove(h.modifierClass+h.type),y.classList.remove(e.isHorizontal()?h.horizontalClass:h.verticalClass),h.clickable&&(y.classList.remove(...(h.clickableClass||"").split(" ")),y.removeEventListener("click",m))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(...h.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const h=e.params.pagination;let{el:T}=e.pagination;T=Ae(T),T.forEach(y=>{y.classList.remove(h.horizontalClass,h.verticalClass),y.classList.add(e.isHorizontal()?h.horizontalClass:h.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?E():(g(),b(),p())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&p()}),n("snapIndexChange",()=>{p()}),n("snapGridLengthChange",()=>{b(),p()}),n("destroy",()=>{c()}),n("enable disable",()=>{let{el:h}=e.pagination;h&&(h=Ae(h),h.forEach(T=>T.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{p()}),n("click",(h,T)=>{const y=T.target,C=Ae(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&C&&C.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const S=C[0].classList.contains(e.params.pagination.hiddenClass);r(S===!0?"paginationShow":"paginationHide"),C.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const f=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:h}=e.pagination;h&&(h=Ae(h),h.forEach(T=>T.classList.remove(e.params.pagination.paginationDisabledClass))),g(),b(),p()},E=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:h}=e.pagination;h&&(h=Ae(h),h.forEach(T=>T.classList.add(e.params.pagination.paginationDisabledClass))),c()};Object.assign(e.pagination,{enable:f,disable:E,render:b,update:p,init:g,destroy:c})}function Ab(){}function _b(){}function wi(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Ii(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $c=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qc={};function Li(e,t){return(qc.jsx?Uc:$c).test(e)}const zc=/[ \t\n\f\r]/g;function Vc(e){return typeof e=="object"?e.type==="text"?Oi(e.value):!1:Oi(e)}function Oi(e){return e.replace(zc,"")===""}class Yt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Yt.prototype.normal={},Yt.prototype.property={},Yt.prototype.space=void 0;function Di(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Yt(n,r,t)}function Wt(e){return e.toLowerCase()}class Oe{constructor(t,n){this.attribute=n,this.property=t}}Oe.prototype.attribute="",Oe.prototype.booleanish=!1,Oe.prototype.boolean=!1,Oe.prototype.commaOrSpaceSeparated=!1,Oe.prototype.commaSeparated=!1,Oe.prototype.defined=!1,Oe.prototype.mustUseProperty=!1,Oe.prototype.number=!1,Oe.prototype.overloadedBoolean=!1,Oe.prototype.property="",Oe.prototype.spaceSeparated=!1,Oe.prototype.space=void 0;let Gc=0;const ae=Tt(),Se=Tt(),kr=Tt(),K=Tt(),Ee=Tt(),Nt=Tt(),Fe=Tt();function Tt(){return 2**++Gc}const vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ae,booleanish:Se,commaOrSpaceSeparated:Fe,commaSeparated:Nt,number:K,overloadedBoolean:kr,spaceSeparated:Ee},Symbol.toStringTag,{value:"Module"})),Nr=Object.keys(vr);class wr extends Oe{constructor(t,n,r,a){let i=-1;if(super(t,n),Pi(this,"space",a),typeof r=="number")for(;++i<Nr.length;){const s=Nr[i];Pi(this,Nr[i],(r&vr[s])===vr[s])}}}wr.prototype.defined=!0;function Pi(e,t,n){n&&(e[t]=n)}function wt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new wr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Wt(r)]=r,n[Wt(i.attribute)]=r}return new Yt(t,n,e.space)}const Mi=wt({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:Ee,ariaCurrent:null,ariaDescribedBy:Ee,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:Ee,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:Ee,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ee,ariaLevel:K,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:Ee,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:Ee,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:Se,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bi(e,t){return t in e?e[t]:t}function Ri(e,t){return Bi(e,t.toLowerCase())}const Yc=wt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Nt,acceptCharset:Ee,accessKey:Ee,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:Ee,autoFocus:ae,autoPlay:ae,blocking:Ee,capture:null,charSet:null,checked:ae,cite:null,className:Ee,cols:K,colSpan:null,content:null,contentEditable:Se,controls:ae,controlsList:Ee,coords:K|Nt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:kr,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:Ee,height:K,hidden:kr,high:K,href:null,hrefLang:null,htmlFor:Ee,httpEquiv:Ee,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:Ee,itemRef:Ee,itemScope:ae,itemType:Ee,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:K,pattern:null,ping:Ee,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:Ee,required:ae,reversed:ae,rows:K,rowSpan:K,sandbox:Ee,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:ae,useMap:null,value:Se,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ee,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ae,disableRemotePlayback:ae,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:Ri}),Wc=wt({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:Fe,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:Ee,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:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,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:Nt,g2:Nt,glyphName:Nt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,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:K,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:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ee,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fe,rev:Fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fe,requiredFeatures:Fe,requiredFonts:Fe,requiredFormats:Fe,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:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fe,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bi}),Fi=wt({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()}}),Hi=wt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ri}),$i=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jc={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"},Xc=/[A-Z]/g,Ui=/-[a-z]/g,Kc=/^data[-\w.:]+$/i;function Bn(e,t){const n=Wt(t);let r=t,a=Oe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Kc.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Ui,Jc);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Ui.test(i)){let s=i.replace(Xc,Qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=wr}return new a(r,t)}function Qc(e){return"-"+e.toLowerCase()}function Jc(e){return e.charAt(1).toUpperCase()}const jt=Di([Mi,Yc,Fi,Hi,$i],"html"),ut=Di([Mi,Wc,Fi,Hi,$i],"svg");function qi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function zi(e){return e.join(" ").trim()}function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var It={},Lr,Vi;function Zc(){if(Vi)return Lr;Vi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
42
|
-
`,l="/",m="*",p="",b="comment",g="declaration";function c(E,h){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];h=h||{};var T=1,y=1;function C(v){var x=v.match(t);x&&(T+=x.length);var P=v.lastIndexOf(o);y=~P?v.length-P:y+v.length}function S(){var v={line:T,column:y};return function(x){return x.position=new A(v),L(),x}}function A(v){this.start=v,this.end={line:T,column:y},this.source=h.source}A.prototype.content=E;function w(v){var x=new Error(h.source+":"+T+":"+y+": "+v);if(x.reason=v,x.filename=h.source,x.line=T,x.column=y,x.source=E,!h.silent)throw x}function _(v){var x=v.exec(E);if(x){var P=x[0];return C(P),E=E.slice(P.length),x}}function L(){_(n)}function O(v){var x;for(v=v||[];x=I();)x!==!1&&v.push(x);return v}function I(){var v=S();if(!(l!=E.charAt(0)||m!=E.charAt(1))){for(var x=2;p!=E.charAt(x)&&(m!=E.charAt(x)||l!=E.charAt(x+1));)++x;if(x+=2,p===E.charAt(x-1))return w("End of comment missing");var P=E.slice(2,x-2);return y+=2,C(P),E=E.slice(x),y+=2,v({type:b,comment:P})}}function B(){var v=S(),x=_(r);if(x){if(I(),!_(a))return w("property missing ':'");var P=_(i),$=v({type:g,property:f(x[0].replace(e,p)),value:P?f(P[0].replace(e,p)):p});return _(s),$}}function H(){var v=[];O(v);for(var x;x=B();)x!==!1&&(v.push(x),O(v));return v}return L(),H()}function f(E){return E?E.replace(u,p):p}return Lr=c,Lr}var Gi;function ed(){if(Gi)return It;Gi=1;var e=It&&It.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(It,"__esModule",{value:!0}),It.default=n;const t=e(Zc());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),u=typeof a=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:m}=o;u?a(l,m,o):m&&(i=i||{},i[l]=m)}),i}return It}var Xt={},Yi;function td(){if(Yi)return Xt;Yi=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(l){return!l||n.test(l)||e.test(l)},s=function(l,m){return m.toUpperCase()},u=function(l,m){return"".concat(m,"-")},o=function(l,m){return m===void 0&&(m={}),i(l)?l:(l=l.toLowerCase(),m.reactCompat?l=l.replace(a,u):l=l.replace(r,u),l.replace(t,s))};return Xt.camelCase=o,Xt}var Kt,Wi;function nd(){if(Wi)return Kt;Wi=1;var e=Kt&&Kt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(ed()),n=td();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(u,o){u&&o&&(s[(0,n.camelCase)(u,i)]=o)}),s}return r.default=r,Kt=r,Kt}var rd=nd();const ad=Ir(rd),Rn=ji("end"),je=ji("start");function ji(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xi(e){const t=je(e),n=Rn(e);if(t&&n)return{start:t,end:n}}function Qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ki(e.position):"start"in e||"end"in e?Ki(e):"line"in e||"column"in e?Or(e):""}function Or(e){return Qi(e&&e.line)+":"+Qi(e&&e.column)}function Ki(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Qi(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?i.ruleId=r:(i.source=r.slice(0,o),i.ruleId=r.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const u=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Qt(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="",ve.prototype.name="",ve.prototype.reason="",ve.prototype.message="",ve.prototype.stack="",ve.prototype.column=void 0,ve.prototype.line=void 0,ve.prototype.ancestors=void 0,ve.prototype.cause=void 0,ve.prototype.fatal=void 0,ve.prototype.place=void 0,ve.prototype.ruleId=void 0,ve.prototype.source=void 0;const Dr={}.hasOwnProperty,id=new Map,sd=/[A-Z]/g,od=new Set(["table","tbody","thead","tfoot","tr"]),ud=new Set(["td","th"]),Ji="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ld(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ed(n,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");r=gd(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ut:jt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Zi(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Zi(e,t,n){if(t.type==="element")return cd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pd(e,t,n);if(t.type==="mdxjsEsm")return fd(e,t);if(t.type==="root")return hd(e,t,n);if(t.type==="text")return md(e,t)}function cd(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=ut,e.schema=a),e.ancestors.push(t);const i=ts(e,t.tagName,!1),s=bd(e,t);let u=Mr(e,t);return od.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Vc(o):!0})),es(e,s,i,t),Pr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function dd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Jt(e,t.position)}function fd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jt(e,t.position)}function pd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=ut,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:ts(e,t.name,!0),s=Td(e,t),u=Mr(e,t);return es(e,s,i,t),Pr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function hd(e,t,n){const r={};return Pr(r,Mr(e,t)),e.create(t,e.Fragment,r,n)}function md(e,t){return t.value}function es(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gd(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function Ed(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),o=je(r);return t(a,i,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function bd(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Dr.call(t.properties,a)){const i=yd(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&ud.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Td(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Jt(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,i=e.evaluater.evaluateExpression(u.expression)}else Jt(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Mr(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:id;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){const l=a.get(o)||0;s=o+"-"+l,a.set(o,l+1)}}const u=Zi(e,i,s);u!==void 0&&n.push(u)}return n}function yd(e,t,n){const r=Bn(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ii(n):zi(n)),r.property==="style"){let a=typeof n=="object"?n:xd(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Cd(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?jc[r.property]||r.property:r.attribute,n]}}function xd(e,t){try{return ad(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ji+"#cannot-parse-style-attribute",a}}function ts(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const u=Li(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}r=s}else r=Li(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Dr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jt(e)}function Jt(e,t){const n=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ji+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Cd(e){const t={};let n;for(n in e)Dr.call(e,n)&&(t[Sd(n)]=e[n]);return t}function Sd(e){let t=e.replace(sd,Ad);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ad(e){return"-"+e.toLowerCase()}const Br={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"]},_d={};function kd(e,t){const n=_d,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ns(e,r,a)}function ns(e,t,n){if(vd(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rs(e.children,t,n)}return Array.isArray(e)?rs(e,t,n):""}function rs(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ns(e[a],t,n);return r.join("")}function vd(e){return!!(e&&typeof e=="object")}const as=document.createElement("i");function Zt(e){const t="&"+e+";";as.innerHTML=t;const n=as.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xe(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Ue(e,t){return e.length>0?(Xe(e,e.length,0,t),e):t}const is={}.hasOwnProperty;function Nd(e){const t={};let n=-1;for(;++n<e.length;)wd(t,e[n]);return t}function wd(e,t){let n;for(n in t){const a=(is.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){is.call(a,s)||(a[s]=[]);const u=i[s];Id(a[s],Array.isArray(u)?u:u?[u]:[])}}}function Id(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xe(e,0,0,r)}function ss(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ke=lt(/[A-Za-z]/),He=lt(/[\dA-Za-z]/),Ld=lt(/[#-'*+\--9=?A-Z^-~]/);function Rr(e){return e!==null&&(e<32||e===127)}const Fr=lt(/\d/),Od=lt(/[\dA-Fa-f]/),Dd=lt(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const en=lt(new RegExp("\\p{P}|\\p{S}","u")),tn=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ot(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&He(e.charCodeAt(n+1))&&He(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function fe(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(o){return de(o)?(e.enter(n),u(o)):t(o)}function u(o){return de(o)&&i++<a?(e.consume(o),u):(e.exit(n),t(o))}}const Pd={tokenize:Md};function Md(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),fe(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),i(u)}function i(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Z(u)?(e.consume(u),e.exit("chunkText"),i):(e.consume(u),s)}}const Bd={tokenize:Rd},os={tokenize:Fd};function Rd(e){const t=this,n=[];let r=0,a,i,s;return u;function u(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,o,l)(y)}return l(y)}function o(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&T();const C=t.events.length;let S=C,A;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){A=t.events[S][1].end;break}h(r);let w=C;for(;w<t.events.length;)t.events[w][1].end={...A},w++;return Xe(t.events,S+1,0,t.events.slice(C)),t.events.length=w,l(y)}return u(y)}function l(y){if(r===n.length){if(!a)return b(y);if(a.currentConstruct&&a.currentConstruct.concrete)return c(y);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(os,m,p)(y)}function m(y){return a&&T(),h(r),b(y)}function p(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,c(y)}function b(y){return t.containerState={},e.attempt(os,g,c)(y)}function g(y){return r++,n.push([t.currentConstruct,t.containerState]),b(y)}function c(y){if(y===null){a&&T(),h(0),e.consume(y);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),f(y)}function f(y){if(y===null){E(e.exit("chunkFlow"),!0),h(0),e.consume(y);return}return Z(y)?(e.consume(y),E(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(y),f)}function E(y,C){const S=t.sliceStream(y);if(C&&S.push(null),y.previous=i,i&&(i.next=y),i=y,a.defineSkip(y.start),a.write(S),t.parser.lazy[y.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<s&&(!a.events[A][1].end||a.events[A][1].end.offset>s))return;const w=t.events.length;let _=w,L,O;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(L){O=t.events[_][1].end;break}L=!0}for(h(r),A=w;A<t.events.length;)t.events[A][1].end={...O},A++;Xe(t.events,_+1,0,t.events.slice(w)),t.events.length=A}}function h(y){let C=n.length;for(;C-- >y;){const S=n[C];t.containerState=S[1],S[0].exit.call(t,e)}n.length=y}function T(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Fd(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function us(e){if(e===null||xe(e)||tn(e))return 1;if(en(e))return 2}function Hr(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const $r={name:"attention",resolveAll:Hd,tokenize:$d};function Hd(e,t){let n=-1,r,a,i,s,u,o,l,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},b={...e[n][1].start};ls(p,-o),ls(b,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},i={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ue(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ue(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Ue(l,Hr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ue(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,l=Ue(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Xe(e,r-1,n-r+3,l),n=r+l.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $d(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=us(r);let i;return s;function s(o){return i=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===i)return e.consume(o),u;const l=e.exit("attentionSequence"),m=us(o),p=!m||m===2&&a||n.includes(o),b=!a||a===2&&m||n.includes(r);return l._open=!!(i===42?p:p&&(a||!b)),l._close=!!(i===42?b:b&&(m||!p)),t(o)}}function ls(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ud={name:"autolink",tokenize:qd};function qd(e,t,n){let r=0;return a;function a(g){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(g){return Ke(g)?(e.consume(g),s):g===64?n(g):l(g)}function s(g){return g===43||g===45||g===46||He(g)?(r=1,u(g)):l(g)}function u(g){return g===58?(e.consume(g),r=0,o):(g===43||g===45||g===46||He(g))&&r++<32?(e.consume(g),u):(r=0,l(g))}function o(g){return g===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):g===null||g===32||g===60||Rr(g)?n(g):(e.consume(g),o)}function l(g){return g===64?(e.consume(g),m):Ld(g)?(e.consume(g),l):n(g)}function m(g){return He(g)?p(g):n(g)}function p(g){return g===46?(e.consume(g),r=0,m):g===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(g),e.exit("autolinkMarker"),e.exit("autolink"),t):b(g)}function b(g){if((g===45||He(g))&&r++<63){const c=g===45?b:p;return e.consume(g),c}return n(g)}}const Fn={partial:!0,tokenize:zd};function zd(e,t,n){return r;function r(i){return de(i)?fe(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Z(i)?t(i):n(i)}}const cs={continuation:{tokenize:Gd},exit:Yd,name:"blockQuote",tokenize:Vd};function Vd(e,t,n){const r=this;return a;function a(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Gd(e,t,n){const r=this;return a;function a(s){return de(s)?fe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(cs,t,n)(s)}}function Yd(e){e.exit("blockQuote")}const ds={name:"characterEscape",tokenize:Wd};function Wd(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Dd(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const fs={name:"characterReference",tokenize:jd};function jd(e,t,n){const r=this;let a=0,i,s;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=He,m(p))}function l(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=Od,m):(e.enter("characterReferenceValue"),i=7,s=Fr,m(p))}function m(p){if(p===59&&a){const b=e.exit("characterReferenceValue");return s===He&&!Zt(r.sliceSerialize(b))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&a++<i?(e.consume(p),m):n(p)}}const ps={partial:!0,tokenize:Kd},hs={concrete:!0,name:"codeFenced",tokenize:Xd};function Xd(e,t,n){const r=this,a={partial:!0,tokenize:S};let i=0,s=0,u;return o;function o(A){return l(A)}function l(A){const w=r.events[r.events.length-1];return i=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===u?(s++,e.consume(A),m):s<3?n(A):(e.exit("codeFencedFenceSequence"),de(A)?fe(e,p,"whitespace")(A):p(A))}function p(A){return A===null||Z(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(ps,f,C)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,g,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),b)}function g(A){return A===null||Z(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(A))}function c(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===u?n(A):(e.consume(A),c)}function f(A){return e.attempt(a,C,E)(A)}function E(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),h}function h(A){return i>0&&de(A)?fe(e,T,"linePrefix",i+1)(A):T(A)}function T(A){return A===null||Z(A)?e.check(ps,f,C)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||Z(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),y)}function C(A){return e.exit("codeFenced"),t(A)}function S(A,w,_){let L=0;return O;function O(x){return A.enter("lineEnding"),A.consume(x),A.exit("lineEnding"),I}function I(x){return A.enter("codeFencedFence"),de(x)?fe(A,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):B(x)}function B(x){return x===u?(A.enter("codeFencedFenceSequence"),H(x)):_(x)}function H(x){return x===u?(L++,A.consume(x),H):L>=s?(A.exit("codeFencedFenceSequence"),de(x)?fe(A,v,"whitespace")(x):v(x)):_(x)}function v(x){return x===null||Z(x)?(A.exit("codeFencedFence"),w(x)):_(x)}}}function Kd(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ur={name:"codeIndented",tokenize:Jd},Qd={partial:!0,tokenize:Zd};function Jd(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),fe(e,i,"linePrefix",5)(l)}function i(l){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):Z(l)?e.attempt(Qd,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||Z(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function Zd(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):fe(e,i,"linePrefix",5)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Z(s)?a(s):n(s)}}const ef={name:"codeText",previous:nf,resolve:tf,tokenize:rf};function tf(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function nf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rf(e,t,n){let r=0,a,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),o(p))}function o(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),o):p===96?(i=e.enter("codeTextSequence"),a=0,m(p)):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(p))}function l(p){return p===null||p===32||p===96||Z(p)?(e.exit("codeTextData"),o(p)):(e.consume(p),l)}function m(p){return p===96?(e.consume(p),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",l(p))}}class af{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&nn(this.left,r),i.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),nn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),nn(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);nn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);nn(this.left,n.reverse())}}}function nn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ms(e){const t={};let n=-1,r,a,i,s,u,o,l;const m=new af(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sf(m,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=m.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return Xe(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!l}function sf(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],l={};let m,p,b=-1,g=n,c=0,f=0;const E=[f];for(;g;){for(;e.get(++a)[1]!==g;);i.push(a),g._tokenizer||(m=r.sliceStream(g),g.next||m.push(null),p&&s.defineSkip(g.start),g._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(m),g._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=n;++b<u.length;)u[b][0]==="exit"&&u[b-1][0]==="enter"&&u[b][1].type===u[b-1][1].type&&u[b][1].start.line!==u[b][1].end.line&&(f=b+1,E.push(f),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(s.events=[],g?(g._tokenizer=void 0,g.previous=void 0):E.pop(),b=E.length;b--;){const h=u.slice(E[b],E[b+1]),T=i.pop();o.push([T,T+h.length-1]),e.splice(T,2,h)}for(o.reverse(),b=-1;++b<o.length;)l[c+o[b][0]]=c+o[b][1],c+=o[b][1]-o[b][0]-1;return l}const of={resolve:lf,tokenize:cf},uf={partial:!0,tokenize:df};function lf(e){return ms(e),e}function cf(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?i(u):Z(u)?e.check(uf,s,i)(u):(e.consume(u),a)}function i(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function df(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),fe(e,i,"linePrefix")}function i(s){if(s===null||Z(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gs(e,t,n,r,a,i,s,u,o){const l=o||Number.POSITIVE_INFINITY;let m=0;return p;function p(h){return h===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(h),e.exit(i),b):h===null||h===32||h===41||Rr(h)?n(h):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),f(h))}function b(h){return h===62?(e.enter(i),e.consume(h),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),g(h))}function g(h){return h===62?(e.exit("chunkString"),e.exit(u),b(h)):h===null||h===60||Z(h)?n(h):(e.consume(h),h===92?c:g)}function c(h){return h===60||h===62||h===92?(e.consume(h),g):g(h)}function f(h){return!m&&(h===null||h===41||xe(h))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(h)):m<l&&h===40?(e.consume(h),m++,f):h===41?(e.consume(h),m--,f):h===null||h===32||h===40||Rr(h)?n(h):(e.consume(h),h===92?E:f)}function E(h){return h===40||h===41||h===92?(e.consume(h),f):f(h)}}function Es(e,t,n,r,a,i){const s=this;let u=0,o;return l;function l(g){return e.enter(r),e.enter(a),e.consume(g),e.exit(a),e.enter(i),m}function m(g){return u>999||g===null||g===91||g===93&&!o||g===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(g):g===93?(e.exit(i),e.enter(a),e.consume(g),e.exit(a),e.exit(r),t):Z(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||Z(g)||u++>999?(e.exit("chunkString"),m(g)):(e.consume(g),o||(o=!de(g)),g===92?b:p)}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,p):p(g)}}function bs(e,t,n,r,a,i){let s;return u;function u(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),s=b===40?41:b,o):n(b)}function o(b){return b===s?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(i),l(b))}function l(b){return b===s?(e.exit(i),o(s)):b===null?n(b):Z(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),fe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===s||b===null||Z(b)?(e.exit("chunkString"),l(b)):(e.consume(b),b===92?p:m)}function p(b){return b===s||b===92?(e.consume(b),m):m(b)}}function et(e,t){let n;return r;function r(a){return Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):de(a)?fe(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const ff={name:"definition",tokenize:hf},pf={partial:!0,tokenize:mf};function hf(e,t,n){const r=this;let a;return i;function i(g){return e.enter("definition"),s(g)}function s(g){return Es.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function u(g){return a=Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),o):n(g)}function o(g){return xe(g)?et(e,l)(g):l(g)}function l(g){return gs(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function m(g){return e.attempt(pf,p,p)(g)}function p(g){return de(g)?fe(e,b,"whitespace")(g):b(g)}function b(g){return g===null||Z(g)?(e.exit("definition"),r.parser.defined.push(a),t(g)):n(g)}}function mf(e,t,n){return r;function r(u){return xe(u)?et(e,a)(u):n(u)}function a(u){return bs(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function i(u){return de(u)?fe(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Z(u)?t(u):n(u)}}const gf={name:"hardBreakEscape",tokenize:Ef};function Ef(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Z(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const bf={name:"headingAtx",resolve:Tf,tokenize:yf};function Tf(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xe(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function yf(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),i(m)}function i(m){return e.enter("atxHeadingSequence"),s(m)}function s(m){return m===35&&r++<6?(e.consume(m),s):m===null||xe(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||Z(m)?(e.exit("atxHeading"),t(m)):de(m)?fe(e,u,"whitespace")(m):(e.enter("atxHeadingText"),l(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),u(m))}function l(m){return m===null||m===35||xe(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),l)}}const xf=["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"],Ts=["pre","script","style","textarea"],Cf={concrete:!0,name:"htmlFlow",resolveTo:_f,tokenize:kf},Sf={partial:!0,tokenize:Nf},Af={partial:!0,tokenize:vf};function _f(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 kf(e,t,n){const r=this;let a,i,s,u,o;return l;function l(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),b):R===47?(e.consume(R),i=!0,f):R===63?(e.consume(R),a=3,r.interrupt?t:k):Ke(R)?(e.consume(R),s=String.fromCharCode(R),E):n(R)}function b(R){return R===45?(e.consume(R),a=2,g):R===91?(e.consume(R),a=5,u=0,c):Ke(R)?(e.consume(R),a=4,r.interrupt?t:k):n(R)}function g(R){return R===45?(e.consume(R),r.interrupt?t:k):n(R)}function c(R){const te="CDATA[";return R===te.charCodeAt(u++)?(e.consume(R),u===te.length?r.interrupt?t:B:c):n(R)}function f(R){return Ke(R)?(e.consume(R),s=String.fromCharCode(R),E):n(R)}function E(R){if(R===null||R===47||R===62||xe(R)){const te=R===47,ce=s.toLowerCase();return!te&&!i&&Ts.includes(ce)?(a=1,r.interrupt?t(R):B(R)):xf.includes(s.toLowerCase())?(a=6,te?(e.consume(R),h):r.interrupt?t(R):B(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):i?T(R):y(R))}return R===45||He(R)?(e.consume(R),s+=String.fromCharCode(R),E):n(R)}function h(R){return R===62?(e.consume(R),r.interrupt?t:B):n(R)}function T(R){return de(R)?(e.consume(R),T):O(R)}function y(R){return R===47?(e.consume(R),O):R===58||R===95||Ke(R)?(e.consume(R),C):de(R)?(e.consume(R),y):O(R)}function C(R){return R===45||R===46||R===58||R===95||He(R)?(e.consume(R),C):S(R)}function S(R){return R===61?(e.consume(R),A):de(R)?(e.consume(R),S):y(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,w):de(R)?(e.consume(R),A):_(R)}function w(R){return R===o?(e.consume(R),o=null,L):R===null||Z(R)?n(R):(e.consume(R),w)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||xe(R)?S(R):(e.consume(R),_)}function L(R){return R===47||R===62||de(R)?y(R):n(R)}function O(R){return R===62?(e.consume(R),I):n(R)}function I(R){return R===null||Z(R)?B(R):de(R)?(e.consume(R),I):n(R)}function B(R){return R===45&&a===2?(e.consume(R),P):R===60&&a===1?(e.consume(R),$):R===62&&a===4?(e.consume(R),j):R===63&&a===3?(e.consume(R),k):R===93&&a===5?(e.consume(R),G):Z(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Sf,J,H)(R)):R===null||Z(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),B)}function H(R){return e.check(Af,v,J)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return R===null||Z(R)?H(R):(e.enter("htmlFlowData"),B(R))}function P(R){return R===45?(e.consume(R),k):B(R)}function $(R){return R===47?(e.consume(R),s="",U):B(R)}function U(R){if(R===62){const te=s.toLowerCase();return Ts.includes(te)?(e.consume(R),j):B(R)}return Ke(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),U):B(R)}function G(R){return R===93?(e.consume(R),k):B(R)}function k(R){return R===62?(e.consume(R),j):R===45&&a===2?(e.consume(R),k):B(R)}function j(R){return R===null||Z(R)?(e.exit("htmlFlowData"),J(R)):(e.consume(R),j)}function J(R){return e.exit("htmlFlow"),t(R)}}function vf(e,t,n){const r=this;return a;function a(s){return Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Nf(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Fn,t,n)}}const wf={name:"htmlText",tokenize:If};function If(e,t,n){const r=this;let a,i,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),S):k===63?(e.consume(k),y):Ke(k)?(e.consume(k),_):n(k)}function l(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),i=0,c):Ke(k)?(e.consume(k),T):n(k)}function m(k){return k===45?(e.consume(k),g):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),b):Z(k)?(s=p,$(k)):(e.consume(k),p)}function b(k){return k===45?(e.consume(k),g):p(k)}function g(k){return k===62?P(k):k===45?b(k):p(k)}function c(k){const j="CDATA[";return k===j.charCodeAt(i++)?(e.consume(k),i===j.length?f:c):n(k)}function f(k){return k===null?n(k):k===93?(e.consume(k),E):Z(k)?(s=f,$(k)):(e.consume(k),f)}function E(k){return k===93?(e.consume(k),h):f(k)}function h(k){return k===62?P(k):k===93?(e.consume(k),h):f(k)}function T(k){return k===null||k===62?P(k):Z(k)?(s=T,$(k)):(e.consume(k),T)}function y(k){return k===null?n(k):k===63?(e.consume(k),C):Z(k)?(s=y,$(k)):(e.consume(k),y)}function C(k){return k===62?P(k):y(k)}function S(k){return Ke(k)?(e.consume(k),A):n(k)}function A(k){return k===45||He(k)?(e.consume(k),A):w(k)}function w(k){return Z(k)?(s=w,$(k)):de(k)?(e.consume(k),w):P(k)}function _(k){return k===45||He(k)?(e.consume(k),_):k===47||k===62||xe(k)?L(k):n(k)}function L(k){return k===47?(e.consume(k),P):k===58||k===95||Ke(k)?(e.consume(k),O):Z(k)?(s=L,$(k)):de(k)?(e.consume(k),L):P(k)}function O(k){return k===45||k===46||k===58||k===95||He(k)?(e.consume(k),O):I(k)}function I(k){return k===61?(e.consume(k),B):Z(k)?(s=I,$(k)):de(k)?(e.consume(k),I):L(k)}function B(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,H):Z(k)?(s=B,$(k)):de(k)?(e.consume(k),B):(e.consume(k),v)}function H(k){return k===a?(e.consume(k),a=void 0,x):k===null?n(k):Z(k)?(s=H,$(k)):(e.consume(k),H)}function v(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||xe(k)?L(k):(e.consume(k),v)}function x(k){return k===47||k===62||xe(k)?L(k):n(k)}function P(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function $(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return de(k)?fe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):G(k)}function G(k){return e.enter("htmlTextData"),s(k)}}const qr={name:"labelEnd",resolveAll:Pf,resolveTo:Mf,tokenize:Bf},Lf={tokenize:Rf},Of={tokenize:Ff},Df={tokenize:Hf};function Pf(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Xe(e,0,e.length,n),e}function Mf(e,t){let n=e.length,r=0,a,i,s,u;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},m={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ue(u,e.slice(i+1,i+r+3)),u=Ue(u,[["enter",m,t]]),u=Ue(u,Hr(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=Ue(u,[["exit",m,t],e[s-2],e[s-1],["exit",l,t]]),u=Ue(u,e.slice(s+1)),u=Ue(u,[["exit",o,t]]),Xe(e,i,e.length,u),e}function Bf(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return u;function u(b){return i?i._inactive?p(b):(s=r.parser.defined.includes(Lt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),o):n(b)}function o(b){return b===40?e.attempt(Lf,m,s?m:p)(b):b===91?e.attempt(Of,m,s?l:p)(b):s?m(b):p(b)}function l(b){return e.attempt(Df,m,p)(b)}function m(b){return t(b)}function p(b){return i._balanced=!0,n(b)}}function Rf(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return xe(p)?et(e,i)(p):i(p)}function i(p){return p===41?m(p):gs(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return xe(p)?et(e,o)(p):m(p)}function u(p){return n(p)}function o(p){return p===34||p===39||p===40?bs(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function l(p){return xe(p)?et(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ff(e,t,n){const r=this;return a;function a(u){return Es.call(r,e,i,s,"reference","referenceMarker","referenceString")(u)}function i(u){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Hf(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const $f={name:"labelStartImage",resolveAll:qr.resolveAll,tokenize:Uf};function Uf(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),i}function i(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const qf={name:"labelStartLink",resolveAll:qr.resolveAll,tokenize:zf};function zf(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const zr={name:"lineEnding",tokenize:Vf};function Vf(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const Hn={name:"thematicBreak",tokenize:Gf};function Gf(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,u(l)}function u(l){return l===a?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Z(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===a?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?fe(e,u,"whitespace")(l):u(l))}}const De={continuation:{tokenize:Xf},exit:Qf,name:"list",tokenize:jf},Yf={partial:!0,tokenize:Jf},Wf={partial:!0,tokenize:Kf};function jf(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return u;function u(g){const c=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(c==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:Fr(g)){if(r.containerState.type||(r.containerState.type=c,e.enter(c,{_container:!0})),c==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(Hn,n,l)(g):l(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(g)}return n(g)}function o(g){return Fr(g)&&++s<10?(e.consume(g),o):(!r.interrupt||s<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),l(g)):n(g)}function l(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Fn,r.interrupt?n:m,e.attempt(Yf,b,p))}function m(g){return r.containerState.initialBlankLine=!0,i++,b(g)}function p(g){return de(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),b):n(g)}function b(g){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function Xf(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fn,a,i);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(u)}function i(u){return r.containerState.furtherBlankLines||!de(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wf,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(De,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Kf(e,t,n){const r=this;return fe(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function Qf(e){e.exit(this.containerState.type)}function Jf(e,t,n){const r=this;return fe(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const ys={name:"setextUnderline",resolveTo:Zf,tokenize:ep};function Zf(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function ep(e,t,n){const r=this;let a;return i;function i(l){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),de(l)?fe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Z(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const tp={tokenize:np};function np(e){const t=this,n=e.attempt(Fn,r,e.attempt(this.parser.constructs.flowInitial,a,fe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(of,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rp={resolveAll:Cs()},ap=xs("string"),ip=xs("text");function xs(e){return{resolveAll:Cs(e==="text"?sp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(m){return l(m)?i(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),o}function o(m){return l(m)?(n.exit("data"),i(m)):(n.consume(m),o)}function l(m){if(m===null)return!0;const p=a[m];let b=-1;if(p)for(;++b<p.length;){const g=p[b];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function Cs(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function sp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,u=0,o;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const op=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ff},disable:{null:[]},document:{42:De,43:De,45:De,48:De,49:De,50:De,51:De,52:De,53:De,54:De,55:De,56:De,57:De,62:cs},flow:{35:bf,42:Hn,45:[ys,Hn],60:Cf,61:ys,95:Hn,96:hs,126:hs},flowInitial:{[-2]:Ur,[-1]:Ur,32:Ur},insideSpan:{null:[$r,rp]},string:{38:fs,92:ds},text:{[-5]:zr,[-4]:zr,[-3]:zr,33:$f,38:fs,42:$r,60:[Ud,wf],91:qf,92:[gf,ds],93:qr,95:$r,96:ef}},Symbol.toStringTag,{value:"Module"}));function up(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],u=[];const o={attempt:w(S),check:w(A),consume:T,enter:y,exit:C,interrupt:w(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:f,events:[],now:c,parser:e,previous:null,sliceSerialize:b,sliceStream:g,write:p};let m=t.tokenize.call(l,o);return t.resolveAll&&i.push(t),l;function p(I){return s=Ue(s,I),E(),s[s.length-1]!==null?[]:(_(t,0),l.events=Hr(i,l.events,l),l.events)}function b(I,B){return cp(g(I),B)}function g(I){return lp(s,I)}function c(){const{_bufferIndex:I,_index:B,line:H,column:v,offset:x}=r;return{_bufferIndex:I,_index:B,line:H,column:v,offset:x}}function f(I){a[I.line]=I.column,O()}function E(){let I;for(;r._index<s.length;){const B=s[r._index];if(typeof B=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<B.length;)h(B.charCodeAt(r._bufferIndex));else h(B)}}function h(I){m=m(I)}function T(I){Z(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,O()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=I}function y(I,B){const H=B||{};return H.type=I,H.start=c(),l.events.push(["enter",H,l]),u.push(H),H}function C(I){const B=u.pop();return B.end=c(),l.events.push(["exit",B,l]),B}function S(I,B){_(I,B.from)}function A(I,B){B.restore()}function w(I,B){return H;function H(v,x,P){let $,U,G,k;return Array.isArray(v)?J(v):"tokenize"in v?J([v]):j(v);function j(ne){return ee;function ee(pe){const Te=pe!==null&&ne[pe],me=pe!==null&&ne.null,Le=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(me)?me:me?[me]:[]];return J(Le)(pe)}}function J(ne){return $=ne,U=0,ne.length===0?P:R(ne[U])}function R(ne){return ee;function ee(pe){return k=L(),G=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?ce():ne.tokenize.call(B?Object.assign(Object.create(l),B):l,o,te,ce)(pe)}}function te(ne){return I(G,k),x}function ce(ne){return k.restore(),++U<$.length?R($[U]):P}}}function _(I,B){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&Xe(l.events,B,l.events.length-B,I.resolve(l.events.slice(B),l)),I.resolveTo&&(l.events=I.resolveTo(l.events,l))}function L(){const I=c(),B=l.previous,H=l.currentConstruct,v=l.events.length,x=Array.from(u);return{from:v,restore:P};function P(){r=I,l.previous=B,l.currentConstruct=H,l.events.length=v,u=x,O()}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function lp(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function cp(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
33
|
+
`);let p=0;for(const c of m){const f=r.measureText(c||" ").width||0;p=Math.max(p,f)}const E=Number.parseFloat(a.letterSpacing||""),h=Number.isFinite(E)?E:0;if(h>0){const c=m.reduce((f,b)=>f.length>=b.length?f:b,"");p+=h*Math.max(0,c.length-1)}return Math.ceil(p)}function Nn(e,t){if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(r=>{if(r.dataset.variableRender==="antd-textarea")return;const a=r.innerText;if(a.replace(/\u200B/g,"").trim().length===0){const E=r.querySelector(".variable-info-icon");Array.from(r.childNodes).forEach(f=>{if(f.nodeType===Node.TEXT_NODE){r.removeChild(f);return}f.nodeType===Node.ELEMENT_NODE&&f.tagName==="BR"&&r.removeChild(f)});const h=document.createTextNode("");E&&E.parentNode===r?r.insertBefore(h,E):r.firstChild?r.insertBefore(h,r.firstChild):r.appendChild(h),r.classList.add("show-placeholder");const c=r.dataset.placeholder||"";if(c){const g=(()=>{try{const A=nl(c,r);if(!A||!Number.isFinite(A)){const w=vn(c);return Math.max(0,w-22)}return A}catch{const A=vn(c);return Math.max(0,A-22)}})(),T=(()=>{if(!r.classList.contains("rte-variable-with-icon"))return 0;const A=r.querySelector(".variable-info-icon:not(.hidden)");if(!A)return 24;try{const w=window.getComputedStyle(A),_=Math.ceil(A.getBoundingClientRect().width||0)||16,N=Math.ceil(Number.parseFloat(w.right||"0"))||4;return Math.max(16,Math.min(120,_+N+2))}catch{return 24}})();T>0?r.style.setProperty("--rte-icon-pad-right",`${T}px`):r.style.removeProperty("--rte-icon-pad-right");const y=2,C=T>0?T:8,S=Math.max(24,Math.min(600,Math.ceil(g+8+C+y)));r.style.minWidth=`${S}px`}else r.style.minWidth=""}else r.classList.remove("show-placeholder"),r.style.minWidth="",r.style.removeProperty("--rte-icon-pad-right");const s=!!r.querySelector("br")||(a||"").includes(`
|
|
34
|
+
`),u=r.offsetHeight>32,o=s||u;r.classList.toggle("rte-variable-multiline",o),r.classList.toggle("rte-variable-force-block",o);const l=r.closest(".rte-inline-group");l&&l.classList.toggle("rte-inline-group-force-block",o);const m=r.closest(".required-upload-group, .required-multi-first");m&&m.classList.toggle("rte-required-group-force-block",o);const p=m?m.parentElement?.closest(".exclusion-wrapper"):r.closest(".exclusion-wrapper");p&&p!==m&&p.classList.toggle("rte-exclusion-force-block",o)})}function pr(e,t,n){if(!e.current)return;const r=c=>{c.classList.contains("rte-richtext-host-expanded")&&(c.style.setProperty("display","flex","important"),c.style.setProperty("flex-direction","column","important"),c.style.setProperty("flex","1 1 auto","important"),c.style.setProperty("min-height","0","important"),c.style.setProperty("width","100%","important"),c.style.setProperty("align-self","stretch","important"))},a=c=>{if(!c.closest('[data-rte-force-hidden="1"]')){if(c.classList.contains("rte-richtext-host-expanded")){r(c);return}if(c.classList.contains("required-upload-group")){c.style.setProperty("display","inline-flex","important");return}if(c.classList.contains("exclusion-wrapper")){c.classList.contains("rte-exclusion-force-block")?c.style.setProperty("display","block","important"):c.style.setProperty("display","inline-block","important");return}c.style.setProperty("display","inline-block","important")}},i=c=>{c.closest('[data-rte-force-hidden="1"]')||(c.style.display="none",c.style.setProperty("display","none","important"))},s=t.some(c=>c.exclusionGroup==="separator");if(s){const c=[];let f=[];for(const w of t){if(w.exclusionGroup==="separator"){f.length&&c.push(f),f=[];continue}!w.exclusionGroup||w.exclusionGroup==="separator"||(w.type==="upload"&&w.key?f.push({type:"upload",key:w.key}):(w.type==="variable"||w.type==="multi-variable"||w.type==="markdown"||w.type==="markdown-name")&&w.key?f.push({type:w.type==="multi-variable"?"multi-variable":"variable",key:w.key}):f.push({type:"other",nodeType:w.type}))}f.length&&c.push(f);const b=w=>{const _=t.find(N=>N.type==="upload"&&N.key===w);return _?typeof _.maxCount=="number"&&_.maxCount>1?_.maxCount:1:0},g=c.map(w=>{for(const _ of w)if(_.type!=="other"){if(_.type==="upload"){if(n[_.key]!==null&&n[_.key]!==void 0)return!0;const N=b(_.key);for(let O=0;O<N;O++){const L=`${_.key}-${O}`;if(n[L]!==null&&n[L]!==void 0)return!0}continue}if(_.type==="multi-variable"){const N=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`);for(const O of N){if(O.dataset.variableRender==="antd-textarea"){const L=O.dataset.value||"";let B=L;try{B=decodeURIComponent(L)}catch{B=L}if(B.trim().length>0)return!0;continue}if(!O.classList.contains("show-placeholder")&&O.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0}continue}if(_.type==="variable"){const N=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);if(!N)continue;if(N.dataset.variableRender==="antd-textarea"){const O=N.dataset.value||"";let L=O;try{L=decodeURIComponent(O)}catch{L=O}if(L.trim().length>0)return!0}else if(!N.classList.contains("show-placeholder")&&N.innerText.replace(/[\u200B\n]/g,"").trim().length>0)return!0;continue}}return!1}),T=g.some(Boolean),y=T?g.findIndex(Boolean):-1,C=w=>{for(const _ of c[w]||[])if(_.type!=="other"){if(_.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${_.key}"], [data-type="upload"][data-key^="${_.key}-"]`).forEach(O=>a(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`).forEach(O=>{const L=O.closest(".exclusion-wrapper")||O;a(L)});continue}if(_.type==="variable"){const N=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);N&&a(N.closest(".exclusion-wrapper")||N)}}},S=w=>{for(const _ of c[w]||[])if(_.type!=="other"){if(_.type==="upload"){e.current.querySelectorAll(`[data-type="upload"][data-key="${_.key}"], [data-type="upload"][data-key^="${_.key}-"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="multi-variable"){e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${_.key}"]`).forEach(O=>i(O.closest(".exclusion-wrapper")||O));continue}if(_.type==="variable"){const N=e.current.querySelector(`[data-type="variable"][data-key="${_.key}"]`);N&&i(N.closest(".exclusion-wrapper")||N)}}};for(let w=0;w<c.length;w++)!T||w===y?C(w):S(w);e.current.querySelectorAll('[data-group="separator"]').forEach(w=>{w.closest('[data-rte-force-hidden="1"]')||(T?i(w):w.style.setProperty("display","inline-flex","important"))});return}const u=new Set,o={};for(const c of t)c.exclusionGroup&&c.exclusionGroup!=="separator"&&(u.add(c.exclusionGroup),o[c.exclusionGroup]||(o[c.exclusionGroup]=[]),o[c.exclusionGroup].push({type:c.type,key:c.key,exclusionGroup:c.exclusionGroup}));const l={};for(const c of u){l[c]=!1;for(const f of o[c])if(f.type==="upload"&&f.key){if(n[f.key]!==null&&n[f.key]!==void 0){l[c]=!0;break}const b=t.find(g=>g.type==="upload"&&g.key===f.key);if(b&&typeof b.maxCount=="number")for(let g=0;g<b.maxCount;g++){const T=`${f.key}-${g}`;if(n[T]!==null&&n[T]!==void 0){l[c]=!0;break}}if(l[c])break}else if((f.type==="variable"||f.type==="multi-variable")&&f.key){const b=f.type==="multi-variable"?e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${f.key}"]`):[e.current.querySelector(`[data-type="variable"][data-key="${f.key}"]`)].filter(Boolean);for(const g of b){if(g.dataset.variableRender==="antd-textarea"){const T=g.dataset.value||"";let y=T;try{y=decodeURIComponent(T)}catch{y=T}if(y.trim().length>0){l[c]=!0;break}continue}if(!g.classList.contains("show-placeholder")&&g.innerText.replace(/[\u200B\n]/g,"").trim().length>0){l[c]=!0;break}}if(l[c])break}}const p=Object.keys(l).filter(c=>l[c]).length>0;let E=null;if(p&&s){for(const c of t)if(c.exclusionGroup&&c.exclusionGroup!=="separator"&&l[c.exclusionGroup]){E=c.exclusionGroup;break}}for(const c of u){const f=e.current.querySelectorAll(`[data-group="${c}"]`);s&&p&&E?c===E?f.forEach(a):f.forEach(i):f.forEach(a)}e.current.querySelectorAll('[data-group="separator"]').forEach(c=>{c.closest('[data-rte-force-hidden="1"]')||(p?i(c):c.style.setProperty("display","inline-flex","important"))})}function ni(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const f=c.getAttribute("data-node-type")||"";if(f!=="report-module"&&f!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let T=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return g.filter((S,A)=>A!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
|
|
35
|
+
`).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const f=t[c];if((f.type==="variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"||f.type==="upload"||f.type==="multi-variable"||f.type==="select"||f.type==="textarea"||f.type==="richtext"||f.type==="report-module"||f.type==="markdown-module"||f.type==="datepicker"||f.type==="number-input")&&f.required&&f.key){s.push({exclusionGroup:f.exclusionGroup||"",key:f.key,type:f.type==="multi-variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"?"variable":f.type==="report-module"||f.type==="markdown-module"?"richtext":f.type,isMultiVariable:f.type==="multi-variable",minCount:f.type==="multi-variable"||f.type==="upload"&&typeof f.minCount=="number"?f.minCount:void 0,moduleIndex:f.type==="report-module"||f.type==="markdown-module"?f.moduleIndex:void 0,__index:c});continue}if(f.type==="text"&&f.className?.includes("rte-text-required"))if(f.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===f.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:f.exclusionGroup,key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((f,b)=>{f.exclusionGroup==="separator"&&c.push(b)});for(const f of c){const g=s.filter(C=>typeof C.__index=="number"&&C.__index<f).sort((C,S)=>(S.__index??0)-(C.__index??0))[0],y=s.filter(C=>typeof C.__index=="number"&&C.__index>f).sort((C,S)=>(C.__index??0)-(S.__index??0))[0];g&&y&&o.push([g,y])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const f=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(f.length>0){const b=f[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const f=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(f.length>0){const b=f[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(f=>{f.key&&m.add(f.key)})});const p=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const f=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(T.length>0){const y=T[0];return i(y)?!0:y.style.display!=="none"}}return!0});if(f.length===0)continue;let b=!1;for(const g of f)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let T=0;const y=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(y.length===0)continue;for(let C=0;C<y.length;C++){const A=y[C].dataset.key;A&&n[A]!=null&&(T+=1)}if(T>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let y=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(y+=1)}const C=g.minCount&&g.minCount>0?g.minCount:1;if(y>=C){b=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const T=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const T=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,y=e.current.querySelector(T);if(y&&a(y).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of p)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let f=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const y=b[g].dataset.key;y&&n[y]!=null&&(f+=1)}if(f<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const T of Array.from(f)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!f){h=!1;break}if(f.classList.contains("show-placeholder")){h=!1;break}if(f.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}r(E&&h)}const rl=({config:e,effectiveConfig:t,files:n,editorRef:r,setIsFormValid:a,multiVariableCounts:i,setMultiVariableCounts:s})=>{D.useLayoutEffect(()=>{const u=r.current;if(!u)return;const o=new Map,l=E=>{const h=E.target,c=E.relatedTarget;!h||!r.current||!r.current.contains(h)||c&&r.current.contains(c)||setTimeout(()=>{if(r.current){if(e.length===0){const f=r.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";a(f.length>0);return}Nn(r),pr(r,t,n),ni(r,t,n,a)}},0)};u.addEventListener("blur",l,!0);const m=()=>{if(!r.current)return;o.forEach((c,f)=>{f.removeEventListener("blur",c,!1)}),o.clear();const E=r.current.querySelectorAll('[data-type="variable"][data-multi-key]'),h=c=>{c.stopPropagation(),c.stopImmediatePropagation();const f=c.target;if(!f||!r.current||!r.current.contains(f))return;const b=f.closest('[data-type="variable"][data-multi-key]');if(!b||!r.current.contains(b))return;let g=!1;if(o.forEach((N,O)=>{(O===b||O.contains(f))&&(g=!0)}),!g)return;const T=b.dataset.multiKey,y=b.dataset.key,C=b.dataset.index;if(!T||!y||C===void 0)return;const S=c.relatedTarget;if(!(!S||!r.current.contains(S)))return;const w=b.innerText.replace(/[\u200B\n]/g,"").trim(),_=/[、,,\s]+/;if(_.test(w)){const L=w.split(_).map(B=>B.trim()).filter(B=>B.length>0).slice(0,9);if(L.length>1){const B=e.find(H=>H.type==="multi-variable"&&H.key===T);if(B){const H=i[T]||1,v=parseInt(C,10),x=B.maxCount||9,M=[];for(let j=0;j<H;j++){const J=`${T}_${j}`,R=r.current.querySelector(`[data-type="variable"][data-key="${J}"][data-multi-key="${T}"]`);if(R){const te=R.innerText.replace(/[\u200B\n]/g,"").trim();M.push(te)}}M.splice(v,1,...L);const $=M.slice(0,x);$.length>0&&$[$.length-1]!==""&&$.length<x&&$.push("");const U=Math.max($.length,1),G={};$.forEach((j,J)=>{j&&(G[`${T}_${J}`]=j)}),r.current.querySelectorAll('[data-type="variable"]').forEach(j=>{const J=j.dataset.key,R=j.dataset.multiKey;if(J&&R!==T){const te=j.innerText.replace(/[\u200B\n]/g,"").trim();te&&(G[J]=te)}}),r.current.__tempVariableValues=G,s(j=>({...j,[T]:U}))}}}};E.forEach(c=>{c.addEventListener("blur",h,!1),o.set(c,h)})},p=setTimeout(()=>{m()},0);return()=>{clearTimeout(p),u.removeEventListener("blur",l,!0),o.forEach((E,h)=>{h.removeEventListener("blur",E,!1)}),o.clear()}},[e,t,r,n,i,a,s])},al=({disabled:e,collapsed:t,onCollapsedChange:n,config:r,lockStructure:a,editorRef:i,containerRef:s,fileInputRef:u,onBeforeFilePickerOpen:o,files:l,setFiles:m,handleRemoveFile:p,setActiveBatchKey:E,setActiveBatchStartIndex:h,setActiveFileKey:c,isDraggingRef:f,richtextPrevScrollTopRef:b})=>{const g=(...y)=>{},T=y=>{try{const C=window.getSelection();if(!C)return g(y,"no selection");const S=C.rangeCount>0?C.getRangeAt(0):null;g(y,{rangeCount:C.rangeCount,isCollapsed:C.isCollapsed,anchorNode:C.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":C.anchorNode?.nodeName,anchorOffset:C.anchorOffset,focusNode:C.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":C.focusNode?.nodeName,focusOffset:C.focusOffset,range:S?{startContainer:S.startContainer.nodeType===Node.TEXT_NODE?"TEXT":S.startContainer.nodeName,startOffset:S.startOffset,endContainer:S.endContainer.nodeType===Node.TEXT_NODE?"TEXT":S.endContainer.nodeName,endOffset:S.endOffset}:null})}catch{}};return D.useCallback(y=>{if(e)return;t&&n?.(!1);const C=y.target;if(g("click",{tag:C.tagName,cls:C.className}),T("before click"),C.closest('[data-type="datepicker"]'))return;if(C.closest(".tag-close-btn")){y.preventDefault(),y.stopPropagation();return}if(r.length===0)return;const w=(v,x)=>{if(!i.current)return;Array.from(i.current.children).forEach($=>{if($!==v)if(x)$.dataset.prevDisplay===void 0&&($.dataset.prevDisplay=$.style.display||""),$.dataset.rteForceHidden="1",$.style.setProperty("display","none","important");else{if($.dataset.prevDisplay!==void 0){const U=$.dataset.prevDisplay;U?$.style.display=U:$.style.removeProperty("display"),delete $.dataset.prevDisplay}else $.style.removeProperty("display");delete $.dataset.rteForceHidden}})},_=C.closest(".rte-textarea-toggle");if(_){y.preventDefault(),y.stopPropagation();const v=_.closest(".rte-textarea-wrapper"),x=v?.querySelector('[data-type="textarea"]'),$=!(_.getAttribute("data-expanded")==="true");_.setAttribute("data-expanded",String($)),_.textContent=$?"收起":"展开",v&&v.classList.toggle("rte-textarea-expanded",$);const U=v?.closest(".rte-textarea-required");if(U?U.classList.toggle("rte-textarea-overlay",$):v&&v.classList.toggle("rte-textarea-overlay",$),x)if($)x.classList.add("rte-textarea-expanded"),x.style.maxHeight="none",x.style.height="100%";else{x.classList.remove("rte-textarea-expanded");const G=x.dataset.maxHeight||"252";x.style.maxHeight=`${G}px`,x.style.height="auto"}i.current&&($?i.current.classList.add("rte-overlay-active"):i.current.classList.remove("rte-overlay-active"));return}const N=C.closest(".rte-richtext-toggle");if(N){y.preventDefault(),y.stopPropagation();const v=N.closest(".rte-richtext-wrapper"),x=v?.querySelector('[data-type="richtext"]'),$=!(N.getAttribute("data-expanded")==="true");((j,J)=>{j.setAttribute("data-expanded",String(J)),j.innerHTML=J?'<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>'})(N,$);const G=v?.closest(".rte-richtext-required");G?G.classList.toggle("rte-richtext-expanded",$):v&&v.classList.toggle("rte-richtext-expanded",$);const k=v?.closest(".exclusion-wrapper")||v?.parentElement;if(x&&($?(x.style.height="100%",x.style.overflow="auto"):(x.style.height="",x.style.overflow="")),k&&(k.classList.toggle("rte-richtext-host-expanded",$),w(k,$)),i.current){if(i.current.classList.toggle("rte-richtext-fullscreen-active",$),s.current?.classList.toggle("rte-richtext-container-expanded",$),s.current)if($){const j=Math.ceil(s.current.getBoundingClientRect().height||0);j>0&&s.current.style.setProperty("--rte-richtext-fullscreen-height",`${j}px`)}else s.current.style.removeProperty("--rte-richtext-fullscreen-height");if($)b.current=i.current.scrollTop||0,setTimeout(()=>{i.current&&(i.current.scrollTop=0,i.current.scrollLeft=0)},0);else{const j=b.current||0;setTimeout(()=>{i.current&&(i.current.scrollTop=j)},0)}}return}if(C.closest('[data-type="text"]')){y.preventDefault(),y.stopPropagation();const v=window.getSelection();v&&v.removeAllRanges();return}if(a&&C.closest(".tag-node")){y.preventDefault(),y.stopPropagation();const x=window.getSelection();x&&x.removeAllRanges();return}const L=C.closest('[data-type="variable"]');if(L){if(f.current)return;if(L.dataset.variableRender!=="antd-textarea"){const v=!!C.closest(".variable-info-icon"),x=L.classList.contains("show-placeholder")||(L.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(g("v1 variable click",{key:L.dataset.key,isPlaceholder:x,isOnIcon:v,classes:L.className,innerText:L.innerText}),x&&!v){y.preventDefault();const M=()=>{try{L.focus();const $=window.getSelection();if(!$)return;const U=document.createTreeWalker(L,NodeFilter.SHOW_TEXT),G=U.nextNode()?U.currentNode:null,k=document.createRange();G?(k.setStart(G,0),k.collapse(!0)):(k.selectNodeContents(L),k.collapse(!0)),$.removeAllRanges(),$.addRange(k),T("after placeCaretLeft()")}catch{}};setTimeout(()=>{window.requestAnimationFrame(M),window.requestAnimationFrame(()=>T("post-raf (click)"))},0)}}setTimeout(()=>{const v=window.getSelection();v&&!v.isCollapsed||Nn(i)},10);return}const B=C.closest(".file-remove-btn");if(B){y.preventDefault(),y.stopPropagation();const v=B.closest('[data-type="upload"]'),x=v?.dataset.key,M=v?.dataset.batchKey;if(x)if(M){const $=r.find(U=>U.type==="upload"&&U.key===M);if($&&typeof $.maxCount=="number"&&typeof $.minCount=="number"){const U=$.maxCount;m(G=>{const k={...G},j=[];for(let J=0;J<U;J++){const R=`${M}-${J}`,te=k[R];te!=null&&R!==x&&j.push(te)}for(let J=0;J<U;J++)delete k[`${M}-${J}`];return j.forEach((J,R)=>{k[`${M}-${R}`]=J}),k})}else p(x)}else p(x);return}const H=C.closest('[data-type="upload"]');if(H){const v=H.dataset.key,x=H.dataset.batchKey,M=H.dataset.batchIndex;if(v){const $=x||v,U=r.find(G=>G.type==="upload"&&G.key===$);if(u.current&&(U?.accept?u.current.accept=U.accept:U?.acceptType==="image"?u.current.accept="image/*":U?.acceptType==="file"?u.current.accept=".csv,.xlsx,.xls,.txt,.pdf,.doc,.docx,.json":u.current.accept=""),x){const G=r.find(k=>k.type==="upload"&&k.key===x);if(G&&typeof G.maxCount=="number"&&typeof G.minCount=="number"){const k=G.maxCount,j=l[v]!=null,J=M!=null?Number.parseInt(M,10):NaN;if(j){u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click();return}let R=0;for(let te=0;te<k;te++)l[`${x}-${te}`]!=null&&(R+=1);R<k&&u.current?(u.current.multiple=!0,E(x),h(Number.isFinite(J)?J:null),c(null),o?.(),u.current.click()):(u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click())}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}else u.current&&(u.current.multiple=!1),E(null),h(null),c(v),o?.(),u.current?.click()}return}},[t,r,s,e,i,u,o,l,p,f,a,n,b,E,h,c,m])},il=({config:e,editorRef:t,setIsEmpty:n,setIsFormValid:r,setReportAnalyzeState:a,setMarkdownAnalyzeState:i,setMarkdownNameAnalyzeState:s,collapsed:u,measureExpandedContentHeight:o,effectiveConfig:l,files:m,multiVariableCounts:p,setMultiVariableCounts:E,savedCursorRef:h})=>D.useCallback(()=>{if(e.length===0){if(t.current){const b=!(t.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"");n(b),r(!b)}return}if(Nn(t),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="report-url"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||a(y=>{const C=y[g];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:{...y,[g]:{status:"idle",modules:[],lastParsedUrl:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||i(y=>{const C=y[g];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}})}),t.current&&t.current.querySelectorAll('[data-type="variable"][data-node-type="markdown-name"]').forEach(b=>{const g=b.dataset.key;if(!g)return;const T=b.innerText.replace(/[\u200B\n]/g,"").trim();s(y=>{const C=y[g];return!C||C.status==="idle"&&(!C.modules||C.modules.length===0)?y:!T||C.lastParsedText&&T!==C.lastParsedText?{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}:y})}),t.current&&t.current.querySelectorAll('[data-type="richtext"][data-node-type="markdown-module"]').forEach(b=>{const g=b.dataset.key;if(!g)return;b.innerText.replace(/[\u200B\n]/g,"").trim()||(i(y=>{const C=y[g];return!C||C.status==="idle"?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}),s(y=>{const C=y[g];return!C||C.status==="idle"?y:{...y,[g]:{status:"idle",modules:[],lastParsedText:void 0,error:void 0}}}))}),t.current&&t.current.querySelectorAll('[data-type="variable"]').forEach(b=>{if(b.dataset.variableRender==="antd-textarea")return;const g=!!b.querySelector("br")||(b.innerText||"").includes(`
|
|
36
|
+
`),T=b.offsetHeight>32,y=g||T;b.classList.toggle("rte-variable-multiline",y),b.classList.toggle("rte-variable-force-block",y);const C=b.closest(".rte-inline-group");C&&C.classList.toggle("rte-inline-group-force-block",y);const S=b.closest(".required-upload-group, .required-multi-first");S&&S.classList.toggle("rte-required-group-force-block",y);const A=b.querySelector(".variable-info-icon");if(A){let w=!1;const _=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:N=>A.contains(N)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(;_.nextNode();)if(_.currentNode.textContent?.replace(/[\u200B\n]/g,"").trim()){w=!0;break}w?A.classList.add("hidden"):A.classList.remove("hidden"),b.classList.toggle("rte-variable-with-icon",!A.classList.contains("hidden"))}}),u||window.requestAnimationFrame(()=>{o()}),pr(t,l,m),ni(t,l,m,r),!t.current)return;e.filter(f=>f.type==="multi-variable"&&f.key).forEach(f=>{if(!f.key)return;const b=f.maxCount||9,g=p[f.key]||1,T=[];for(let w=0;w<g;w++){const _=`${f.key}_${w}`,N=t.current.querySelector(`[data-type="variable"][data-key="${_}"][data-multi-key="${f.key}"]`);if(N){const O=(N.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
37
|
+
`).trim();T.push(O)}}const C=(T[T.length-1]||"")==="";let S=!1,A=-1;for(let w=0;w<T.length-1;w++)if(T[w]===""){S=!0,A=w;break}if(S&&A>=0){const w=window.getSelection();if(w&&w.rangeCount>0){const B=w.getRangeAt(0),H=B.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const x=v.dataset.key;if(x){const M=document.createRange();M.setStartBefore(v),M.setEnd(B.startContainer,B.startOffset);const $=M.toString().length;h.current={key:x,offset:$}}}}const _=[...T];for(let B=A;B<_.length-1;B++)_[B]=_[B+1];_.pop();const N={};_.forEach((B,H)=>{B&&(N[`${f.key}_${H}`]=B)});const O=Math.max(C?_.length:_.length+1,1);t.current.querySelectorAll('[data-type="variable"]').forEach(B=>{const H=B.dataset.key,v=B.dataset.multiKey;if(H&&v!==f.key){const x=(B.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
38
|
+
`).trim();x&&(N[H]=x)}}),t.current.__tempVariableValues=N,E(B=>({...B,[f.key]:O}));return}if(!C){const w=g-1,_=`${f.key}_${w}`,N=t.current.querySelector(`[data-type="variable"][data-key="${_}"][data-multi-key="${f.key}"]`);if(N&&(N.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
39
|
+
`).trim().length>0&&g<b){const L=window.getSelection();if(L&&L.rangeCount>0){const B=L.getRangeAt(0),H=B.startContainer,v=H.nodeType===Node.ELEMENT_NODE?H.closest('[data-type="variable"][data-multi-key]'):H.parentElement?.closest('[data-type="variable"][data-multi-key]');if(v){const x=v.dataset.key;if(x){const M=document.createRange();M.setStartBefore(v),M.setEnd(B.startContainer,B.startOffset);const $=M.toString().length;h.current={key:x,offset:$}}}}E(B=>({...B,[f.key]:g+1}))}}})},[u,e,t,l,m,o,p,h,n,r,i,s,E,a]),sl=({disabled:e,lockStructure:t,config:n,editorRef:r,handleInput:a})=>D.useCallback(i=>{if(e){i.preventDefault();return}const s=i.target;if(s&&(s.tagName==="TEXTAREA"||s.tagName==="INPUT")&&s.closest?.('[data-variable-render="antd-textarea"]'))return;if(i.key==="Enter"){const o=i.target,l=o?.closest?.('[data-type="variable"]'),m=!!o?.closest?.('[data-type="richtext"]'),p=o?.tagName==="TEXTAREA"||!!o?.closest?.('[data-type="textarea"]');if(l){const E=l.getAttribute("data-node-type")||"";if(E==="report-url"||E==="markdown"||E==="markdown-name"){i.preventDefault();return}if(!(()=>{const f=l.dataset.multiKey;if(f)return n.find(y=>y.type==="multi-variable"&&y.key===f)?.allowNewline!==!1;const b=l.dataset.key;return n.find(T=>T.type==="variable"&&T.key===b)?.allowNewline!==!1})()){i.preventDefault();return}i.preventDefault();const c=window.getSelection();if(c&&c.rangeCount>0){const f=c.getRangeAt(0);f.deleteContents();const b=document.createElement("br");f.insertNode(b);const g=document.createTextNode("");b.parentNode?.insertBefore(g,b.nextSibling),f.setStart(g,0),f.collapse(!0),c.removeAllRanges(),c.addRange(f)}a();return}if(!m&&!p){i.preventDefault();return}}const u=window.getSelection();if(u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest('[data-type="text"]'):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest('[data-type="text"]'))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(t&&u&&u.rangeCount>0){const o=u.anchorNode;let l=null;if(o&&(o.nodeType===Node.ELEMENT_NODE?l=o.closest(".tag-node"):o.nodeType===Node.TEXT_NODE&&o.parentElement&&(l=o.parentElement.closest(".tag-node"))),l){if(i.preventDefault(),i.stopPropagation(),r.current){const m=r.current.querySelector('[data-type="variable"], [data-type="upload"]');m&&m.focus()}return}}if(i.key==="Escape"&&r.current){if(t){i.preventDefault();return}r.current.innerHTML="",r.current.focus()}if(i.key==="Backspace"){const o=window.getSelection();if(o&&o.rangeCount>0){const l=o.getRangeAt(0),m=o.anchorNode;if(t){let E=null,h=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?(E=m.closest(".tag-node"),h=m.closest('[data-type="text"]')):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(E=m.parentElement.closest(".tag-node"),h=m.parentElement.closest('[data-type="text"]'))),(E||h)&&l.collapsed&&l.startOffset===0){i.preventDefault();return}}let p=null;if(m&&(m.nodeType===Node.ELEMENT_NODE?p=m.closest('[data-type="variable"]'):m.nodeType===Node.TEXT_NODE&&m.parentElement&&(p=m.parentElement.closest('[data-type="variable"]'))),p){if(!l.collapsed)return;const E=p.innerText;if(E===""||E===""){i.preventDefault();return}if((()=>{try{const f=document.createRange();f.selectNodeContents(p),f.setEnd(l.startContainer,l.startOffset);const b=f.cloneContents(),g=document.createTreeWalker(b,NodeFilter.SHOW_ALL);for(;g.nextNode();){const T=g.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 l.startOffset===0}})()){i.preventDefault();return}if(E.startsWith("")&&l.startOffset===1){i.preventDefault();return}}}}},[n,e,r,a,t]),ol=({lockStructure:e,onAgentExit:t,editorRef:n,setPopoverVisible:r,isDraggingRef:a,mouseDownPosRef:i})=>{const s=(...E)=>{},u=E=>{try{const h=window.getSelection();if(!h)return s(E,"no selection");const c=h.rangeCount>0?h.getRangeAt(0):null;s(E,{rangeCount:h.rangeCount,isCollapsed:h.isCollapsed,anchorNode:h.anchorNode?.nodeType===Node.TEXT_NODE?"TEXT":h.anchorNode?.nodeName,anchorOffset:h.anchorOffset,focusNode:h.focusNode?.nodeType===Node.TEXT_NODE?"TEXT":h.focusNode?.nodeName,focusOffset:h.focusOffset,range:c?{startContainer:c.startContainer.nodeType===Node.TEXT_NODE?"TEXT":c.startContainer.nodeName,startOffset:c.startOffset,endContainer:c.endContainer.nodeType===Node.TEXT_NODE?"TEXT":c.endContainer.nodeName,endOffset:c.endOffset}:null})}catch{}},o=D.useCallback(E=>{const h=E.target;if(s("mousedown",{tag:h.tagName,cls:h.className}),u("before mousedown"),h.closest(".rte-datepicker-wrapper")||h.closest(".rte-datepicker-host")||h.closest(".rte-select-wrapper")||h.closest(".rte-select-host")||h.closest(".ant-select-dropdown"))return;if(h.closest(".tag-close-btn")){if(E.preventDefault(),E.stopPropagation(),e)return;r(null),t?t():n.current&&(n.current.innerHTML="",n.current.focus());return}if(e){const b=h.closest(".tag-node"),g=h.closest('[data-type="text"]');if(b||g){E.preventDefault(),E.stopPropagation();const T=window.getSelection();T&&T.removeAllRanges();return}}const f=h.closest('[data-type="variable"]');if(f){if(s("mousedown on variable",{key:f.dataset.key,multiKey:f.dataset.multiKey,nodeType:f.getAttribute("data-node-type")||"",render:f.dataset.variableRender||"v1",classes:f.className}),f.dataset.variableRender==="antd-textarea")return;const b=!!h.closest(".variable-info-icon"),g=f.classList.contains("show-placeholder")||(f.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;if(s("v1 variable mousedown",{isPlaceholder:g,isOnIcon:b,innerText:f.innerText}),g&&!b){E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mousedown)");const T=window.getSelection();if(!T)return;const y=f;y.focus();const C=document.createTreeWalker(y,NodeFilter.SHOW_TEXT),S=C.nextNode()?C.currentNode:null,A=document.createRange();S?(A.setStart(S,0),A.collapse(!0)):(A.selectNodeContents(y),A.collapse(!0)),T.removeAllRanges(),T.addRange(A),u("raf after setRange (mousedown)")});return}return}i.current={x:E.clientX,y:E.clientY},a.current=!1,h.closest(".file-remove-btn")&&(E.preventDefault(),E.stopPropagation())},[n,a,e,i,t,r]),l=D.useCallback(E=>{if(!E.target.closest('[data-type="variable"]')&&i.current){const f=Math.abs(E.clientX-i.current.x),b=Math.abs(E.clientY-i.current.y);(f>3||b>3)&&(a.current=!0)}},[a,i]),m=D.useCallback(E=>{const h=E.target;s("mouseup",{tag:h.tagName,cls:h.className}),u("before mouseup");const c=h.closest('[data-type="variable"]');if(c){if(c.dataset.variableRender!=="antd-textarea"){const f=!!h.closest(".variable-info-icon"),b=c.classList.contains("show-placeholder")||(c.innerText||"").replace(/[\u200B\n]/g,"").trim().length===0;s("v1 variable mouseup",{key:c.dataset.key,isPlaceholder:b,isOnIcon:f,classes:c.className}),b&&!f&&(E.preventDefault(),window.requestAnimationFrame(()=>{u("raf before setRange (mouseup)");const g=window.getSelection();if(!g)return;const T=c;T.focus();const y=document.createTreeWalker(T,NodeFilter.SHOW_TEXT),C=y.nextNode()?y.currentNode:null,S=document.createRange();C?(S.setStart(C,0),S.collapse(!0)):(S.selectNodeContents(T),S.collapse(!0)),g.removeAllRanges(),g.addRange(S),u("raf after setRange (mouseup)")}))}i.current=null,a.current=!1;return}i.current=null,a.current=!1},[a,i]),p=D.useCallback(E=>{const c=E.target.closest('[data-type="variable"]');if(c){const f=window.getSelection();if(f){const b=document.createRange(),g=c.textContent||"";if(g.replace(/\u200B/g,"")){let y=0,C=g.length;g.startsWith("")&&(y=1),g.endsWith("")&&g.length>1&&(C=g.length-1);const S=c.firstChild;S&&S.nodeType===Node.TEXT_NODE?(b.setStart(S,y),b.setEnd(S,C)):b.selectNodeContents(c)}else b.selectNodeContents(c),b.collapse(!0);f.removeAllRanges(),f.addRange(b)}}},[]);return{handleMouseDown:o,handleMouseMove:l,handleMouseUp:m,handleDoubleClick:p}},ul=({disabled:e,config:t,multiVariableCounts:n,setMultiVariableCounts:r,editorRef:a,handleInput:i,markdownAnalyzeRef:s,reportAnalyzeRef:u,markdownNameAnalyzeRef:o,markdownAnalyzeStateRef:l,markdownRawTextRef:m,setMarkdownAnalyzeState:p})=>D.useCallback(E=>{const h=E.target;if(h&&(h.tagName==="TEXTAREA"||h.tagName==="INPUT")&&h.closest?.('[data-variable-render="antd-textarea"]'))return;if(e){E.preventDefault();return}E.preventDefault();const f=(E.clipboardData.getData("text/plain")||"").replace(/\r\n/g,`
|
|
40
|
+
`).replace(/\n+$/g,""),b=window.getSelection();if(b&&b.rangeCount>0){const C=b.anchorNode;if(C){let S=null;if(C.nodeType===Node.ELEMENT_NODE?S=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(S=C.parentElement.closest('[data-type="variable"]')),S){const A=S.dataset.multiKey;if(A){const N=/[、,,\s\n\r\t]+/,O=f.split(N).map(L=>L.trim()).filter(L=>L.length>0);if(O.length>1){const L=parseInt(S.dataset.index||"0",10),B=t.find(j=>j.type==="multi-variable"&&j.key===A)?.maxCount||9,H=n[A]||1,v=Math.min(L+O.length,B);v>H&&r(k=>({...k,[A]:v}));const x=[];for(let k=0;k<H;k++){const j=`${A}_${k}`,J=a.current.querySelector(`[data-type="variable"][data-key="${j}"][data-multi-key="${A}"]`);if(J){const R=J.innerText.replace(/[\u200B\n]/g,"").trim();x.push(R)}}x.splice(L,1,...O.slice(0,B-L));const M=x.slice(0,B);M.length>0&&M[M.length-1]!==""&&M.length<B&&M.push("");const $=Math.max(M.length,1),U={};M.forEach((k,j)=>{k&&(U[`${A}_${j}`]=k)}),a.current.querySelectorAll('[data-type="variable"]').forEach(k=>{const j=k.dataset.key,J=k.dataset.multiKey;if(j&&J!==A){const R=k.innerText.replace(/[\u200B\n]/g,"").trim();R&&(U[j]=R)}}),a.current.__tempVariableValues=U,r(k=>({...k,[A]:$}));return}}const w=S.getAttribute("data-node-type")||"";if(!(w==="markdown"||w==="report-url"||w==="markdown-name")){const N=(()=>{const L=S.getAttribute("data-node-type")||"";if(L==="report-url"||L==="markdown"||L==="markdown-name")return!1;const B=S.dataset.multiKey;if(B)return t.find(M=>M.type==="multi-variable"&&M.key===B)?.allowNewline!==!1;const H=S.dataset.key;return t.find(x=>x.type==="variable"&&x.key===H)?.allowNewline!==!1})(),O=window.getSelection();if(O&&O.rangeCount>0){const L=O.getRangeAt(0);L.deleteContents();const B=document.createDocumentFragment(),v=(N?f:f.replace(/\n+/g," ")).split(`
|
|
41
|
+
`);for(let M=0;M<v.length;M++)B.appendChild(document.createTextNode(v[M])),N&&M<v.length-1&&B.appendChild(document.createElement("br"));L.insertNode(B),O.removeAllRanges();const x=document.createRange();x.selectNodeContents(S),x.collapse(!1),O.addRange(x)}i();return}}}}let g=!1,T="";const y=window.getSelection();if(y&&y.rangeCount>0){const C=y.anchorNode;if(C){let S=null;if(C.nodeType===Node.ELEMENT_NODE?S=C.closest('[data-type="variable"]'):C.nodeType===Node.TEXT_NODE&&C.parentElement&&(S=C.parentElement.closest('[data-type="variable"]')),S){const A=S.getAttribute("data-node-type")||"",w=S.dataset.key;if(A==="markdown"&&w&&/20\d{2}-\d{2}-\d{2}/.test(f))g=!0,T=w,m.current[w]=f,p(_=>({..._,[w]:{..._[w],status:"loading",error:void 0}}));else if(A==="report-url"&&w){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();u.current(w,_)},0);return}else if(A==="markdown-name"&&w){document.execCommand("insertText",!1,f),i(),setTimeout(()=>{const _=S.innerText.replace(/[\u200B\n]/g,"").trim();o.current(w,_)},0);return}}}}if(g&&T){setTimeout(()=>{s.current(T,f)},0);return}document.execCommand("insertText",!1,f),i(),setTimeout(()=>{/20\d{2}-\d{2}-\d{2}/.test(f)&&l.current.tableData?.status==="success"&&(p(S=>({...S,tableData:{status:"loading",modules:[],lastParsedText:f,error:void 0}})),setTimeout(()=>{m.current.tableData=f,s.current("tableData",f)},0))},0)},[t,e,a,i,s,l,m,n,u,p,r]),ll=({config:e,files:t,onSend:n,isProcessing:r,disabled:a,loading:i,isFormValid:s,editorRef:u,markdownAnalyzeState:o,markdownNameAnalyzeState:l})=>D.useCallback(()=>{if(r||a||i||!s||!u.current)return;if(e.length===0){const f=u.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";if(!f)return;if(n(f,f),u.current){u.current.textContent="";const b=new Event("input",{bubbles:!0});u.current.dispatchEvent(b)}return}const m=u.current;let p="";const E={},h=f=>{if(!(f.nodeType===Node.ELEMENT_NODE&&f.style.display==="none")){if(f.nodeType===Node.TEXT_NODE)p+=(f.textContent||"").replace(/\u200B/g,"");else if(f.nodeType===Node.ELEMENT_NODE){const b=f,g=b.dataset.type,T=b.dataset.key;if(g==="variable"&&T){let y="";const C=document.createTreeWalker(b,NodeFilter.SHOW_TEXT,{acceptNode:A=>{const w=b.querySelector(".variable-info-icon");return w&&w.contains(A)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;C.nextNode();)y+=C.currentNode.textContent||"";const S=y.replace(/[\u200B\n]/g,"").trim();if(S){const A=b.dataset.multiKey;if(A){(!E[A]||!Array.isArray(E[A]))&&(E[A]=[]);const w=E[A];w.push(S),w.length>1&&(p+=" "),p+=S}else E[T]=S,p+=S;if(b.dataset.nodeType==="report-url")if(E.url===void 0)E.url=S;else{const w=E.url;Array.isArray(w)?w.push(S):E.url=[String(w),S]}if(b.dataset.nodeType==="markdown-name"){const w=`${T}__sourceText`;E[w]===void 0&&(E[w]=S)}if(b.dataset.nodeType==="markdown"){const w=b.dataset.sourceTextKey||`${T}__sourceText`;if(E[w]===void 0)E[w]=S;else{const N=E[w];Array.isArray(N)?N.push(S):E[w]=[String(N),S]}const _=`${T}__markdown`;E[_]===void 0&&(E[_]=[ei(S)])}}}else if(g==="select"&&T){const y=(b.getAttribute("data-value")||"").trim();y&&(E[T]=y,p+=y)}else if(g==="textarea"&&T){const C=(b.value||"").replace(/\u200B/g,"").trim();C&&(E[T]=C,p+=C)}else if(g==="richtext"&&T){const y=b,C=y.dataset.nodeType,S=(y.textContent||"").replace(/\u200B/g,"").trim();if(S)if(C==="report-module"||C==="markdown-module"){(!E[T]||!Array.isArray(E[T]))&&(E[T]=[]);const A=E[T];A.push(S),A.length>1&&(p+=" "),p+=S}else E[T]=S,p+=S}else if(g==="datepicker"&&T){const C=(b.getAttribute("data-value")||"").trim();if(C)if(C.includes(",")){const S=C.split(",");S.length===2?(E[T]=S,p+=`[${S[0]}, ${S[1]}]`):(E[T]=C,p+=C)}else E[T]=C,p+=C}else if(g==="number-input"&&T){const C=(b.value||"").trim();C&&(E[T]=C,p+=C)}else if(g==="upload"&&T){const y=b.dataset.batchKey;if(y){const C=e.find(S=>S.type==="upload"&&S.key===y);if(C&&typeof C.maxCount=="number"&&typeof C.minCount=="number"){const S=[];for(let A=0;A<C.maxCount;A++){const w=`${y}-${A}`,_=t[w];_&&S.push(_)}E[y]||(E[y]=S.length>0?S:null,S.length>0&&(p+=` [附带${S.length}个文件: ${S.map(A=>A.name).join(", ")}] `))}else E[T]=t[T]??null,t[T]&&(p+=` [附带文件: ${t[T]?.name}] `)}else E[T]=t[T]??null,t[T]&&(p+=` [附带文件: ${t[T]?.name}] `)}else{if(b.classList.contains("tag-close-btn")||b.classList.contains("file-remove-btn"))return;b.getAttribute("contenteditable")==="false"&&!g&&b.classList.contains("tag-node")?p+=b.innerText:b.childNodes.forEach(h)}}}};if(m.childNodes.forEach(h),p=p.trim(),!p)return;Object.keys(o).forEach(f=>{const b=o[f];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);g.length!==0&&(E[`${f}__markdown`]=g)}),Object.keys(l).forEach(f=>{const b=l[f];if(!b||!b.modules||b.modules.length===0)return;const g=b.modules.map(T=>(T?.markdown||"").trim()).filter(T=>T.length>0);g.length!==0&&(E[`${f}__markdown`]=g)});const c=new FormData;c.append("fullPrompt",p),Object.keys(E).forEach(f=>{const b=E[f];if(b!=null)if(b instanceof File)c.append(f,b);else if(Array.isArray(b)){const g=e.some(S=>S.type==="multi-variable"&&S.key===f),T=e.some(S=>S.type==="report-url"&&S.key===f),y=f.endsWith("__markdown");g||T||y||f==="url"?b.forEach(S=>{S!=null&&S!==""&&c.append(f,String(S))}):b.forEach((S,A)=>{S!=null&&(S instanceof File?c.append(`${f}[${A}]`,S):typeof S=="string"?c.append(`${f}[${A}]`,S):c.append(`${f}[${A}]`,String(S)))})}else typeof b=="string"?c.append(f,b):c.append(f,String(b))}),n(c,p)},[e,t,n,r,a,i,s,u,o,l]);function ri(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function hr(e={},t={}){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:ri(t[r])&&ri(e[r])&&Object.keys(t[r]).length>0&&hr(e[r],t[r])})}const ai={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 Et(){const e=typeof document<"u"?document:{};return hr(e,ai),e}const cl={document:ai,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 Ie(){const e=typeof window<"u"?window:{};return hr(e,cl),e}function dl(e=""){return e.trim().split(" ").filter(t=>!!t.trim())}function fl(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function ii(e,t=0){return setTimeout(e,t)}function wn(){return Date.now()}function pl(e){const t=Ie();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function hl(e,t="x"){const n=Ie();let r,a,i;const s=pl(e);return n.WebKitCSSMatrix?(a=s.transform||s.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map(u=>u.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix(a==="none"?"":a)):(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=i.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?a=i.m41:r.length===16?a=parseFloat(r[12]):a=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?a=i.m42:r.length===16?a=parseFloat(r[13]):a=parseFloat(r[5])),a||0}function In(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function ml(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Re(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let r=1;r<e.length;r+=1){const a=e[r];if(a!=null&&!ml(a)){const i=Object.keys(Object(a)).filter(s=>n.indexOf(s)<0);for(let s=0,u=i.length;s<u;s+=1){const o=i[s],l=Object.getOwnPropertyDescriptor(a,o);l!==void 0&&l.enumerable&&(In(t[o])&&In(a[o])?a[o].__swiper__?t[o]=a[o]:Re(t[o],a[o]):!In(t[o])&&In(a[o])?(t[o]={},a[o].__swiper__?t[o]=a[o]:Re(t[o],a[o])):t[o]=a[o])}}}return t}function kt(e,t,n){e.style.setProperty(t,n)}function si({swiper:e,targetPosition:t,side:n}){const r=Ie(),a=-e.translate;let i=null,s;const u=e.params.speed;e.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(e.cssModeFrameID);const o=t>a?"next":"prev",l=(p,E)=>o==="next"&&p>=E||o==="prev"&&p<=E,m=()=>{s=new Date().getTime(),i===null&&(i=s);const p=Math.max(Math.min((s-i)/u,1),0),E=.5-Math.cos(p*Math.PI)/2;let h=a+E*(t-a);if(l(h,t)&&(h=t),e.wrapperEl.scrollTo({[n]:h}),l(h,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:h})}),r.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=r.requestAnimationFrame(m)};m()}function We(e,t=""){const n=Ie(),r=[...e.children];return n.HTMLSlotElement&&e instanceof HTMLSlotElement&&r.push(...e.assignedElements()),t?r.filter(a=>a.matches(t)):r}function gl(e,t){const n=[t];for(;n.length>0;){const r=n.shift();if(e===r)return!0;n.push(...r.children,...r.shadowRoot?r.shadowRoot.children:[],...r.assignedElements?r.assignedElements():[])}}function El(e,t){const n=Ie();let r=t.contains(e);return!r&&n.HTMLSlotElement&&t instanceof HTMLSlotElement&&(r=[...t.assignedElements()].includes(e),r||(r=gl(e,t))),r}function Ln(e){try{console.warn(e);return}catch{}}function On(e,t=[]){const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:dl(t)),n}function bl(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Tl(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function ot(e,t){return Ie().getComputedStyle(e,null).getPropertyValue(t)}function Dn(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function oi(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function mr(e,t,n){const r=Ie();return e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom"))}function Ae(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function zt(e,t=""){typeof trustedTypes<"u"?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:n=>n}).createHTML(t):e.innerHTML=t}let gr;function yl(){const e=Ie(),t=Et();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ui(){return gr||(gr=yl()),gr}let Er;function xl({userAgent:e}={}){const t=ui(),n=Ie(),r=n.navigator.platform,a=e||n.navigator.userAgent,i={ios:!1,android:!1},s=n.screen.width,u=n.screen.height,o=a.match(/(Android);?[\s\/]+([\d.]+)?/);let l=a.match(/(iPad)(?!\1).*OS\s([\d_]+)/);const m=a.match(/(iPod)(.*OS\s([\d_]+))?/),p=!l&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),E=r==="Win32";let h=r==="MacIntel";const c=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l&&h&&t.touch&&c.indexOf(`${s}x${u}`)>=0&&(l=a.match(/(Version)\/([\d.]+)/),l||(l=[0,1,"13_0_0"]),h=!1),o&&!E&&(i.os="android",i.android=!0),(l||p||m)&&(i.os="ios",i.ios=!0),i}function li(e={}){return Er||(Er=xl(e)),Er}let br;function Cl(){const e=Ie(),t=li();let n=!1;function r(){const u=e.navigator.userAgent.toLowerCase();return u.indexOf("safari")>=0&&u.indexOf("chrome")<0&&u.indexOf("android")<0}if(r()){const u=String(e.navigator.userAgent);if(u.includes("Version/")){const[o,l]=u.split("Version/")[1].split(" ")[0].split(".").map(m=>Number(m));n=o<16||o===16&&l<2}}const a=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=r(),s=i||a&&t.ios;return{isSafari:n||i,needPerspectiveFix:n,need3dFix:s,isWebView:a}}function ci(){return br||(br=Cl()),br}function Sl({swiper:e,on:t,emit:n}){const r=Ie();let a=null,i=null;const s=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},u=()=>{!e||e.destroyed||!e.initialized||(a=new ResizeObserver(m=>{i=r.requestAnimationFrame(()=>{const{width:p,height:E}=e;let h=p,c=E;m.forEach(({contentBoxSize:f,contentRect:b,target:g})=>{g&&g!==e.el||(h=b?b.width:(f[0]||f).inlineSize,c=b?b.height:(f[0]||f).blockSize)}),(h!==p||c!==E)&&s()})}),a.observe(e.el))},o=()=>{i&&r.cancelAnimationFrame(i),a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null)},l=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof r.ResizeObserver<"u"){u();return}r.addEventListener("resize",s),r.addEventListener("orientationchange",l)}),t("destroy",()=>{o(),r.removeEventListener("resize",s),r.removeEventListener("orientationchange",l)})}function Al({swiper:e,extendParams:t,on:n,emit:r}){const a=[],i=Ie(),s=(l,m={})=>{const p=i.MutationObserver||i.WebkitMutationObserver,E=new p(h=>{if(e.__preventObserver__)return;if(h.length===1){r("observerUpdate",h[0]);return}const c=function(){r("observerUpdate",h[0])};i.requestAnimationFrame?i.requestAnimationFrame(c):i.setTimeout(c,0)});E.observe(l,{attributes:typeof m.attributes>"u"?!0:m.attributes,childList:e.isElement||(typeof m.childList>"u"?!0:m).childList,characterData:typeof m.characterData>"u"?!0:m.characterData}),a.push(E)},u=()=>{if(e.params.observer){if(e.params.observeParents){const l=oi(e.hostEl);for(let m=0;m<l.length;m+=1)s(l[m])}s(e.hostEl,{childList:e.params.observeSlideChildren}),s(e.wrapperEl,{attributes:!1})}},o=()=>{a.forEach(l=>{l.disconnect()}),a.splice(0,a.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",u),n("destroy",o)}var _l={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const a=n?"unshift":"push";return e.split(" ").forEach(i=>{r.eventsListeners[i]||(r.eventsListeners[i]=[]),r.eventsListeners[i][a](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function a(...i){r.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(r,i)}return a.__emitterProxy=t,r.on(e,a,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const r=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[r](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((a,i)=>{(a===t||a.__emitterProxy&&a.__emitterProxy===t)&&n.eventsListeners[r].splice(i,1)})}),n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let n,r,a;return typeof e[0]=="string"||Array.isArray(e[0])?(n=e[0],r=e.slice(1,e.length),a=t):(n=e[0].events,r=e[0].data,a=e[0].context||t),r.unshift(a),(Array.isArray(n)?n:n.split(" ")).forEach(s=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(u=>{u.apply(a,[s,...r])}),t.eventsListeners&&t.eventsListeners[s]&&t.eventsListeners[s].forEach(u=>{u.apply(a,r)})}),t}};function kl(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(ot(r,"padding-left")||0,10)-parseInt(ot(r,"padding-right")||0,10),n=n-parseInt(ot(r,"padding-top")||0,10)-parseInt(ot(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function vl(){const e=this;function t(O,L){return parseFloat(O.getPropertyValue(e.getDirectionLabel(L))||0)}const n=e.params,{wrapperEl:r,slidesEl:a,rtlTranslate:i,wrongRTL:s}=e,u=e.virtual&&n.virtual.enabled,o=u?e.virtual.slides.length:e.slides.length,l=We(a,`.${e.params.slideClass}, swiper-slide`),m=u?e.virtual.slides.length:l.length;let p=[];const E=[],h=[];let c=n.slidesOffsetBefore;typeof c=="function"&&(c=n.slidesOffsetBefore.call(e));let f=n.slidesOffsetAfter;typeof f=="function"&&(f=n.slidesOffsetAfter.call(e));const b=e.snapGrid.length,g=e.slidesGrid.length,T=e.size-c-f;let y=n.spaceBetween,C=-c,S=0,A=0;if(typeof T>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*T:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y-c-f,l.forEach(O=>{i?O.style.marginLeft="":O.style.marginRight="",O.style.marginBottom="",O.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(kt(r,"--swiper-centered-offset-before",""),kt(r,"--swiper-centered-offset-after","")),n.cssMode&&(kt(r,"--swiper-slides-offset-before",`${c}px`),kt(r,"--swiper-slides-offset-after",`${f}px`));const w=n.grid&&n.grid.rows>1&&e.grid;w?e.grid.initSlides(l):e.grid&&e.grid.unsetSlides();let _;const N=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(O=>typeof n.breakpoints[O].slidesPerView<"u").length>0;for(let O=0;O<m;O+=1){_=0;const L=l[O];if(!(L&&(w&&e.grid.updateSlide(O,L,l),ot(L,"display")==="none"))){if(u&&n.slidesPerView==="auto")n.virtual.slidesPerViewAutoSlideSize&&(_=n.virtual.slidesPerViewAutoSlideSize),_&&L&&(n.roundLengths&&(_=Math.floor(_)),L.style[e.getDirectionLabel("width")]=`${_}px`);else if(n.slidesPerView==="auto"){N&&(L.style[e.getDirectionLabel("width")]="");const B=getComputedStyle(L),H=L.style.transform,v=L.style.webkitTransform;if(H&&(L.style.transform="none"),v&&(L.style.webkitTransform="none"),n.roundLengths)_=e.isHorizontal()?mr(L,"width"):mr(L,"height");else{const x=t(B,"width"),M=t(B,"padding-left"),$=t(B,"padding-right"),U=t(B,"margin-left"),G=t(B,"margin-right"),k=B.getPropertyValue("box-sizing");if(k&&k==="border-box")_=x+U+G;else{const{clientWidth:j,offsetWidth:J}=L;_=x+M+$+U+G+(J-j)}}H&&(L.style.transform=H),v&&(L.style.webkitTransform=v),n.roundLengths&&(_=Math.floor(_))}else _=(T-(n.slidesPerView-1)*y)/n.slidesPerView,n.roundLengths&&(_=Math.floor(_)),L&&(L.style[e.getDirectionLabel("width")]=`${_}px`);L&&(L.swiperSlideSize=_),h.push(_),n.centeredSlides?(C=C+_/2+S/2+y,S===0&&O!==0&&(C=C-T/2-y),O===0&&(C=C-T/2-y),Math.abs(C)<1/1e3&&(C=0),n.roundLengths&&(C=Math.floor(C)),A%n.slidesPerGroup===0&&p.push(C),E.push(C)):(n.roundLengths&&(C=Math.floor(C)),(A-Math.min(e.params.slidesPerGroupSkip,A))%e.params.slidesPerGroup===0&&p.push(C),E.push(C),C=C+_+y),e.virtualSize+=_+y,S=_,A+=1}}if(e.virtualSize=Math.max(e.virtualSize,T)+f,i&&s&&(n.effect==="slide"||n.effect==="coverflow")&&(r.style.width=`${e.virtualSize+y}px`),n.setWrapperSize&&(r.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),w&&e.grid.updateWrapperSize(_,p),!n.centeredSlides){const O=n.slidesPerView!=="auto"&&n.slidesPerView%1!==0,L=n.snapToSlideEdge&&!n.loop&&(n.slidesPerView==="auto"||O);let B=p.length;if(L){let v;if(n.slidesPerView==="auto"){v=1;let x=0;for(let M=h.length-1;M>=0&&(x+=h[M]+(M<h.length-1?y:0),x<=T);M-=1)v=h.length-M}else v=Math.floor(n.slidesPerView);B=Math.max(m-v,0)}const H=[];for(let v=0;v<p.length;v+=1){let x=p[v];n.roundLengths&&(x=Math.floor(x)),L?v<=B&&H.push(x):p[v]<=e.virtualSize-T&&H.push(x)}p=H,Math.floor(e.virtualSize-T)-Math.floor(p[p.length-1])>1&&(L||p.push(e.virtualSize-T))}if(u&&n.loop){const O=h[0]+y;if(n.slidesPerGroup>1){const L=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),B=O*n.slidesPerGroup;for(let H=0;H<L;H+=1)p.push(p[p.length-1]+B)}for(let L=0;L<e.virtual.slidesBefore+e.virtual.slidesAfter;L+=1)n.slidesPerGroup===1&&p.push(p[p.length-1]+O),E.push(E[E.length-1]+O),e.virtualSize+=O}if(p.length===0&&(p=[0]),y!==0){const O=e.isHorizontal()&&i?"marginLeft":e.getDirectionLabel("marginRight");l.filter((L,B)=>!n.cssMode||n.loop?!0:B!==l.length-1).forEach(L=>{L.style[O]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let O=0;h.forEach(B=>{O+=B+(y||0)}),O-=y;const L=O>T?O-T:0;p=p.map(B=>B<=0?-c:B>L?L+f:B)}if(n.centerInsufficientSlides){let O=0;h.forEach(B=>{O+=B+(y||0)}),O-=y;const L=(c||0)+(f||0);if(O+L<T){const B=(T-O-L)/2;p.forEach((H,v)=>{p[v]=H-B}),E.forEach((H,v)=>{E[v]=H+B})}}if(Object.assign(e,{slides:l,snapGrid:p,slidesGrid:E,slidesSizesGrid:h}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){kt(r,"--swiper-centered-offset-before",`${-p[0]}px`),kt(r,"--swiper-centered-offset-after",`${e.size/2-h[h.length-1]/2}px`);const O=-e.snapGrid[0],L=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(B=>B+O),e.slidesGrid=e.slidesGrid.map(B=>B+L)}if(m!==o&&e.emit("slidesLengthChange"),p.length!==b&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),E.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!u&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const O=`${n.containerModifierClass}backface-hidden`,L=e.el.classList.contains(O);m<=n.maxBackfaceHiddenSlides?L||e.el.classList.add(O):L&&e.el.classList.remove(O)}}function Nl(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let a=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=u=>r?t.slides[t.getSlideIndexByData(u)]:t.slides[u];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(u=>{n.push(u)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const u=t.activeIndex+i;if(u>t.slides.length&&!r)break;n.push(s(u))}else n.push(s(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]<"u"){const u=n[i].offsetHeight;a=u>a?u:a}(a||a===0)&&(t.wrapperEl.style.height=`${a}px`)}function wl(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r<t.length;r+=1)t[r].swiperSlideOffset=(e.isHorizontal()?t[r].offsetLeft:t[r].offsetTop)-n-e.cssOverflowAdjustment()}const di=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Il(e=this&&this.translate||0){const t=this,n=t.params,{slides:r,rtlTranslate:a,snapGrid:i}=t;if(r.length===0)return;typeof r[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;a&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let u=n.spaceBetween;typeof u=="string"&&u.indexOf("%")>=0?u=parseFloat(u.replace("%",""))/100*t.size:typeof u=="string"&&(u=parseFloat(u));for(let o=0;o<r.length;o+=1){const l=r[o];let m=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(m-=r[0].swiperSlideOffset);const p=(s+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),E=(s-i[0]+(n.centeredSlides?t.minTranslate():0)-m)/(l.swiperSlideSize+u),h=-(s-m),c=h+t.slidesSizesGrid[o],f=h>=0&&h<=t.size-t.slidesSizesGrid[o],b=h>=0&&h<t.size-1||c>1&&c<=t.size||h<=0&&c>=t.size;b&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(o)),di(l,b,n.slideVisibleClass),di(l,f,n.slideFullyVisibleClass),l.progress=a?-p:p,l.originalProgress=a?-E:E}}function Ll(e){const t=this;if(typeof e>"u"){const m=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*m||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:i,isEnd:s,progressLoop:u}=t;const o=i,l=s;if(r===0)a=0,i=!0,s=!0;else{a=(e-t.minTranslate())/r;const m=Math.abs(e-t.minTranslate())<1,p=Math.abs(e-t.maxTranslate())<1;i=m||a<=0,s=p||a>=1,m&&(a=0),p&&(a=1)}if(n.loop){const m=t.getSlideIndexByData(0),p=t.getSlideIndexByData(t.slides.length-1),E=t.slidesGrid[m],h=t.slidesGrid[p],c=t.slidesGrid[t.slidesGrid.length-1],f=Math.abs(e);f>=E?u=(f-E)/c:u=(f+c-h)/c,u>1&&(u-=1)}Object.assign(t,{progress:a,progressLoop:u,isBeginning:i,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!o&&t.emit("reachBeginning toEdge"),s&&!l&&t.emit("reachEnd toEdge"),(o&&!i||l&&!s)&&t.emit("fromEdge"),t.emit("progress",a)}const Tr=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function Ol(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:a}=e,i=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,u=p=>We(r,`.${n.slideClass}${p}, swiper-slide${p}`)[0];let o,l,m;if(i)if(n.loop){let p=a-e.virtual.slidesBefore;p<0&&(p=e.virtual.slides.length+p),p>=e.virtual.slides.length&&(p-=e.virtual.slides.length),o=u(`[data-swiper-slide-index="${p}"]`)}else o=u(`[data-swiper-slide-index="${a}"]`);else s?(o=t.find(p=>p.column===a),m=t.find(p=>p.column===a+1),l=t.find(p=>p.column===a-1)):o=t[a];o&&(s||(m=Tl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!m&&(m=t[0]),l=bl(o,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!l===0&&(l=t[t.length-1]))),t.forEach(p=>{Tr(p,p===o,n.slideActiveClass),Tr(p,p===m,n.slideNextClass),Tr(p,p===l,n.slidePrevClass)}),e.emitSlidesClasses()}const Pn=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let a=r.querySelector(`.${e.params.lazyPreloaderClass}`);!a&&e.isElement&&(r.shadowRoot?a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(a=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),a&&!a.lazyPreloaderManaged&&a.remove())})),a&&!a.lazyPreloaderManaged&&a.remove()}},yr=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},xr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),a=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=a,u=[s-t];u.push(...Array.from({length:t}).map((o,l)=>s+r+l)),e.slides.forEach((o,l)=>{u.includes(o.column)&&yr(e,l)});return}const i=a+r-1;if(e.params.rewind||e.params.loop)for(let s=a-t;s<=i+t;s+=1){const u=(s%n+n)%n;(u<a||u>i)&&yr(e,u)}else for(let s=Math.max(a-t,0);s<=Math.min(i+t,n-1);s+=1)s!==a&&(s>i||s<a)&&yr(e,s)};function Dl(e){const{slidesGrid:t,params:n}=e,r=e.rtlTranslate?e.translate:-e.translate;let a;for(let i=0;i<t.length;i+=1)typeof t[i+1]<"u"?r>=t[i]&&r<t[i+1]-(t[i+1]-t[i])/2?a=i:r>=t[i]&&r<t[i+1]&&(a=i+1):r>=t[i]&&(a=i);return n.normalizeSlideIndex&&(a<0||typeof a>"u")&&(a=0),a}function Pl(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:a,activeIndex:i,realIndex:s,snapIndex:u}=t;let o=e,l;const m=h=>{let c=h-t.virtual.slidesBefore;return c<0&&(c=t.virtual.slides.length+c),c>=t.virtual.slides.length&&(c-=t.virtual.slides.length),c};if(typeof o>"u"&&(o=Dl(t)),r.indexOf(n)>=0)l=r.indexOf(n);else{const h=Math.min(a.slidesPerGroupSkip,o);l=h+Math.floor((o-h)/a.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),o===i&&!t.params.loop){l!==u&&(t.snapIndex=l,t.emit("snapIndexChange"));return}if(o===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=m(o);return}const p=t.grid&&a.grid&&a.grid.rows>1;let E;if(t.virtual&&a.virtual.enabled)a.loop?E=m(o):E=o;else if(p){const h=t.slides.find(f=>f.column===o);let c=parseInt(h.getAttribute("data-swiper-slide-index"),10);Number.isNaN(c)&&(c=Math.max(t.slides.indexOf(h),0)),E=Math.floor(c/a.grid.rows)}else if(t.slides[o]){const h=t.slides[o].getAttribute("data-swiper-slide-index");h?E=parseInt(h,10):E=o}else E=o;Object.assign(t,{previousSnapIndex:u,snapIndex:l,previousRealIndex:s,realIndex:E,previousIndex:i,activeIndex:o}),t.initialized&&xr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==E&&t.emit("realIndexChange"),t.emit("slideChange"))}function Ml(e,t){const n=this,r=n.params;let a=e.closest(`.${r.slideClass}, swiper-slide`);!a&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(u=>{!a&&u.matches&&u.matches(`.${r.slideClass}, swiper-slide`)&&(a=u)});let i=!1,s;if(a){for(let u=0;u<n.slides.length;u+=1)if(n.slides[u]===a){i=!0,s=u;break}}if(a&&i)n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(a.getAttribute("data-swiper-slide-index"),10):n.clickedIndex=s;else{n.clickedSlide=void 0,n.clickedIndex=void 0;return}r.slideToClickedSlide&&n.clickedIndex!==void 0&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}var Bl={updateSize:kl,updateSlides:vl,updateAutoHeight:Nl,updateSlidesOffset:wl,updateSlidesProgress:Il,updateProgress:Ll,updateSlidesClasses:Ol,updateActiveIndex:Pl,updateClickedSlide:Ml};function Rl(e=this.isHorizontal()?"x":"y"){const t=this,{params:n,rtlTranslate:r,translate:a,wrapperEl:i}=t;if(n.virtualTranslate)return r?-a:a;if(n.cssMode)return a;let s=hl(i,e);return s+=t.cssOverflowAdjustment(),r&&(s=-s),s||0}function Fl(e,t){const n=this,{rtlTranslate:r,params:a,wrapperEl:i,progress:s}=n;let u=0,o=0;const l=0;n.isHorizontal()?u=r?-e:e:o=e,a.roundLengths&&(u=Math.floor(u),o=Math.floor(o)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?u:o,a.cssMode?i[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-u:-o:a.virtualTranslate||(n.isHorizontal()?u-=n.cssOverflowAdjustment():o-=n.cssOverflowAdjustment(),i.style.transform=`translate3d(${u}px, ${o}px, ${l}px)`);let m;const p=n.maxTranslate()-n.minTranslate();p===0?m=0:m=(e-n.minTranslate())/p,m!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function Hl(){return-this.snapGrid[0]}function $l(){return-this.snapGrid[this.snapGrid.length-1]}function Ul(e=0,t=this.params.speed,n=!0,r=!0,a){const i=this,{params:s,wrapperEl:u}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;const o=i.minTranslate(),l=i.maxTranslate();let m;if(r&&e>o?m=o:r&&e<l?m=l:m=e,i.updateProgress(m),s.cssMode){const p=i.isHorizontal();if(t===0)u[p?"scrollLeft":"scrollTop"]=-m;else{if(!i.support.smoothScroll)return si({swiper:i,targetPosition:-m,side:p?"left":"top"}),!0;u.scrollTo({[p?"left":"top"]:-m,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(m),n&&(i.emit("beforeTransitionStart",t,a),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(E){!i||i.destroyed||E.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,n&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}var ql={getTranslate:Rl,setTranslate:Fl,minTranslate:Hl,maxTranslate:$l,translateTo:Ul};function zl(e,t){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=`${e}ms`,n.wrapperEl.style.transitionDelay=e===0?"0ms":""),n.emit("setTransition",e,t)}function fi({swiper:e,runCallbacks:t,direction:n,step:r}){const{activeIndex:a,previousIndex:i}=e;let s=n;s||(a>i?s="next":a<i?s="prev":s="reset"),e.emit(`transition${r}`),t&&s==="reset"?e.emit(`slideResetTransition${r}`):t&&a!==i&&(e.emit(`slideChangeTransition${r}`),s==="next"?e.emit(`slideNextTransition${r}`):e.emit(`slidePrevTransition${r}`))}function Vl(e=!0,t){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),fi({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function Gl(e=!0,t){const n=this,{params:r}=n;n.animating=!1,!r.cssMode&&(n.setTransition(0),fi({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var Yl={setTransition:zl,transitionStart:Vl,transitionEnd:Gl};function Wl(e=0,t,n=!0,r,a){typeof e=="string"&&(e=parseInt(e,10));const i=this;let s=e;s<0&&(s=0);const{params:u,snapGrid:o,slidesGrid:l,previousIndex:m,activeIndex:p,rtlTranslate:E,wrapperEl:h,enabled:c}=i;if(!c&&!r&&!a||i.destroyed||i.animating&&u.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);const f=Math.min(i.params.slidesPerGroupSkip,s);let b=f+Math.floor((s-f)/i.params.slidesPerGroup);b>=o.length&&(b=o.length-1);const g=-o[b];if(u.normalizeSlideIndex)for(let w=0;w<l.length;w+=1){const _=-Math.floor(g*100),N=Math.floor(l[w]*100),O=Math.floor(l[w+1]*100);typeof l[w+1]<"u"?_>=N&&_<O-(O-N)/2?s=w:_>=N&&_<O&&(s=w+1):_>=N&&(s=w)}if(i.initialized&&s!==p&&(!i.allowSlideNext&&(E?g>i.translate&&g>i.minTranslate():g<i.translate&&g<i.minTranslate())||!i.allowSlidePrev&&g>i.translate&&g>i.maxTranslate()&&(p||0)!==s))return!1;s!==(m||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(g);let T;s>p?T="next":s<p?T="prev":T="reset";const y=i.virtual&&i.params.virtual.enabled;if(!(y&&a)&&(E&&-g===i.translate||!E&&g===i.translate))return i.updateActiveIndex(s),u.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),u.effect!=="slide"&&i.setTranslate(g),T!=="reset"&&(i.transitionStart(n,T),i.transitionEnd(n,T)),!1;if(u.cssMode){const w=i.isHorizontal(),_=E?g:-g;if(t===0)y&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),y&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{h[w?"scrollLeft":"scrollTop"]=_})):h[w?"scrollLeft":"scrollTop"]=_,y&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return si({swiper:i,targetPosition:_,side:w?"left":"top"}),!0;h.scrollTo({[w?"left":"top"]:_,behavior:"smooth"})}return!0}const A=ci().isSafari;return y&&!a&&A&&i.isElement&&i.virtual.update(!1,!1,s),i.setTransition(t),i.setTranslate(g),i.updateActiveIndex(s),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,r),i.transitionStart(n,T),t===0?i.transitionEnd(n,T):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(_){!i||i.destroyed||_.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,T))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function jl(e=0,t,n=!0,r){typeof e=="string"&&(e=parseInt(e,10));const a=this;if(a.destroyed)return;typeof t>"u"&&(t=a.params.speed);const i=a.grid&&a.params.grid&&a.params.grid.rows>1;let s=e;if(a.params.loop)if(a.virtual&&a.params.virtual.enabled)s=s+a.virtual.slidesBefore;else{let u;if(i){const f=s*a.params.grid.rows;u=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===f).column}else u=a.getSlideIndexByData(s);const o=i?Math.ceil(a.slides.length/a.params.grid.rows):a.slides.length,{centeredSlides:l,slidesOffsetBefore:m,slidesOffsetAfter:p}=a.params,E=l||!!m||!!p;let h=a.params.slidesPerView;h==="auto"?h=a.slidesPerViewDynamic():(h=Math.ceil(parseFloat(a.params.slidesPerView,10)),E&&h%2===0&&(h=h+1));let c=o-u<h;if(E&&(c=c||u<Math.ceil(h/2)),r&&E&&a.params.slidesPerView!=="auto"&&!i&&(c=!1),c){const f=E?u<a.activeIndex?"prev":"next":u-a.activeIndex-1<a.params.slidesPerView?"next":"prev";a.loopFix({direction:f,slideTo:!0,activeSlideIndex:f==="next"?u+1:u-o+1,slideRealIndex:f==="next"?a.realIndex:void 0})}if(i){const f=s*a.params.grid.rows;s=a.slides.find(b=>b.getAttribute("data-swiper-slide-index")*1===f).column}else s=a.getSlideIndexByData(s)}return requestAnimationFrame(()=>{a.slideTo(s,t,n,r)}),a}function Xl(e,t=!0,n){const r=this,{enabled:a,params:i,animating:s}=r;if(!a||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let u=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(u=Math.max(r.slidesPerViewDynamic("current",!0),1));const o=r.activeIndex<i.slidesPerGroupSkip?1:u,l=r.virtual&&i.virtual.enabled;if(i.loop){if(s&&!l&&i.loopPreventsSliding)return!1;if(r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft,r.activeIndex===r.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(r.activeIndex+o,e,t,n)}),!0}return i.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+o,e,t,n)}function Kl(e,t=!0,n){const r=this,{params:a,snapGrid:i,slidesGrid:s,rtlTranslate:u,enabled:o,animating:l}=r;if(!o||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const m=r.virtual&&a.virtual.enabled;if(a.loop){if(l&&!m&&a.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const p=u?r.translate:-r.translate;function E(T){return T<0?-Math.floor(Math.abs(T)):Math.floor(T)}const h=E(p),c=i.map(T=>E(T)),f=a.freeMode&&a.freeMode.enabled;let b=i[c.indexOf(h)-1];if(typeof b>"u"&&(a.cssMode||f)){let T;i.forEach((y,C)=>{h>=y&&(T=C)}),typeof T<"u"&&(b=f?i[T]:i[T>0?T-1:T])}let g=0;if(typeof b<"u"&&(g=s.indexOf(b),g<0&&(g=r.activeIndex-1),a.slidesPerView==="auto"&&a.slidesPerGroup===1&&a.slidesPerGroupAuto&&(g=g-r.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),a.rewind&&r.isBeginning){const T=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(T,e,t,n)}else if(a.loop&&r.activeIndex===0&&a.cssMode)return requestAnimationFrame(()=>{r.slideTo(g,e,t,n)}),!0;return r.slideTo(g,e,t,n)}function Ql(e,t=!0,n){const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function Jl(e,t=!0,n,r=.5){const a=this;if(a.destroyed)return;typeof e>"u"&&(e=a.params.speed);let i=a.activeIndex;const s=Math.min(a.params.slidesPerGroupSkip,i),u=s+Math.floor((i-s)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[u]){const l=a.snapGrid[u],m=a.snapGrid[u+1];o-l>(m-l)*r&&(i+=a.params.slidesPerGroup)}else{const l=a.snapGrid[u-1],m=a.snapGrid[u];o-l<=(m-l)*r&&(i-=a.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,a.slidesGrid.length-1),a.slideTo(i,e,t,n)}function Zl(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let a=e.getSlideIndexWhenGrid(e.clickedIndex),i;const s=e.isElement?"swiper-slide":`.${t.slideClass}`,u=e.grid&&e.params.grid&&e.params.grid.rows>1;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?e.slideToLoop(i):a>(u?(e.slides.length-r)/2-(e.params.grid.rows-1):e.slides.length-r)?(e.loopFix(),a=e.getSlideIndex(We(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),ii(()=>{e.slideTo(a)})):e.slideTo(a)}else e.slideTo(a)}var ec={slideTo:Wl,slideToLoop:jl,slideNext:Xl,slidePrev:Kl,slideReset:Ql,slideToClosest:Jl,slideToClickedSlide:Zl};function tc(e,t){const n=this,{params:r,slidesEl:a}=n;if(!r.loop||n.virtual&&n.params.virtual.enabled)return;const i=()=>{We(a,`.${r.slideClass}, swiper-slide`).forEach((c,f)=>{c.setAttribute("data-swiper-slide-index",f)})},s=()=>{const h=We(a,`.${r.slideBlankClass}`);h.forEach(c=>{c.remove()}),h.length>0&&(n.recalcSlides(),n.updateSlides())},u=n.grid&&r.grid&&r.grid.rows>1;r.loopAddBlankSlides&&(r.slidesPerGroup>1||u)&&s();const o=r.slidesPerGroup*(u?r.grid.rows:1),l=n.slides.length%o!==0,m=u&&n.slides.length%r.grid.rows!==0,p=h=>{for(let c=0;c<h;c+=1){const f=n.isElement?On("swiper-slide",[r.slideBlankClass]):On("div",[r.slideClass,r.slideBlankClass]);n.slidesEl.append(f)}};if(l){if(r.loopAddBlankSlides){const h=o-n.slides.length%o;p(h),n.recalcSlides(),n.updateSlides()}else Ln("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)");i()}else if(m){if(r.loopAddBlankSlides){const h=r.grid.rows-n.slides.length%r.grid.rows;p(h),n.recalcSlides(),n.updateSlides()}else Ln("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)");i()}else i();const E=r.centeredSlides||!!r.slidesOffsetBefore||!!r.slidesOffsetAfter;n.loopFix({slideRealIndex:e,direction:E?void 0:"next",initial:t})}function nc({slideRealIndex:e,slideTo:t=!0,direction:n,setTranslate:r,activeSlideIndex:a,initial:i,byController:s,byMousewheel:u}={}){const o=this;if(!o.params.loop)return;o.emit("beforeLoopFix");const{slides:l,allowSlidePrev:m,allowSlideNext:p,slidesEl:E,params:h}=o,{centeredSlides:c,slidesOffsetBefore:f,slidesOffsetAfter:b,initialSlide:g}=h,T=c||!!f||!!b;if(o.allowSlidePrev=!0,o.allowSlideNext=!0,o.virtual&&h.virtual.enabled){t&&(!T&&o.snapIndex===0?o.slideTo(o.virtual.slides.length,0,!1,!0):T&&o.snapIndex<h.slidesPerView?o.slideTo(o.virtual.slides.length+o.snapIndex,0,!1,!0):o.snapIndex===o.snapGrid.length-1&&o.slideTo(o.virtual.slidesBefore,0,!1,!0)),o.allowSlidePrev=m,o.allowSlideNext=p,o.emit("loopFix");return}let y=h.slidesPerView;y==="auto"?y=o.slidesPerViewDynamic():(y=Math.ceil(parseFloat(h.slidesPerView,10)),T&&y%2===0&&(y=y+1));const C=h.slidesPerGroupAuto?y:h.slidesPerGroup;let S=T?Math.max(C,Math.ceil(y/2)):C;S%C!==0&&(S+=C-S%C),S+=h.loopAdditionalSlides,o.loopedSlides=S;const A=o.grid&&h.grid&&h.grid.rows>1;l.length<y+S||o.params.effect==="cards"&&l.length<y+S*2?Ln("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&&h.grid.fill==="row"&&Ln("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const w=[],_=[],N=A?Math.ceil(l.length/h.grid.rows):l.length,O=i&&N-g<y&&!T;let L=O?g:o.activeIndex;typeof a>"u"?a=o.getSlideIndex(l.find(U=>U.classList.contains(h.slideActiveClass))):L=a;const B=n==="next"||!n,H=n==="prev"||!n;let v=0,x=0;const $=(A?l[a].column:a)+(T&&typeof r>"u"?-y/2+.5:0);if($<S){v=Math.max(S-$,C);for(let U=0;U<S-$;U+=1){const G=U-Math.floor(U/N)*N;if(A){const k=N-G-1;for(let j=l.length-1;j>=0;j-=1)l[j].column===k&&w.push(j)}else w.push(N-G-1)}}else if($+y>N-S){x=Math.max($-(N-S*2),C),O&&(x=Math.max(x,y-N+g+1));for(let U=0;U<x;U+=1){const G=U-Math.floor(U/N)*N;A?l.forEach((k,j)=>{k.column===G&&_.push(j)}):_.push(G)}}if(o.__preventObserver__=!0,requestAnimationFrame(()=>{o.__preventObserver__=!1}),o.params.effect==="cards"&&l.length<y+S*2&&(_.includes(a)&&_.splice(_.indexOf(a),1),w.includes(a)&&w.splice(w.indexOf(a),1)),H&&w.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.prepend(l[U]),l[U].swiperLoopMoveDOM=!1}),B&&_.forEach(U=>{l[U].swiperLoopMoveDOM=!0,E.append(l[U]),l[U].swiperLoopMoveDOM=!1}),o.recalcSlides(),h.slidesPerView==="auto"?o.updateSlides():A&&(w.length>0&&H||_.length>0&&B)&&o.slides.forEach((U,G)=>{o.grid.updateSlide(G,U,o.slides)}),h.watchSlidesProgress&&o.updateSlidesOffset(),t){if(w.length>0&&H){if(typeof e>"u"){const U=o.slidesGrid[L],k=o.slidesGrid[L+v]-U;u?o.setTranslate(o.translate-k):(o.slideTo(L+Math.ceil(v),0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else if(r){const U=A?w.length/h.grid.rows:w.length;o.slideTo(o.activeIndex+U,0,!1,!0),o.touchEventsData.currentTranslate=o.translate}}else if(_.length>0&&B)if(typeof e>"u"){const U=o.slidesGrid[L],k=o.slidesGrid[L-x]-U;u?o.setTranslate(o.translate-k):(o.slideTo(L-x,0,!1,!0),r&&(o.touchEventsData.startTranslate=o.touchEventsData.startTranslate-k,o.touchEventsData.currentTranslate=o.touchEventsData.currentTranslate-k))}else{const U=A?_.length/h.grid.rows:_.length;o.slideTo(o.activeIndex-U,0,!1,!0)}}if(o.allowSlidePrev=m,o.allowSlideNext=p,o.controller&&o.controller.control&&!s){const U={slideRealIndex:e,direction:n,setTranslate:r,activeSlideIndex:a,byController:!0};Array.isArray(o.controller.control)?o.controller.control.forEach(G=>{!G.destroyed&&G.params.loop&&G.loopFix({...U,slideTo:G.params.slidesPerView===h.slidesPerView?t:!1})}):o.controller.control instanceof o.constructor&&o.controller.control.params.loop&&o.controller.control.loopFix({...U,slideTo:o.controller.control.params.slidesPerView===h.slidesPerView?t:!1})}o.emit("loopFix")}function rc(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||!n||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(a=>{const i=typeof a.swiperSlideIndex>"u"?a.getAttribute("data-swiper-slide-index")*1:a.swiperSlideIndex;r[i]=a}),e.slides.forEach(a=>{a.removeAttribute("data-swiper-slide-index")}),r.forEach(a=>{n.append(a)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var ac={loopCreate:tc,loopFix:nc,loopDestroy:rc};function ic(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function sc(){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 oc={setGrabCursor:ic,unsetGrabCursor:sc};function uc(e,t=this){function n(r){if(!r||r===Et()||r===Ie())return null;r.assignedSlot&&(r=r.assignedSlot);const a=r.closest(e);return!a&&!r.getRootNode?null:a||n(r.getRootNode().host)}return n(t)}function pi(e,t,n){const r=Ie(),{params:a}=e,i=a.edgeSwipeDetection,s=a.edgeSwipeThreshold;return i&&(n<=s||n>=r.innerWidth-s)?i==="prevent"?(t.preventDefault(),!0):!1:!0}function lc(e){const t=this,n=Et();let r=e;r.originalEvent&&(r=r.originalEvent);const a=t.touchEventsData;if(r.type==="pointerdown"){if(a.pointerId!==null&&a.pointerId!==r.pointerId)return;a.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(a.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){pi(t,r,r.targetTouches[0].pageX);return}const{params:i,touches:s,enabled:u}=t;if(!u||!i.simulateTouch&&r.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let o=r.target;if(i.touchEventsTarget==="wrapper"&&!El(o,t.wrapperEl)||"which"in r&&r.which===3||"button"in r&&r.button>0||a.isTouched&&a.isMoved)return;const l=!!i.noSwipingClass&&i.noSwipingClass!=="",m=r.composedPath?r.composedPath():r.path;l&&r.target&&r.target.shadowRoot&&m&&(o=m[0]);const p=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,E=!!(r.target&&r.target.shadowRoot);if(i.noSwiping&&(E?uc(p,o):o.closest(p))){t.allowClick=!0;return}if(i.swipeHandler&&!o.closest(i.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const h=s.currentX,c=s.currentY;if(!pi(t,r,h))return;Object.assign(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=h,s.startY=c,a.touchStartTime=wn(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(a.allowThresholdMove=!1);let f=!0;o.matches(a.focusableElements)&&(f=!1,o.nodeName==="SELECT"&&(a.isTouched=!1)),n.activeElement&&n.activeElement.matches(a.focusableElements)&&n.activeElement!==o&&(r.pointerType==="mouse"||r.pointerType!=="mouse"&&!o.matches(a.focusableElements))&&n.activeElement.blur();const b=f&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||b)&&!o.isContentEditable&&r.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function cc(e){const t=Et(),n=this,r=n.touchEventsData,{params:a,touches:i,rtlTranslate:s,enabled:u}=n;if(!u||!a.simulateTouch&&e.pointerType==="mouse")return;let o=e;if(o.originalEvent&&(o=o.originalEvent),o.type==="pointermove"&&(r.touchId!==null||o.pointerId!==r.pointerId))return;let l;if(o.type==="touchmove"){if(l=[...o.changedTouches].find(S=>S.identifier===r.touchId),!l||l.identifier!==r.touchId)return}else l=o;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",o);return}const m=l.pageX,p=l.pageY;if(o.preventedByNestedSwiper){i.startX=m,i.startY=p;return}if(!n.allowTouchMove){o.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p}),r.touchStartTime=wn());return}if(a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(p<i.startY&&n.translate<=n.maxTranslate()||p>i.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else{if(s&&(m>i.startX&&-n.translate<=n.maxTranslate()||m<i.startX&&-n.translate>=n.minTranslate()))return;if(!s&&(m<i.startX&&n.translate<=n.maxTranslate()||m>i.startX&&n.translate>=n.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(r.focusableElements)&&t.activeElement!==o.target&&o.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&o.target===t.activeElement&&o.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",o),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=m,i.currentY=p;const E=i.currentX-i.startX,h=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(E**2+h**2)<n.params.threshold)return;if(typeof r.isScrolling>"u"){let S;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?r.isScrolling=!1:E*E+h*h>=25&&(S=Math.atan2(Math.abs(h),Math.abs(E))*180/Math.PI,r.isScrolling=n.isHorizontal()?S>a.touchAngle:90-S>a.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",o),typeof r.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(r.startMoving=!0),r.isScrolling||o.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!a.cssMode&&o.cancelable&&o.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&o.stopPropagation();let c=n.isHorizontal()?E:h,f=n.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;a.oneWayMovement&&(c=Math.abs(c)*(s?1:-1),f=Math.abs(f)*(s?1:-1)),i.diff=c,c*=a.touchRatio,s&&(c=-c,f=-f);const b=n.touchesDirection;n.swipeDirection=c>0?"prev":"next",n.touchesDirection=f>0?"prev":"next";const g=n.params.loop&&!a.cssMode,T=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(g&&T&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const S=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});n.wrapperEl.dispatchEvent(S)}r.allowMomentumBounce=!1,a.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",o)}if(new Date().getTime(),a._loopSwapReset!==!1&&r.isMoved&&r.allowThresholdMove&&b!==n.touchesDirection&&g&&T&&Math.abs(c)>=1){Object.assign(i,{startX:m,startY:p,currentX:m,currentY:p,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",o),r.isMoved=!0,r.currentTranslate=c+r.startTranslate;let y=!0,C=a.resistanceRatio;if(a.touchReleaseOnEdges&&(C=0),c>0?(g&&T&&r.allowThresholdMove&&r.currentTranslate>(a.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]-(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.activeIndex+1]+n.params.spaceBetween:0)-n.params.spaceBetween:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(y=!1,a.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+c)**C))):c<0&&(g&&T&&r.allowThresholdMove&&r.currentTranslate<(a.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween+(a.slidesPerView!=="auto"&&n.slides.length-a.slidesPerView>=2?n.slidesSizesGrid[n.slidesSizesGrid.length-1]+n.params.spaceBetween:0):n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(a.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(a.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(y=!1,a.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-c)**C))),y&&(o.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),a.threshold>0)if(Math.abs(c)>a.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,r.currentTranslate=r.startTranslate,i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{r.currentTranslate=r.startTranslate;return}!a.followFinger||a.cssMode||((a.freeMode&&a.freeMode.enabled&&n.freeMode||a.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&a.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function dc(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let a;if(r.type==="touchend"||r.type==="touchcancel"){if(a=[...r.changedTouches].find(S=>S.identifier===n.touchId),!a||a.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;a=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:u,rtlTranslate:o,slidesGrid:l,enabled:m}=t;if(!m||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const p=wn(),E=p-n.touchStartTime;if(t.allowClick){const S=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(S&&S[0]||r.target,S),t.emit("tap click",r),E<300&&p-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=wn(),ii(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||u.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let h;if(s.followFinger?h=o?t.translate:-t.translate:h=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:h});return}const c=h>=-t.maxTranslate()&&!t.params.loop;let f=0,b=t.slidesSizesGrid[0];for(let S=0;S<l.length;S+=S<s.slidesPerGroupSkip?1:s.slidesPerGroup){const A=S<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof l[S+A]<"u"?(c||h>=l[S]&&h<l[S+A])&&(f=S,b=l[S+A]-l[S]):(c||h>=l[S])&&(f=S,b=l[l.length-1]-l[l.length-2])}let g=null,T=null;s.rewind&&(t.isBeginning?T=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const y=(h-l[f])/b,C=f<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(E>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:f+C):t.slideTo(f)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(f+C):T!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(T):t.slideTo(f))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(f+C):t.slideTo(f):(t.swipeDirection==="next"&&t.slideTo(g!==null?g:f+C),t.swipeDirection==="prev"&&t.slideTo(T!==null?T:f))}}function hi(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:a,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const u=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!u?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?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=a,e.allowSlideNext=r,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function fc(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function pc(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)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 a;const i=e.maxTranslate()-e.minTranslate();i===0?a=0:a=(e.translate-e.minTranslate())/i,a!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function hc(e){const t=this;Pn(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function mc(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const mi=(e,t)=>{const n=Et(),{params:r,el:a,wrapperEl:i,device:s}=e,u=!!r.nested,o=t==="on"?"addEventListener":"removeEventListener",l=t;!a||typeof a=="string"||(n[o]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:u}),a[o]("touchstart",e.onTouchStart,{passive:!1}),a[o]("pointerdown",e.onTouchStart,{passive:!1}),n[o]("touchmove",e.onTouchMove,{passive:!1,capture:u}),n[o]("pointermove",e.onTouchMove,{passive:!1,capture:u}),n[o]("touchend",e.onTouchEnd,{passive:!0}),n[o]("pointerup",e.onTouchEnd,{passive:!0}),n[o]("pointercancel",e.onTouchEnd,{passive:!0}),n[o]("touchcancel",e.onTouchEnd,{passive:!0}),n[o]("pointerout",e.onTouchEnd,{passive:!0}),n[o]("pointerleave",e.onTouchEnd,{passive:!0}),n[o]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&a[o]("click",e.onClick,!0),r.cssMode&&i[o]("scroll",e.onScroll),r.updateOnWindowResize?e[l](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",hi,!0):e[l]("observerUpdate",hi,!0),a[o]("load",e.onLoad,{capture:!0}))};function gc(){const e=this,{params:t}=e;e.onTouchStart=lc.bind(e),e.onTouchMove=cc.bind(e),e.onTouchEnd=dc.bind(e),e.onDocumentTouchStart=mc.bind(e),t.cssMode&&(e.onScroll=pc.bind(e)),e.onClick=fc.bind(e),e.onLoad=hc.bind(e),mi(e,"on")}function Ec(){mi(this,"off")}var bc={attachEvents:gc,detachEvents:Ec};const gi=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function Tc(){const e=this,{realIndex:t,initialized:n,params:r,el:a}=e,i=r.breakpoints;if(!i||i&&Object.keys(i).length===0)return;const s=Et(),u=r.breakpointsBase==="window"||!r.breakpointsBase?r.breakpointsBase:"container",o=["window","container"].includes(r.breakpointsBase)||!r.breakpointsBase?e.el:s.querySelector(r.breakpointsBase),l=e.getBreakpoint(i,u,o);if(!l||e.currentBreakpoint===l)return;const p=(l in i?i[l]:void 0)||e.originalParams,E=gi(e,r),h=gi(e,p),c=e.params.grabCursor,f=p.grabCursor,b=r.enabled;E&&!h?(a.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!E&&h&&(a.classList.add(`${r.containerModifierClass}grid`),(p.grid.fill&&p.grid.fill==="column"||!p.grid.fill&&r.grid.fill==="column")&&a.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),c&&!f?e.unsetGrabCursor():!c&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(A=>{if(typeof p[A]>"u")return;const w=r[A]&&r[A].enabled,_=p[A]&&p[A].enabled;w&&!_&&e[A].disable(),!w&&_&&e[A].enable()});const g=p.direction&&p.direction!==r.direction,T=r.loop&&(p.slidesPerView!==r.slidesPerView||g),y=r.loop;g&&n&&e.changeDirection(),Re(e.params,p);const C=e.params.enabled,S=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),b&&!C?e.disable():!b&&C&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",p),n&&(T?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!y&&S?(e.loopCreate(t),e.updateSlides()):y&&!S&&e.loopDestroy()),e.emit("breakpoint",p)}function yc(e,t="window",n){if(!e||t==="container"&&!n)return;let r=!1;const a=Ie(),i=t==="window"?a.innerHeight:n.clientHeight,s=Object.keys(e).map(u=>{if(typeof u=="string"&&u.indexOf("@")===0){const o=parseFloat(u.substr(1));return{value:i*o,point:u}}return{value:u,point:u}});s.sort((u,o)=>parseInt(u.value,10)-parseInt(o.value,10));for(let u=0;u<s.length;u+=1){const{point:o,value:l}=s[u];t==="window"?a.matchMedia(`(min-width: ${l}px)`).matches&&(r=o):l<=n.clientWidth&&(r=o)}return r||"max"}var xc={setBreakpoint:Tc,getBreakpoint:yc};function Cc(e,t){const n=[];return e.forEach(r=>{typeof r=="object"?Object.keys(r).forEach(a=>{r[a]&&n.push(t+a)}):typeof r=="string"&&n.push(t+r)}),n}function Sc(){const e=this,{classNames:t,params:n,rtl:r,el:a,device:i}=e,s=Cc(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),a.classList.add(...t),e.emitContainerClasses()}function Ac(){const e=this,{el:t,classNames:n}=e;!t||typeof t=="string"||(t.classList.remove(...n),e.emitContainerClasses())}var _c={addClasses:Sc,removeClasses:Ac};function kc(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const a=e.slides.length-1,i=e.slidesGrid[a]+e.slidesSizesGrid[a]+r*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var vc={checkOverflow:kc},Cr={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 Nc(e,t){return function(r={}){const a=Object.keys(r)[0],i=r[a];if(typeof i!="object"||i===null){Re(t,r);return}if(e[a]===!0&&(e[a]={enabled:!0}),a==="navigation"&&e[a]&&e[a].enabled&&!e[a].prevEl&&!e[a].nextEl&&(e[a].auto=!0),["pagination","scrollbar"].indexOf(a)>=0&&e[a]&&e[a].enabled&&!e[a].el&&(e[a].auto=!0),!(a in e&&"enabled"in i)){Re(t,r);return}typeof e[a]=="object"&&!("enabled"in e[a])&&(e[a].enabled=!0),e[a]||(e[a]={enabled:!1}),Re(t,r)}}const Sr={eventsEmitter:_l,update:Bl,translate:ql,transition:Yl,slide:ec,loop:ac,grabCursor:oc,events:bc,breakpoints:xc,checkOverflow:vc,classes:_c},Ar={};let _r=class it{constructor(...t){let n,r;t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?r=t[0]:[n,r]=t,r||(r={}),r=Re({},r),n&&!r.el&&(r.el=n);const a=Et();if(r.el&&typeof r.el=="string"&&a.querySelectorAll(r.el).length>1){const o=[];return a.querySelectorAll(r.el).forEach(l=>{const m=Re({},r,{el:l});o.push(new it(m))}),o}const i=this;i.__swiper__=!0,i.support=ui(),i.device=li({userAgent:r.userAgent}),i.browser=ci(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],r.modules&&Array.isArray(r.modules)&&i.modules.push(...r.modules);const s={};i.modules.forEach(o=>{o({params:r,swiper:i,extendParams:Nc(r,s),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const u=Re({},Cr,s);return i.params=Re({},u,Ar,r),i.originalParams=Re({},i.params),i.passedParams=Re({},r),i.params&&i.params.on&&Object.keys(i.params.on).forEach(o=>{i.on(o,i.params.on[o])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:n,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return i.params.direction==="horizontal"},isVertical(){return i.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:i.params.allowSlideNext,allowSlidePrev:i.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:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}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:n,params:r}=this,a=We(n,`.${r.slideClass}, swiper-slide`),i=Dn(a[0]);return Dn(t)-i}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(n=>n.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:n,params:r}=t;t.slides=We(n,`.${r.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,n){const r=this;t=Math.min(Math.max(t,0),1);const a=r.minTranslate(),s=(r.maxTranslate()-a)*t+a;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const a=t.getSlideClasses(r);n.push({slideEl:r,classNames:a}),t.emit("_slideClass",r,a)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t="current",n=!1){const r=this,{params:a,slides:i,slidesGrid:s,slidesSizesGrid:u,size:o,activeIndex:l}=r;let m=1;if(typeof a.slidesPerView=="number")return a.slidesPerView;if(a.centeredSlides){let p=i[l]?Math.ceil(i[l].swiperSlideSize):0,E;for(let h=l+1;h<i.length;h+=1)i[h]&&!E&&(p+=Math.ceil(i[h].swiperSlideSize),m+=1,p>o&&(E=!0));for(let h=l-1;h>=0;h-=1)i[h]&&!E&&(p+=i[h].swiperSlideSize,m+=1,p>o&&(E=!0))}else if(t==="current")for(let p=l+1;p<i.length;p+=1)(n?s[p]+u[p]-s[l]<o:s[p]-s[l]<o)&&(m+=1);else for(let p=l-1;p>=0;p-=1)s[l]-s[p]<o&&(m+=1);return m}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:r}=t;r.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&Pn(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function a(){const s=t.rtlTranslate?t.translate*-1:t.translate,u=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(u),t.updateActiveIndex(),t.updateSlidesClasses()}let i;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)a(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(s.length-1,0,!1,!0)}else i=t.slideTo(t.activeIndex,0,!1,!0);i||a()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n=!0){const r=this,a=r.params.direction;return t||(t=a==="horizontal"?"vertical":"horizontal"),t===a||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${a}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(i=>{t==="vertical"?i.style.width="":i.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const a=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(a()):We(r,a())[0];return!s&&n.params.createElements&&(s=On("div",n.params.wrapperClass),r.append(s),We(r,`.${n.params.slideClass}`).forEach(u=>{s.append(u)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||ot(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||ot(r,"direction")==="rtl"),wrongRTL:ot(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(void 0,!0),n.attachEvents();const a=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&a.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),a.forEach(i=>{i.complete?Pn(n,i):i.addEventListener("load",s=>{Pn(n,s.target)})}),xr(n),n.initialized=!0,xr(n),n.emit("init"),n.emit("afterInit"),n}destroy(t=!0,n=!0){const r=this,{params:a,el:i,wrapperEl:s,slides:u}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),a.loop&&r.loopDestroy(),n&&(r.removeClasses(),i&&typeof i!="string"&&i.removeAttribute("style"),s&&s.removeAttribute("style"),u&&u.length&&u.forEach(o=>{o.classList.remove(a.slideVisibleClass,a.slideFullyVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass),o.removeAttribute("style"),o.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(o=>{r.off(o)}),t!==!1&&(r.el&&typeof r.el!="string"&&(r.el.swiper=null),fl(r)),r.destroyed=!0),null}static extendDefaults(t){Re(Ar,t)}static get extendedDefaults(){return Ar}static get defaults(){return Cr}static installModule(t){it.prototype.__modules__||(it.prototype.__modules__=[]);const n=it.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>it.installModule(n)),it):(it.installModule(t),it)}};Object.keys(Sr).forEach(e=>{Object.keys(Sr[e]).forEach(t=>{_r.prototype[t]=Sr[e][t]})}),_r.use([Sl,Al]);const Ei=["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 bt(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function vt(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:bt(t[r])&&bt(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:vt(e[r],t[r]):e[r]=t[r]})}function bi(e={}){return e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function Ti(e={}){return e.pagination&&typeof e.pagination.el>"u"}function yi(e={}){return e.scrollbar&&typeof e.scrollbar.el>"u"}function xi(e=""){const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function wc(e=""){return e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Ic({swiper:e,slides:t,passedParams:n,changedParams:r,nextEl:a,prevEl:i,scrollbarEl:s,paginationEl:u}){const o=r.filter(_=>_!=="children"&&_!=="direction"&&_!=="wrapperClass"),{params:l,pagination:m,navigation:p,scrollbar:E,virtual:h,thumbs:c}=e;let f,b,g,T,y,C,S,A;r.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&l.thumbs&&(!l.thumbs.swiper||l.thumbs.swiper.destroyed)&&(f=!0),r.includes("controller")&&n.controller&&n.controller.control&&l.controller&&!l.controller.control&&(b=!0),r.includes("pagination")&&n.pagination&&(n.pagination.el||u)&&(l.pagination||l.pagination===!1)&&m&&!m.el&&(g=!0),r.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||s)&&(l.scrollbar||l.scrollbar===!1)&&E&&!E.el&&(T=!0),r.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||a)&&(l.navigation||l.navigation===!1)&&p&&!p.prevEl&&!p.nextEl&&(y=!0);const w=_=>{e[_]&&(e[_].destroy(),_==="navigation"?(e.isElement&&(e[_].prevEl.remove(),e[_].nextEl.remove()),l[_].prevEl=void 0,l[_].nextEl=void 0,e[_].prevEl=void 0,e[_].nextEl=void 0):(e.isElement&&e[_].el.remove(),l[_].el=void 0,e[_].el=void 0))};r.includes("loop")&&e.isElement&&(l.loop&&!n.loop?C=!0:!l.loop&&n.loop?S=!0:A=!0),o.forEach(_=>{if(bt(l[_])&&bt(n[_]))Object.assign(l[_],n[_]),(_==="navigation"||_==="pagination"||_==="scrollbar")&&"enabled"in n[_]&&!n[_].enabled&&w(_);else{const N=n[_];(N===!0||N===!1)&&(_==="navigation"||_==="pagination"||_==="scrollbar")?N===!1&&w(_):l[_]=n[_]}}),o.includes("controller")&&!b&&e.controller&&e.controller.control&&l.controller&&l.controller.control&&(e.controller.control=l.controller.control),r.includes("children")&&t&&h&&l.virtual.enabled?(h.slides=t,h.update(!0)):r.includes("virtual")&&h&&l.virtual.enabled&&(t&&(h.slides=t),h.update(!0)),r.includes("children")&&t&&l.loop&&(A=!0),f&&c.init()&&c.update(!0),b&&(e.controller.control=l.controller.control),g&&(e.isElement&&(!u||typeof u=="string")&&(u=document.createElement("div"),u.classList.add("swiper-pagination"),u.part.add("pagination"),e.el.appendChild(u)),u&&(l.pagination.el=u),m.init(),m.render(),m.update()),T&&(e.isElement&&(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-scrollbar"),s.part.add("scrollbar"),e.el.appendChild(s)),s&&(l.scrollbar.el=s),E.init(),E.updateSize(),E.setTranslate()),y&&(e.isElement&&((!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-button-next"),zt(a,e.navigation.arrowSvg),a.part.add("button-next"),e.el.appendChild(a)),(!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-button-prev"),zt(i,e.navigation.arrowSvg),i.part.add("button-prev"),e.el.appendChild(i))),a&&(l.navigation.nextEl=a),i&&(l.navigation.prevEl=i),p.init(),p.update()),r.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),r.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),r.includes("direction")&&e.changeDirection(n.direction,!1),(C||A)&&e.loopDestroy(),(S||A)&&e.loopCreate(),e.update()}function Lc(e={},t=!0){const n={on:{}},r={},a={};vt(n,Cr),n._emitClasses=!0,n.init=!1;const i={},s=Ei.map(o=>o.replace(/_/,"")),u=Object.assign({},e);return Object.keys(u).forEach(o=>{typeof e[o]>"u"||(s.indexOf(o)>=0?bt(e[o])?(n[o]={},a[o]={},vt(n[o],e[o]),vt(a[o],e[o])):(n[o]=e[o],a[o]=e[o]):o.search(/on[A-Z]/)===0&&typeof e[o]=="function"?t?r[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:n.on[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:i[o]=e[o])}),["navigation","pagination","scrollbar"].forEach(o=>{n[o]===!0&&(n[o]={}),n[o]===!1&&delete n[o]}),{params:n,passedParams:a,rest:i,events:r}}function Oc({el:e,nextEl:t,prevEl:n,paginationEl:r,scrollbarEl:a,swiper:i},s){bi(s)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),Ti(s)&&r&&(i.params.pagination.el=r,i.originalParams.pagination.el=r),yi(s)&&a&&(i.params.scrollbar.el=a,i.originalParams.scrollbar.el=a),i.init(e)}function Dc(e,t,n,r,a){const i=[];if(!t)return i;const s=o=>{i.indexOf(o)<0&&i.push(o)};if(n&&r){const o=r.map(a),l=n.map(a);o.join("")!==l.join("")&&s("children"),r.length!==n.length&&s("children")}return Ei.filter(o=>o[0]==="_").map(o=>o.replace(/_/,"")).forEach(o=>{if(o in e&&o in t)if(bt(e[o])&&bt(t[o])){const l=Object.keys(e[o]),m=Object.keys(t[o]);l.length!==m.length?s(o):(l.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}),m.forEach(p=>{e[o][p]!==t[o][p]&&s(o)}))}else e[o]!==t[o]&&s(o)}),i}const Pc=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 Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mn.apply(this,arguments)}function Ci(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Si(e){const t=[];return D.Children.toArray(e).forEach(n=>{Ci(n)?t.push(n):n.props&&n.props.children&&Si(n.props.children).forEach(r=>t.push(r))}),t}function Mc(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return D.Children.toArray(e).forEach(r=>{if(Ci(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const a=Si(r.props.children);a.length>0?a.forEach(i=>t.push(i)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function Bc(e,t,n){if(!n)return null;const r=m=>{let p=m;return m<0?p=t.length+m:p>=t.length&&(p=p-t.length),p},a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:i,to:s}=n,u=e.params.loop?-t.length:0,o=e.params.loop?t.length*2:t.length,l=[];for(let m=u;m<o;m+=1)m>=i&&m<=s&&l.push(t[r(m)]);return l.map((m,p)=>D.cloneElement(m,{swiper:e,style:a,key:m.props.virtualIndex||m.key||`slide-${p}`}))}function Vt(e,t){return typeof window>"u"?D.useEffect(e,t):D.useLayoutEffect(e,t)}const Ai=D.createContext(null),Rc=D.createContext(null),_i=D.forwardRef(({className:e,tag:t="div",wrapperTag:n="div",children:r,onSwiper:a,...i}={},s)=>{let u=!1;const[o,l]=D.useState("swiper"),[m,p]=D.useState(null),[E,h]=D.useState(!1),c=D.useRef(!1),f=D.useRef(null),b=D.useRef(null),g=D.useRef(null),T=D.useRef(null),y=D.useRef(null),C=D.useRef(null),S=D.useRef(null),A=D.useRef(null),{params:w,passedParams:_,rest:N,events:O}=Lc(i),{slides:L,slots:B}=Mc(r),H=()=>{h(!E)};Object.assign(w.on,{_containerClasses(U,G){l(G)}});const v=()=>{Object.assign(w.on,O),u=!0;const U={...w};if(delete U.wrapperClass,b.current=new _r(U),b.current.virtual&&b.current.params.virtual.enabled){b.current.virtual.slides=L;const G={cache:!1,slides:L,renderExternal:p,renderExternalUpdate:!1};vt(b.current.params.virtual,G),vt(b.current.originalParams.virtual,G)}};f.current||v(),b.current&&b.current.on("_beforeBreakpoint",H);const x=()=>{u||!O||!b.current||Object.keys(O).forEach(U=>{b.current.on(U,O[U])})},M=()=>{!O||!b.current||Object.keys(O).forEach(U=>{b.current.off(U,O[U])})};D.useEffect(()=>()=>{b.current&&b.current.off("_beforeBreakpoint",H)}),D.useEffect(()=>{!c.current&&b.current&&(b.current.emitSlidesClasses(),c.current=!0)}),Vt(()=>{if(s&&(s.current=f.current),!!f.current)return b.current.destroyed&&v(),Oc({el:f.current,nextEl:y.current,prevEl:C.current,paginationEl:S.current,scrollbarEl:A.current,swiper:b.current},w),a&&!b.current.destroyed&&a(b.current),()=>{b.current&&!b.current.destroyed&&b.current.destroy(!0,!1)}},[]),Vt(()=>{x();const U=Dc(_,g.current,L,T.current,G=>G.key);return g.current=_,T.current=L,U.length&&b.current&&!b.current.destroyed&&Ic({swiper:b.current,slides:L,passedParams:_,changedParams:U,nextEl:y.current,prevEl:C.current,scrollbarEl:A.current,paginationEl:S.current}),()=>{M()}}),Vt(()=>{Pc(b.current)},[m]);function $(){return w.virtual?Bc(b.current,L,m):L.map((U,G)=>D.cloneElement(U,{swiper:b.current,swiperSlideIndex:G}))}return D.createElement(t,Mn({ref:f,className:xi(`${o}${e?` ${e}`:""}`)},N),D.createElement(Rc.Provider,{value:b.current},B["container-start"],D.createElement(n,{className:wc(w.wrapperClass)},B["wrapper-start"],$(),B["wrapper-end"]),bi(w)&&D.createElement(D.Fragment,null,D.createElement("div",{ref:C,className:"swiper-button-prev"}),D.createElement("div",{ref:y,className:"swiper-button-next"})),yi(w)&&D.createElement("div",{ref:A,className:"swiper-scrollbar"}),Ti(w)&&D.createElement("div",{ref:S,className:"swiper-pagination"}),B["container-end"]))});_i.displayName="Swiper";const ki=D.forwardRef(({tag:e="div",children:t,className:n="",swiper:r,zoom:a,lazy:i,virtualIndex:s,swiperSlideIndex:u,...o}={},l)=>{const m=D.useRef(null),[p,E]=D.useState("swiper-slide"),[h,c]=D.useState(!1);function f(y,C,S){C===m.current&&E(S)}Vt(()=>{if(typeof u<"u"&&(m.current.swiperSlideIndex=u),l&&(l.current=m.current),!(!m.current||!r)){if(r.destroyed){p!=="swiper-slide"&&E("swiper-slide");return}return r.on("_slideClass",f),()=>{r&&r.off("_slideClass",f)}}}),Vt(()=>{r&&m.current&&!r.destroyed&&E(r.getSlideClasses(m.current))},[r]);const b={isActive:p.indexOf("swiper-slide-active")>=0,isVisible:p.indexOf("swiper-slide-visible")>=0,isPrev:p.indexOf("swiper-slide-prev")>=0,isNext:p.indexOf("swiper-slide-next")>=0},g=()=>typeof t=="function"?t(b):t,T=()=>{c(!0)};return D.createElement(e,Mn({ref:m,className:xi(`${p}${n?` ${n}`:""}`),"data-swiper-slide-index":s,onLoad:T},o),a&&D.createElement(Ai.Provider,{value:b},D.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof a=="number"?a:void 0},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}}))),!a&&D.createElement(Ai.Provider,{value:b},g(),i&&!h&&D.createElement("div",{className:"swiper-lazy-preloader",ref:y=>{y&&(y.lazyPreloaderManaged=!0)}})))});ki.displayName="SwiperSlide";function vi(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(a=>{if(!n[a]&&n.auto===!0){let i=We(e.el,`.${r[a]}`)[0];i||(i=On("div",r[a]),i.className=r[a],e.el.append(i)),n[a]=i,t[a]=i}}),n}const Ni='<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 Fc({swiper:e,extendParams:t,on:n,emit:r}){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:Ni};function a(h){let c;return h&&typeof h=="string"&&e.isElement&&(c=e.el.querySelector(h)||e.hostEl.querySelector(h),c)?c:(h&&(typeof h=="string"&&(c=[...document.querySelectorAll(h)]),e.params.uniqueNavElements&&typeof h=="string"&&c&&c.length>1&&e.el.querySelectorAll(h).length===1?c=e.el.querySelector(h):c&&c.length===1&&(c=c[0])),h&&!c?h:c)}function i(h,c){const f=e.params.navigation;h=Ae(h),h.forEach(b=>{b&&(b.classList[c?"add":"remove"](...f.disabledClass.split(" ")),b.tagName==="BUTTON"&&(b.disabled=c),e.params.watchOverflow&&e.enabled&&b.classList[e.isLocked?"add":"remove"](f.lockClass))})}function s(){const{nextEl:h,prevEl:c}=e.navigation;if(e.params.loop){i(c,!1),i(h,!1);return}i(c,e.isBeginning&&!e.params.rewind),i(h,e.isEnd&&!e.params.rewind)}function u(h){h.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),r("navigationPrev"))}function o(h){h.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),r("navigationNext"))}function l(){const h=e.params.navigation;if(e.params.navigation=vi(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(h.nextEl||h.prevEl))return;let c=a(h.nextEl),f=a(h.prevEl);Object.assign(e.navigation,{nextEl:c,prevEl:f}),c=Ae(c),f=Ae(f);const b=(g,T)=>{if(g){if(h.addIcons&&g.matches(".swiper-button-next,.swiper-button-prev")&&!g.querySelector("svg")){const y=document.createElement("div");zt(y,Ni),g.appendChild(y.querySelector("svg")),y.remove()}g.addEventListener("click",T==="next"?o:u)}!e.enabled&&g&&g.classList.add(...h.lockClass.split(" "))};c.forEach(g=>b(g,"next")),f.forEach(g=>b(g,"prev"))}function m(){let{nextEl:h,prevEl:c}=e.navigation;h=Ae(h),c=Ae(c);const f=(b,g)=>{b.removeEventListener("click",g==="next"?o:u),b.classList.remove(...e.params.navigation.disabledClass.split(" "))};h.forEach(b=>f(b,"next")),c.forEach(b=>f(b,"prev"))}n("init",()=>{e.params.navigation.enabled===!1?E():(l(),s())}),n("toEdge fromEdge lock unlock",()=>{s()}),n("destroy",()=>{m()}),n("enable disable",()=>{let{nextEl:h,prevEl:c}=e.navigation;if(h=Ae(h),c=Ae(c),e.enabled){s();return}[...h,...c].filter(f=>!!f).forEach(f=>f.classList.add(e.params.navigation.lockClass))}),n("click",(h,c)=>{let{nextEl:f,prevEl:b}=e.navigation;f=Ae(f),b=Ae(b);const g=c.target;let T=b.includes(g)||f.includes(g);if(e.isElement&&!T){const y=c.path||c.composedPath&&c.composedPath();y&&(T=y.find(C=>f.includes(C)||b.includes(C)))}if(e.params.navigation.hideOnClick&&!T){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===g||e.pagination.el.contains(g)))return;let y;f.length?y=f[0].classList.contains(e.params.navigation.hiddenClass):b.length&&(y=b[0].classList.contains(e.params.navigation.hiddenClass)),r(y===!0?"navigationShow":"navigationHide"),[...f,...b].filter(C=>!!C).forEach(C=>C.classList.toggle(e.params.navigation.hiddenClass))}});const p=()=>{e.el.classList.remove(...e.params.navigation.navigationDisabledClass.split(" ")),l(),s()},E=()=>{e.el.classList.add(...e.params.navigation.navigationDisabledClass.split(" ")),m()};Object.assign(e.navigation,{enable:p,disable:E,update:s,init:l,destroy:m})}function Gt(e=""){return`.${e.trim().replace(/([\.:!+\/()[\]#>~*^$|=,'"@{}\\])/g,"\\$1").replace(/ /g,".")}`}function Hc({swiper:e,extendParams:t,on:n,emit:r}){const a="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:g=>g,formatFractionTotal:g=>g,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`,paginationDisabledClass:`${a}-disabled`}}),e.pagination={el:null,bullets:[]};let i,s=0;function u(){return!e.params.pagination.el||!e.pagination.el||Array.isArray(e.pagination.el)&&e.pagination.el.length===0}function o(g,T){const{bulletActiveClass:y}=e.params.pagination;g&&(g=g[`${T==="prev"?"previous":"next"}ElementSibling`],g&&(g.classList.add(`${y}-${T}`),g=g[`${T==="prev"?"previous":"next"}ElementSibling`],g&&g.classList.add(`${y}-${T}-${T}`)))}function l(g,T,y){if(g=g%y,T=T%y,T===g+1)return"next";if(T===g-1)return"previous"}function m(g){const T=g.target.closest(Gt(e.params.pagination.bulletClass));if(!T)return;g.preventDefault();const y=Dn(T)*e.params.slidesPerGroup;if(e.params.loop){if(e.realIndex===y)return;const C=l(e.realIndex,y,e.slides.length);C==="next"?e.slideNext():C==="previous"?e.slidePrev():e.slideToLoop(y)}else e.slideTo(y)}function p(){const g=e.rtl,T=e.params.pagination;if(u())return;let y=e.pagination.el;y=Ae(y);let C,S;const A=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,w=e.params.loop?Math.ceil(A/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(S=e.previousRealIndex||0,C=e.params.slidesPerGroup>1?Math.floor(e.realIndex/e.params.slidesPerGroup):e.realIndex):typeof e.snapIndex<"u"?(C=e.snapIndex,S=e.previousSnapIndex):(S=e.previousIndex||0,C=e.activeIndex||0),T.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const _=e.pagination.bullets;let N,O,L;if(T.dynamicBullets&&(i=mr(_[0],e.isHorizontal()?"width":"height"),y.forEach(B=>{B.style[e.isHorizontal()?"width":"height"]=`${i*(T.dynamicMainBullets+4)}px`}),T.dynamicMainBullets>1&&S!==void 0&&(s+=C-(S||0),s>T.dynamicMainBullets-1?s=T.dynamicMainBullets-1:s<0&&(s=0)),N=Math.max(C-s,0),O=N+(Math.min(_.length,T.dynamicMainBullets)-1),L=(O+N)/2),_.forEach(B=>{const H=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(v=>`${T.bulletActiveClass}${v}`)].map(v=>typeof v=="string"&&v.includes(" ")?v.split(" "):v).flat();B.classList.remove(...H)}),y.length>1)_.forEach(B=>{const H=Dn(B);H===C?B.classList.add(...T.bulletActiveClass.split(" ")):e.isElement&&B.setAttribute("part","bullet"),T.dynamicBullets&&(H>=N&&H<=O&&B.classList.add(...`${T.bulletActiveClass}-main`.split(" ")),H===N&&o(B,"prev"),H===O&&o(B,"next"))});else{const B=_[C];if(B&&B.classList.add(...T.bulletActiveClass.split(" ")),e.isElement&&_.forEach((H,v)=>{H.setAttribute("part",v===C?"bullet-active":"bullet")}),T.dynamicBullets){const H=_[N],v=_[O];for(let x=N;x<=O;x+=1)_[x]&&_[x].classList.add(...`${T.bulletActiveClass}-main`.split(" "));o(H,"prev"),o(v,"next")}}if(T.dynamicBullets){const B=Math.min(_.length,T.dynamicMainBullets+4),H=(i*B-i)/2-L*i,v=g?"right":"left";_.forEach(x=>{x.style[e.isHorizontal()?v:"top"]=`${H}px`})}}y.forEach((_,N)=>{if(T.type==="fraction"&&(_.querySelectorAll(Gt(T.currentClass)).forEach(O=>{O.textContent=T.formatFractionCurrent(C+1)}),_.querySelectorAll(Gt(T.totalClass)).forEach(O=>{O.textContent=T.formatFractionTotal(w)})),T.type==="progressbar"){let O;T.progressbarOpposite?O=e.isHorizontal()?"vertical":"horizontal":O=e.isHorizontal()?"horizontal":"vertical";const L=(C+1)/w;let B=1,H=1;O==="horizontal"?B=L:H=L,_.querySelectorAll(Gt(T.progressbarFillClass)).forEach(v=>{v.style.transform=`translate3d(0,0,0) scaleX(${B}) scaleY(${H})`,v.style.transitionDuration=`${e.params.speed}ms`})}T.type==="custom"&&T.renderCustom?(zt(_,T.renderCustom(e,C+1,w)),N===0&&r("paginationRender",_)):(N===0&&r("paginationRender",_),r("paginationUpdate",_)),e.params.watchOverflow&&e.enabled&&_.classList[e.isLocked?"add":"remove"](T.lockClass)})}function E(){const g=e.params.pagination;if(u())return;const T=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 y=e.pagination.el;y=Ae(y);let C="";if(g.type==="bullets"){let S=e.params.loop?Math.ceil(T/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&S>T&&(S=T);for(let A=0;A<S;A+=1)g.renderBullet?C+=g.renderBullet.call(e,A,g.bulletClass):C+=`<${g.bulletElement} ${e.isElement?'part="bullet"':""} class="${g.bulletClass}"></${g.bulletElement}>`}g.type==="fraction"&&(g.renderFraction?C=g.renderFraction.call(e,g.currentClass,g.totalClass):C=`<span class="${g.currentClass}"></span> / <span class="${g.totalClass}"></span>`),g.type==="progressbar"&&(g.renderProgressbar?C=g.renderProgressbar.call(e,g.progressbarFillClass):C=`<span class="${g.progressbarFillClass}"></span>`),e.pagination.bullets=[],y.forEach(S=>{g.type!=="custom"&&zt(S,C||""),g.type==="bullets"&&e.pagination.bullets.push(...S.querySelectorAll(Gt(g.bulletClass)))}),g.type!=="custom"&&r("paginationRender",y[0])}function h(){e.params.pagination=vi(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const g=e.params.pagination;if(!g.el)return;let T;typeof g.el=="string"&&e.isElement&&(T=e.el.querySelector(g.el)),!T&&typeof g.el=="string"&&(T=[...document.querySelectorAll(g.el)]),T||(T=g.el),!(!T||T.length===0)&&(e.params.uniqueNavElements&&typeof g.el=="string"&&Array.isArray(T)&&T.length>1&&(T=[...e.el.querySelectorAll(g.el)],T.length>1&&(T=T.find(y=>oi(y,".swiper")[0]===e.el))),Array.isArray(T)&&T.length===1&&(T=T[0]),Object.assign(e.pagination,{el:T}),T=Ae(T),T.forEach(y=>{g.type==="bullets"&&g.clickable&&y.classList.add(...(g.clickableClass||"").split(" ")),y.classList.add(g.modifierClass+g.type),y.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.type==="bullets"&&g.dynamicBullets&&(y.classList.add(`${g.modifierClass}${g.type}-dynamic`),s=0,g.dynamicMainBullets<1&&(g.dynamicMainBullets=1)),g.type==="progressbar"&&g.progressbarOpposite&&y.classList.add(g.progressbarOppositeClass),g.clickable&&y.addEventListener("click",m),e.enabled||y.classList.add(g.lockClass)}))}function c(){const g=e.params.pagination;if(u())return;let T=e.pagination.el;T&&(T=Ae(T),T.forEach(y=>{y.classList.remove(g.hiddenClass),y.classList.remove(g.modifierClass+g.type),y.classList.remove(e.isHorizontal()?g.horizontalClass:g.verticalClass),g.clickable&&(y.classList.remove(...(g.clickableClass||"").split(" ")),y.removeEventListener("click",m))})),e.pagination.bullets&&e.pagination.bullets.forEach(y=>y.classList.remove(...g.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!e.pagination||!e.pagination.el)return;const g=e.params.pagination;let{el:T}=e.pagination;T=Ae(T),T.forEach(y=>{y.classList.remove(g.horizontalClass,g.verticalClass),y.classList.add(e.isHorizontal()?g.horizontalClass:g.verticalClass)})}),n("init",()=>{e.params.pagination.enabled===!1?b():(h(),E(),p())}),n("activeIndexChange",()=>{typeof e.snapIndex>"u"&&p()}),n("snapIndexChange",()=>{p()}),n("snapGridLengthChange",()=>{E(),p()}),n("destroy",()=>{c()}),n("enable disable",()=>{let{el:g}=e.pagination;g&&(g=Ae(g),g.forEach(T=>T.classList[e.enabled?"remove":"add"](e.params.pagination.lockClass)))}),n("lock unlock",()=>{p()}),n("click",(g,T)=>{const y=T.target,C=Ae(e.pagination.el);if(e.params.pagination.el&&e.params.pagination.hideOnClick&&C&&C.length>0&&!y.classList.contains(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&y===e.navigation.nextEl||e.navigation.prevEl&&y===e.navigation.prevEl))return;const S=C[0].classList.contains(e.params.pagination.hiddenClass);r(S===!0?"paginationShow":"paginationHide"),C.forEach(A=>A.classList.toggle(e.params.pagination.hiddenClass))}});const f=()=>{e.el.classList.remove(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ae(g),g.forEach(T=>T.classList.remove(e.params.pagination.paginationDisabledClass))),h(),E(),p()},b=()=>{e.el.classList.add(e.params.pagination.paginationDisabledClass);let{el:g}=e.pagination;g&&(g=Ae(g),g.forEach(T=>T.classList.add(e.params.pagination.paginationDisabledClass))),c()};Object.assign(e.pagination,{enable:f,disable:b,render:E,update:p,init:h,destroy:c})}function Ab(){}function _b(){}function wi(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const s=n.slice(a,r).trim();(s||!i)&&t.push(s),a=r+1,r=n.indexOf(",",a)}return t}function Ii(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $c=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Uc=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qc={};function Li(e,t){return(qc.jsx?Uc:$c).test(e)}const zc=/[ \t\n\f\r]/g;function Vc(e){return typeof e=="object"?e.type==="text"?Oi(e.value):!1:Oi(e)}function Oi(e){return e.replace(zc,"")===""}class Yt{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Yt.prototype.normal={},Yt.prototype.property={},Yt.prototype.space=void 0;function Di(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Yt(n,r,t)}function Wt(e){return e.toLowerCase()}class Oe{constructor(t,n){this.attribute=n,this.property=t}}Oe.prototype.attribute="",Oe.prototype.booleanish=!1,Oe.prototype.boolean=!1,Oe.prototype.commaOrSpaceSeparated=!1,Oe.prototype.commaSeparated=!1,Oe.prototype.defined=!1,Oe.prototype.mustUseProperty=!1,Oe.prototype.number=!1,Oe.prototype.overloadedBoolean=!1,Oe.prototype.property="",Oe.prototype.spaceSeparated=!1,Oe.prototype.space=void 0;let Gc=0;const ae=Tt(),Se=Tt(),kr=Tt(),K=Tt(),Ee=Tt(),Nt=Tt(),Fe=Tt();function Tt(){return 2**++Gc}const vr=Object.freeze(Object.defineProperty({__proto__:null,boolean:ae,booleanish:Se,commaOrSpaceSeparated:Fe,commaSeparated:Nt,number:K,overloadedBoolean:kr,spaceSeparated:Ee},Symbol.toStringTag,{value:"Module"})),Nr=Object.keys(vr);class wr extends Oe{constructor(t,n,r,a){let i=-1;if(super(t,n),Pi(this,"space",a),typeof r=="number")for(;++i<Nr.length;){const s=Nr[i];Pi(this,Nr[i],(r&vr[s])===vr[s])}}}wr.prototype.defined=!0;function Pi(e,t,n){n&&(e[t]=n)}function wt(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new wr(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Wt(r)]=r,n[Wt(i.attribute)]=r}return new Yt(t,n,e.space)}const Mi=wt({properties:{ariaActiveDescendant:null,ariaAtomic:Se,ariaAutoComplete:null,ariaBusy:Se,ariaChecked:Se,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:Ee,ariaCurrent:null,ariaDescribedBy:Ee,ariaDetails:null,ariaDisabled:Se,ariaDropEffect:Ee,ariaErrorMessage:null,ariaExpanded:Se,ariaFlowTo:Ee,ariaGrabbed:Se,ariaHasPopup:null,ariaHidden:Se,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ee,ariaLevel:K,ariaLive:null,ariaModal:Se,ariaMultiLine:Se,ariaMultiSelectable:Se,ariaOrientation:null,ariaOwns:Ee,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:Se,ariaReadOnly:Se,ariaRelevant:null,ariaRequired:Se,ariaRoleDescription:Ee,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:Se,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Bi(e,t){return t in e?e[t]:t}function Ri(e,t){return Bi(e,t.toLowerCase())}const Yc=wt({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Nt,acceptCharset:Ee,accessKey:Ee,action:null,allow:null,allowFullScreen:ae,allowPaymentRequest:ae,allowUserMedia:ae,alt:null,as:null,async:ae,autoCapitalize:null,autoComplete:Ee,autoFocus:ae,autoPlay:ae,blocking:Ee,capture:null,charSet:null,checked:ae,cite:null,className:Ee,cols:K,colSpan:null,content:null,contentEditable:Se,controls:ae,controlsList:Ee,coords:K|Nt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ae,defer:ae,dir:null,dirName:null,disabled:ae,download:kr,draggable:Se,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ae,formTarget:null,headers:Ee,height:K,hidden:kr,high:K,href:null,hrefLang:null,htmlFor:Ee,httpEquiv:Ee,id:null,imageSizes:null,imageSrcSet:null,inert:ae,inputMode:null,integrity:null,is:null,isMap:ae,itemId:null,itemProp:Ee,itemRef:Ee,itemScope:ae,itemType:Ee,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ae,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:ae,muted:ae,name:null,nonce:null,noModule:ae,noValidate:ae,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:ae,optimum:K,pattern:null,ping:Ee,placeholder:null,playsInline:ae,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ae,referrerPolicy:null,rel:Ee,required:ae,reversed:ae,rows:K,rowSpan:K,sandbox:Ee,scope:null,scoped:ae,seamless:ae,selected:ae,shadowRootClonable:ae,shadowRootDelegatesFocus:ae,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:Se,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:ae,useMap:null,value:Se,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ee,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ae,declare:ae,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:ae,noHref:ae,noShade:ae,noWrap:ae,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:Se,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ae,disableRemotePlayback:ae,prefix:null,property:null,results:K,security:null,unselectable:null},space:"html",transform:Ri}),Wc=wt({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:Fe,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:Ee,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:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:ae,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,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:Nt,g2:Nt,glyphName:Nt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:Fe,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,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:K,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:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ee,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Fe,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Fe,rev:Fe,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Fe,requiredFeatures:Fe,requiredFonts:Fe,requiredFormats:Fe,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:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:Fe,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Fe,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Fe,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Bi}),Fi=wt({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()}}),Hi=wt({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ri}),$i=wt({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),jc={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"},Xc=/[A-Z]/g,Ui=/-[a-z]/g,Kc=/^data[-\w.:]+$/i;function Bn(e,t){const n=Wt(t);let r=t,a=Oe;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Kc.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Ui,Jc);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Ui.test(i)){let s=i.replace(Xc,Qc);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}a=wr}return new a(r,t)}function Qc(e){return"-"+e.toLowerCase()}function Jc(e){return e.charAt(1).toUpperCase()}const jt=Di([Mi,Yc,Fi,Hi,$i],"html"),ut=Di([Mi,Wc,Fi,Hi,$i],"svg");function qi(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function zi(e){return e.join(" ").trim()}function Ir(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var It={},Lr,Vi;function Zc(){if(Vi)return Lr;Vi=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,u=/^\s+|\s+$/g,o=`
|
|
42
|
+
`,l="/",m="*",p="",E="comment",h="declaration";function c(b,g){if(typeof b!="string")throw new TypeError("First argument must be a string");if(!b)return[];g=g||{};var T=1,y=1;function C(v){var x=v.match(t);x&&(T+=x.length);var M=v.lastIndexOf(o);y=~M?v.length-M:y+v.length}function S(){var v={line:T,column:y};return function(x){return x.position=new A(v),N(),x}}function A(v){this.start=v,this.end={line:T,column:y},this.source=g.source}A.prototype.content=b;function w(v){var x=new Error(g.source+":"+T+":"+y+": "+v);if(x.reason=v,x.filename=g.source,x.line=T,x.column=y,x.source=b,!g.silent)throw x}function _(v){var x=v.exec(b);if(x){var M=x[0];return C(M),b=b.slice(M.length),x}}function N(){_(n)}function O(v){var x;for(v=v||[];x=L();)x!==!1&&v.push(x);return v}function L(){var v=S();if(!(l!=b.charAt(0)||m!=b.charAt(1))){for(var x=2;p!=b.charAt(x)&&(m!=b.charAt(x)||l!=b.charAt(x+1));)++x;if(x+=2,p===b.charAt(x-1))return w("End of comment missing");var M=b.slice(2,x-2);return y+=2,C(M),b=b.slice(x),y+=2,v({type:E,comment:M})}}function B(){var v=S(),x=_(r);if(x){if(L(),!_(a))return w("property missing ':'");var M=_(i),$=v({type:h,property:f(x[0].replace(e,p)),value:M?f(M[0].replace(e,p)):p});return _(s),$}}function H(){var v=[];O(v);for(var x;x=B();)x!==!1&&(v.push(x),O(v));return v}return N(),H()}function f(b){return b?b.replace(u,p):p}return Lr=c,Lr}var Gi;function ed(){if(Gi)return It;Gi=1;var e=It&&It.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(It,"__esModule",{value:!0}),It.default=n;const t=e(Zc());function n(r,a){let i=null;if(!r||typeof r!="string")return i;const s=(0,t.default)(r),u=typeof a=="function";return s.forEach(o=>{if(o.type!=="declaration")return;const{property:l,value:m}=o;u?a(l,m,o):m&&(i=i||{},i[l]=m)}),i}return It}var Xt={},Yi;function td(){if(Yi)return Xt;Yi=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,i=function(l){return!l||n.test(l)||e.test(l)},s=function(l,m){return m.toUpperCase()},u=function(l,m){return"".concat(m,"-")},o=function(l,m){return m===void 0&&(m={}),i(l)?l:(l=l.toLowerCase(),m.reactCompat?l=l.replace(a,u):l=l.replace(r,u),l.replace(t,s))};return Xt.camelCase=o,Xt}var Kt,Wi;function nd(){if(Wi)return Kt;Wi=1;var e=Kt&&Kt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(ed()),n=td();function r(a,i){var s={};return!a||typeof a!="string"||(0,t.default)(a,function(u,o){u&&o&&(s[(0,n.camelCase)(u,i)]=o)}),s}return r.default=r,Kt=r,Kt}var rd=nd();const ad=Ir(rd),Rn=ji("end"),je=ji("start");function ji(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Xi(e){const t=je(e),n=Rn(e);if(t&&n)return{start:t,end:n}}function Qt(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ki(e.position):"start"in e||"end"in e?Ki(e):"line"in e||"column"in e?Or(e):""}function Or(e){return Qi(e&&e.line)+":"+Qi(e&&e.column)}function Ki(e){return Or(e&&e.start)+"-"+Or(e&&e.end)}function Qi(e){return e&&typeof e=="number"?e:1}class ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(s=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const o=r.indexOf(":");o===-1?i.ruleId=r:(i.source=r.slice(0,o),i.ruleId=r.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){const o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}const u=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=u?u.line:void 0,this.name=Qt(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ve.prototype.file="",ve.prototype.name="",ve.prototype.reason="",ve.prototype.message="",ve.prototype.stack="",ve.prototype.column=void 0,ve.prototype.line=void 0,ve.prototype.ancestors=void 0,ve.prototype.cause=void 0,ve.prototype.fatal=void 0,ve.prototype.place=void 0,ve.prototype.ruleId=void 0,ve.prototype.source=void 0;const Dr={}.hasOwnProperty,id=new Map,sd=/[A-Z]/g,od=new Set(["table","tbody","thead","tfoot","tr"]),ud=new Set(["td","th"]),Ji="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ld(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Ed(n,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");r=gd(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ut:jt,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Zi(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function Zi(e,t,n){if(t.type==="element")return cd(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return dd(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return pd(e,t,n);if(t.type==="mdxjsEsm")return fd(e,t);if(t.type==="root")return hd(e,t,n);if(t.type==="text")return md(e,t)}function cd(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=ut,e.schema=a),e.ancestors.push(t);const i=ts(e,t.tagName,!1),s=bd(e,t);let u=Mr(e,t);return od.has(t.tagName)&&(u=u.filter(function(o){return typeof o=="string"?!Vc(o):!0})),es(e,s,i,t),Pr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function dd(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Jt(e,t.position)}function fd(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Jt(e,t.position)}function pd(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=ut,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:ts(e,t.name,!0),s=Td(e,t),u=Mr(e,t);return es(e,s,i,t),Pr(s,u),e.ancestors.pop(),e.schema=r,e.create(t,i,s,n)}function hd(e,t,n){const r={};return Pr(r,Mr(e,t)),e.create(t,e.Fragment,r,n)}function md(e,t){return t.value}function es(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Pr(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function gd(e,t,n){return r;function r(a,i,s,u){const l=Array.isArray(s.children)?n:t;return u?l(i,s,u):l(i,s)}}function Ed(e,t){return n;function n(r,a,i,s){const u=Array.isArray(i.children),o=je(r);return t(a,i,s,u,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function bd(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Dr.call(t.properties,a)){const i=yd(e,a,t.properties[a]);if(i){const[s,u]=i;e.tableCellAlignToStyle&&s==="align"&&typeof u=="string"&&ud.has(t.tagName)?r=u:n[s]=u}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Td(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const s=i.expression;s.type;const u=s.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Jt(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,i=e.evaluater.evaluateExpression(u.expression)}else Jt(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Mr(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:id;for(;++r<t.children.length;){const i=t.children[r];let s;if(e.passKeys){const o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){const l=a.get(o)||0;s=o+"-"+l,a.set(o,l+1)}}const u=Zi(e,i,s);u!==void 0&&n.push(u)}return n}function yd(e,t,n){const r=Bn(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ii(n):zi(n)),r.property==="style"){let a=typeof n=="object"?n:xd(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Cd(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?jc[r.property]||r.property:r.attribute,n]}}function xd(e,t){try{return ad(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ji+"#cannot-parse-style-attribute",a}}function ts(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,s;for(;++i<a.length;){const u=Li(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};s=s?{type:"MemberExpression",object:s,property:u,computed:!!(i&&u.type==="Literal"),optional:!1}:u}r=s}else r=Li(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Dr.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Jt(e)}function Jt(e,t){const n=new ve("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ji+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Cd(e){const t={};let n;for(n in e)Dr.call(e,n)&&(t[Sd(n)]=e[n]);return t}function Sd(e){let t=e.replace(sd,Ad);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Ad(e){return"-"+e.toLowerCase()}const Br={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"]},_d={};function kd(e,t){const n=_d,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ns(e,r,a)}function ns(e,t,n){if(vd(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return rs(e.children,t,n)}return Array.isArray(e)?rs(e,t,n):""}function rs(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=ns(e[a],t,n);return r.join("")}function vd(e){return!!(e&&typeof e=="object")}const as=document.createElement("i");function Zt(e){const t="&"+e+";";as.innerHTML=t;const n=as.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xe(e,t,n,r){const a=e.length;let i=0,s;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<r.length;)s=r.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Ue(e,t){return e.length>0?(Xe(e,e.length,0,t),e):t}const is={}.hasOwnProperty;function Nd(e){const t={};let n=-1;for(;++n<e.length;)wd(t,e[n]);return t}function wd(e,t){let n;for(n in t){const a=(is.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let s;if(i)for(s in i){is.call(a,s)||(a[s]=[]);const u=i[s];Id(a[s],Array.isArray(u)?u:u?[u]:[])}}}function Id(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xe(e,0,0,r)}function ss(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ke=lt(/[A-Za-z]/),He=lt(/[\dA-Za-z]/),Ld=lt(/[#-'*+\--9=?A-Z^-~]/);function Rr(e){return e!==null&&(e<32||e===127)}const Fr=lt(/\d/),Od=lt(/[\dA-Fa-f]/),Dd=lt(/[!-/:-@[-`{-~]/);function Z(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const en=lt(new RegExp("\\p{P}|\\p{S}","u")),tn=lt(/\s/);function lt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ot(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let s="";if(i===37&&He(e.charCodeAt(n+1))&&He(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){const u=e.charCodeAt(n+1);i<56320&&u>56319&&u<57344?(s=String.fromCharCode(i,u),a=1):s="�"}else s=String.fromCharCode(i);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+a+1,s=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function fe(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return s;function s(o){return de(o)?(e.enter(n),u(o)):t(o)}function u(o){return de(o)&&i++<a?(e.consume(o),u):(e.exit(n),t(o))}}const Pd={tokenize:Md};function Md(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),fe(e,t,"linePrefix")}function a(u){return e.enter("paragraph"),i(u)}function i(u){const o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(u)}function s(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Z(u)?(e.consume(u),e.exit("chunkText"),i):(e.consume(u),s)}}const Bd={tokenize:Rd},os={tokenize:Fd};function Rd(e){const t=this,n=[];let r=0,a,i,s;return u;function u(y){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,o,l)(y)}return l(y)}function o(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&T();const C=t.events.length;let S=C,A;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){A=t.events[S][1].end;break}g(r);let w=C;for(;w<t.events.length;)t.events[w][1].end={...A},w++;return Xe(t.events,S+1,0,t.events.slice(C)),t.events.length=w,l(y)}return u(y)}function l(y){if(r===n.length){if(!a)return E(y);if(a.currentConstruct&&a.currentConstruct.concrete)return c(y);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(os,m,p)(y)}function m(y){return a&&T(),g(r),E(y)}function p(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,c(y)}function E(y){return t.containerState={},e.attempt(os,h,c)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),E(y)}function c(y){if(y===null){a&&T(),g(0),e.consume(y);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),f(y)}function f(y){if(y===null){b(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return Z(y)?(e.consume(y),b(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(y),f)}function b(y,C){const S=t.sliceStream(y);if(C&&S.push(null),y.previous=i,i&&(i.next=y),i=y,a.defineSkip(y.start),a.write(S),t.parser.lazy[y.start.line]){let A=a.events.length;for(;A--;)if(a.events[A][1].start.offset<s&&(!a.events[A][1].end||a.events[A][1].end.offset>s))return;const w=t.events.length;let _=w,N,O;for(;_--;)if(t.events[_][0]==="exit"&&t.events[_][1].type==="chunkFlow"){if(N){O=t.events[_][1].end;break}N=!0}for(g(r),A=w;A<t.events.length;)t.events[A][1].end={...O},A++;Xe(t.events,_+1,0,t.events.slice(w)),t.events.length=A}}function g(y){let C=n.length;for(;C-- >y;){const S=n[C];t.containerState=S[1],S[0].exit.call(t,e)}n.length=y}function T(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function Fd(e,t,n){return fe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function us(e){if(e===null||xe(e)||tn(e))return 1;if(en(e))return 2}function Hr(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const $r={name:"attention",resolveAll:Hd,tokenize:$d};function Hd(e,t){let n=-1,r,a,i,s,u,o,l,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},E={...e[n][1].start};ls(p,-o),ls(E,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:o>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},i={type:o>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:o>1?"strong":"emphasis",start:{...s.start},end:{...u.end}},e[r][1].end={...s.start},e[n][1].start={...u.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=Ue(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=Ue(l,[["enter",a,t],["enter",s,t],["exit",s,t],["enter",i,t]]),l=Ue(l,Hr(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=Ue(l,[["exit",i,t],["enter",u,t],["exit",u,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,l=Ue(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Xe(e,r-1,n-r+3,l),n=r+l.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function $d(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=us(r);let i;return s;function s(o){return i=o,e.enter("attentionSequence"),u(o)}function u(o){if(o===i)return e.consume(o),u;const l=e.exit("attentionSequence"),m=us(o),p=!m||m===2&&a||n.includes(o),E=!a||a===2&&m||n.includes(r);return l._open=!!(i===42?p:p&&(a||!E)),l._close=!!(i===42?E:E&&(m||!p)),t(o)}}function ls(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ud={name:"autolink",tokenize:qd};function qd(e,t,n){let r=0;return a;function a(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Ke(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||He(h)?(r=1,u(h)):l(h)}function u(h){return h===58?(e.consume(h),r=0,o):(h===43||h===45||h===46||He(h))&&r++<32?(e.consume(h),u):(r=0,l(h))}function o(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Rr(h)?n(h):(e.consume(h),o)}function l(h){return h===64?(e.consume(h),m):Ld(h)?(e.consume(h),l):n(h)}function m(h){return He(h)?p(h):n(h)}function p(h){return h===46?(e.consume(h),r=0,m):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):E(h)}function E(h){if((h===45||He(h))&&r++<63){const c=h===45?E:p;return e.consume(h),c}return n(h)}}const Fn={partial:!0,tokenize:zd};function zd(e,t,n){return r;function r(i){return de(i)?fe(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||Z(i)?t(i):n(i)}}const cs={continuation:{tokenize:Gd},exit:Yd,name:"blockQuote",tokenize:Vd};function Vd(e,t,n){const r=this;return a;function a(s){if(s===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function Gd(e,t,n){const r=this;return a;function a(s){return de(s)?fe(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(cs,t,n)(s)}}function Yd(e){e.exit("blockQuote")}const ds={name:"characterEscape",tokenize:Wd};function Wd(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return Dd(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const fs={name:"characterReference",tokenize:jd};function jd(e,t,n){const r=this;let a=0,i,s;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,s=He,m(p))}function l(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=Od,m):(e.enter("characterReferenceValue"),i=7,s=Fr,m(p))}function m(p){if(p===59&&a){const E=e.exit("characterReferenceValue");return s===He&&!Zt(r.sliceSerialize(E))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&a++<i?(e.consume(p),m):n(p)}}const ps={partial:!0,tokenize:Kd},hs={concrete:!0,name:"codeFenced",tokenize:Xd};function Xd(e,t,n){const r=this,a={partial:!0,tokenize:S};let i=0,s=0,u;return o;function o(A){return l(A)}function l(A){const w=r.events[r.events.length-1];return i=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(A)}function m(A){return A===u?(s++,e.consume(A),m):s<3?n(A):(e.exit("codeFencedFenceSequence"),de(A)?fe(e,p,"whitespace")(A):p(A))}function p(A){return A===null||Z(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(ps,f,C)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(A)):de(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),fe(e,h,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),E)}function h(A){return A===null||Z(A)?p(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(A))}function c(A){return A===null||Z(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(A)):A===96&&A===u?n(A):(e.consume(A),c)}function f(A){return e.attempt(a,C,b)(A)}function b(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g}function g(A){return i>0&&de(A)?fe(e,T,"linePrefix",i+1)(A):T(A)}function T(A){return A===null||Z(A)?e.check(ps,f,C)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||Z(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),y)}function C(A){return e.exit("codeFenced"),t(A)}function S(A,w,_){let N=0;return O;function O(x){return A.enter("lineEnding"),A.consume(x),A.exit("lineEnding"),L}function L(x){return A.enter("codeFencedFence"),de(x)?fe(A,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):B(x)}function B(x){return x===u?(A.enter("codeFencedFenceSequence"),H(x)):_(x)}function H(x){return x===u?(N++,A.consume(x),H):N>=s?(A.exit("codeFencedFenceSequence"),de(x)?fe(A,v,"whitespace")(x):v(x)):_(x)}function v(x){return x===null||Z(x)?(A.exit("codeFencedFence"),w(x)):_(x)}}}function Kd(e,t,n){const r=this;return a;function a(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ur={name:"codeIndented",tokenize:Jd},Qd={partial:!0,tokenize:Zd};function Jd(e,t,n){const r=this;return a;function a(l){return e.enter("codeIndented"),fe(e,i,"linePrefix",5)(l)}function i(l){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?o(l):Z(l)?e.attempt(Qd,s,o)(l):(e.enter("codeFlowValue"),u(l))}function u(l){return l===null||Z(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),u)}function o(l){return e.exit("codeIndented"),t(l)}}function Zd(e,t,n){const r=this;return a;function a(s){return r.parser.lazy[r.now().line]?n(s):Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),a):fe(e,i,"linePrefix",5)(s)}function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Z(s)?a(s):n(s)}}const ef={name:"codeText",previous:nf,resolve:tf,tokenize:rf};function tf(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function nf(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function rf(e,t,n){let r=0,a,i;return s;function s(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),o(p))}function o(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),o):p===96?(i=e.enter("codeTextSequence"),a=0,m(p)):Z(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),o):(e.enter("codeTextData"),l(p))}function l(p){return p===null||p===32||p===96||Z(p)?(e.exit("codeTextData"),o(p)):(e.consume(p),l)}function m(p){return p===96?(e.consume(p),a++,m):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(i.type="codeTextData",l(p))}}class af{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,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&nn(this.left,r),i.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),nn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),nn(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 n=this.left.splice(t,Number.POSITIVE_INFINITY);nn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);nn(this.left,n.reverse())}}}function nn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ms(e){const t={};let n=-1,r,a,i,s,u,o,l;const m=new af(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(o=r[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sf(m,n)),n=t[n],l=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(s=m.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),s[1].type="lineEnding",a=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;a&&(r[1].end={...m.get(a)[1].start},u=m.slice(a,n),u.unshift(r),m.splice(a,n-a+1,u))}}return Xe(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!l}function sf(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const u=s.events,o=[],l={};let m,p,E=-1,h=n,c=0,f=0;const b=[f];for(;h;){for(;e.get(++a)[1]!==h;);i.push(a),h._tokenizer||(m=r.sliceStream(h),h.next||m.push(null),p&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(m),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=h,h=h.next}for(h=n;++E<u.length;)u[E][0]==="exit"&&u[E-1][0]==="enter"&&u[E][1].type===u[E-1][1].type&&u[E][1].start.line!==u[E][1].end.line&&(f=E+1,b.push(f),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):b.pop(),E=b.length;E--;){const g=u.slice(b[E],b[E+1]),T=i.pop();o.push([T,T+g.length-1]),e.splice(T,2,g)}for(o.reverse(),E=-1;++E<o.length;)l[c+o[E][0]]=c+o[E][1],c+=o[E][1]-o[E][0]-1;return l}const of={resolve:lf,tokenize:cf},uf={partial:!0,tokenize:df};function lf(e){return ms(e),e}function cf(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(u)}function a(u){return u===null?i(u):Z(u)?e.check(uf,s,i)(u):(e.consume(u),a)}function i(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function s(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function df(e,t,n){const r=this;return a;function a(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),fe(e,i,"linePrefix")}function i(s){if(s===null||Z(s))return n(s);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gs(e,t,n,r,a,i,s,u,o){const l=o||Number.POSITIVE_INFINITY;let m=0;return p;function p(g){return g===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(g),e.exit(i),E):g===null||g===32||g===41||Rr(g)?n(g):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),f(g))}function E(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(u),E(g)):g===null||g===60||Z(g)?n(g):(e.consume(g),g===92?c:h)}function c(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function f(g){return!m&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(g)):m<l&&g===40?(e.consume(g),m++,f):g===41?(e.consume(g),m--,f):g===null||g===32||g===40||Rr(g)?n(g):(e.consume(g),g===92?b:f)}function b(g){return g===40||g===41||g===92?(e.consume(g),f):f(g)}}function Es(e,t,n,r,a,i){const s=this;let u=0,o;return l;function l(h){return e.enter(r),e.enter(a),e.consume(h),e.exit(a),e.enter(i),m}function m(h){return u>999||h===null||h===91||h===93&&!o||h===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(i),e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):Z(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),p(h))}function p(h){return h===null||h===91||h===93||Z(h)||u++>999?(e.exit("chunkString"),m(h)):(e.consume(h),o||(o=!de(h)),h===92?E:p)}function E(h){return h===91||h===92||h===93?(e.consume(h),u++,p):p(h)}}function bs(e,t,n,r,a,i){let s;return u;function u(E){return E===34||E===39||E===40?(e.enter(r),e.enter(a),e.consume(E),e.exit(a),s=E===40?41:E,o):n(E)}function o(E){return E===s?(e.enter(a),e.consume(E),e.exit(a),e.exit(r),t):(e.enter(i),l(E))}function l(E){return E===s?(e.exit(i),o(s)):E===null?n(E):Z(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),fe(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===s||E===null||Z(E)?(e.exit("chunkString"),l(E)):(e.consume(E),E===92?p:m)}function p(E){return E===s||E===92?(e.consume(E),m):m(E)}}function et(e,t){let n;return r;function r(a){return Z(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):de(a)?fe(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const ff={name:"definition",tokenize:hf},pf={partial:!0,tokenize:mf};function hf(e,t,n){const r=this;let a;return i;function i(h){return e.enter("definition"),s(h)}function s(h){return Es.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function u(h){return a=Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o):n(h)}function o(h){return xe(h)?et(e,l)(h):l(h)}function l(h){return gs(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function m(h){return e.attempt(pf,p,p)(h)}function p(h){return de(h)?fe(e,E,"whitespace")(h):E(h)}function E(h){return h===null||Z(h)?(e.exit("definition"),r.parser.defined.push(a),t(h)):n(h)}}function mf(e,t,n){return r;function r(u){return xe(u)?et(e,a)(u):n(u)}function a(u){return bs(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function i(u){return de(u)?fe(e,s,"whitespace")(u):s(u)}function s(u){return u===null||Z(u)?t(u):n(u)}}const gf={name:"hardBreakEscape",tokenize:Ef};function Ef(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return Z(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const bf={name:"headingAtx",resolve:Tf,tokenize:yf};function Tf(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xe(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function yf(e,t,n){let r=0;return a;function a(m){return e.enter("atxHeading"),i(m)}function i(m){return e.enter("atxHeadingSequence"),s(m)}function s(m){return m===35&&r++<6?(e.consume(m),s):m===null||xe(m)?(e.exit("atxHeadingSequence"),u(m)):n(m)}function u(m){return m===35?(e.enter("atxHeadingSequence"),o(m)):m===null||Z(m)?(e.exit("atxHeading"),t(m)):de(m)?fe(e,u,"whitespace")(m):(e.enter("atxHeadingText"),l(m))}function o(m){return m===35?(e.consume(m),o):(e.exit("atxHeadingSequence"),u(m))}function l(m){return m===null||m===35||xe(m)?(e.exit("atxHeadingText"),u(m)):(e.consume(m),l)}}const xf=["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"],Ts=["pre","script","style","textarea"],Cf={concrete:!0,name:"htmlFlow",resolveTo:_f,tokenize:kf},Sf={partial:!0,tokenize:Nf},Af={partial:!0,tokenize:vf};function _f(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 kf(e,t,n){const r=this;let a,i,s,u,o;return l;function l(R){return m(R)}function m(R){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(R),p}function p(R){return R===33?(e.consume(R),E):R===47?(e.consume(R),i=!0,f):R===63?(e.consume(R),a=3,r.interrupt?t:k):Ke(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function E(R){return R===45?(e.consume(R),a=2,h):R===91?(e.consume(R),a=5,u=0,c):Ke(R)?(e.consume(R),a=4,r.interrupt?t:k):n(R)}function h(R){return R===45?(e.consume(R),r.interrupt?t:k):n(R)}function c(R){const te="CDATA[";return R===te.charCodeAt(u++)?(e.consume(R),u===te.length?r.interrupt?t:B:c):n(R)}function f(R){return Ke(R)?(e.consume(R),s=String.fromCharCode(R),b):n(R)}function b(R){if(R===null||R===47||R===62||xe(R)){const te=R===47,ce=s.toLowerCase();return!te&&!i&&Ts.includes(ce)?(a=1,r.interrupt?t(R):B(R)):xf.includes(s.toLowerCase())?(a=6,te?(e.consume(R),g):r.interrupt?t(R):B(R)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(R):i?T(R):y(R))}return R===45||He(R)?(e.consume(R),s+=String.fromCharCode(R),b):n(R)}function g(R){return R===62?(e.consume(R),r.interrupt?t:B):n(R)}function T(R){return de(R)?(e.consume(R),T):O(R)}function y(R){return R===47?(e.consume(R),O):R===58||R===95||Ke(R)?(e.consume(R),C):de(R)?(e.consume(R),y):O(R)}function C(R){return R===45||R===46||R===58||R===95||He(R)?(e.consume(R),C):S(R)}function S(R){return R===61?(e.consume(R),A):de(R)?(e.consume(R),S):y(R)}function A(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),o=R,w):de(R)?(e.consume(R),A):_(R)}function w(R){return R===o?(e.consume(R),o=null,N):R===null||Z(R)?n(R):(e.consume(R),w)}function _(R){return R===null||R===34||R===39||R===47||R===60||R===61||R===62||R===96||xe(R)?S(R):(e.consume(R),_)}function N(R){return R===47||R===62||de(R)?y(R):n(R)}function O(R){return R===62?(e.consume(R),L):n(R)}function L(R){return R===null||Z(R)?B(R):de(R)?(e.consume(R),L):n(R)}function B(R){return R===45&&a===2?(e.consume(R),M):R===60&&a===1?(e.consume(R),$):R===62&&a===4?(e.consume(R),j):R===63&&a===3?(e.consume(R),k):R===93&&a===5?(e.consume(R),G):Z(R)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Sf,J,H)(R)):R===null||Z(R)?(e.exit("htmlFlowData"),H(R)):(e.consume(R),B)}function H(R){return e.check(Af,v,J)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return R===null||Z(R)?H(R):(e.enter("htmlFlowData"),B(R))}function M(R){return R===45?(e.consume(R),k):B(R)}function $(R){return R===47?(e.consume(R),s="",U):B(R)}function U(R){if(R===62){const te=s.toLowerCase();return Ts.includes(te)?(e.consume(R),j):B(R)}return Ke(R)&&s.length<8?(e.consume(R),s+=String.fromCharCode(R),U):B(R)}function G(R){return R===93?(e.consume(R),k):B(R)}function k(R){return R===62?(e.consume(R),j):R===45&&a===2?(e.consume(R),k):B(R)}function j(R){return R===null||Z(R)?(e.exit("htmlFlowData"),J(R)):(e.consume(R),j)}function J(R){return e.exit("htmlFlow"),t(R)}}function vf(e,t,n){const r=this;return a;function a(s){return Z(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function Nf(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Fn,t,n)}}const wf={name:"htmlText",tokenize:If};function If(e,t,n){const r=this;let a,i,s;return u;function u(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),o}function o(k){return k===33?(e.consume(k),l):k===47?(e.consume(k),S):k===63?(e.consume(k),y):Ke(k)?(e.consume(k),_):n(k)}function l(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),i=0,c):Ke(k)?(e.consume(k),T):n(k)}function m(k){return k===45?(e.consume(k),h):n(k)}function p(k){return k===null?n(k):k===45?(e.consume(k),E):Z(k)?(s=p,$(k)):(e.consume(k),p)}function E(k){return k===45?(e.consume(k),h):p(k)}function h(k){return k===62?M(k):k===45?E(k):p(k)}function c(k){const j="CDATA[";return k===j.charCodeAt(i++)?(e.consume(k),i===j.length?f:c):n(k)}function f(k){return k===null?n(k):k===93?(e.consume(k),b):Z(k)?(s=f,$(k)):(e.consume(k),f)}function b(k){return k===93?(e.consume(k),g):f(k)}function g(k){return k===62?M(k):k===93?(e.consume(k),g):f(k)}function T(k){return k===null||k===62?M(k):Z(k)?(s=T,$(k)):(e.consume(k),T)}function y(k){return k===null?n(k):k===63?(e.consume(k),C):Z(k)?(s=y,$(k)):(e.consume(k),y)}function C(k){return k===62?M(k):y(k)}function S(k){return Ke(k)?(e.consume(k),A):n(k)}function A(k){return k===45||He(k)?(e.consume(k),A):w(k)}function w(k){return Z(k)?(s=w,$(k)):de(k)?(e.consume(k),w):M(k)}function _(k){return k===45||He(k)?(e.consume(k),_):k===47||k===62||xe(k)?N(k):n(k)}function N(k){return k===47?(e.consume(k),M):k===58||k===95||Ke(k)?(e.consume(k),O):Z(k)?(s=N,$(k)):de(k)?(e.consume(k),N):M(k)}function O(k){return k===45||k===46||k===58||k===95||He(k)?(e.consume(k),O):L(k)}function L(k){return k===61?(e.consume(k),B):Z(k)?(s=L,$(k)):de(k)?(e.consume(k),L):N(k)}function B(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),a=k,H):Z(k)?(s=B,$(k)):de(k)?(e.consume(k),B):(e.consume(k),v)}function H(k){return k===a?(e.consume(k),a=void 0,x):k===null?n(k):Z(k)?(s=H,$(k)):(e.consume(k),H)}function v(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||xe(k)?N(k):(e.consume(k),v)}function x(k){return k===47||k===62||xe(k)?N(k):n(k)}function M(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function $(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),U}function U(k){return de(k)?fe(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):G(k)}function G(k){return e.enter("htmlTextData"),s(k)}}const qr={name:"labelEnd",resolveAll:Pf,resolveTo:Mf,tokenize:Bf},Lf={tokenize:Rf},Of={tokenize:Ff},Df={tokenize:Hf};function Pf(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Xe(e,0,e.length,n),e}function Mf(e,t){let n=e.length,r=0,a,i,s,u;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(s=n);const o={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[i][1].start},end:{...e[s][1].end}},m={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[s-2][1].start}};return u=[["enter",o,t],["enter",l,t]],u=Ue(u,e.slice(i+1,i+r+3)),u=Ue(u,[["enter",m,t]]),u=Ue(u,Hr(t.parser.constructs.insideSpan.null,e.slice(i+r+4,s-3),t)),u=Ue(u,[["exit",m,t],e[s-2],e[s-1],["exit",l,t]]),u=Ue(u,e.slice(s+1)),u=Ue(u,[["exit",o,t]]),Xe(e,i,e.length,u),e}function Bf(e,t,n){const r=this;let a=r.events.length,i,s;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return u;function u(E){return i?i._inactive?p(E):(s=r.parser.defined.includes(Lt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),o):n(E)}function o(E){return E===40?e.attempt(Lf,m,s?m:p)(E):E===91?e.attempt(Of,m,s?l:p)(E):s?m(E):p(E)}function l(E){return e.attempt(Df,m,p)(E)}function m(E){return t(E)}function p(E){return i._balanced=!0,n(E)}}function Rf(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),a}function a(p){return xe(p)?et(e,i)(p):i(p)}function i(p){return p===41?m(p):gs(e,s,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return xe(p)?et(e,o)(p):m(p)}function u(p){return n(p)}function o(p){return p===34||p===39||p===40?bs(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):m(p)}function l(p){return xe(p)?et(e,m)(p):m(p)}function m(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function Ff(e,t,n){const r=this;return a;function a(u){return Es.call(r,e,i,s,"reference","referenceMarker","referenceString")(u)}function i(u){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function s(u){return n(u)}}function Hf(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const $f={name:"labelStartImage",resolveAll:qr.resolveAll,tokenize:Uf};function Uf(e,t,n){const r=this;return a;function a(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),i}function i(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),s):n(u)}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const qf={name:"labelStartLink",resolveAll:qr.resolveAll,tokenize:zf};function zf(e,t,n){const r=this;return a;function a(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const zr={name:"lineEnding",tokenize:Vf};function Vf(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),fe(e,t,"linePrefix")}}const Hn={name:"thematicBreak",tokenize:Gf};function Gf(e,t,n){let r=0,a;return i;function i(l){return e.enter("thematicBreak"),s(l)}function s(l){return a=l,u(l)}function u(l){return l===a?(e.enter("thematicBreakSequence"),o(l)):r>=3&&(l===null||Z(l))?(e.exit("thematicBreak"),t(l)):n(l)}function o(l){return l===a?(e.consume(l),r++,o):(e.exit("thematicBreakSequence"),de(l)?fe(e,u,"whitespace")(l):u(l))}}const De={continuation:{tokenize:Xf},exit:Qf,name:"list",tokenize:jf},Yf={partial:!0,tokenize:Jf},Wf={partial:!0,tokenize:Kf};function jf(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,s=0;return u;function u(h){const c=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(c==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Fr(h)){if(r.containerState.type||(r.containerState.type=c,e.enter(c,{_container:!0})),c==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Hn,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(h)}return n(h)}function o(h){return Fr(h)&&++s<10?(e.consume(h),o):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Fn,r.interrupt?n:m,e.attempt(Yf,E,p))}function m(h){return r.containerState.initialBlankLine=!0,i++,E(h)}function p(h){return de(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),E):n(h)}function E(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function Xf(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Fn,a,i);function a(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fe(e,t,"listItemIndent",r.containerState.size+1)(u)}function i(u){return r.containerState.furtherBlankLines||!de(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wf,t,s)(u))}function s(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,fe(e,e.attempt(De,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Kf(e,t,n){const r=this;return fe(e,a,"listItemIndent",r.containerState.size+1);function a(i){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(i):n(i)}}function Qf(e){e.exit(this.containerState.type)}function Jf(e,t,n){const r=this;return fe(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const s=r.events[r.events.length-1];return!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const ys={name:"setextUnderline",resolveTo:Zf,tokenize:ep};function Zf(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",s,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function ep(e,t,n){const r=this;let a;return i;function i(l){let m=r.events.length,p;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){p=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),a=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),u(l)}function u(l){return l===a?(e.consume(l),u):(e.exit("setextHeadingLineSequence"),de(l)?fe(e,o,"lineSuffix")(l):o(l))}function o(l){return l===null||Z(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const tp={tokenize:np};function np(e){const t=this,n=e.attempt(Fn,r,e.attempt(this.parser.constructs.flowInitial,a,fe(e,e.attempt(this.parser.constructs.flow,a,e.attempt(of,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rp={resolveAll:Cs()},ap=xs("string"),ip=xs("text");function xs(e){return{resolveAll:Cs(e==="text"?sp:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,s,u);return s;function s(m){return l(m)?i(m):u(m)}function u(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),o}function o(m){return l(m)?(n.exit("data"),i(m)):(n.consume(m),o)}function l(m){if(m===null)return!0;const p=a[m];let E=-1;if(p)for(;++E<p.length;){const h=p[E];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Cs(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function sp(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,s=-1,u=0,o;for(;i--;){const l=a[i];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)u++,s--;if(s)break;s=-1}else if(l===-2)o=!0,u++;else if(l!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const l={type:n===e.length||o||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:r.start._bufferIndex+s,_index:r.start._index+i,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const op=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ff},disable:{null:[]},document:{42:De,43:De,45:De,48:De,49:De,50:De,51:De,52:De,53:De,54:De,55:De,56:De,57:De,62:cs},flow:{35:bf,42:Hn,45:[ys,Hn],60:Cf,61:ys,95:Hn,96:hs,126:hs},flowInitial:{[-2]:Ur,[-1]:Ur,32:Ur},insideSpan:{null:[$r,rp]},string:{38:fs,92:ds},text:{[-5]:zr,[-4]:zr,[-3]:zr,33:$f,38:fs,42:$r,60:[Ud,wf],91:qf,92:[gf,ds],93:qr,95:$r,96:ef}},Symbol.toStringTag,{value:"Module"}));function up(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let s=[],u=[];const o={attempt:w(S),check:w(A),consume:T,enter:y,exit:C,interrupt:w(A,{interrupt:!0})},l={code:null,containerState:{},defineSkip:f,events:[],now:c,parser:e,previous:null,sliceSerialize:E,sliceStream:h,write:p};let m=t.tokenize.call(l,o);return t.resolveAll&&i.push(t),l;function p(L){return s=Ue(s,L),b(),s[s.length-1]!==null?[]:(_(t,0),l.events=Hr(i,l.events,l),l.events)}function E(L,B){return cp(h(L),B)}function h(L){return lp(s,L)}function c(){const{_bufferIndex:L,_index:B,line:H,column:v,offset:x}=r;return{_bufferIndex:L,_index:B,line:H,column:v,offset:x}}function f(L){a[L.line]=L.column,O()}function b(){let L;for(;r._index<s.length;){const B=s[r._index];if(typeof B=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<B.length;)g(B.charCodeAt(r._bufferIndex));else g(B)}}function g(L){m=m(L)}function T(L){Z(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,O()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=L}function y(L,B){const H=B||{};return H.type=L,H.start=c(),l.events.push(["enter",H,l]),u.push(H),H}function C(L){const B=u.pop();return B.end=c(),l.events.push(["exit",B,l]),B}function S(L,B){_(L,B.from)}function A(L,B){B.restore()}function w(L,B){return H;function H(v,x,M){let $,U,G,k;return Array.isArray(v)?J(v):"tokenize"in v?J([v]):j(v);function j(ne){return ee;function ee(pe){const Te=pe!==null&&ne[pe],me=pe!==null&&ne.null,Le=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(me)?me:me?[me]:[]];return J(Le)(pe)}}function J(ne){return $=ne,U=0,ne.length===0?M:R(ne[U])}function R(ne){return ee;function ee(pe){return k=N(),G=ne,ne.partial||(l.currentConstruct=ne),ne.name&&l.parser.constructs.disable.null.includes(ne.name)?ce():ne.tokenize.call(B?Object.assign(Object.create(l),B):l,o,te,ce)(pe)}}function te(ne){return L(G,k),x}function ce(ne){return k.restore(),++U<$.length?R($[U]):M}}}function _(L,B){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&Xe(l.events,B,l.events.length-B,L.resolve(l.events.slice(B),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function N(){const L=c(),B=l.previous,H=l.currentConstruct,v=l.events.length,x=Array.from(u);return{from:v,restore:M};function M(){r=L,l.previous=B,l.currentConstruct=H,l.events.length=v,u=x,O()}}function O(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function lp(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let s;if(n===a)s=[e[n].slice(r,i)];else{if(s=e.slice(n,a),r>-1){const u=s[0];typeof u=="string"?s[0]=u.slice(r):s.shift()}i>0&&s.push(e[a].slice(0,i))}return s}function cp(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
43
43
|
`;break}case-3:{s=`\r
|
|
44
|
-
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function dp(e){const r={constructs:Nd([op,...(e||{}).extensions||[]]),content:a(Pd),defined:[],document:a(Bd),flow:a(tp),lazy:{},string:a(ap),text:a(ip)};return r;function a(i){return s;function s(u){return up(r,i,u)}}}function fp(e){for(;!ms(e););return e}const Ss=/[\0\t\n\r]/g;function pp(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const o=[];let l,m,p,b,g;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Ss.lastIndex=p,l=Ss.exec(i),b=l&&l.index!==void 0?l.index:i.length,g=i.charCodeAt(b),!l){t=i.slice(p);break}if(g===10&&p===b&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),p<b&&(o.push(i.slice(p,b)),e+=b-p),g){case 0:{o.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,o.push(-2);e++<m;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}p=b+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const hp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mp(e){return e.replace(hp,gp)}function gp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return ss(n.slice(i?2:1),i?16:10)}return Zt(n)||e}const As={}.hasOwnProperty;function Ep(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bp(n)(fp(dp(n).document().write(pp()(e,t,!0))))}function bp(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(cr),autolinkProtocol:L,autolinkEmail:L,atxHeading:i(_t),blockQuote:i(me),characterEscape:L,characterReference:L,codeFenced:i(Le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Le,s),codeText:i(nt,s),codeTextData:L,data:L,codeFlowValue:L,definition:i(mt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(or),hardBreakEscape:i(Cn),hardBreakTrailing:i(Cn),htmlFlow:i(ur,s),htmlFlowData:L,htmlText:i(ur,s),htmlTextData:L,image:i(lr),label:s,link:i(cr),listItem:i(Ha),listItemValue:b,listOrdered:i(Sn,p),listUnordered:i(Sn),paragraph:i($a),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(_t),strong:i(Ua),thematicBreak:i(za)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:Te,autolinkProtocol:pe,blockQuote:o(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ne,characterReference:ee,codeFenced:o(E),codeFencedFence:f,codeFencedFenceInfo:g,codeFencedFenceMeta:c,codeFlowValue:O,codeIndented:o(h),codeText:o(x),codeTextData:O,data:O,definition:o(),definitionDestinationString:C,definitionLabelString:T,definitionTitleString:y,emphasis:o(),hardBreakEscape:o(B),hardBreakTrailing:o(B),htmlFlow:o(H),htmlFlowData:O,htmlText:o(v),htmlTextData:O,image:o($),label:G,labelText:U,lineEnding:I,link:o(P),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:te,resourceDestinationString:k,resourceTitleString:j,resource:J,setextHeading:o(_),setextHeadingLineSequence:w,setextHeadingText:A,strong:o(),thematicBreak:o()}};_s(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let Q={type:"root",children:[]};const re={stack:[Q],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:m,data:n},ie=[];let ue=-1;for(;++ue<Y.length;)if(Y[ue][1].type==="listOrdered"||Y[ue][1].type==="listUnordered")if(Y[ue][0]==="enter")ie.push(ue);else{const Me=ie.pop();ue=a(Y,Me,ue)}for(ue=-1;++ue<Y.length;){const Me=t[Y[ue][0]];As.call(Me,Y[ue][1].type)&&Me[Y[ue][1].type].call(Object.assign({sliceSerialize:Y[ue][2].sliceSerialize},re),Y[ue][1])}if(re.tokenStack.length>0){const Me=re.tokenStack[re.tokenStack.length-1];(Me[1]||ks).call(re,void 0,Me[0])}for(Q.position={start:ct(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:ct(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)Q=t.transforms[ue](Q)||Q;return Q}function a(Y,Q,re){let ie=Q-1,ue=-1,Me=!1,Ze,ze,Ve,rt;for(;++ie<=re;){const we=Y[ie];switch(we[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{we[0]==="enter"?ue++:ue--,rt=void 0;break}case"lineEndingBlank":{we[0]==="enter"&&(Ze&&!rt&&!ue&&!Ve&&(Ve=ie),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!ue&&we[0]==="enter"&&we[1].type==="listItemPrefix"||ue===-1&&we[0]==="exit"&&(we[1].type==="listUnordered"||we[1].type==="listOrdered")){if(Ze){let gt=ie;for(ze=void 0;gt--;){const $e=Y[gt];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;ze&&(Y[ze][1].type="lineEndingBlank",Me=!0),$e[1].type="lineEnding",ze=gt}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}Ve&&(!ze||Ve<ze)&&(Ze._spread=!0),Ze.end=Object.assign({},ze?Y[ze][1].start:we[1].end),Y.splice(ze||ie,0,["exit",Ze,we[2]]),ie++,re++}if(we[1].type==="listItemPrefix"){const gt={type:"listItem",_spread:!1,start:Object.assign({},we[1].start),end:void 0};Ze=gt,Y.splice(ie,0,["enter",gt,we[2]]),ie++,re++,Ve=void 0,rt=!0}}}return Y[Q][1]._spread=Me,re}function i(Y,Q){return re;function re(ie){u.call(this,Y(ie),ie),Q&&Q.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(Y,Q,re){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([Q,re||void 0]),Y.position={start:ct(Q.start),end:void 0}}function o(Y){return Q;function Q(re){Y&&Y.call(this,re),l.call(this,re)}}function l(Y,Q){const re=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==Y.type&&(Q?Q.call(this,Y,ie[0]):(ie[1]||ks).call(this,Y,ie[0]));else throw new Error("Cannot close `"+Y.type+"` ("+Qt({start:Y.start,end:Y.end})+"): it’s not open");re.position.end=ct(Y.end)}function m(){return kd(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(Y){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function g(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=Y}function c(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=Y}function f(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function h(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/(\r?\n|\r)$/g,"")}function T(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Lt(this.sliceSerialize(Y)).toLowerCase()}function y(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function C(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function S(Y){const Q=this.stack[this.stack.length-1];if(!Q.depth){const re=this.sliceSerialize(Y).length;Q.depth=re}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function w(Y){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function L(Y){const re=this.stack[this.stack.length-1].children;let ie=re[re.length-1];(!ie||ie.type!=="text")&&(ie=qa(),ie.position={start:ct(Y.start),end:void 0},re.push(ie)),this.stack.push(ie)}function O(Y){const Q=this.stack.pop();Q.value+=this.sliceSerialize(Y),Q.position.end=ct(Y.end)}function I(Y){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=Q.children[Q.children.length-1];re.position.end=ct(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(L.call(this,Y),O.call(this,Y))}function B(){this.data.atHardBreak=!0}function H(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function v(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function x(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function P(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function $(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function U(Y){const Q=this.sliceSerialize(Y),re=this.stack[this.stack.length-2];re.label=mp(Q),re.identifier=Lt(Q).toLowerCase()}function G(){const Y=this.stack[this.stack.length-1],Q=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const ie=Y.children;re.children=ie}else re.alt=Q}function k(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function j(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function J(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function te(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Lt(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function ce(Y){this.data.characterReferenceType=Y.type}function ne(Y){const Q=this.sliceSerialize(Y),re=this.data.characterReferenceType;let ie;re?(ie=ss(Q,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Zt(Q);const ue=this.stack[this.stack.length-1];ue.value+=ie}function ee(Y){const Q=this.stack.pop();Q.position.end=ct(Y.end)}function pe(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(Y)}function Te(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(Y)}function me(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function or(){return{type:"emphasis",children:[]}}function _t(){return{type:"heading",depth:0,children:[]}}function Cn(){return{type:"break"}}function ur(){return{type:"html",value:""}}function lr(){return{type:"image",title:null,url:"",alt:null}}function cr(){return{type:"link",title:null,url:"",children:[]}}function Sn(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Ha(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function $a(){return{type:"paragraph",children:[]}}function Ua(){return{type:"strong",children:[]}}function qa(){return{type:"text",value:""}}function za(){return{type:"thematicBreak"}}}function ct(e){return{line:e.line,column:e.column,offset:e.offset}}function _s(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_s(e,r):Tp(e,r)}}function Tp(e,t){let n;for(n in t)if(As.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ks(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is still open")}function yp(e){const t=this;t.parser=n;function n(r){return Ep(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xp(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Cp(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
44
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&a)continue;s=" ";break}default:s=String.fromCharCode(i)}a=i===-2,r.push(s)}return r.join("")}function dp(e){const r={constructs:Nd([op,...(e||{}).extensions||[]]),content:a(Pd),defined:[],document:a(Bd),flow:a(tp),lazy:{},string:a(ap),text:a(ip)};return r;function a(i){return s;function s(u){return up(r,i,u)}}}function fp(e){for(;!ms(e););return e}const Ss=/[\0\t\n\r]/g;function pp(){let e=1,t="",n=!0,r;return a;function a(i,s,u){const o=[];let l,m,p,E,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Ss.lastIndex=p,l=Ss.exec(i),E=l&&l.index!==void 0?l.index:i.length,h=i.charCodeAt(E),!l){t=i.slice(p);break}if(h===10&&p===E&&r)o.push(-3),r=void 0;else switch(r&&(o.push(-5),r=void 0),p<E&&(o.push(i.slice(p,E)),e+=E-p),h){case 0:{o.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,o.push(-2);e++<m;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:r=!0,e=1}p=E+1}return u&&(r&&o.push(-5),t&&o.push(t),o.push(null)),o}}const hp=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mp(e){return e.replace(hp,gp)}function gp(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return ss(n.slice(i?2:1),i?16:10)}return Zt(n)||e}const As={}.hasOwnProperty;function Ep(e,t,n){return typeof t!="string"&&(n=t,t=void 0),bp(n)(fp(dp(n).document().write(pp()(e,t,!0))))}function bp(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(cr),autolinkProtocol:N,autolinkEmail:N,atxHeading:i(_t),blockQuote:i(me),characterEscape:N,characterReference:N,codeFenced:i(Le),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(Le,s),codeText:i(nt,s),codeTextData:N,data:N,codeFlowValue:N,definition:i(mt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(or),hardBreakEscape:i(Cn),hardBreakTrailing:i(Cn),htmlFlow:i(ur,s),htmlFlowData:N,htmlText:i(ur,s),htmlTextData:N,image:i(lr),label:s,link:i(cr),listItem:i(Ha),listItemValue:E,listOrdered:i(Sn,p),listUnordered:i(Sn),paragraph:i($a),reference:R,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i(_t),strong:i(Ua),thematicBreak:i(za)},exit:{atxHeading:o(),atxHeadingSequence:S,autolink:o(),autolinkEmail:Te,autolinkProtocol:pe,blockQuote:o(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ne,characterReference:ee,codeFenced:o(b),codeFencedFence:f,codeFencedFenceInfo:h,codeFencedFenceMeta:c,codeFlowValue:O,codeIndented:o(g),codeText:o(x),codeTextData:O,data:O,definition:o(),definitionDestinationString:C,definitionLabelString:T,definitionTitleString:y,emphasis:o(),hardBreakEscape:o(B),hardBreakTrailing:o(B),htmlFlow:o(H),htmlFlowData:O,htmlText:o(v),htmlTextData:O,image:o($),label:G,labelText:U,lineEnding:L,link:o(M),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:te,resourceDestinationString:k,resourceTitleString:j,resource:J,setextHeading:o(_),setextHeadingLineSequence:w,setextHeadingText:A,strong:o(),thematicBreak:o()}};_s(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Y){let Q={type:"root",children:[]};const re={stack:[Q],tokenStack:[],config:t,enter:u,exit:l,buffer:s,resume:m,data:n},ie=[];let ue=-1;for(;++ue<Y.length;)if(Y[ue][1].type==="listOrdered"||Y[ue][1].type==="listUnordered")if(Y[ue][0]==="enter")ie.push(ue);else{const Me=ie.pop();ue=a(Y,Me,ue)}for(ue=-1;++ue<Y.length;){const Me=t[Y[ue][0]];As.call(Me,Y[ue][1].type)&&Me[Y[ue][1].type].call(Object.assign({sliceSerialize:Y[ue][2].sliceSerialize},re),Y[ue][1])}if(re.tokenStack.length>0){const Me=re.tokenStack[re.tokenStack.length-1];(Me[1]||ks).call(re,void 0,Me[0])}for(Q.position={start:ct(Y.length>0?Y[0][1].start:{line:1,column:1,offset:0}),end:ct(Y.length>0?Y[Y.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)Q=t.transforms[ue](Q)||Q;return Q}function a(Y,Q,re){let ie=Q-1,ue=-1,Me=!1,Ze,ze,Ve,rt;for(;++ie<=re;){const we=Y[ie];switch(we[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{we[0]==="enter"?ue++:ue--,rt=void 0;break}case"lineEndingBlank":{we[0]==="enter"&&(Ze&&!rt&&!ue&&!Ve&&(Ve=ie),rt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:rt=void 0}if(!ue&&we[0]==="enter"&&we[1].type==="listItemPrefix"||ue===-1&&we[0]==="exit"&&(we[1].type==="listUnordered"||we[1].type==="listOrdered")){if(Ze){let gt=ie;for(ze=void 0;gt--;){const $e=Y[gt];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;ze&&(Y[ze][1].type="lineEndingBlank",Me=!0),$e[1].type="lineEnding",ze=gt}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}Ve&&(!ze||Ve<ze)&&(Ze._spread=!0),Ze.end=Object.assign({},ze?Y[ze][1].start:we[1].end),Y.splice(ze||ie,0,["exit",Ze,we[2]]),ie++,re++}if(we[1].type==="listItemPrefix"){const gt={type:"listItem",_spread:!1,start:Object.assign({},we[1].start),end:void 0};Ze=gt,Y.splice(ie,0,["enter",gt,we[2]]),ie++,re++,Ve=void 0,rt=!0}}}return Y[Q][1]._spread=Me,re}function i(Y,Q){return re;function re(ie){u.call(this,Y(ie),ie),Q&&Q.call(this,ie)}}function s(){this.stack.push({type:"fragment",children:[]})}function u(Y,Q,re){this.stack[this.stack.length-1].children.push(Y),this.stack.push(Y),this.tokenStack.push([Q,re||void 0]),Y.position={start:ct(Q.start),end:void 0}}function o(Y){return Q;function Q(re){Y&&Y.call(this,re),l.call(this,re)}}function l(Y,Q){const re=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==Y.type&&(Q?Q.call(this,Y,ie[0]):(ie[1]||ks).call(this,Y,ie[0]));else throw new Error("Cannot close `"+Y.type+"` ("+Qt({start:Y.start,end:Y.end})+"): it’s not open");re.position.end=ct(Y.end)}function m(){return kd(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function E(Y){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(Y),10),this.data.expectingFirstListItemValue=void 0}}function h(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=Y}function c(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=Y}function f(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y.replace(/(\r?\n|\r)$/g,"")}function T(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Lt(this.sliceSerialize(Y)).toLowerCase()}function y(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function C(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function S(Y){const Q=this.stack[this.stack.length-1];if(!Q.depth){const re=this.sliceSerialize(Y).length;Q.depth=re}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function w(Y){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(Y).codePointAt(0)===61?1:2}function _(){this.data.setextHeadingSlurpLineEnding=void 0}function N(Y){const re=this.stack[this.stack.length-1].children;let ie=re[re.length-1];(!ie||ie.type!=="text")&&(ie=qa(),ie.position={start:ct(Y.start),end:void 0},re.push(ie)),this.stack.push(ie)}function O(Y){const Q=this.stack.pop();Q.value+=this.sliceSerialize(Y),Q.position.end=ct(Y.end)}function L(Y){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=Q.children[Q.children.length-1];re.position.end=ct(Y.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(N.call(this,Y),O.call(this,Y))}function B(){this.data.atHardBreak=!0}function H(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function v(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function x(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.value=Y}function M(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function $(){const Y=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";Y.type+="Reference",Y.referenceType=Q,delete Y.url,delete Y.title}else delete Y.identifier,delete Y.label;this.data.referenceType=void 0}function U(Y){const Q=this.sliceSerialize(Y),re=this.stack[this.stack.length-2];re.label=mp(Q),re.identifier=Lt(Q).toLowerCase()}function G(){const Y=this.stack[this.stack.length-1],Q=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const ie=Y.children;re.children=ie}else re.alt=Q}function k(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.url=Y}function j(){const Y=this.resume(),Q=this.stack[this.stack.length-1];Q.title=Y}function J(){this.data.inReference=void 0}function R(){this.data.referenceType="collapsed"}function te(Y){const Q=this.resume(),re=this.stack[this.stack.length-1];re.label=Q,re.identifier=Lt(this.sliceSerialize(Y)).toLowerCase(),this.data.referenceType="full"}function ce(Y){this.data.characterReferenceType=Y.type}function ne(Y){const Q=this.sliceSerialize(Y),re=this.data.characterReferenceType;let ie;re?(ie=ss(Q,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Zt(Q);const ue=this.stack[this.stack.length-1];ue.value+=ie}function ee(Y){const Q=this.stack.pop();Q.position.end=ct(Y.end)}function pe(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(Y)}function Te(Y){O.call(this,Y);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(Y)}function me(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function or(){return{type:"emphasis",children:[]}}function _t(){return{type:"heading",depth:0,children:[]}}function Cn(){return{type:"break"}}function ur(){return{type:"html",value:""}}function lr(){return{type:"image",title:null,url:"",alt:null}}function cr(){return{type:"link",title:null,url:"",children:[]}}function Sn(Y){return{type:"list",ordered:Y.type==="listOrdered",start:null,spread:Y._spread,children:[]}}function Ha(Y){return{type:"listItem",spread:Y._spread,checked:null,children:[]}}function $a(){return{type:"paragraph",children:[]}}function Ua(){return{type:"strong",children:[]}}function qa(){return{type:"text",value:""}}function za(){return{type:"thematicBreak"}}}function ct(e){return{line:e.line,column:e.column,offset:e.offset}}function _s(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_s(e,r):Tp(e,r)}}function Tp(e,t){let n;for(n in t)if(As.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ks(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Qt({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Qt({start:t.start,end:t.end})+") is still open")}function yp(e){const t=this;t.parser=n;function n(r){return Ep(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function xp(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Cp(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
45
45
|
`}]}function Sp(e,t){const n=t.value?t.value+`
|
|
46
46
|
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Ap(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _p(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kp(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Ot(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let s,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=i+1,u+=1,e.footnoteCounts.set(r,u);const o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);const l={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,l),e.applyData(t,l)}function vp(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Np(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vs(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const s=a[a.length-1];return s&&s.type==="text"?s.value+=r:a.push({type:"text",value:r}),a}function wp(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vs(e,t);const a={src:Ot(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function Ip(e,t){const n={src:Ot(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Lp(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Op(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vs(e,t);const a={href:Ot(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Dp(e,t){const n={href:Ot(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Pp(e,t,n){const r=e.all(t),a=n?Mp(n):Ns(t),i={},s=[];if(typeof t.checked=="boolean"){const m=r[0];let p;m&&m.type==="element"&&m.tagName==="p"?p=m:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const m=r[u];(a||u!==0||m.type!=="element"||m.tagName!=="p")&&s.push({type:"text",value:`
|
|
47
47
|
`}),m.type==="element"&&m.tagName==="p"&&!a?s.push(...m.children):s.push(m)}const o=r[r.length-1];o&&(a||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
|
|
48
|
-
`});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function Mp(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ns(n[r])}return t}function Ns(e){const t=e.spread;return t??e.children.length>1}function Bp(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Rp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Hp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $p(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=je(t.children[1]),o=Rn(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Up(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const p=t.children[o],
|
|
48
|
+
`});const l={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,l),e.applyData(t,l)}function Mp(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=Ns(n[r])}return t}function Ns(e){const t=e.spread;return t??e.children.length>1}function Bp(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const s=r[a];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function Rp(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fp(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Hp(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $p(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),a.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=je(t.children[1]),o=Rn(t.children[t.children.length-1]);u&&o&&(s.position={start:u,end:o}),a.push(s)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function Up(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,u=s?s.length:t.children.length;let o=-1;const l=[];for(;++o<u;){const p=t.children[o],E={},h=s?s[o]:void 0;h&&(E.align=h);let c={type:"element",tagName:i,properties:E,children:[]};p&&(c.children=e.all(p),e.patch(p,c),c=e.applyData(p,c)),l.push(c)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,m),e.applyData(t,m)}function qp(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ws=9,Is=32;function zp(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Ls(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Ls(t.slice(a),a>0,!1)),i.join("")}function Ls(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===ws||i===Is;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===ws||i===Is;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function Vp(e,t){const n={type:"text",value:zp(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Gp(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Yp={blockquote:xp,break:Cp,code:Sp,delete:Ap,emphasis:_p,footnoteReference:kp,heading:vp,html:Np,imageReference:wp,image:Ip,inlineCode:Lp,linkReference:Op,link:Dp,listItem:Pp,list:Bp,paragraph:Rp,root:Fp,strong:Hp,table:$p,tableCell:qp,tableRow:Up,text:Vp,thematicBreak:Gp,toml:$n,yaml:$n,definition:$n,footnoteDefinition:$n};function $n(){}const Os=-1,Un=0,rn=1,qn=2,Vr=3,Gr=4,Yr=5,Wr=6,Ds=7,Ps=8,Ms=typeof self=="object"?self:globalThis,Wp=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,s]=t[a];switch(i){case Un:case Os:return n(s,a);case rn:{const u=n([],a);for(const o of s)u.push(r(o));return u}case qn:{const u=n({},a);for(const[o,l]of s)u[r(o)]=r(l);return u}case Vr:return n(new Date(s),a);case Gr:{const{source:u,flags:o}=s;return n(new RegExp(u,o),a)}case Yr:{const u=n(new Map,a);for(const[o,l]of s)u.set(r(o),r(l));return u}case Wr:{const u=n(new Set,a);for(const o of s)u.add(r(o));return u}case Ds:{const{name:u,message:o}=s;return n(new Ms[u](o),a)}case Ps:return n(BigInt(s),a);case"BigInt":return n(Object(BigInt(s)),a);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:u}=new Uint8Array(s);return n(new DataView(u),s)}}return n(new Ms[i](s),a)};return r},Bs=e=>Wp(new Map,e)(0),Dt="",{toString:jp}={},{keys:Xp}=Object,an=e=>{const t=typeof e;if(t!=="object"||!e)return[Un,t];const n=jp.call(e).slice(8,-1);switch(n){case"Array":return[rn,Dt];case"Object":return[qn,Dt];case"Date":return[Vr,Dt];case"RegExp":return[Gr,Dt];case"Map":return[Yr,Dt];case"Set":return[Wr,Dt];case"DataView":return[rn,n]}return n.includes("Array")?[rn,n]:n.includes("Error")?[Ds,n]:[qn,n]},zn=([e,t])=>e===Un&&(t==="function"||t==="symbol"),Kp=(e,t,n,r)=>{const a=(s,u)=>{const o=r.push(s)-1;return n.set(u,o),o},i=s=>{if(n.has(s))return n.get(s);let[u,o]=an(s);switch(u){case Un:{let m=s;switch(o){case"bigint":u=Ps,m=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);m=null;break;case"undefined":return a([Os],s)}return a([u,m],s)}case rn:{if(o){let E=s;return o==="DataView"?E=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(E=new Uint8Array(s)),a([o,[...E]],s)}const m=[],p=a([u,m],s);for(const E of s)m.push(i(E));return p}case qn:{if(o)switch(o){case"BigInt":return a([o,s.toString()],s);case"Boolean":case"Number":case"String":return a([o,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());const m=[],p=a([u,m],s);for(const E of Xp(s))(e||!zn(an(s[E])))&&m.push([i(E),i(s[E])]);return p}case Vr:return a([u,s.toISOString()],s);case Gr:{const{source:m,flags:p}=s;return a([u,{source:m,flags:p}],s)}case Yr:{const m=[],p=a([u,m],s);for(const[E,h]of s)(e||!(zn(an(E))||zn(an(h))))&&m.push([i(E),i(h)]);return p}case Wr:{const m=[],p=a([u,m],s);for(const E of s)(e||!zn(an(E)))&&m.push(i(E));return p}}const{message:l}=s;return a([u,{name:o,message:l}],s)};return i},Rs=(e,{json:t,lossy:n}={})=>{const r=[];return Kp(!(t||n),!!t,new Map,r)(e),r},yt=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Bs(Rs(e,t)):structuredClone(e):(e,t)=>Bs(Rs(e,t));function Qp(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Jp(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Zp(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Qp,r=e.options.footnoteBackLabel||Jp,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let o=-1;for(;++o<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[o]);if(!l)continue;const m=e.all(l),p=String(l.identifier).toUpperCase(),E=Ot(p.toLowerCase());let h=0;const c=[],f=e.footnoteCounts.get(p);for(;f!==void 0&&++h<=f;){c.length>0&&c.push({type:"text",value:" "});let T=typeof n=="string"?n:n(o,h);typeof T=="string"&&(T={type:"text",value:T}),c.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(o,h),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const b=m[m.length-1];if(b&&b.type==="element"&&b.tagName==="p"){const T=b.children[b.children.length-1];T&&T.type==="text"?T.value+=" ":b.children.push({type:"text",value:" "}),b.children.push(...c)}else m.push(...c);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(m,!0)};e.patch(l,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...yt(s),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
49
49
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
50
|
-
`}]}}const Fs=function(e){if(e==null)return rh;if(typeof e=="function")return Vn(e);if(typeof e=="object")return Array.isArray(e)?eh(e):th(e);if(typeof e=="string")return nh(e);throw new Error("Expected function, string, or object as test")};function eh(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fs(e[n]);return Vn(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function th(e){const t=e;return Vn(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function nh(e){return Vn(t);function t(n){return n&&n.type===e}}function Vn(e){return t;function t(n,r,a){return!!(ah(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function rh(){return!0}function ah(e){return e!==null&&typeof e=="object"&&"type"in e}function Mb(e){return e}const Hs=[],ih=!0,$s=!1,sh="skip";function Us(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Fs(a),s=r?-1:1;u(e,void 0,[])();function u(o,l,m){const p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){const
|
|
50
|
+
`}]}}const Fs=function(e){if(e==null)return rh;if(typeof e=="function")return Vn(e);if(typeof e=="object")return Array.isArray(e)?eh(e):th(e);if(typeof e=="string")return nh(e);throw new Error("Expected function, string, or object as test")};function eh(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fs(e[n]);return Vn(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function th(e){const t=e;return Vn(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function nh(e){return Vn(t);function t(n){return n&&n.type===e}}function Vn(e){return t;function t(n,r,a){return!!(ah(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function rh(){return!0}function ah(e){return e!==null&&typeof e=="object"&&"type"in e}function Mb(e){return e}const Hs=[],ih=!0,$s=!1,sh="skip";function Us(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=Fs(a),s=r?-1:1;u(e,void 0,[])();function u(o,l,m){const p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){const h=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(o.type+(h?"<"+h+">":""))+")"})}return E;function E(){let h=Hs,c,f,b;if((!t||i(o,l,m[m.length-1]||void 0))&&(h=oh(n(o,m)),h[0]===$s))return h;if("children"in o&&o.children){const g=o;if(g.children&&h[0]!==sh)for(f=(r?g.children.length:-1)+s,b=m.concat(g);f>-1&&f<g.children.length;){const T=g.children[f];if(c=u(T,f,b)(),c[0]===$s)return c;f=typeof c[1]=="number"?c[1]:f+s}}return h}}}function oh(e){return Array.isArray(e)?e:typeof e=="number"?[ih,e]:e==null?Hs:[e]}function Gn(e,t,n,r){let a,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,a=n):(i=t,s=n,a=r),Us(e,i,u,a);function u(o,l){const m=l[l.length-1],p=m?m.children.indexOf(o):void 0;return s(o,p,m)}}const jr={}.hasOwnProperty,uh={};function lh(e,t){const n=t||uh,r=new Map,a=new Map,i=new Map,s={...Yp,...n.handlers},u={all:l,applyData:dh,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:s,one:o,options:n,patch:ch,wrap:ph};return Gn(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const p=m.type==="definition"?r:a,E=String(m.identifier).toUpperCase();p.has(E)||p.set(E,m)}}),u;function o(m,p){const E=m.type,h=u.handlers[E];if(jr.call(u.handlers,E)&&h)return h(u,m,p);if(u.options.passThrough&&u.options.passThrough.includes(E)){if("children"in m){const{children:f,...b}=m,g=yt(b);return g.children=u.all(m),g}return yt(m)}return(u.options.unknownHandler||fh)(u,m,p)}function l(m){const p=[];if("children"in m){const E=m.children;let h=-1;for(;++h<E.length;){const c=u.one(E[h],m);if(c){if(h&&E[h-1].type==="break"&&(!Array.isArray(c)&&c.type==="text"&&(c.value=qs(c.value)),!Array.isArray(c)&&c.type==="element")){const f=c.children[0];f&&f.type==="text"&&(f.value=qs(f.value))}Array.isArray(c)?p.push(...c):p.push(c)}}}return p}}function ch(e,t){e.position&&(t.position=Xi(e))}function dh(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,yt(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function fh(e,t){const n=t.data||{},r="value"in t&&!(jr.call(n,"hProperties")||jr.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ph(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
51
51
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
52
52
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
53
53
|
`}),n}function qs(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function zs(e,t){const n=lh(e,t),r=n.one(e,void 0),a=Zp(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
|
|
54
|
-
`},a),i}function hh(e,t){return e&&"run"in e?async function(n,r){const a=zs(n,{file:r,...t});await e.run(a,r)}:function(n,r){return zs(n,{file:r,...e||t})}}function Vs(e){if(e)throw e}var Xr,Gs;function mh(){if(Gs)return Xr;Gs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var m=e.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!m&&!p)return!1;var b;for(b in l);return typeof b>"u"||e.call(l,b)},s=function(l,m){n&&m.name==="__proto__"?n(l,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):l[m.name]=m.newValue},u=function(l,m){if(m==="__proto__")if(e.call(l,m)){if(r)return r(l,m).value}else return;return l[m]};return Xr=function o(){var l,m,p,b,g,c,f=arguments[0],E=1,h=arguments.length,T=!1;for(typeof f=="boolean"&&(T=f,f=arguments[1]||{},E=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});E<h;++E)if(l=arguments[E],l!=null)for(m in l)p=u(f,m),b=u(l,m),f!==b&&(T&&b&&(i(b)||(g=a(b)))?(g?(g=!1,c=p&&a(p)?p:[]):c=p&&i(p)?p:{},s(f,{name:m,newValue:o(T,c,b)})):typeof b<"u"&&s(f,{name:m,newValue:b}));return f},Xr}var gh=mh();const Kr=Ir(gh);function Qr(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 Eh(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...a);function u(o,...l){const m=e[++i];let p=-1;if(o){s(o);return}for(;++p<a.length;)(l[p]===null||l[p]===void 0)&&(l[p]=a[p]);a=l,m?bh(m,u)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function bh(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(a);try{o=e.apply(this,s)}catch(l){const m=l;if(u&&n)throw m;return a(m)}u||(o&&o.then&&typeof o.then=="function"?o.then(i,a):o instanceof Error?a(o):i(o))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const Qe={basename:Th,dirname:yh,extname:xh,join:Ch,sep:"/"};function Th(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sn(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function yh(e){if(sn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xh(e){sn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Ch(...e){let t=-1,n;for(;++t<e.length;)sn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Sh(n)}function Sh(e){sn(e);const t=e.codePointAt(0)===47;let n=Ah(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ah(e,t){let n="",r=0,a=-1,i=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function sn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _h={cwd:kh};function kh(){return"/"}function Jr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vh(e){if(typeof e=="string")e=new URL(e);else if(!Jr(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 Nh(e)}function Nh(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Zr=["history","path","basename","stem","extname","dirname"];class Ys{constructor(t){let n;t?Jr(t)?n={path:t}:typeof t=="string"||wh(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_h.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zr.length;){const i=Zr[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)Zr.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Qe.basename(this.path):void 0}set basename(t){ta(t,"basename"),ea(t,"basename"),this.path=Qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qe.dirname(this.path):void 0}set dirname(t){Ws(this.basename,"dirname"),this.path=Qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qe.extname(this.path):void 0}set extname(t){if(ea(t,"extname"),Ws(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=Qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jr(t)&&(t=vh(t)),ta(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qe.basename(this.path,this.extname):void 0}set stem(t){ta(t,"stem"),ea(t,"stem"),this.path=Qe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new ve(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ea(e,t){if(e&&e.includes(Qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qe.sep+"`")}function ta(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ws(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ih=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},Lh={}.hasOwnProperty;class na extends Ih{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=Eh()}copy(){const t=new na;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Kr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ia("data",this.frozen),this.namespace[t]=n,this):Lh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ia("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Yn(t),r=this.parser||this.Parser;return ra("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ra("process",this.parser||this.Parser),aa("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Yn(t),o=r.parse(u);r.run(o,u,function(m,p,b){if(m||!p||!b)return l(m);const g=p,c=r.stringify(g,b);Ph(c)?b.value=c:b.result=c,l(m,b)});function l(m,p){m||!p?s(m):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ra("processSync",this.parser||this.Parser),aa("processSync",this.compiler||this.Compiler),this.process(t,a),Xs("processSync","process",n),r;function a(i,s){n=!0,Vs(i),r=s}}run(t,n,r){js(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,u){const o=Yn(n);a.run(t,o,l);function l(m,p,b){const g=p||t;m?u(m):s?s(g):r(void 0,g,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Xs("runSync","run",r),a;function i(s,u){Vs(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Yn(n),a=this.compiler||this.Compiler;return aa("stringify",a),js(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(ia("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[m,...p]=l;o(m,p)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))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");u(l.plugins),l.settings&&(a.settings=Kr(!0,a.settings,l.settings))}function u(l){let m=-1;if(l!=null)if(Array.isArray(l))for(;++m<l.length;){const p=l[m];i(p)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,m){let p=-1,b=-1;for(;++p<r.length;)if(r[p][0]===l){b=p;break}if(b===-1)r.push([l,...m]);else if(m.length>0){let[g,...c]=m;const f=r[b][1];Qr(f)&&Qr(g)&&(g=Kr(!0,f,g)),r[b]=[l,g,...c]}}}}const Oh=new na().freeze();function ra(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function aa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ia(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 js(e){if(!Qr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xs(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yn(e){return Dh(e)?e:new Ys(e)}function Dh(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ph(e){return typeof e=="string"||Mh(e)}function Mh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Bh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ks=[],Qs={allowDangerousHtml:!0},Rh=/^(https?|ircs?|mailto|xmpp)$/i,Fh=[{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 sa(e){const t=Hh(e),n=$h(e);return Uh(t.runSync(t.parse(n),n),e)}function Hh(e){const t=e.rehypePlugins||Ks,n=e.remarkPlugins||Ks,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qs}:Qs;return Oh().use(yp).use(n).use(hh,r).use(t)}function $h(e){const t=e.children||"",n=new Ys;return typeof t=="string"&&(n.value=t),n}function Uh(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||qh;for(const m of Fh)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Bh+m.id,void 0);return Gn(e,l),ld(e,{Fragment:z.Fragment,components:a,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function l(m,p,b){if(m.type==="raw"&&b&&typeof p=="number")return s?b.children.splice(p,1):b.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let g;for(g in Br)if(Object.hasOwn(Br,g)&&Object.hasOwn(m.properties,g)){const c=m.properties[g],f=Br[g];(f===null||f.includes(m.tagName))&&(m.properties[g]=o(String(c||""),g,m))}}if(m.type==="element"){let g=n?!n.includes(m.tagName):i?i.includes(m.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(m,p,b)),g&&b&&typeof p=="number")return u&&m.children?b.children.splice(p,1,...m.children):b.children.splice(p,1),p}}}function qh(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||Rh.test(e.slice(0,t))?e:""}const Js=/[#.]/g;function zh(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){Js.lastIndex=a;const u=Js.exec(n),o=n.slice(a,u?u.index:n.length);o&&(i?i==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,a+=o.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Zs(e,t,n){const r=n?Wh(n):void 0;function a(i,s,...u){let o;if(i==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=zh(i,t);const l=o.tagName.toLowerCase(),m=r?r.get(l):void 0;if(o.tagName=m||l,Vh(s))u.unshift(s);else for(const[p,b]of Object.entries(s))Gh(e,o.properties,p,b)}for(const l of u)oa(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return a}function Vh(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Gh(e,t,n,r){const a=Bn(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?a.spaceSeparated?i=qi(r):a.commaSeparated?i=wi(r):a.commaOrSpaceSeparated?i=qi(wi(r).join(" ")):i=eo(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?Yh(r):String(r);if(Array.isArray(i)){const s=[];for(const u of i)s.push(eo(a,a.property,u));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function oa(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 n of t)oa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?oa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function eo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Wt(n)===Wt(t)))return!0}return n}function Yh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Wh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const jh=["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"],Xh=Zs(jt,"div"),Kh=Zs(ut,"g",jh);function Qh(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=to(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],o=to(t,u),l=o===-1?t.length+1:o+1;if(u===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function to(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
55
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const xt={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/"},no={}.hasOwnProperty,Jh=Object.prototype;function Zh(e,t){const n=t||{};return ua({file:n.file||void 0,location:!1,schema:n.space==="svg"?ut:jt,verbose:n.verbose||!1},e)}function ua(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Wn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ro(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=Qh(i),u=s.toPoint(0),o=s.toPoint(i.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Wn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Wn(e,r,n),n}default:return n=e0(e,t),n}}function ro(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=ua(e,t[n]);r.push(a)}return r}function e0(e,t){const n=e.schema;e.schema=t.namespaceURI===xt.svg?ut:jt;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;no.call(Jh,o)||(a[o]=u.value)}const s=(e.schema.space==="svg"?Kh:Xh)(t.tagName,a,ro(e,t.childNodes));if(Wn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&Pt(o.startTag),m=o&&o.endTag&&Pt(o.endTag),p=ua(e,u.content);l&&m&&e.file&&(p.position={start:l.end,end:m.start}),s.content=p}return e.schema=n,s}function Wn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=t0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function t0(e,t,n){const r=Pt(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)no.call(n.attrs,s)&&(i[Bn(e.schema,s).property]=Pt(n.attrs[s]));n.startTag;const u=Pt(n.startTag),o=n.endTag?Pt(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=i,t.data={position:l}}}return r}function Pt(e){const t=ao({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ao({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ao(e){return e.line&&e.column?e:void 0}const io={}.hasOwnProperty;function so(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&io.call(a,e)){const o=String(a[e]);s=io.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const n0={},r0={}.hasOwnProperty,oo=so("type",{handlers:{root:i0,element:c0,text:u0,comment:l0,doctype:o0}});function a0(e,t){const r=(t||n0).space;return oo(e,r==="svg"?ut:jt)}function i0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=la(e.children,n,t),Mt(e,n),n}function s0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=la(e.children,n,t),Mt(e,n),n}function o0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Mt(e,t),t}function u0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Mt(e,t),t}function l0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Mt(e,t),t}function c0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ut);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&r0.call(e.properties,i)){const o=d0(r,i,e.properties[i]);o&&a.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:xt[s],childNodes:[],parentNode:null};return u.childNodes=la(e.children,u,r),Mt(e,u),e.tagName==="template"&&e.content&&(u.content=s0(e.content,r)),u}function d0(e,t,n){const r=Bn(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ii(n):zi(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=xt[r.space]}return a}function la(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=oo(e[r],n);i.parentNode=t,a.push(i)}return a}function Mt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const f0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],p0=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]),be="�";var N;(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"})(N||(N={}));const Pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uo(e){return e>=55296&&e<=57343}function h0(e){return e>=56320&&e<=57343}function m0(e,t){return(e-55296)*1024+9216+t}function lo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function co(e){return e>=64976&&e<=65007||p0.has(e)}var V;(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"})(V||(V={}));const g0=65536;class E0{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=g0,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,n){const{line:r,col:a,offset:i}=this,s=a+n,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(h0(n))return this.pos++,this._addGap(),m0(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(V.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.LINE_FEED:r}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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uo(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){lo(t)?this._err(V.controlCharacterInInputStream):co(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var oe;(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"})(oe||(oe={}));function fo(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const b0=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))),T0=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 y0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=T0.get(e))!==null&&t!==void 0?t:e}var _e;(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"})(_e||(_e={}));const x0=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 ca(e){return e>=_e.ZERO&&e<=_e.NINE}function C0(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function S0(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||ca(e)}function A0(e){return e===_e.EQUALS||S0(e)}var ke;(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"})(ke||(ke={}));var tt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(tt||(tt={}));class _0{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tt.Strict}startEntity(t){this.decodeMode=t,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ke.EntityStart:return t.charCodeAt(n)===_e.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(t,n));case ke.NumericStart:return this.stateNumericStart(t,n);case ke.NumericDecimal:return this.stateNumericDecimal(t,n);case ke.NumericHex:return this.stateNumericHex(t,n);case ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|x0)===_e.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+Number.parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(ca(a)||C0(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(ca(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_e.SEMI)this.consumed+=1;else if(this.decodeMode===tt.Strict)return 0;return this.emitCodePoint(y0(this.result),this.consumed),this.errors&&(t!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&dt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=k0(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===tt.Attribute&&(i===0||A0(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&dt.VALUE_LENGTH)>>14,i!==0){if(s===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==tt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&dt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~dt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==tt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}}function k0(e,t,n,r){const a=(t&dt.BRANCH_LENGTH)>>7,i=t&dt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const o=r-i;return o<0||o>=a?-1:e[n+o]-1}let s=n,u=s+a-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return e[o+a]}return-1}var W;(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/"})(W||(W={}));var Ct;(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"})(Ct||(Ct={}));var qe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(qe||(qe={}));var q;(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"})(q||(q={}));var d;(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"})(d||(d={}));const v0=new Map([[q.A,d.A],[q.ADDRESS,d.ADDRESS],[q.ANNOTATION_XML,d.ANNOTATION_XML],[q.APPLET,d.APPLET],[q.AREA,d.AREA],[q.ARTICLE,d.ARTICLE],[q.ASIDE,d.ASIDE],[q.B,d.B],[q.BASE,d.BASE],[q.BASEFONT,d.BASEFONT],[q.BGSOUND,d.BGSOUND],[q.BIG,d.BIG],[q.BLOCKQUOTE,d.BLOCKQUOTE],[q.BODY,d.BODY],[q.BR,d.BR],[q.BUTTON,d.BUTTON],[q.CAPTION,d.CAPTION],[q.CENTER,d.CENTER],[q.CODE,d.CODE],[q.COL,d.COL],[q.COLGROUP,d.COLGROUP],[q.DD,d.DD],[q.DESC,d.DESC],[q.DETAILS,d.DETAILS],[q.DIALOG,d.DIALOG],[q.DIR,d.DIR],[q.DIV,d.DIV],[q.DL,d.DL],[q.DT,d.DT],[q.EM,d.EM],[q.EMBED,d.EMBED],[q.FIELDSET,d.FIELDSET],[q.FIGCAPTION,d.FIGCAPTION],[q.FIGURE,d.FIGURE],[q.FONT,d.FONT],[q.FOOTER,d.FOOTER],[q.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[q.FORM,d.FORM],[q.FRAME,d.FRAME],[q.FRAMESET,d.FRAMESET],[q.H1,d.H1],[q.H2,d.H2],[q.H3,d.H3],[q.H4,d.H4],[q.H5,d.H5],[q.H6,d.H6],[q.HEAD,d.HEAD],[q.HEADER,d.HEADER],[q.HGROUP,d.HGROUP],[q.HR,d.HR],[q.HTML,d.HTML],[q.I,d.I],[q.IMG,d.IMG],[q.IMAGE,d.IMAGE],[q.INPUT,d.INPUT],[q.IFRAME,d.IFRAME],[q.KEYGEN,d.KEYGEN],[q.LABEL,d.LABEL],[q.LI,d.LI],[q.LINK,d.LINK],[q.LISTING,d.LISTING],[q.MAIN,d.MAIN],[q.MALIGNMARK,d.MALIGNMARK],[q.MARQUEE,d.MARQUEE],[q.MATH,d.MATH],[q.MENU,d.MENU],[q.META,d.META],[q.MGLYPH,d.MGLYPH],[q.MI,d.MI],[q.MO,d.MO],[q.MN,d.MN],[q.MS,d.MS],[q.MTEXT,d.MTEXT],[q.NAV,d.NAV],[q.NOBR,d.NOBR],[q.NOFRAMES,d.NOFRAMES],[q.NOEMBED,d.NOEMBED],[q.NOSCRIPT,d.NOSCRIPT],[q.OBJECT,d.OBJECT],[q.OL,d.OL],[q.OPTGROUP,d.OPTGROUP],[q.OPTION,d.OPTION],[q.P,d.P],[q.PARAM,d.PARAM],[q.PLAINTEXT,d.PLAINTEXT],[q.PRE,d.PRE],[q.RB,d.RB],[q.RP,d.RP],[q.RT,d.RT],[q.RTC,d.RTC],[q.RUBY,d.RUBY],[q.S,d.S],[q.SCRIPT,d.SCRIPT],[q.SEARCH,d.SEARCH],[q.SECTION,d.SECTION],[q.SELECT,d.SELECT],[q.SOURCE,d.SOURCE],[q.SMALL,d.SMALL],[q.SPAN,d.SPAN],[q.STRIKE,d.STRIKE],[q.STRONG,d.STRONG],[q.STYLE,d.STYLE],[q.SUB,d.SUB],[q.SUMMARY,d.SUMMARY],[q.SUP,d.SUP],[q.TABLE,d.TABLE],[q.TBODY,d.TBODY],[q.TEMPLATE,d.TEMPLATE],[q.TEXTAREA,d.TEXTAREA],[q.TFOOT,d.TFOOT],[q.TD,d.TD],[q.TH,d.TH],[q.THEAD,d.THEAD],[q.TITLE,d.TITLE],[q.TR,d.TR],[q.TRACK,d.TRACK],[q.TT,d.TT],[q.U,d.U],[q.UL,d.UL],[q.SVG,d.SVG],[q.VAR,d.VAR],[q.WBR,d.WBR],[q.XMP,d.XMP]]);function Bt(e){var t;return(t=v0.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const X=d,N0={[W.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[W.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[W.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},da=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var D;(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"})(D||(D={}));const Ce={DATA:D.DATA,RCDATA:D.RCDATA,RAWTEXT:D.RAWTEXT,SCRIPT_DATA:D.SCRIPT_DATA,PLAINTEXT:D.PLAINTEXT,CDATA_SECTION:D.CDATA_SECTION};function w0(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function on(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function I0(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function ft(e){return I0(e)||on(e)}function po(e){return ft(e)||w0(e)}function jn(e){return e+32}function ho(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function mo(e){return ho(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function L0(e){return e===N.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:uo(e)?V.surrogateCharacterReference:co(e)?V.noncharacterCharacterReference:lo(e)||e===N.CARRIAGE_RETURN?V.controlCharacterReference:null}class O0{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=D.DATA,this.returnState=D.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new E0(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _0(b0,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=L0(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}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,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:oe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fo(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.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=Bt(t.tagName),t.type===oe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.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 oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oe.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:oe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ho(t)?oe.WHITESPACE_CHARACTER:t===N.NULL?oe.NULL_CHARACTER:oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=D.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tt.Attribute:tt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===D.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===D.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case D.DATA:{this._stateData(t);break}case D.RCDATA:{this._stateRcdata(t);break}case D.RAWTEXT:{this._stateRawtext(t);break}case D.SCRIPT_DATA:{this._stateScriptData(t);break}case D.PLAINTEXT:{this._statePlaintext(t);break}case D.TAG_OPEN:{this._stateTagOpen(t);break}case D.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case D.TAG_NAME:{this._stateTagName(t);break}case D.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case D.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case D.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case D.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case D.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case D.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case D.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case D.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case D.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case D.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case D.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case D.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case D.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case D.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case D.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case D.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case D.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case D.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case D.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case D.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case D.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case D.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case D.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case D.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case D.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case D.BOGUS_COMMENT:{this._stateBogusComment(t);break}case D.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case D.COMMENT_START:{this._stateCommentStart(t);break}case D.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case D.COMMENT:{this._stateComment(t);break}case D.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case D.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case D.COMMENT_END:{this._stateCommentEnd(t);break}case D.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case D.DOCTYPE:{this._stateDoctype(t);break}case D.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case D.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case D.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case D.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case D.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case D.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case D.CDATA_SECTION:{this._stateCdataSection(t);break}case D.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case D.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case D.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case D.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=D.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=D.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=D.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ft(t))this._createStartTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=D.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=D.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=D.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ft(t))this._createEndTagToken(),this.state=D.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=D.DATA;break}case N.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=be;break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(on(t)?jn(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=D.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ft(t)?(this.state=D.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=D.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=D.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=D.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=D.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=D.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ft(t)?(this.state=D.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=D.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=D.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=D.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ft(t)?(this.state=D.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=D.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_ESCAPED,this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ft(t)?(this._emitChars("<"),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ft(t)?(this.state=D.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&mo(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=D.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(be);break}case N.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&mo(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=D.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=D.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=D.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=D.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.name+=be;break}default:this.currentAttr.name+=String.fromCodePoint(on(t)?jn(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=D.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=D.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=D.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=D.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=D.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=D.DATA,this.emitCurrentTagToken();break}default:this.state=D.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=D.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=D.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=D.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=D.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=D.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=D.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.data+=be;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pe.DASH_DASH,!0)?(this._createCommentToken(Pe.DASH_DASH.length+1),this.state=D.COMMENT_START):this._consumeSequenceIfMatch(Pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pe.DOCTYPE.length+1),this.state=D.DOCTYPE):this._consumeSequenceIfMatch(Pe.CDATA_START,!0)?this.inForeignNode?this.state=D.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=D.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=D.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=D.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=D.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=D.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=D.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=D.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.data+=be;break}case N.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=D.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=D.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=D.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=D.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=D.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(V.nestedComment),this.state=D.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=D.COMMENT_END;break}case N.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=D.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=D.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=D.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=D.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=D.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=D.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(on(t))this._createDoctypeToken(String.fromCharCode(jn(t))),this.state=D.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(be),this.state=D.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=D.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.name+=be;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(on(t)?jn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pe.PUBLIC,!1)?this.state=D.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pe.SYSTEM,!1)?this.state=D.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=D.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=be;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=be;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=D.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=D.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=be;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=D.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=be;break}case N.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=D.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=D.DATA;break}case N.NULL:{this._err(V.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=D.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=D.CDATA_SECTION_END:(this._emitChars("]"),this.state=D.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=D.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=D.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(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&po(this.preprocessor.peek(1))?D.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){po(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const go=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Eo=new Set([...go,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Xn=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),D0=new Set([...Xn,d.OL,d.UL]),P0=new Set([...Xn,d.BUTTON]),bo=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),To=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),M0=new Set([d.TR,d.TEMPLATE,d.HTML]),B0=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),R0=new Set([d.TABLE,d.TEMPLATE,d.HTML]),F0=new Set([d.TD,d.TH]);class H0{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==W.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(da,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(F0,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(R0,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(B0,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(M0,W.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case W.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case W.SVG:{if(To.has(a))return!1;break}case W.MATHML:{if(bo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xn)}hasInListItemScope(t){return this.hasInDynamicScope(t,D0)}hasInButtonScope(t){return this.hasInDynamicScope(t,P0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(da.has(n))return!0;if(Xn.has(n))return!1;break}case W.SVG:{if(To.has(n))return!1;break}case W.MATHML:{if(bo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Eo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Eo.has(this.currentTagId);)this.pop()}}const fa=3;var Je;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Je||(Je={}));const yo={type:Je.Marker};class $0{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const m=this.treeAdapter.getAttrList(l);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<fa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<fa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>a.get(o.name)===o.value)&&(i+=1,i>=fa&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(yo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Je.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Je.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(yo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Je.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Je.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Je.Element&&n.element===t)}}const pt={createDocument(){return{nodeName:"#document",mode:qe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pt.appendChild(e,i)}},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 n=e.childNodes[e.childNodes.length-1];if(pt.isTextNode(n)){n.value+=t;return}}pt.appendChild(e,pt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pt.isTextNode(r)?r.value+=t:pt.insertBefore(e,pt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},xo="html",U0="about:legacy-compat",q0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Co=["+//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//"],z0=[...Co,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],V0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),So=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],G0=[...So,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ao(e,t){return t.some(n=>e.startsWith(n))}function Y0(e){return e.name===xo&&e.publicId===null&&(e.systemId===null||e.systemId===U0)}function W0(e){if(e.name!==xo)return qe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===q0)return qe.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),V0.has(n))return qe.QUIRKS;let r=t===null?z0:Co;if(Ao(n,r))return qe.QUIRKS;if(r=t===null?So:G0,Ao(n,r))return qe.LIMITED_QUIRKS}return qe.NO_QUIRKS}const _o={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},j0="definitionurl",X0="definitionURL",K0=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])),Q0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),J0=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([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function em(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Ct.COLOR||r===Ct.SIZE||r===Ct.FACE)||Z0.has(t)}function ko(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===j0){e.attrs[t].name=X0;break}}function vo(e){for(let t=0;t<e.attrs.length;t++){const n=K0.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pa(e){for(let t=0;t<e.attrs.length;t++){const n=Q0.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function tm(e){const t=J0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bt(e.tagName))}function nm(e,t){return t===W.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function rm(e,t,n){if(t===W.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ct.ENCODING){const a=n[r].value.toLowerCase();return a===_o.TEXT_HTML||a===_o.APPLICATION_XML}}return t===W.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function am(e,t,n,r){return(!r||r===W.HTML)&&rm(e,t,n)||(!r||r===W.MATHML)&&nm(e,t)}const im="hidden",sm=8,om=3;var F;(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"})(F||(F={}));const um={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},No=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),wo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pt,onParseError:null};class Io{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.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={...wo,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new O0(this.options,this),this.activeFormattingElements=new $0(this.treeAdapter),this.fragmentContextID=r?Bt(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new H0(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...wo,...n};t??(t=r.treeAdapter.createElement(q.TEMPLATE,W.HTML,[]));const a=r.treeAdapter.createElement("documentmock",W.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===d.TEMPLATE&&i.tmplInsertionModeStack.unshift(F.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:um,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=Ce.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)===q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ce.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(q.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===oe.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===d.SVG&&this.treeAdapter.getTagName(n)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case oe.CHARACTER:{this.onCharacter(t);break}case oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case oe.COMMENT:{this.onComment(t);break}case oe.DOCTYPE:{this.onDoctype(t);break}case oe.START_TAG:{this._processStartTag(t);break}case oe.END_TAG:{this.onEndTag(t);break}case oe.EOF:{this.onEof(t);break}case oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return am(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Je.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=F.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=F.IN_TABLE;return}case d.BODY:{this.insertionMode=F.IN_BODY;return}case d.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return No.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 n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return N0[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Fg(this,t);return}switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{Oo(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_TABLE_TEXT:{$o(this,t);break}case F.IN_COLUMN_GROUP:{Jn(this,t);break}case F.AFTER_BODY:{tr(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Rg(this,t);return}switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_COLUMN_GROUP:{Jn(this,t);break}case F.AFTER_BODY:{tr(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ma(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{ma(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.AFTER_BODY:{mm(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{gm(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{Em(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case F.IN_TABLE_TEXT:{gn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Hg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{bm(this,t);break}case F.BEFORE_HEAD:{ym(this,t);break}case F.IN_HEAD:{Ge(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Sm(this,t);break}case F.AFTER_HEAD:{_m(this,t);break}case F.IN_BODY:{Ne(this,t);break}case F.IN_TABLE:{Rt(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_CAPTION:{xg(this,t);break}case F.IN_COLUMN_GROUP:{ba(this,t);break}case F.IN_TABLE_BODY:{Zn(this,t);break}case F.IN_ROW:{er(this,t);break}case F.IN_CELL:{Ag(this,t);break}case F.IN_SELECT:{zo(this,t);break}case F.IN_SELECT_IN_TABLE:{kg(this,t);break}case F.IN_TEMPLATE:{Ng(this,t);break}case F.AFTER_BODY:{Ig(this,t);break}case F.IN_FRAMESET:{Lg(this,t);break}case F.AFTER_FRAMESET:{Dg(this,t);break}case F.AFTER_AFTER_BODY:{Mg(this,t);break}case F.AFTER_AFTER_FRAMESET:{Bg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?$g(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{Tm(this,t);break}case F.BEFORE_HEAD:{xm(this,t);break}case F.IN_HEAD:{Cm(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Am(this,t);break}case F.AFTER_HEAD:{km(this,t);break}case F.IN_BODY:{Qn(this,t);break}case F.TEXT:{dg(this,t);break}case F.IN_TABLE:{hn(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_CAPTION:{Cg(this,t);break}case F.IN_COLUMN_GROUP:{Sg(this,t);break}case F.IN_TABLE_BODY:{Ta(this,t);break}case F.IN_ROW:{qo(this,t);break}case F.IN_CELL:{_g(this,t);break}case F.IN_SELECT:{Vo(this,t);break}case F.IN_SELECT_IN_TABLE:{vg(this,t);break}case F.IN_TEMPLATE:{wg(this,t);break}case F.AFTER_BODY:{Yo(this,t);break}case F.IN_FRAMESET:{Og(this,t);break}case F.AFTER_FRAMESET:{Pg(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{Fo(this,t);break}case F.TEXT:{fg(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_TEMPLATE:{Go(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{ga(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.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 F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Lo(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_TABLE_TEXT:{Ho(this,t);break}}}}function lm(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ro(e,t),n}function cm(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function dm(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&i>=om;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=fm(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function fm(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function pm(e,t,n){const r=e.treeAdapter.getTagName(t),a=Bt(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===d.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function hm(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function ha(e,t){for(let n=0;n<sm;n++){const r=lm(e,t);if(!r)break;const a=cm(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=dm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&pm(e,s,i),hm(e,a,r)}}function ma(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mm(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gm(e,t){e._appendCommentNode(t,e.document)}function ga(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function Em(e,t){e._setDocumentType(t);const n=t.forceQuirks?qe.QUIRKS:W0(t);Y0(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function un(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,qe.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function bm(e,t){t.tagID===d.HTML?(e._insertElement(t,W.HTML),e.insertionMode=F.BEFORE_HEAD):ln(e,t)}function Tm(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&ln(e,t)}function ln(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function ym(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:cn(e,t)}}function xm(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?cn(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function cn(e,t){e._insertFakeElement(q.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function Ge(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ce.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ce.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ce.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ce.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case d.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:dn(e,t)}}function Cm(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{dn(e,t);break}case d.TEMPLATE:{St(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function St(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function dn(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function Sm(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{Ge(e,t);break}case d.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:fn(e,t)}}function Am(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case d.BR:{fn(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function fn(e,t){const n=t.type===oe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function _m(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),Ge(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:pn(e,t)}}function km(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{pn(e,t);break}case d.TEMPLATE:{St(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function pn(e,t){e._insertFakeElement(q.BODY,d.BODY),e.insertionMode=F.IN_BODY,Kn(e,t)}function Kn(e,t){switch(t.type){case oe.CHARACTER:{Oo(e,t);break}case oe.WHITESPACE_CHARACTER:{Lo(e,t);break}case oe.COMMENT:{ma(e,t);break}case oe.START_TAG:{Ne(e,t);break}case oe.END_TAG:{Qn(e,t);break}case oe.EOF:{Fo(e,t);break}}}function Lo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Oo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET)}function Im(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Lm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&da.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function Om(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Dm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function Pm(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===d.LI&&a===d.LI||(n===d.DD||n===d.DT)&&(a===d.DD||a===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==d.ADDRESS&&a!==d.DIV&&a!==d.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Mm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ce.PLAINTEXT}function Bm(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function Rm(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(ha(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(ha(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Um(e,t){e.treeAdapter.getDocumentMode(e.document)!==qe.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function Do(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Po(e){const t=fo(e,Ct.TYPE);return t!=null&&t.toLowerCase()===im}function qm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Po(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function zm(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function Vm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Gm(e,t){t.tagName=q.IMG,t.tagID=d.IMG,Do(e,t)}function Ym(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ce.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function Wm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function jm(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function Mo(e,t){e._switchToTextParsing(t,Ce.RAWTEXT)}function Xm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function Km(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Qm(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function Jm(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,W.HTML)}function Zm(e,t){e._reconstructActiveFormattingElements(),ko(t),pa(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function eg(e,t){e._reconstructActiveFormattingElements(),vo(t),pa(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function Bo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Ne(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{Fm(e,t);break}case d.A:{Rm(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{Lm(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{Im(e,t);break}case d.LI:case d.DD:case d.DT:{Pm(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Do(e,t);break}case d.HR:{Vm(e,t);break}case d.RB:case d.RTC:{Qm(e,t);break}case d.RT:case d.RP:{Jm(e,t);break}case d.PRE:case d.LISTING:{Om(e,t);break}case d.XMP:{Wm(e,t);break}case d.SVG:{eg(e,t);break}case d.HTML:{vm(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{Ge(e,t);break}case d.BODY:{Nm(e,t);break}case d.FORM:{Dm(e,t);break}case d.NOBR:{Hm(e,t);break}case d.MATH:{Zm(e,t);break}case d.TABLE:{Um(e,t);break}case d.INPUT:{qm(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{zm(e,t);break}case d.IMAGE:{Gm(e,t);break}case d.BUTTON:{Bm(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{$m(e,t);break}case d.IFRAME:{jm(e,t);break}case d.SELECT:{Xm(e,t);break}case d.OPTION:case d.OPTGROUP:{Km(e,t);break}case d.NOEMBED:case d.NOFRAMES:{Mo(e,t);break}case d.FRAMESET:{wm(e,t);break}case d.TEXTAREA:{Ym(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?Mo(e,t):Bo(e,t);break}case d.PLAINTEXT:{Mm(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:Bo(e,t)}}function tg(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ng(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,Yo(e,t))}function rg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ag(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function ig(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(q.P,d.P),e._closePElement()}function sg(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function og(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ug(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function cg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Ro(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==d.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function Qn(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{ha(e,t);break}case d.P:{ig(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{rg(e,t);break}case d.LI:{sg(e);break}case d.DD:case d.DT:{og(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{ug(e);break}case d.BR:{cg(e);break}case d.BODY:{tg(e,t);break}case d.HTML:{ng(e,t);break}case d.FORM:{ag(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{lg(e,t);break}case d.TEMPLATE:{St(e,t);break}default:Ro(e,t)}}function Fo(e,t){e.tmplInsertionModeStack.length>0?Go(e,t):ga(e,t)}function dg(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function fg(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ea(e,t){if(e.openElements.currentTagId!==void 0&&No.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case oe.CHARACTER:{$o(e,t);break}case oe.WHITESPACE_CHARACTER:{Ho(e,t);break}}else mn(e,t)}function pg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CAPTION}function hg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function mg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,d.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,ba(e,t)}function gg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_TABLE_BODY}function Eg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,d.TBODY),e.insertionMode=F.IN_TABLE_BODY,Zn(e,t)}function bg(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Tg(e,t){Po(t)?e._appendElement(t,W.HTML):mn(e,t),t.ackSelfClosing=!0}function yg(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Rt(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{Eg(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{Ge(e,t);break}case d.COL:{mg(e,t);break}case d.FORM:{yg(e,t);break}case d.TABLE:{bg(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{gg(e,t);break}case d.INPUT:{Tg(e,t);break}case d.CAPTION:{pg(e,t);break}case d.COLGROUP:{hg(e,t);break}default:mn(e,t)}}function hn(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{St(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:mn(e,t)}}function mn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Kn(e,t),e.fosterParentingEnabled=n}function Ho(e,t){e.pendingCharacterTokens.push(t)}function $o(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function gn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)mn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uo=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function xg(e,t){const n=t.tagID;Uo.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Rt(e,t)):Ne(e,t)}function Cg(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===d.TABLE&&hn(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Qn(e,t)}}function ba(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{Ge(e,t);break}default:Jn(e,t)}}function Sg(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TEMPLATE:{St(e,t);break}case d.COL:break;default:Jn(e,t)}}function Jn(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function Zn(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,d.TR),e.insertionMode=F.IN_ROW,er(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Rt(e,t));break}default:Rt(e,t)}}function Ta(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,hn(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:hn(e,t)}}function er(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Zn(e,t));break}default:Rt(e,t)}}function qo(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ta(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ta(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:hn(e,t)}}function Ag(e,t){const n=t.tagID;Uo.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),er(e,t)):Ne(e,t)}function _g(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),qo(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Qn(e,t)}}function zo(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{Ge(e,t);break}}}function Vo(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{St(e,t);break}}}function kg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):zo(e,t)}function vg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Vo(e,t)}function Ng(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{Ge(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Rt(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,ba(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,Zn(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,er(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Ne(e,t)}}function wg(e,t){t.tagID===d.TEMPLATE&&St(e,t)}function Go(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ga(e,t)}function Ig(e,t){t.tagID===d.HTML?Ne(e,t):tr(e,t)}function Yo(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else tr(e,t)}function tr(e,t){e.insertionMode=F.IN_BODY,Kn(e,t)}function Lg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.FRAMESET:{e._insertElement(t,W.HTML);break}case d.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{Ge(e,t);break}}}function Og(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function Dg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.NOFRAMES:{Ge(e,t);break}}}function Pg(e,t){t.tagID===d.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function Mg(e,t){t.tagID===d.HTML?Ne(e,t):nr(e,t)}function nr(e,t){e.insertionMode=F.IN_BODY,Kn(e,t)}function Bg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.NOFRAMES:{Ge(e,t);break}}}function Rg(e,t){t.chars=be,e._insertCharacters(t)}function Fg(e,t){e._insertCharacters(t),e.framesetOk=!1}function Wo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Hg(e,t){if(em(t))Wo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?ko(t):r===W.SVG&&(tm(t),vo(t)),pa(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $g(e,t){if(t.tagID===d.P||t.tagID===d.BR){Wo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const Ug=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,qg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),jo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Xo(e,t){const n=Jg(e),r=so("type",{handlers:{root:zg,element:Vg,text:Gg,comment:Qo,doctype:Yg,raw:jg},unknown:Xg}),a={parser:n?new Io(jo):Io.getFragmentParser(void 0,jo),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),Ft(a,je());const i=n?a.parser.document:a.parser.getFragment(),s=Zh(i,{file:a.options.file});return a.stitches&&Gn(s,"comment",function(u,o,l){const m=u;if(m.value.stitch&&l&&o!==void 0){const p=l.children;return p[o]=m.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ko(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function zg(e,t){Ko(e.children,t)}function Vg(e,t){Kg(e,t),Ko(e.children,t),Qg(e,t)}function Gg(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:oe.CHARACTER,chars:e.value,location:En(e)};Ft(t,je(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Yg(e,t){const n={type:oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:En(e)};Ft(t,je(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Wg(e,t){t.stitches=!0;const n=Zg(e);if("children"in e&&"children"in n){const r=Xo({type:"root",children:e.children},t.options);n.children=r.children}Qo({type:"comment",value:{stitch:n}},t)}function Qo(e,t){const n=e.value,r={type:oe.COMMENT,data:n,location:En(e)};Ft(t,je(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function jg(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,Jo(t,je(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ug,"<$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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Xg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Wg(n,t);else{let r="";throw qg.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function Ft(e,t){Jo(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Ce.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 Jo(e,t){if(t&&t.offset!==void 0){const n={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=n}}function Kg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ce.PLAINTEXT)return;Ft(t,je(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:xt.html;a===xt.html&&n==="svg"&&(a=xt.svg);const i=a0({...e,children:[]},{space:a===xt.svg?"svg":"html"}),s={type:oe.START_TAG,tagName:n,tagID:Bt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:En(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Qg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&f0.includes(n)||t.parser.tokenizer.state===Ce.PLAINTEXT)return;Ft(t,Rn(e));const r={type:oe.END_TAG,tagName:n,tagID:Bt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:En(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ce.RCDATA||t.parser.tokenizer.state===Ce.RAWTEXT||t.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ce.DATA)}function Jg(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function En(e){const t=je(e)||{line:void 0,column:void 0,offset:void 0},n=Rn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Zg(e){return"children"in e?yt({...e,children:[]}):yt(e)}function ya(e){return function(t,n){return Xo(t,{...e,file:n})}}const At=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ht={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...At,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...At],h2:[["className","sr-only"]],img:[...At,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...At,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...At],table:[...At],ul:[...At,["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"]},ht={}.hasOwnProperty;function eE(e,t){let n={type:"root",children:[]};const r={schema:t?{...Ht,...t}:Ht,stack:[]},a=Zo(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Zo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return tE(e,n);case"doctype":return nE(e,n);case"element":return rE(e,n);case"root":return aE(e,n);case"text":return iE(e,n)}}}function tE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return bn(i,t),i}}function nE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return bn(n,t),n}}function rE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=eu(e,t.children),a=sE(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&ht.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(i=!1;++o<u.length;)e.stack.includes(u[o])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:a,children:r};return bn(s,t),s}function aE(e,t){const r={type:"root",children:eu(e,t.children)};return bn(r,t),r}function iE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return bn(r,t),r}function eu(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=Zo(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function sE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&ht.call(r,n)?r[n]:void 0,s=r&&ht.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let l;for(l in u)if(ht.call(u,l)){const m=u[l];let p=tu(e,ru(i,l),l,m);p==null&&(p=tu(e,ru(s,l),l,m)),p!=null&&(o[l]=p)}if(a&&ht.call(a,n)){const m=a[n];for(l in m)ht.call(m,l)&&!ht.call(o,l)&&(o[l]=m[l])}return o}function tu(e,t,n,r){return t?Array.isArray(r)?oE(e,t,n,r):nu(e,t,n,r):void 0}function oE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=nu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function nu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&uE(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const s=t[i];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){a=!0;break}}else if(s===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uE(e,t,n){const r=e.schema.protocols&&ht.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),s=a.indexOf("?"),u=a.indexOf("#"),o=a.indexOf("/");if(i<0||o>-1&&i>o||s>-1&&i>s||u>-1&&i>u)return!0;let l=-1;for(;++l<r.length;){const m=r[l];if(i===m.length&&a.slice(0,m.length)===m)return!0}return!1}function bn(e,t){const n=Xi(t);t.data&&(e.data=yt(t.data)),n&&(e.position=n)}function ru(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function xa(e){return function(t){return eE(t,e)}}function au(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}const lE=["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"],iu={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 su(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function cE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function dE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function ou(e){return dE(e)||su(e)}const fE=["","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 Ca(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,u="",o,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,o=n.position.start):o=n.position);let m=(o?o.line:0)||1,p=(o?o.column:0)||1,b=c(),g;for(i--;++i<=e.length;)if(g===10&&(p=(l?l[s]:0)||1),g=e.charCodeAt(i),g===38){const h=e.charCodeAt(i+1);if(h===9||h===10||h===12||h===32||h===38||h===60||Number.isNaN(h)||r&&h===r){u+=String.fromCharCode(g),p++;continue}const T=i+1;let y=T,C=T,S;if(h===35){C=++y;const H=e.charCodeAt(C);H===88||H===120?(S="hexadecimal",C=++y):S="decimal"}else S="named";let A="",w="",_="";const L=S==="named"?ou:S==="decimal"?su:cE;for(C--;++C<=e.length;){const H=e.charCodeAt(C);if(!L(H))break;_+=String.fromCharCode(H),S==="named"&&lE.includes(_)&&(A=_,w=Zt(_))}let O=e.charCodeAt(C)===59;if(O){C++;const H=S==="named"?Zt(_):!1;H&&(A=_,w=H)}let I=1+C-T,B="";if(!(!O&&n.nonTerminated===!1))if(!_)S!=="named"&&f(4,I);else if(S==="named"){if(O&&!w)f(5,1);else if(A!==_&&(C=y+A.length,I=1+C-y,O=!1),!O){const H=A?1:3;if(n.attribute){const v=e.charCodeAt(C);v===61?(f(H,I),w=""):ou(v)?w="":f(H,I)}else f(H,I)}B=w}else{O||f(2,I);let H=Number.parseInt(_,S==="hexadecimal"?16:10);if(pE(H))f(7,I),B="�";else if(H in iu)f(6,I),B=iu[H];else{let v="";hE(H)&&f(6,I),H>65535&&(H-=65536,v+=String.fromCharCode(H>>>10|55296),H=56320|H&1023),B=v+String.fromCharCode(H)}}if(B){E(),b=c(),i=C-1,p+=C-T+1,a.push(B);const H=c();H.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,B,{start:b,end:H},e.slice(T-1,C)),b=H}else _=e.slice(T-1,C),u+=_,p+=_.length,i=C-1}else g===10&&(m++,s++,p=0),Number.isNaN(g)?E():(u+=String.fromCharCode(g),p++);return a.join("");function c(){return{line:m,column:p,offset:i+((o?o.offset:0)||0)}}function f(h,T){let y;n.warning&&(y=c(),y.column+=T,y.offset+=T,n.warning.call(n.warningContext||void 0,fE[h],y,h))}function E(){u&&(a.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:b,end:c()}),u="")}}function pE(e){return e>=55296&&e<=57343||e>1114111}function hE(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 mE=/["&'<>`]/g,gE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,EE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,bE=/[|\\{}()[\]^$+*?.]/g,uu=new WeakMap;function TE(e,t){if(e=e.replace(t.subset?yE(t.subset):mE,r),t.subset||t.escapeOnly)return e;return e.replace(gE,n).replace(EE,r);function n(a,i,s){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(a,i,s){return t.format(a.charCodeAt(0),s.charCodeAt(i+1),t)}}function yE(e){let t=uu.get(e);return t||(t=xE(e),uu.set(e,t)),t}function xE(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(bE,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function CE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function SE(e,t){return TE(e,Object.assign({format:CE},t))}const AE={}.hasOwnProperty,_E={},lu=/^[^\t\n\r "#'.<=>`}]+$/,kE=/^[^\t\n\r "'<=>`}]+$/;function vE(){return{canContainEols:["textDirective"],enter:{directiveContainer:wE,directiveContainerAttributes:_a,directiveContainerLabel:OE,directiveLeaf:IE,directiveLeafAttributes:_a,directiveText:LE,directiveTextAttributes:_a},exit:{directiveContainer:La,directiveContainerAttributeClassValue:va,directiveContainerAttributeIdValue:ka,directiveContainerAttributeName:wa,directiveContainerAttributeValue:Na,directiveContainerAttributes:Ia,directiveContainerLabel:DE,directiveContainerName:Aa,directiveLeaf:La,directiveLeafAttributeClassValue:va,directiveLeafAttributeIdValue:ka,directiveLeafAttributeName:wa,directiveLeafAttributeValue:Na,directiveLeafAttributes:Ia,directiveLeafName:Aa,directiveText:La,directiveTextAttributeClassValue:va,directiveTextAttributeIdValue:ka,directiveTextAttributeName:wa,directiveTextAttributeValue:Na,directiveTextAttributes:Ia,directiveTextName:Aa}}}function NE(e){const t=_E;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=PE,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
|
|
56
|
-
`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(i,s,u,o){const l=u.createTracker(o),m=ME(i),p=u.enter(i.type);let
|
|
57
|
-
`),
|
|
58
|
-
`+m)}return p(),
|
|
59
|
-
`,"\r"];return i+"="+p+SE(s,{subset:b})+p}}function wE(e){Sa.call(this,"containerDirective",e)}function IE(e){Sa.call(this,"leafDirective",e)}function LE(e){Sa.call(this,"textDirective",e)}function Sa(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function Aa(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function OE(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function DE(e){this.exit(e)}function _a(){this.data.directiveAttributes=[],this.buffer()}function ka(e){this.data.directiveAttributes.push(["id",Ca(this.sliceSerialize(e),{attribute:!0})])}function va(e){this.data.directiveAttributes.push(["class",Ca(this.sliceSerialize(e),{attribute:!0})])}function Na(e){const t=this.data.directiveAttributes;t[t.length-1][1]=Ca(this.sliceSerialize(e),{attribute:!0})}function wa(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ia(){const e=this.data.directiveAttributes,t={};let n=-1;for(;++n<e.length;){const a=e[n];a[0]==="class"&&t.class?t.class+=" "+a[1]:t[a[0]]=a[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=t}function La(e){this.exit(e)}function PE(){return":"}function cu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function ME(e){let t=0;return e.type==="containerDirective"?(Us(e,function(n,r){if(n.type==="containerDirective"){let a=r.length,i=0;for(;a--;)r[a].type==="containerDirective"&&i++;i>t&&(t=i)}}),t+=3):e.type==="leafDirective"?t=2:t=1,":".repeat(t)}function Oa(e,t,n,r,a,i,s,u,o,l,m,p,b,g,c){let f,E;return h;function h(x){return e.enter(r),e.enter(a),e.consume(x),e.exit(a),T}function T(x){return x===35?(f=s,y(x)):x===46?(f=u,y(x)):c&&de(x)?fe(e,T,"whitespace")(x):!c&&xe(x)?et(e,T)(x):x===null||Z(x)||tn(x)||en(x)&&x!==45&&x!==95?v(x):(e.enter(i),e.enter(o),e.consume(x),A)}function y(x){const P=f+"Marker";return e.enter(i),e.enter(f),e.enter(P),e.consume(x),e.exit(P),C}function C(x){if(x===null||x===34||x===35||x===39||x===46||x===60||x===61||x===62||x===96||x===125||xe(x))return n(x);const P=f+"Value";return e.enter(P),e.consume(x),S}function S(x){if(x===null||x===34||x===39||x===60||x===61||x===62||x===96)return n(x);if(x===35||x===46||x===125||xe(x)){const P=f+"Value";return e.exit(P),e.exit(f),e.exit(i),T(x)}return e.consume(x),S}function A(x){return x===null||Z(x)||tn(x)||en(x)&&x!==45&&x!==46&&x!==58&&x!==95?(e.exit(o),c&&de(x)?fe(e,w,"whitespace")(x):!c&&xe(x)?et(e,w)(x):w(x)):(e.consume(x),A)}function w(x){return x===61?(e.enter(l),e.consume(x),e.exit(l),_):(e.exit(i),T(x))}function _(x){return x===null||x===60||x===61||x===62||x===96||x===125||c&&Z(x)?n(x):x===34||x===39?(e.enter(m),e.enter(b),e.consume(x),e.exit(b),E=x,O):c&&de(x)?fe(e,_,"whitespace")(x):!c&&xe(x)?et(e,_)(x):(e.enter(p),e.enter(g),e.consume(x),E=void 0,L)}function L(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96?n(x):x===125||xe(x)?(e.exit(g),e.exit(p),e.exit(i),T(x)):(e.consume(x),L)}function O(x){return x===E?(e.enter(b),e.consume(x),e.exit(b),e.exit(m),e.exit(i),H):(e.enter(p),I(x))}function I(x){return x===E?(e.exit(p),O(x)):x===null?n(x):Z(x)?c?n(x):et(e,I)(x):(e.enter(g),e.consume(x),B)}function B(x){return x===E||x===null||Z(x)?(e.exit(g),I(x)):(e.consume(x),B)}function H(x){return x===125||xe(x)?T(x):v(x)}function v(x){return x===125?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),t):n(x)}}function Da(e,t,n,r,a,i,s){let u=0,o=0,l;return m;function m(E){return e.enter(r),e.enter(a),e.consume(E),e.exit(a),p}function p(E){return E===93?(e.enter(a),e.consume(E),e.exit(a),e.exit(r),t):(e.enter(i),b(E))}function b(E){if(E===93&&!o)return f(E);const h=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=h),l=h,g(E)}function g(E){return E===null||u>999||E===91&&++o>32?n(E):E===93&&!o--?(e.exit("chunkText"),f(E)):Z(E)?s?n(E):(e.consume(E),e.exit("chunkText"),b):(e.consume(E),E===92?c:g)}function c(E){return E===91||E===92||E===93?(e.consume(E),u++,g):g(E)}function f(E){return e.exit(i),e.enter(a),e.consume(E),e.exit(a),e.exit(r),t}}function Pa(e,t,n,r){const a=this;return i;function i(u){return u===null||Z(u)||en(u)||tn(u)?n(u):(e.enter(r),e.consume(u),s)}function s(u){return u===null||Z(u)||tn(u)||en(u)&&u!==45&&u!==95?(e.exit(r),a.previous===45||a.previous===95?n(u):t(u)):(e.consume(u),s)}}const BE={tokenize:HE,concrete:!0},RE={tokenize:$E,partial:!0},FE={tokenize:UE,partial:!0},rr={tokenize:qE,partial:!0};function HE(e,t,n){const r=this,a=r.events[r.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0,u;return o;function o(L){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(L)}function l(L){return L===58?(e.consume(L),s++,l):s<3?n(L):(e.exit("directiveContainerSequence"),Pa.call(r,e,m,n,"directiveContainerName")(L))}function m(L){return L===91?e.attempt(RE,p,p)(L):p(L)}function p(L){return L===123?e.attempt(FE,b,b)(L):b(L)}function b(L){return fe(e,g,"whitespace")(L)}function g(L){return e.exit("directiveContainerFence"),L===null?w(L):Z(L)?r.interrupt?t(L):e.attempt(rr,c,w)(L):n(L)}function c(L){return L===null?w(L):Z(L)?e.check(rr,y,w)(L):(e.enter("directiveContainerContent"),f(L))}function f(L){return e.attempt({tokenize:_,partial:!0},A,i?fe(e,E,"linePrefix",i+1):E)(L)}function E(L){return L===null?A(L):Z(L)?e.check(rr,T,A)(L):T(L)}function h(L){if(L===null){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(L)}return Z(L)?e.check(rr,C,S)(L):(e.consume(L),h)}function T(L){const O=e.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=O),u=O,h(L)}function y(L){return e.enter("directiveContainerContent"),f(L)}function C(L){e.consume(L);const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,f}function S(L){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(L)}function A(L){return e.exit("directiveContainerContent"),w(L)}function w(L){return e.exit("directiveContainer"),t(L)}function _(L,O,I){let B=0;return fe(L,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function H(P){return L.enter("directiveContainerFence"),L.enter("directiveContainerSequence"),v(P)}function v(P){return P===58?(L.consume(P),B++,v):B<s?I(P):(L.exit("directiveContainerSequence"),fe(L,x,"whitespace")(P))}function x(P){return P===null||Z(P)?(L.exit("directiveContainerFence"),O(P)):I(P)}}}function $E(e,t,n){return Da(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function UE(e,t,n){return Oa(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function qE(e,t,n){const r=this;return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const zE={tokenize:YE},VE={tokenize:WE,partial:!0},GE={tokenize:jE,partial:!0};function YE(e,t,n){const r=this;return a;function a(m){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(m),i}function i(m){return m===58?(e.consume(m),e.exit("directiveLeafSequence"),Pa.call(r,e,s,n,"directiveLeafName")):n(m)}function s(m){return m===91?e.attempt(VE,u,u)(m):u(m)}function u(m){return m===123?e.attempt(GE,o,o)(m):o(m)}function o(m){return fe(e,l,"whitespace")(m)}function l(m){return m===null||Z(m)?(e.exit("directiveLeaf"),t(m)):n(m)}}function WE(e,t,n){return Da(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function jE(e,t,n){return Oa(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const XE={tokenize:ZE,previous:JE},KE={tokenize:e1,partial:!0},QE={tokenize:t1,partial:!0};function JE(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function ZE(e,t,n){const r=this;return a;function a(o){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(o),e.exit("directiveTextMarker"),Pa.call(r,e,i,n,"directiveTextName")}function i(o){return o===58?n(o):o===91?e.attempt(KE,s,s)(o):s(o)}function s(o){return o===123?e.attempt(QE,u,u)(o):u(o)}function u(o){return e.exit("directiveText"),t(o)}}function e1(e,t,n){return Da(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function t1(e,t,n){return Oa(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function n1(){return{text:{58:XE},flow:{58:[BE,zE]}}}function Ma(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(n1()),r.push(vE()),a.push(NE())}const Ba={...Ht,attributes:{...Ht.attributes||{},span:[...(Ht.attributes||{}).span||[],"style"],font:[...(Ht.attributes||{}).font||[],"color"]}},Ra=()=>e=>{Gn(e,t=>{const n=t;if(!n||n.type!=="textDirective"&&n.type!=="leafDirective"&&n.type!=="containerDirective"||n.name!=="color")return;const r=n.attributes||{},a=r.hex??r.color??r.value,i=typeof a=="string"?a.trim():"",s=/^#([0-9a-fA-F]{6})$/.test(i)?i:"#7C3AED",u=r.bold,l=`${u===!0||u==="true"||u===1||u==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},r1=e=>{const t=(e??"").trim();if(!t)return null;if(!(t.startsWith("{")&&t.endsWith("}")))return{kind:"text",text:t};try{const n=JSON.parse(t);if(!n||typeof n!="object")return{kind:"text",text:t};const r=n;return r.type==="steps"&&typeof r.title=="string"&&Array.isArray(r.images)&&Array.isArray(r.stepDescriptions)?{kind:"steps",data:n}:{kind:"text",text:t}}catch{return{kind:"text",text:t}}},a1=({config:e,files:t,debugTooltipSticky:n=!1})=>{const[r,a]=M.useState(null),[i,s]=M.useState(!1),u=M.useRef(null),o=M.useRef(null),l=M.useRef(null),m=200,p=200,b=M.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),o.current&&(window.clearTimeout(o.current),o.current=null),l.current!==null&&(window.cancelAnimationFrame(l.current),l.current=null)},[]),g=M.useCallback(()=>{b(),s(!0)},[b]),c=M.useCallback(O=>{if(b(),O){a(O),s(!1),l.current=window.requestAnimationFrame(()=>{l.current=null,s(!0)});return}u.current=window.setTimeout(()=>{u.current=null,s(!1),o.current=window.setTimeout(()=>{a(null),o.current=null},p)},m)},[b]);M.useEffect(()=>()=>{b()},[b]);const[f,E]=M.useState(0),h=M.useRef(null),[T,y]=M.useState(!1),C=M.useRef(new Map),[S,A]=M.useState(357),[w,_]=M.useState("bottom");return M.useEffect(()=>{E(0),y(!1),_("bottom")},[r?.key,r?.type]),M.useEffect(()=>{const O=C.current,I=new Set,B=H=>{if(!H||I.has(H)||O.has(H))return;I.add(H);const v=new window.Image;v.decoding="async",v.onload=()=>{const x=v.naturalWidth||v.width||0,P=v.naturalHeight||v.height||0;x>0&&P>0&&O.set(H,`${x} / ${P}`)},v.src=H};e.forEach(H=>{const v=H.tooltip;if(!v)return;const P=typeof v=="string"?(()=>{try{return JSON.parse(v)}catch{return null}})():v;if(!P||P.type!=="steps")return;const $=P.images;Array.isArray($)&&$.forEach(U=>{typeof U=="string"&&B(U)})})},[e]),M.useLayoutEffect(()=>{if(!i)return;if(r?.type!=="upload"&&r?.type!=="tag"&&r?.type!=="variable"){A(null);return}const O=requestAnimationFrame(()=>{const I=document.querySelector(".rte-steps-tooltip"),B=document.querySelector(".rte-steps-tooltip-title"),H=document.querySelector(".rte-steps-tooltip-step-badge");if(!I||!B||!H)return;const v=window.getComputedStyle(I),x=Number.parseFloat(v.paddingLeft)||0,P=Number.parseFloat(v.paddingRight)||0,$=Math.ceil(B.getBoundingClientRect().width||0),U=Math.ceil(H.getBoundingClientRect().width||0),k=$+16+U+Math.ceil(x+P),j=357,J=Math.max(240,Math.floor(window.innerWidth-32));A(Math.min(Math.max(k,j),J));const R=r?.anchorEl;if(R){const te=R.getBoundingClientRect(),ce=I.getBoundingClientRect(),ne=Math.ceil(ce.height||0),ee=Math.max(0,Math.floor(window.innerHeight-te.bottom)),pe=Math.max(0,Math.floor(te.top)),me=ee<ne+12&&pe>ee;_(me?"top":"bottom")}});return()=>cancelAnimationFrame(O)},[i,r?.key,r?.type,f,r?.anchorEl]),M.useEffect(()=>{if(!n)return;const O=I=>{I.key==="Escape"&&c(null)};return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[n,c]),{tooltipPortal:r?.anchorEl?(()=>{if(!document.body.contains(r.anchorEl))return null;let O="",I={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},B=!1;const H=P=>{const $=r1(P);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const U=$.data,G=Math.max(0,U.images?.length||0);if(G<=0)return{node:U.title,steps:!1};const k=Math.min(Math.max(f,0),G-1),j=Array.isArray(U.stepDescriptions)&&U.stepDescriptions[k]||"",J=(U.disclaimer||"").trim(),R=Array.isArray(U.images)?U.images[k]:void 0,te=typeof R=="string"?C.current.get(R):void 0;return{node:z.jsxs("div",{className:"rte-steps-tooltip",style:S?{width:`${S}px`}:void 0,onMouseEnter:()=>g(),onMouseLeave:()=>{n||c(null)},onClick:ne=>{ne.preventDefault(),ne.stopPropagation()},children:[z.jsxs("div",{className:"rte-steps-tooltip-header",children:[z.jsx("div",{className:"rte-steps-tooltip-title",children:U.title}),z.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",k+1,"/",G]})]}),U.description?z.jsx("div",{className:"rte-steps-tooltip-desc",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:U.description})}):null,z.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:z.jsx(se.Image.PreviewGroup,{preview:{visible:T,current:k,onVisibleChange:ne=>y(ne),onChange:ne=>{const ee=Math.min(Math.max(ne,0),G-1);E(ee),h.current?.slideTo(ee)}},children:z.jsx(_i,{className:"rte-steps-tooltip-swiper",modules:[Fc,Hc],navigation:!0,pagination:{clickable:!0},initialSlide:k,onSwiper:ne=>{h.current=ne},onSlideChange:ne=>E(ne.activeIndex),children:U.images.map((ne,ee)=>z.jsx(ki,{children:z.jsx(se.Image,{className:"rte-steps-tooltip-img",src:ne,alt:`step-${ee+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{E(ee),h.current?.slideTo(ee),y(!0)}})},`${ne}-${ee}`))},`${r.key}-${r.type}`)})}),z.jsx("div",{className:"rte-steps-tooltip-footer",children:z.jsx("div",{className:"rte-steps-tooltip-step-text",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:j})})}),J?z.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[z.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),z.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:J})})]}):null]}),steps:!0}};if(r.type==="upload"){const P=r.anchorEl.dataset.tooltip,$=H(P);if($)O=$.node,B=$.steps;else{const U=e.find(k=>k.type==="upload"&&k.key===r.key),G=H(typeof U?.tooltip=="string"?U?.tooltip:U?.tooltip?JSON.stringify(U.tooltip):"");O=G?.node||"",B=G?.steps||!1}}else if(r.type==="tag"){const P=r.anchorEl.dataset.tooltip,$=H(P);O=$?.node||"",B=$?.steps||!1}else if(r.type==="upload-label")O=r.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||r.anchorEl.dataset.fileName||"";else if(r.type==="variable"){const P=r.anchorEl.dataset.tooltip,$=H(P);O=$?.node||"",B=$?.steps||!1}else if(r.type==="upload-preview"){const P=t[r.key],$=!!P&&(P.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(P.name||""));if(P&&$){const U=URL.createObjectURL(P);O=z.jsx("div",{className:"rte-upload-preview",children:z.jsx("img",{className:"rte-upload-preview-img",src:U,alt:P.name})}),I={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},setTimeout(()=>URL.revokeObjectURL(U),1e3)}else O=""}if(!O)return null;B&&(I={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const v="#0A0A0A",x=w;return kn.createPortal(z.jsx(se.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!B,align:B?{points:x==="top"?["bc","tc"]:["tc","bc"],offset:x==="top"?[0,-4]:[0,4]}:void 0,title:r.type==="upload-preview"?z.jsx("div",{onMouseEnter:()=>g(),onMouseLeave:()=>{n||c(null)},onClick:P=>{P.preventDefault(),P.stopPropagation()},children:O}):B?O:z.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:v},onMouseEnter:()=>g(),onMouseLeave:()=>{n||c(null)},onClick:P=>{P.preventDefault(),P.stopPropagation()},children:O}),open:i,placement:B?x==="top"?"top":"bottom":r.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:I,overlayClassName:"rte-tooltip-overlay",children:z.jsx("div",{style:{position:"fixed",left:`${r.anchorEl.getBoundingClientRect().left}px`,top:`${r.anchorEl.getBoundingClientRect().top-(r.type==="upload-label"?4:0)}px`,width:`${r.anchorEl.offsetWidth}px`,height:`${r.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:c}},i1=(e,t)=>{const n=t.hideButtons==="hideTagClose",r=t.lockStructure||n?"":'<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>',a=t.lockStructure?' data-locked="true"':"",i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}" data-tag-key="${e.key||""}"`:"";return`<span contenteditable="false" class="tag-node group"${a}${s}><span class="tag-label">${e.text}</span>${r}</span>`},s1=(e,t)=>{const n=t?' data-locked="true" contenteditable="false"':' contenteditable="false"',a=(e.text??"").replace(/\n/g,"<br/>");return e.className?`<span data-type="text" class="${e.className}"${n}>${a}</span>`:t?`<span data-type="text"${n}>${a}</span>`:`<span data-type="text" contenteditable="false">${a}</span>`},o1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,du=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const b=r?encodeURIComponent(r):"",g=le(e.placeholder||""),c=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',f=vn(r||e.placeholder||""),E=i&&!r?18:0;return`<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${b}" data-placeholder="${g}" data-estimated-width="${Math.min(600,f+E)}"${c}${a}${s} class="rte-variable-host-v2"></span>`}const u=!r,o=u?"":le(r).replace(/\n/g,"<br/>"),l=u?"show-placeholder":"",m=i&&u?"rte-variable-with-icon":"",p=i&&u?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${m?` ${m}`:""}">${o}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}</span>`},u1=(e,t)=>{const n=du(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${o1}${n}</span>`:n},fu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,l1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Ye(e.tooltip),a=r?` data-tooltip="${le(r)}"`:"",i=t[e.key]!==null&&t[e.key]!==void 0,s=i?t[e.key]:null,u=i?t[e.key]?.name:e.text,o=i?"":"hidden",l=r&&!i?"":"hidden",m=i?"has-file":"",p=i&&u?` data-file-name="${u.replace(/"/g,""")}"`:"";let b="";i&&s?dr(s)?b=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(s)}" alt="preview" />`:b="<i class='iconfont icon-exlwenjian'></i>":b="<i class='iconfont icon-shangchuan1'></i>";const g=(e.text||"").trim(),f=i&&g.length>=12?`<span ${n} contenteditable="false" class="exclusion-wrapper upload-hint">${g}</span>`:"";return{uploadHtml:`<span contenteditable="false" data-type="upload" data-key="${e.key}"${a} class="upload-chip"><span class="upload-inner-wrapper ${m}"><span class="upload-icon">${b}</span><span class="upload-label"${p}>${u||e.text}</span>${r?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${l}" data-upload-key="${e.key}" data-tooltip="${le(r)}" ></i>`:""}<span class="file-remove-btn ${o}" title="移除文件">×</span></span></span>`,hintHtml:f}},c1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const y=Ye(e.tooltip),C=y?` data-tooltip="${le(y)}"`:"",S=e.minCount||1,A=e.maxCount||3;let w=0;for(let I=0;I<A;I++){const B=`${e.key}-${I}`;t[B]!=null&&(w+=1)}const _=Math.min(A,Math.max(S,w+(w<A?1:0)));let L="";for(let I=0;I<_;I++){const B=`${e.key}-${I}`,H=t[B]!==null&&t[B]!==void 0,v=H?t[B]:null,x=H?t[B]?.name:e.text,P=H?"":"hidden",$=y&&!H?"":"hidden",U=H?"has-file":"",G=H&&x?` data-file-name="${x.replace(/"/g,""")}"`:"";let k="";H&&v?dr(v)?k=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(v)}" alt="preview" />`:k="<i class='iconfont icon-exlwenjian'></i>":k="<i class='iconfont icon-shangchuan1'></i>";const j=` data-batch-key="${e.key}"`,J=` data-batch-index="${I}"`,R=`<span contenteditable="false" data-type="upload" data-key="${B}"${j}${J}${C} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${U}"><span class="upload-icon">${k}</span><span class="upload-label"${G}>${x||e.text}</span>${y?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${$}" data-upload-key="${B}" data-tooltip="${le(y)}" ></i>`:""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;L+=R}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${fu}<span class="rte-upload-batch-chips">${L}${n}</span></span>`:`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-upload-batch-chips">${L}${n}</span>`}const i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}"`:"",u=t[e.key]!==null&&t[e.key]!==void 0,o=u?t[e.key]:null,l=u?t[e.key]?.name:e.text,m=u?"":"hidden",p=i&&!u?"":"hidden",b=u?"has-file":"",g=u&&l?` data-file-name="${l.replace(/"/g,""")}"`:"";let c="";u&&o?dr(o)?c=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(o)}" alt="preview" />`:c="<i class='iconfont icon-exlwenjian'></i>":c="<i class='iconfont icon-shangchuan1'></i>";const f=(e.text||"").trim(),h=u&&e.showHint===!0&&f.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${f}</span>`:"",T=`<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${b}"><span class="upload-icon">${c}</span><span class="upload-label"${g}>${l||e.text}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}<span class="file-remove-btn ${m}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${fu}${T}${n}</span>${h}`:T+n+h},d1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,f1=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",u=`<div data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${d1}${u}</span>`:u},p1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,h1=(e,t,n)=>{const r=t[e.key]||"",a=typeof e.maxHeight=="number"?e.maxHeight:252,i=e.placeholder?` placeholder="${e.placeholder}"`:"",s=`<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${a}px;"${i}>${r}</textarea>`,u=`<div class="rte-textarea-wrapper" data-key="${e.key}">${s}</div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${p1}${u}</span>`:u},m1=(e,t,n)=>{const r=t[e.key]||e.text||"",a=typeof e.minHeight=="number"?e.minHeight:40,i=typeof e.maxHeight=="number"?e.maxHeight:160,s=Math.max(i,a),u=e.placeholder?` data-placeholder="${e.placeholder}"`:"",o=e.expandable!==!1,l=r,m=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${u} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,p=o?`<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>`:"",b=`<div class="rte-richtext-wrapper${o?" rte-richtext-toggleable":""}" data-key="${e.key}">${m}${p}</div>`,g=`<div class="rte-richtext-container" data-key="${e.key}">${b}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${g}</div>`:g},g1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,E1=(e,t)=>{const n=`${e.key}__url`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ye(e.tooltip),b=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",g=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${le(e.placeholder||"")}"${m}${b} class="variable-chip rte-report-url ${l}${g?` ${g}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${g1}${f}</span>`:f},b1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,T1=(e,t)=>{const n=`${e.key}__name`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ye(e.tooltip),b=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",g=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${le(e.placeholder||"")}"${m}${b} class="variable-chip rte-markdown-name ${l}${g?` ${g}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${b1}${f}</span>`:f},y1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,x1=(e,t)=>{const n=e.sourceTextKey||`${e.key}__sourceText`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=e.sourceTextKey?` data-source-text-key="${le(e.sourceTextKey)}"`:"",b=Ye(e.tooltip),g=b?` data-tooltip="${le(b)}" data-variable-key="${e.key||""}"`:"",c=b&&u?"rte-variable-with-icon":"",f=b&&u?"":"hidden",E=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${le(e.placeholder||"")}"${m}${p}${g} class="variable-chip rte-markdown-input ${l}${c?` ${c}`:""}">${o}${b?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${f}" data-variable-key="${e.key}" data-tooltip="${le(b)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${y1}${E}</span>`:E},C1=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,b=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`,g=`<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${b}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${g}</div>`:g},S1=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="markdown-module" data-module-index="${n}" class="rte-richtext rte-markdown-module"${l} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,b=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${p}</div>`,g=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${b}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${g}</div>`:g},A1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,_1=(e,t)=>{const n=t[e.key]||"",r=e.placeholder?` data-placeholder="${e.placeholder}"`:"",a=e.limitRange?` data-limit-range="${e.limitRange}"`:"",i=e.disableFuture?' data-disable-future="true"':"",s=`<div data-type="datepicker" data-key="${e.key}" data-value="${n}" class="rte-datepicker-host"${r}${a}${i}></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${A1}${s}</span>`:s},k1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,v1=(e,t)=>{const n=t[e.key]||(typeof e.defaultNumber=="number"?String(e.defaultNumber):""),r=typeof e.min=="number"?` min="${e.min}"`:"",a=typeof e.max=="number"?` max="${e.max}"`:"",i=e.placeholder?le(e.placeholder):"",s=i?` placeholder="${i}"`:"",u=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",o=n||e.placeholder||"",l=vn(o),m=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${le(n)}" style="width: ${l}px;"${r}${a}${s}${u} />`,b=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${m}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${k1}${b}</span>`:b},N1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,w1=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const o=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Ye(e.tooltip);let m="";for(let p=0;p<i;p++){const b=`${e.key}_${p}`,g=t[b]||"",c=!g,f=c?"":le(g).replace(/\n/g,"<br/>"),E=c?"show-placeholder":"",h=l&&c?"rte-variable-with-icon":"",T=l?` data-tooltip="${le(l)}" data-variable-key="${e.key||""}"`:"",y=l&&c?"":"hidden",C=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",S=`<span contenteditable="true" data-type="variable" data-key="${b}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder||""}"${C}${T} class="variable-chip ${E}${h?` ${h}`:""}">${f}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${le(l)}" ></i>`:""}</span>`;p===0?m+=`<span ${o} class="exclusion-wrapper required-upload-group required-multi-first">${N1}${S}</span>`:m+=S}return m}const s=Ye(e.tooltip);let u="";for(let o=0;o<i;o++){const l=`${e.key}_${o}`,m=t[l]||"",p=!m,b=p?"":le(m).replace(/\n/g,"<br/>"),g=p?"show-placeholder":"",c=s&&p?"rte-variable-with-icon":"",f=s?` data-tooltip="${le(s)}" data-variable-key="${e.key||""}"`:"",E=s&&p?"":"hidden",h=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",T=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${o}" data-placeholder="${e.placeholder||""}"${h}${f} class="variable-chip ${g}${c?` ${c}`:""}">${b}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${E}" data-variable-key="${e.key}" data-tooltip="${le(s)}" ></i>`:""}</span>`;u+=T}return u};function I1(e,t,n,r,a,i={},s,u){if(!e.current)return;const o=/[;;,,。.!!??::、]/,l=c=>{const f=(c??"").trim();return f.length===1&&o.test(f)},m=c=>{const f=c??"",E=f.match(new RegExp(`^\\s*(${o.source})`));if(!E)return null;const h=E[1],T=f.replace(new RegExp(`^\\s*${o.source}`),"");return{punct:h,rest:T}},p=c=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${c}</span>`,b=[];let g=0;for(;g<t.length;){const c=t[g],f=g+1<t.length?t[g+1]:null;let E=!1;if(c.type==="text"&&(c.text?.includes("icon-bitian")||c.className==="rte-text-required")&&f){const w=f.type==="upload"&&f.exclusionGroup==="fileInput"&&c.exclusionGroup==="fileInput"&&c.exclusionGroup===f.exclusionGroup,_=f.type==="variable"&&f.exclusionGroup==="textInput"&&c.exclusionGroup==="textInput"&&c.exclusionGroup===f.exclusionGroup;if(w){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,I="</span>";let B="";c.className?B=`<span class="${c.className}">${c.text??""}</span>`:B=c.text??"";const H=f,{uploadHtml:v,hintHtml:x}=l1(H,n);b.push(O+B+v+I+x),g+=2;continue}if(_){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,I="</span>";let B="";c.className?B=`<span class="${c.className}">${c.text??""}</span>`:B=c.text??"";const v=du(f,a);b.push(O+B+v+I),g+=2;continue}}const T=c.exclusionGroup?`data-group="${c.exclusionGroup}"`:"",y=c.exclusionGroup?`<span ${T} class="exclusion-wrapper">`:"",C=c.exclusionGroup?"</span>":"";let S="";if(c.type==="tag")S=i1(c,{lockStructure:r,hideButtons:s});else if(c.type==="text")S=s1(c,r);else if(c.type==="variable"&&c.key)S=u1(c,a);else if(c.type==="report-url"&&c.key)S=E1(c,a);else if(c.type==="markdown-name"&&c.key)S=T1(c,a);else if(c.type==="markdown"&&c.key)S=x1(c,a);else if(c.type==="upload"&&c.key){const w=!!f&&f.type==="text"&&!f.className&&!f.exclusionGroup&&l(f.text),_=w?(f.text??"").trim():"",L=_?p(_):"";w&&(E=!0),S=c1(c,n,L)}else c.type==="select"&&c.key?S=f1(c,a):c.type==="textarea"&&c.key?S=h1(c,a):c.type==="richtext"&&c.key?S=m1(c,a):c.type==="report-module"&&c.key?S=C1(c,a):c.type==="markdown-module"&&c.key?S=S1(c,a):c.type==="datepicker"&&c.key?S=_1(c,a):c.type==="number-input"&&c.key?S=v1(c,a):c.type==="multi-variable"&&c.key&&(S=w1(c,a,i));const A=y+S+C;if(c.type==="text"&&!c.className&&!c.exclusionGroup){if(l(c.text)&&b.length>0){const _=b[b.length-1],L=(c.text??"").trim();b[b.length-1]=`<span class="rte-inline-group">${_}${p(L)}</span>`,g++;continue}const w=m(c.text);if(w&&b.length>0){const _=b[b.length-1];b[b.length-1]=`<span class="rte-inline-group">${_}${p(w.punct)}</span>`;const L=w.rest;if(L){const O=L.replace(/\n/g,"<br/>");b.push(`<span data-type="text" contenteditable="false">${O}</span>`)}g++;continue}}b.push(A),g+=E?2:1}e.current&&(e.current.innerHTML=b.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(f=>{if(f.dataset.variableRender==="antd-textarea")return;if(f.innerText.replace(/\n/g,"").replace(/\u200B/g,""))f.classList.remove("show-placeholder");else{const T=Array.from(f.childNodes),y=f.querySelector(".variable-info-icon");T.forEach(S=>{if(S.nodeType===Node.TEXT_NODE){f.removeChild(S);return}S.nodeType===Node.ELEMENT_NODE&&S.tagName==="BR"&&f.removeChild(S)});const C=document.createTextNode("");y&&y.parentNode===f?f.insertBefore(C,y):f.firstChild?f.insertBefore(C,f.firstChild):f.appendChild(C),f.classList.add("show-placeholder")}})},0))}function L1(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const f=c.getAttribute("data-node-type")||"";if(f!=="report-module"&&f!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const E=(c.textContent||"").replace(/[\u200B]/g,"").trim(),h=Array.from(c.querySelectorAll(":scope > div"));if(h.length===0)return E;let T=-1;for(let S=0;S<h.length;S++)if((h[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return h.filter((S,A)=>A!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
|
|
60
|
-
`).trim()||
|
|
61
|
-
`).trim():""}catch{
|
|
62
|
-
`);
|
|
63
|
-
`).trim()}catch{return
|
|
64
|
-
`);return L.replace(/\n/g,"").trim().length>0?L:""})();_&&(S.getAttribute("data-node-type")==="report-url"?p[`${A}__url`]=_:S.getAttribute("data-node-type")==="markdown-name"?p[`${A}__name`]=_:p[A]=_)}}),e.current.querySelectorAll('[data-type="select"]').forEach(S=>{const A=S.dataset.key;if(A){const w=(S.getAttribute("data-value")||"").trim();w&&(p[A]=w)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(S=>{const A=S.dataset.key;if(A){const w=S.value.replace(/[\u200B]/g,"").trim();w&&(p[A]=w)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(S=>{const A=S.dataset.key;if(A){const w=S.getAttribute("data-node-type")||"",_=w==="report-module"||w==="markdown-module",L=_?(S.innerHTML||"").replace(/[\u200B]/g,"").trim():(S.textContent||"").replace(/[\u200B]/g,"").trim();if(_){const O=Number.parseInt(S.getAttribute("data-module-index")||"0",10);p[`${A}__module_${Number.isFinite(O)?O:0}`]=L}else L&&(p[A]=L)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(S=>{const A=S.dataset.key;if(A){const w=(S.getAttribute("data-value")||"").trim();w&&(p[A]=w)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(S=>{const A=S.dataset.key;if(A){const w=(S.value||"").trim();w&&(p[A]=w)}})),l&&Object.keys(l).length>0){const f={};Object.entries(l).forEach(([E,h])=>{Array.isArray(h)?h.forEach((T,y)=>{T!=null&&String(T).trim()!==""&&(f[`${E}_${y}`]=String(T))}):h!=null&&String(h).trim()!==""&&(t.find(y=>y.key===E&&y.type==="report-url")?f[`${E}__url`]=String(h):f[E]=String(h))}),Object.entries(f).forEach(([E,h])=>{!(E in p)&&!b.has(E)&&(p[E]=h)})}if(I1(e,t,n,r,p,a,u),setTimeout(()=>{Nn(e)},0),i?.current){const{key:f,offset:E}=i.current;setTimeout(()=>{if(!e.current)return;const h=e.current.querySelector(`[data-type="variable"][data-key="${f}"]`);if(h){if(h.dataset.variableRender==="antd-textarea"){const T=h.querySelector("textarea");if(T){T.focus();try{const y=T.value?.length??0;T.setSelectionRange(Math.min(E,y),Math.min(E,y))}catch{}i.current=null;return}}try{const T=document.createRange(),y=document.createTreeWalker(h,NodeFilter.SHOW_TEXT,null);let C=0,S=null,A=0;for(;y.nextNode();){const w=y.currentNode,_=w.textContent?.length||0;if(C+_>=E){S=w,A=E-C;break}C+=_}if(S){T.setStart(S,Math.min(A,S.textContent?.length||0)),T.collapse(!0);const w=window.getSelection();w&&(w.removeAllRanges(),w.addRange(T),h.focus())}else{T.selectNodeContents(h),T.collapse(!1);const w=window.getSelection();w&&(w.removeAllRanges(),w.addRange(T),h.focus())}}catch{const T=document.createRange();T.selectNodeContents(h),T.collapse(!1);const y=window.getSelection();y&&(y.removeAllRanges(),y.addRange(T),h.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,u,o,l]);M.useEffect(()=>{m()},[m])}function D1(e,t,n,r,a){M.useEffect(()=>{const i=e.current;if(!i)return;const s=l=>l.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(l.name||""),u=l=>{const m=l.target?.closest(".upload-info-icon");if(m&&m.classList.contains("upload-info-icon")){const b=m.dataset.uploadKey;if(b){const g=m.dataset.tooltip||"";let c=!1;try{const E=JSON.parse(g);E&&E.type==="steps"&&Array.isArray(E.images)&&(c=!0)}catch{}if(c){const f=m.closest('[data-type="upload"]');r({key:b,anchorEl:f||m,type:"upload"})}else{const f=m.closest('[data-type="upload"]');r({key:b,anchorEl:f||m,type:"upload"})}}return}const p=l.target?.closest('[data-type="upload"]');if(p){const b=p.dataset.key;if(b){const g=n[b];g&&s(g)&&r({key:b,anchorEl:p,type:"upload-preview"})}}},o=l=>{if(a)return;const m=l.target?.closest(".upload-info-icon"),p=l.relatedTarget;if(p?.closest?.(".rte-tooltip-overlay"))return;if(m&&m.classList.contains("upload-info-icon")){const g=m.closest('[data-type="upload"]');if(p&&g&&g.contains(p))return;if(!p||!i.contains(p))r(null);else{const c=p.closest('[data-type="upload"]');(!c||c!==g)&&r(null)}return}const b=l.target?.closest('[data-type="upload"]');if(b){const g=p;if(g?.closest?.(".rte-tooltip-overlay")||g&&b.contains(g))return;r(null)}};return i.addEventListener("mouseover",u,!0),i.addEventListener("mouseout",o,!0),()=>{i.removeEventListener("mouseover",u,!0),i.removeEventListener("mouseout",o,!0)}},[t,n,e,r,a])}function P1(e,t,n,r,a){M.useEffect(()=>{const i=e.current;if(!i)return;const s=m=>{if(r==="hideTagClose")return;const p=m.currentTarget,b=p.dataset.tooltip,g=p.dataset.tagKey||"";b&&n({key:g,anchorEl:p,type:"tag"})},u=m=>{a||m.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let o;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.addEventListener("mouseenter",s),p.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(o),i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.removeEventListener("mouseenter",s),p.removeEventListener("mouseleave",u)})}},[t,e,n,r,a])}function M1(e,t,n,r){M.useEffect(()=>{const a=e.current;if(!a)return;const i=u=>{const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const m=o.dataset.variableKey;m&&n({key:m,anchorEl:o,type:"variable"});return}const l=u.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const m=l.dataset.key;m&&n({key:m,anchorEl:l,type:"variable"})}},s=u=>{if(r)return;const o=u.target,l=u.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const m=o?.closest?.(".variable-info-icon"),p=o?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(m||p){if(!l||!a.contains(l)){n(null);return}const b=!!l.closest?.(".variable-info-icon"),g=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!b&&!g&&n(null)}};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[t,e,n,r])}function B1(e,t,n,r,a){M.useEffect(()=>{const i=e.current;if(!i)return;const s=p=>p.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name||""),u=p=>{const b=p.currentTarget,g=b.dataset.fileName,c=b.closest('[data-type="upload"]'),f=c?.dataset.key||"",E=f?n[f]:null;if(E&&s(E)){r({key:f,anchorEl:c||b,type:"upload-preview"});return}g&&r({key:f,anchorEl:c||b,type:"upload-label"})},o=p=>{a||p.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const m=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(b=>{b.addEventListener("mouseenter",u),b.addEventListener("mouseleave",o)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(m)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(b=>{b.removeEventListener("mouseenter",u),b.removeEventListener("mouseleave",o)})}},[t,n,e,r,a])}function R1(e,t,n,r){M.useEffect(()=>{const a=setTimeout(()=>{pr(e,t,n),L1(e,t,n,r)},0);return()=>clearTimeout(a)},[n,t,e,r])}function F1(e,t){const n=M.useRef(0),r=M.useRef(0);M.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=T=>T instanceof HTMLElement?!!(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker")||T.closest(".ant-picker-dropdown")):!1,u=T=>T instanceof HTMLElement?!!(T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown")):!1,o=T=>{a=!0,s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] mousedown on datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] mousedown on select target"))},l=()=>{a=!1,i=Date.now()};let m=!1,p=0;const b=()=>{m=!0},g=()=>{m=!1,p=Date.now()},c=()=>{p=Date.now()},f=T=>{s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] focusin datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] focusin select target"))},E=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800){console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");return}const T=document.activeElement;if(T&&(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker-dropdown")||T.tagName==="INPUT"&&T.closest(".ant-picker")||T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown"))){console.log("[SelectionCtrl] activeElement is picker/select; skip");return}if(!e.current)return;const y=window.getSelection();if(!y||y.rangeCount===0||t.current||a||m||Date.now()-p<500)return;const C=y.getRangeAt(0);if(!C.collapsed)return e.current.contains(C.commonAncestorContainer),void 0;const S=y.anchorNode;if(!S||!e.current.contains(S))return;let A=!1,w=!1;if(S.nodeType===Node.ELEMENT_NODE){const L=S;(L.closest('[data-type="datepicker"]')||L.closest(".rte-datepicker-wrapper")||L.closest(".rte-datepicker-host"))&&(A=!0),(L.closest('[data-type="select"]')||L.closest(".rte-select-wrapper")||L.closest(".rte-select-host"))&&(w=!0)}else if(S.parentElement){const L=S.parentElement;(L.closest('[data-type="datepicker"]')||L.closest(".rte-datepicker-wrapper")||L.closest(".rte-datepicker-host"))&&(A=!0),(L.closest('[data-type="select"]')||L.closest(".rte-select-wrapper")||L.closest(".rte-select-host"))&&(w=!0)}if(A||w)return;let _=null;if(S.nodeType===Node.ELEMENT_NODE?_=S.closest('[data-type="variable"]'):S.nodeType===Node.TEXT_NODE&&S.parentElement&&(_=S.parentElement.closest('[data-type="variable"]')),!_){if(Date.now()-i>500)return;const L=e.current.querySelectorAll('[data-type="variable"]');if(L.length>0){let O=null;for(const I of Array.from(L))if(I.style.display!=="none"){O=I;break}if(!O&&L.length>0&&(O=L[0]),O){const I=document.createRange();I.selectNodeContents(O),I.collapse(!1),y.removeAllRanges(),y.addRange(I),O.focus()}else y.removeAllRanges()}else y.removeAllRanges()}},h=e.current;return h&&(h.addEventListener("compositionstart",b),h.addEventListener("compositionend",g),h.addEventListener("input",c)),document.addEventListener("mousedown",o),document.addEventListener("mouseup",l),document.addEventListener("focusin",f),document.addEventListener("selectionchange",E),()=>{h&&(h.removeEventListener("compositionstart",b),h.removeEventListener("compositionend",g),h.removeEventListener("input",c)),document.removeEventListener("mousedown",o),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",f),document.removeEventListener("selectionchange",E)}},[e,t])}var ar={exports:{}},H1=ar.exports,pu;function hu(){return pu||(pu=1,function(e,t){(function(n,r){e.exports=r()})(H1,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",p="month",b="quarter",g="year",c="date",f="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|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,T={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(v){var x=["th","st","nd","rd"],P=v%100;return"["+v+(x[(P-20)%10]||x[P]||x[0])+"]"}},y=function(v,x,P){var $=String(v);return!$||$.length>=x?v:""+Array(x+1-$.length).join(P)+v},C={s:y,z:function(v){var x=-v.utcOffset(),P=Math.abs(x),$=Math.floor(P/60),U=P%60;return(x<=0?"+":"-")+y($,2,"0")+":"+y(U,2,"0")},m:function v(x,P){if(x.date()<P.date())return-v(P,x);var $=12*(P.year()-x.year())+(P.month()-x.month()),U=x.clone().add($,p),G=P-U<0,k=x.clone().add($+(G?-1:1),p);return+(-($+(P-U)/(G?U-k:k-U))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:p,y:g,w:m,d:l,D:c,h:o,m:u,s,ms:i,Q:b}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},S="en",A={};A[S]=T;var w="$isDayjsObject",_=function(v){return v instanceof B||!(!v||!v[w])},L=function v(x,P,$){var U;if(!x)return S;if(typeof x=="string"){var G=x.toLowerCase();A[G]&&(U=G),P&&(A[G]=P,U=G);var k=x.split("-");if(!U&&k.length>1)return v(k[0])}else{var j=x.name;A[j]=x,U=j}return!$&&U&&(S=U),U||!$&&S},O=function(v,x){if(_(v))return v.clone();var P=typeof x=="object"?x:{};return P.date=v,P.args=arguments,new B(P)},I=C;I.l=L,I.i=_,I.w=function(v,x){return O(v,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var B=function(){function v(P){this.$L=L(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[w]=!0}var x=v.prototype;return x.parse=function(P){this.$d=function($){var U=$.date,G=$.utc;if(U===null)return new Date(NaN);if(I.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var k=U.match(E);if(k){var j=k[2]-1||0,J=(k[7]||"0").substring(0,3);return G?new Date(Date.UTC(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)):new Date(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)}}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 I},x.isValid=function(){return this.$d.toString()!==f},x.isSame=function(P,$){var U=O(P);return this.startOf($)<=U&&U<=this.endOf($)},x.isAfter=function(P,$){return O(P)<this.startOf($)},x.isBefore=function(P,$){return this.endOf($)<O(P)},x.$g=function(P,$,U){return I.u(P)?this[$]:this.set(U,P)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(P,$){var U=this,G=!!I.u($)||$,k=I.p(P),j=function(Te,me){var Le=I.w(U.$u?Date.UTC(U.$y,me,Te):new Date(U.$y,me,Te),U);return G?Le:Le.endOf(l)},J=function(Te,me){return I.w(U.toDate()[Te].apply(U.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(me)),U)},R=this.$W,te=this.$M,ce=this.$D,ne="set"+(this.$u?"UTC":"");switch(k){case g:return G?j(1,0):j(31,11);case p:return G?j(1,te):j(0,te+1);case m:var ee=this.$locale().weekStart||0,pe=(R<ee?R+7:R)-ee;return j(G?ce-pe:ce+(6-pe),te);case l:case c:return J(ne+"Hours",0);case o:return J(ne+"Minutes",1);case u:return J(ne+"Seconds",2);case s:return J(ne+"Milliseconds",3);default:return this.clone()}},x.endOf=function(P){return this.startOf(P,!1)},x.$set=function(P,$){var U,G=I.p(P),k="set"+(this.$u?"UTC":""),j=(U={},U[l]=k+"Date",U[c]=k+"Date",U[p]=k+"Month",U[g]=k+"FullYear",U[o]=k+"Hours",U[u]=k+"Minutes",U[s]=k+"Seconds",U[i]=k+"Milliseconds",U)[G],J=G===l?this.$D+($-this.$W):$;if(G===p||G===g){var R=this.clone().set(c,1);R.$d[j](J),R.init(),this.$d=R.set(c,Math.min(this.$D,R.daysInMonth())).$d}else j&&this.$d[j](J);return this.init(),this},x.set=function(P,$){return this.clone().$set(P,$)},x.get=function(P){return this[I.p(P)]()},x.add=function(P,$){var U,G=this;P=Number(P);var k=I.p($),j=function(te){var ce=O(G);return I.w(ce.date(ce.date()+Math.round(te*P)),G)};if(k===p)return this.set(p,this.$M+P);if(k===g)return this.set(g,this.$y+P);if(k===l)return j(1);if(k===m)return j(7);var J=(U={},U[u]=r,U[o]=a,U[s]=n,U)[k]||1,R=this.$d.getTime()+P*J;return I.w(R,this)},x.subtract=function(P,$){return this.add(-1*P,$)},x.format=function(P){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||f;var G=P||"YYYY-MM-DDTHH:mm:ssZ",k=I.z(this),j=this.$H,J=this.$m,R=this.$M,te=U.weekdays,ce=U.months,ne=U.meridiem,ee=function(me,Le,nt,mt){return me&&(me[Le]||me($,G))||nt[Le].slice(0,mt)},pe=function(me){return I.s(j%12||12,me,"0")},Te=ne||function(me,Le,nt){var mt=me<12?"AM":"PM";return nt?mt.toLowerCase():mt};return G.replace(h,function(me,Le){return Le||function(nt){switch(nt){case"YY":return String($.$y).slice(-2);case"YYYY":return I.s($.$y,4,"0");case"M":return R+1;case"MM":return I.s(R+1,2,"0");case"MMM":return ee(U.monthsShort,R,ce,3);case"MMMM":return ee(ce,R);case"D":return $.$D;case"DD":return I.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ee(U.weekdaysMin,$.$W,te,2);case"ddd":return ee(U.weekdaysShort,$.$W,te,3);case"dddd":return te[$.$W];case"H":return String(j);case"HH":return I.s(j,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return Te(j,J,!0);case"A":return Te(j,J,!1);case"m":return String(J);case"mm":return I.s(J,2,"0");case"s":return String($.$s);case"ss":return I.s($.$s,2,"0");case"SSS":return I.s($.$ms,3,"0");case"Z":return k}return null}(me)||k.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(P,$,U){var G,k=this,j=I.p($),J=O(P),R=(J.utcOffset()-this.utcOffset())*r,te=this-J,ce=function(){return I.m(k,J)};switch(j){case g:G=ce()/12;break;case p:G=ce();break;case b:G=ce()/3;break;case m:G=(te-R)/6048e5;break;case l:G=(te-R)/864e5;break;case o:G=te/a;break;case u:G=te/r;break;case s:G=te/n;break;default:G=te}return U?G:I.a(G)},x.daysInMonth=function(){return this.endOf(p).$D},x.$locale=function(){return A[this.$L]},x.locale=function(P,$){if(!P)return this.$L;var U=this.clone(),G=L(P,$,!0);return G&&(U.$L=G),U},x.clone=function(){return I.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()},v}(),H=B.prototype;return O.prototype=H,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",p],["$y",g],["$D",c]].forEach(function(v){H[v[1]]=function(x){return this.$g(x,v[0],v[1])}}),O.extend=function(v,x){return v.$i||(v(x,B,O),v.$i=!0),O},O.locale=L,O.isDayjs=_,O.unix=function(v){return O(1e3*v)},O.en=A[S],O.Ls=A,O.p={},O})}(ar)),ar.exports}var $1=hu();const ir=Ir($1);var sr={exports:{}},U1=sr.exports,mu;function q1(){return mu||(mu=1,function(e,t){(function(n,r){e.exports=r(hu())})(U1,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var a=r(n),i={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(s,u){return u==="W"?s+"周":s+"日"},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(s,u){var o=100*s+u;return o<600?"凌晨":o<900?"早上":o<1100?"上午":o<1300?"中午":o<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(sr)),sr.exports}q1();function Tn(e){"@babel/helpers - typeof";return Tn=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},Tn(e)}function z1(e,t){if(Tn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V1(e){var t=z1(e,"string");return Tn(t)=="symbol"?t:t+""}function G1(e,t,n){return(t=V1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Eu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gu(Object(n),!0).forEach(function(r){G1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Y1={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},W1=Eu(Eu({},Y1),{},{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 j1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},bu={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},W1),timePickerLocale:Object.assign({},j1)};bu.lang.ok="确定",ir.locale("zh-cn");const{RangePicker:X1}=se.DatePicker,K1=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.value,a=e.dataset.placeholder,i=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,s=e.dataset.disableFuture==="true",[u,o]=M.useState(()=>{if(!r)return null;const f=r.split(",");return f.length===2&&f[0]&&f[1]?[ir(f[0]),ir(f[1])]:null}),[l,m]=M.useState(null),p=f=>f?s&&f.isAfter(ir(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(f.diff(l[0],"days"))>i:!1,b=f=>{m(f)},g=f=>{if(o(f),m(null),f&&f[0]&&f[1]){const E=`${f[0].format("YYYY-MM-DD")},${f[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",E),t(n,E)}else e.setAttribute("data-value",""),t(n,"")},c=f=>{m(f?u:null)};return kn.createPortal(z.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:z.jsx(X1,{value:u,disabledDate:p,onCalendarChange:b,onChange:g,onOpenChange:c,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:bu,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},Q1=e=>{const[t,n]=M.useState([]);return M.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(K1,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`datepicker-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},Tu=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:u,onAgentExit:o,loading:l=!1,placeholder:m,border:p,background:b="transparent",hideButtons:g,maxHeight:c,minHeight:f,collapsed:E=!1,reportAnalyze:h,markdownAnalyze:T,markdownNameAnalyze:y,onCollapsedChange:C,collapseTransitionMs:S=260,debugTooltipSticky:A=!1,nodeValues:w})=>{console.log("收到了传递的参数");const[_,L]=se.message.useMessage(),O=M.useRef(null),I=M.useRef(null),B=M.useRef(null),H=M.useRef(null),v=M.useRef(null),x=M.useRef("");if(!x.current){const ge=Math.random().toString(36).slice(2,8);x.current=`rte_${ge}`}const[P,$]=M.useState({}),[U,G]=M.useState(null),[k,j]=M.useState(null),[J,R]=M.useState(null),{tooltipPortal:te,setPopoverVisible:ce}=a1({config:e,files:P,debugTooltipSticky:A}),{handleFileChange:ne,handleRemoveFile:ee}=Wu({config:e,messageApi:_,activeBatchKey:k,activeFileKey:U,activeBatchStartIndex:J,setActiveFileKey:G,setActiveBatchKey:j,setActiveBatchStartIndex:R,setFiles:$}),pe=M.useRef(!1),Te=M.useRef(null),{handleMouseDown:me,handleMouseMove:Le,handleMouseUp:nt,handleDoubleClick:mt}=ol({lockStructure:i,onAgentExit:o,editorRef:H,setPopoverVisible:ce,isDraggingRef:pe,mouseDownPosRef:Te}),[or,_t]=M.useState(!1),Cn=M.useRef(null),[ur,lr]=M.useState(!0),cr=M.useRef(0),[Sn,Ha]=M.useState(58),[$a,Ua]=M.useState(58),[qa,za]=M.useState(!1),[Y,Q]=M.useState(null),re=M.useRef(!1),ie=M.useRef(!1),ue=M.useRef(null),[Me,Ze]=M.useState({}),ze=M.useRef(()=>{}),[Ve,rt]=M.useState({}),we=M.useRef(()=>{}),gt=M.useRef({}),$e=M.useRef(Ve);M.useEffect(()=>{$e.current=Ve},[Ve]);const[Ut,Nu]=M.useState({}),wu=M.useRef(()=>{}),Iu=M.useRef(Ut);M.useEffect(()=>{Iu.current=Ut},[Ut]);const[qt,An]=M.useState(()=>{const ge={};return e.forEach(ye=>{ye.type==="multi-variable"&&ye.key&&(ge[ye.key]=1)}),ge});Ku({config:e,editorRef:H,files:P,setFiles:$,multiVariableCounts:qt,setMultiVariableCounts:An}),M.useEffect(()=>{if(!w)return;const ge={};e.forEach(ye=>{if(ye.type==="multi-variable"&&ye.key){const at=w[ye.key];if(Array.isArray(at)&&at.length>0){const Sb=ye.maxCount??9;ge[ye.key]=Math.min(at.length,Sb)}}}),Object.keys(ge).length>0&&An(ye=>({...ye,...ge}))},[w,e]);const Be=tl({config:e,reportAnalyzeState:Me,markdownAnalyzeState:Ve,markdownNameAnalyzeState:Ut}),{handleReportUrlBlur:db,handleMarkdownBlur:fb,handleMarkdownNameBlur:pb}=Ju({reportAnalyze:h,markdownAnalyze:T,markdownNameAnalyze:y,reportAnalyzeState:Me,setReportAnalyzeState:Ze,markdownAnalyzeState:Ve,setMarkdownAnalyzeState:rt,markdownNameAnalyzeState:Ut,setMarkdownNameAnalyzeState:Nu,editorRef:H,reportAnalyzeRef:ze,markdownAnalyzeRef:we,markdownNameAnalyzeRef:wu,markdownAnalyzeStateRef:$e,markdownNameAnalyzeStateRef:Iu});Vu(H,db,[Be]),Gu(H,pb,[Be]),Yu(H,fb,[Be]),zu(H,[Be]),O1(H,Be,P,i,qt,Cn,void 0,g,void 0,w),D1(H,Be,P,ce,A),P1(H,Be,ce,g,A),B1(H,Be,P,ce,A),M1(H,Be,ce,A),R1(H,Be,P,_t),F1(H,pe);const Lu=Ru(H),Ou=qu(H);M.useEffect(()=>{if(!H.current)return;H.current.querySelectorAll(".rte-richtext-toggle").forEach(ye=>{const at=ye.getAttribute("data-expanded")==="true";ye.innerHTML=at?'<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>'})},[Be,H]);const Du=Q1(H),{measureExpandedContentHeight:_n}=Zu({collapsed:E,collapseTransitionMs:S,contentRef:I,contentBodyRef:B,editorRef:H,debugIdRef:x,setCollapsedContentMaxHeightPx:Ha,setExpandedContentMaxHeightPx:Ua,setIsCollapseAnimating:za,effectiveConfig:Be,files:P,multiVariableCounts:qt,selectPortalsLength:Lu.length,datePickerPortalsLength:Du.length,variablePortalsLength:Ou.length}),hb=()=>{if(E)return;const ge=B.current;if(!ge)return;const ye=Math.ceil(ge.getBoundingClientRect().height||0);ye>0&&Q(ye),re.current=!0,ie.current=!1,ue.current&&(window.clearTimeout(ue.current),ue.current=null)};M.useEffect(()=>{const ge=()=>{re.current&&(ie.current=!0,ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{ue.current=null,re.current=!1,ie.current=!1,Q(null),window.requestAnimationFrame(()=>_n())},450))};return window.addEventListener("focus",ge),()=>window.removeEventListener("focus",ge)},[_n]),M.useEffect(()=>{!re.current||!ie.current||(ue.current&&(window.clearTimeout(ue.current),ue.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{Q(null),_n(),re.current=!1,ie.current=!1})}))},[P,_n]),el({config:e,editorRef:H,setIsEmpty:lr,setIsFormValid:_t});const mb=al({disabled:r,collapsed:E,onCollapsedChange:C,config:e,lockStructure:i,editorRef:H,containerRef:O,fileInputRef:v,onBeforeFilePickerOpen:hb,files:P,setFiles:$,handleRemoveFile:ee,setActiveBatchKey:j,setActiveBatchStartIndex:R,setActiveFileKey:G,isDraggingRef:pe,richtextPrevScrollTopRef:cr}),Va=il({config:e,editorRef:H,setIsEmpty:lr,setIsFormValid:_t,setReportAnalyzeState:Ze,setMarkdownAnalyzeState:rt,setMarkdownNameAnalyzeState:Nu,collapsed:E,measureExpandedContentHeight:_n,effectiveConfig:Be,files:P,multiVariableCounts:qt,setMultiVariableCounts:An,savedCursorRef:Cn}),gb=ul({disabled:r,config:e,multiVariableCounts:qt,setMultiVariableCounts:An,editorRef:H,handleInput:Va,markdownAnalyzeRef:we,reportAnalyzeRef:ze,markdownNameAnalyzeRef:wu,markdownAnalyzeStateRef:$e,markdownRawTextRef:gt,setMarkdownAnalyzeState:rt});rl({config:e,effectiveConfig:Be,files:P,editorRef:H,setIsFormValid:_t,multiVariableCounts:qt,setMultiVariableCounts:An});const Eb=sl({disabled:r,lockStructure:i,config:e,editorRef:H,handleInput:Va}),bb=ll({config:e,files:P,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:or,editorRef:H,markdownAnalyzeState:Ve,markdownNameAnalyzeState:Ut}),Tb={...a?{width:typeof a=="number"?`${a}px`:a}:{},...p?{border:p}:{},...b?{background:b}:{},...c?{maxHeight:typeof c=="number"?`${c}px`:c}:{},...f?{minHeight:typeof f=="number"?`${f}px`:f}:{},...c?{"--rte-richtext-fullscreen-height":typeof c=="number"?`${c}px`:c}:{}},yb=typeof S=="number"&&Number.isFinite(S)&&S>=0?S:260,xb={overflow:"hidden"},Cb={maxHeight:Y!=null?`${Y}px`:E?`${Sn}px`:`${Math.max($a,Sn)}px`,overflow:Y!=null||E||qa?"hidden":"auto",transition:Y!=null?"none":`max-height ${yb}ms cubic-bezier(0.4, 0, 0.2, 1)`,willChange:"max-height"};return z.jsxs("div",{className:"rich-text-editor",style:Tb,"data-disabled":r,ref:O,children:[L,z.jsx("div",{className:"rich-text-editor-content",ref:I,style:xb,children:z.jsxs("div",{ref:B,className:"rich-text-editor-content-body",style:Cb,children:[z.jsx("div",{ref:H,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${ur&&m?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":m,onMouseDown:me,onMouseMove:Le,onMouseUp:nt,onClick:mb,onDoubleClick:mt,onInput:Va,onKeyDown:Eb,onPaste:gb}),z.jsx("input",{type:"file",ref:v,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:ne})]})}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsx("div",{className:"rich-text-editor-footer-left",children:z.jsxs("div",{className:"rich-text-editor-brand",children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""}),z.jsx("span",{className:"rte-brand-text",children:"SealSeek 1.0"})]}),g!=="hideAgent"&&z.jsx(se.Dropdown,{placement:"topLeft",menu:{items:s.filter(ge=>ge.isShowNew!==1).map(ge=>({key:ge.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[ge.icon&&z.jsx("i",{className:ge.icon}),z.jsx("span",{children:ge.label})]}),onClick:()=>{u?.(ge)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})]})}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(()=>{const ge=e.find(at=>at.type==="tag");if(!ge||!ge.text)return null;const ye=s.find(at=>at.label===ge.text);return!ye||ye.points===void 0||ye.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ye.points)]}),ye.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:bb,disabled:n||r||l||!or,className:"rich-text-editor-send-button",children:n||l?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),te,Du,Lu,Ou]})};Tu.__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 yu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",J1=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],Z1=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:u})=>e&&n?z.jsxs("div",{className:"auto_load_progress",children:[r||z.jsx("img",{src:yu,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),z.jsx(se.Progress,{percent:n.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||z.jsx("img",{src:yu,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(se.Select,{value:t,onChange:a,options:J1,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),eb=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:u,onChange:o,onLoadNextPage:l,onStartAutoLoad:m,onStopLoading:p})=>{const[b,g]=M.useState(5),c=Math.ceil(r/n),f=M.useMemo(()=>a.length>=c,[a,c]),E=()=>Array.from({length:c},(y,C)=>C+1).filter(y=>!a.includes(y)).slice(0,b),h=(T,y,C)=>{const S=a.includes(T);return y==="prev"||y==="next"||y==="jump-prev"||y==="jump-next"?z.jsx("div",{className:"pageBox",children:C}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===T?"#2563EB":"#f5f5f5",color:e===T?"#fff":S?"#171717":"#a3a3a3"},children:[T,!S&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(st.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!f&&z.jsx(Z1,{loadIcon:t||void 0,autoLoading:s,batchSize:b,loadingProgress:u,disabled:!l||!m,onBatchSizeChange:g,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const T=E();m?.(T)},onStopLoad:()=>p?.()})]}),z.jsx(se.Pagination,{current:e,pageSize:n,total:r,onChange:T=>o(T),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:h})]})},xu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:u,pageSize:o,cachedPages:l,onChangePage:m,onLoadNextPage:p,onStartAutoLoad:b,onStopLoading:g,...c}=e,f=M.useRef(null),E=M.useCallback(h=>{m(h),l.includes(h)&&f.current?.scrollTo({key:`${(h-1)*o+1}`})},[l,m,o]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(se.Table,{ref:f,...c,columns:a,dataSource:i,pagination:!1,virtual:!0}),z.jsx(eb,{loading:t,autoLoading:n,loadingProgress:r,current:u,pageSize:o,total:s,loadedCount:i.length,cachedPages:l,onChange:E,onLoadNextPage:p,onStartAutoLoad:b,onStopLoading:g})]})};xu.__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 Cu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[u,o]=M.useState(""),[l,m]=M.useState(0),[p,b]=M.useState(!1),[g,c]=M.useState(!1),[f,E]=M.useState(!1),h=M.useRef(void 0),T=M.useRef(void 0),y=M.useRef(e),C=M.useRef(l),S=M.useRef(g),A=M.useRef(u);M.useEffect(()=>{y.current=e,C.current=l,S.current=g,A.current=u});const w=M.useCallback((v,x)=>{let P=0;E(!0);const $=()=>{P<v.length?(o(v.slice(0,P+1)),P++,T.current=window.setTimeout($,n)):(E(!1),x?.())};$()},[n]),_=M.useCallback(v=>{let x=A.current.length;const P=()=>{x>0?(o(A.current.slice(0,x-1)),x--,T.current=window.setTimeout(P,n/2)):v?.()};P()},[n]),L=M.useCallback(()=>{if(y.current.length===0||S.current)return;b(!0);const v=y.current[C.current];A.current?_(()=>{w(v,()=>{h.current=window.setTimeout(()=>{m(x=>(x+1)%y.current.length),b(!1)},2e3)})}):w(v,()=>{h.current=window.setTimeout(()=>{m(x=>(x+1)%y.current.length),b(!1)},2e3)})},[_,w]);M.useEffect(()=>(r&&e.length>0&&!g&&L(),()=>{h.current&&window.clearTimeout(h.current),T.current&&window.clearTimeout(T.current)}),[l,g,r,e.length,L]),M.useEffect(()=>{!p&&r&&e.length>0&&!g&&L()},[l,p,r,e.length,g,L]);const O=v=>{c(!0),h.current&&window.clearTimeout(h.current),T.current&&window.clearTimeout(T.current),b(!1),E(!1),s.onFocus?.(v)},I=v=>{c(!1),!a&&e.length>0&&(o(""),m(0)),s.onBlur?.(v)},B=v=>{i?.(v.target.value),s.onChange?.(v)},H=()=>g||a?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(se.Input,{...s,value:a,onChange:B,onFocus:O,onBlur:I,placeholder:H(),style:{...s.style,position:"relative",zIndex:1}}),!g&&!a&&u&&z.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:[z.jsx("span",{children:u}),f&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
|
|
54
|
+
`},a),i}function hh(e,t){return e&&"run"in e?async function(n,r){const a=zs(n,{file:r,...t});await e.run(a,r)}:function(n,r){return zs(n,{file:r,...e||t})}}function Vs(e){if(e)throw e}var Xr,Gs;function mh(){if(Gs)return Xr;Gs=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},i=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var m=e.call(l,"constructor"),p=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!m&&!p)return!1;var E;for(E in l);return typeof E>"u"||e.call(l,E)},s=function(l,m){n&&m.name==="__proto__"?n(l,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):l[m.name]=m.newValue},u=function(l,m){if(m==="__proto__")if(e.call(l,m)){if(r)return r(l,m).value}else return;return l[m]};return Xr=function o(){var l,m,p,E,h,c,f=arguments[0],b=1,g=arguments.length,T=!1;for(typeof f=="boolean"&&(T=f,f=arguments[1]||{},b=2),(f==null||typeof f!="object"&&typeof f!="function")&&(f={});b<g;++b)if(l=arguments[b],l!=null)for(m in l)p=u(f,m),E=u(l,m),f!==E&&(T&&E&&(i(E)||(h=a(E)))?(h?(h=!1,c=p&&a(p)?p:[]):c=p&&i(p)?p:{},s(f,{name:m,newValue:o(T,c,E)})):typeof E<"u"&&s(f,{name:m,newValue:E}));return f},Xr}var gh=mh();const Kr=Ir(gh);function Qr(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 Eh(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const s=a.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);u(null,...a);function u(o,...l){const m=e[++i];let p=-1;if(o){s(o);return}for(;++p<a.length;)(l[p]===null||l[p]===void 0)&&(l[p]=a[p]);a=l,m?bh(m,u)(...l):s(null,...l)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function bh(e,t){let n;return r;function r(...s){const u=e.length>s.length;let o;u&&s.push(a);try{o=e.apply(this,s)}catch(l){const m=l;if(u&&n)throw m;return a(m)}u||(o&&o.then&&typeof o.then=="function"?o.then(i,a):o instanceof Error?a(o):i(o))}function a(s,...u){n||(n=!0,t(s,...u))}function i(s){a(null,s)}}const Qe={basename:Th,dirname:yh,extname:xh,join:Ch,sep:"/"};function Th(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sn(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else s<0&&(i=!0,s=a+1),u>-1&&(e.codePointAt(a)===t.codePointAt(u--)?u<0&&(r=a):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function yh(e){if(sn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xh(e){sn(e);let t=e.length,n=-1,r=0,a=-1,i=0,s;for(;t--;){const u=e.codePointAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Ch(...e){let t=-1,n;for(;++t<e.length;)sn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Sh(n)}function Sh(e){sn(e);const t=e.codePointAt(0)===47;let n=Ah(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Ah(e,t){let n="",r=0,a=-1,i=0,s=-1,u,o;for(;++s<=e.length;){if(s<e.length)u=e.codePointAt(s);else{if(u===47)break;u=47}if(u===47){if(!(a===s-1||i===1))if(a!==s-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",r=0):(n=n.slice(0,o),r=n.length-1-n.lastIndexOf("/")),a=s,i=0;continue}}else if(n.length>0){n="",r=0,a=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,s):n=e.slice(a+1,s),r=s-a-1;a=s,i=0}else u===46&&i>-1?i++:i=-1}return n}function sn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _h={cwd:kh};function kh(){return"/"}function Jr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function vh(e){if(typeof e=="string")e=new URL(e);else if(!Jr(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 Nh(e)}function Nh(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Zr=["history","path","basename","stem","extname","dirname"];class Ys{constructor(t){let n;t?Jr(t)?n={path:t}:typeof t=="string"||wh(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_h.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Zr.length;){const i=Zr[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)Zr.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Qe.basename(this.path):void 0}set basename(t){ta(t,"basename"),ea(t,"basename"),this.path=Qe.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qe.dirname(this.path):void 0}set dirname(t){Ws(this.basename,"dirname"),this.path=Qe.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qe.extname(this.path):void 0}set extname(t){if(ea(t,"extname"),Ws(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=Qe.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Jr(t)&&(t=vh(t)),ta(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qe.basename(this.path,this.extname):void 0}set stem(t){ta(t,"stem"),ea(t,"stem"),this.path=Qe.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new ve(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function ea(e,t){if(e&&e.includes(Qe.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qe.sep+"`")}function ta(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ws(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Ih=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},Lh={}.hasOwnProperty;class na extends Ih{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=Eh()}copy(){const t=new na;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Kr(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ia("data",this.frozen),this.namespace[t]=n,this):Lh.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ia("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[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Yn(t),r=this.parser||this.Parser;return ra("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ra("process",this.parser||this.Parser),aa("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,s){const u=Yn(t),o=r.parse(u);r.run(o,u,function(m,p,E){if(m||!p||!E)return l(m);const h=p,c=r.stringify(h,E);Ph(c)?E.value=c:E.result=c,l(m,E)});function l(m,p){m||!p?s(m):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),ra("processSync",this.parser||this.Parser),aa("processSync",this.compiler||this.Compiler),this.process(t,a),Xs("processSync","process",n),r;function a(i,s){n=!0,Vs(i),r=s}}run(t,n,r){js(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(s,u){const o=Yn(n);a.run(t,o,l);function l(m,p,E){const h=p||t;m?u(m):s?s(h):r(void 0,h,E)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Xs("runSync","run",r),a;function i(s,u){Vs(s),a=u,r=!0}}stringify(t,n){this.freeze();const r=Yn(n),a=this.compiler||this.Compiler;return aa("stringify",a),js(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(ia("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(l){if(typeof l=="function")o(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[m,...p]=l;o(m,p)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))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");u(l.plugins),l.settings&&(a.settings=Kr(!0,a.settings,l.settings))}function u(l){let m=-1;if(l!=null)if(Array.isArray(l))for(;++m<l.length;){const p=l[m];i(p)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function o(l,m){let p=-1,E=-1;for(;++p<r.length;)if(r[p][0]===l){E=p;break}if(E===-1)r.push([l,...m]);else if(m.length>0){let[h,...c]=m;const f=r[E][1];Qr(f)&&Qr(h)&&(h=Kr(!0,f,h)),r[E]=[l,h,...c]}}}}const Oh=new na().freeze();function ra(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function aa(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ia(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 js(e){if(!Qr(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Xs(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yn(e){return Dh(e)?e:new Ys(e)}function Dh(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ph(e){return typeof e=="string"||Mh(e)}function Mh(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Bh="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ks=[],Qs={allowDangerousHtml:!0},Rh=/^(https?|ircs?|mailto|xmpp)$/i,Fh=[{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 sa(e){const t=Hh(e),n=$h(e);return Uh(t.runSync(t.parse(n),n),e)}function Hh(e){const t=e.rehypePlugins||Ks,n=e.remarkPlugins||Ks,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Qs}:Qs;return Oh().use(yp).use(n).use(hh,r).use(t)}function $h(e){const t=e.children||"",n=new Ys;return typeof t=="string"&&(n.value=t),n}function Uh(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,s=t.skipHtml,u=t.unwrapDisallowed,o=t.urlTransform||qh;for(const m of Fh)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+Bh+m.id,void 0);return Gn(e,l),ld(e,{Fragment:z.Fragment,components:a,ignoreInvalidStyle:!0,jsx:z.jsx,jsxs:z.jsxs,passKeys:!0,passNode:!0});function l(m,p,E){if(m.type==="raw"&&E&&typeof p=="number")return s?E.children.splice(p,1):E.children[p]={type:"text",value:m.value},p;if(m.type==="element"){let h;for(h in Br)if(Object.hasOwn(Br,h)&&Object.hasOwn(m.properties,h)){const c=m.properties[h],f=Br[h];(f===null||f.includes(m.tagName))&&(m.properties[h]=o(String(c||""),h,m))}}if(m.type==="element"){let h=n?!n.includes(m.tagName):i?i.includes(m.tagName):!1;if(!h&&r&&typeof p=="number"&&(h=!r(m,p,E)),h&&E&&typeof p=="number")return u&&m.children?E.children.splice(p,1,...m.children):E.children.splice(p,1),p}}}function qh(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||Rh.test(e.slice(0,t))?e:""}const Js=/[#.]/g;function zh(e,t){const n=e||"",r={};let a=0,i,s;for(;a<n.length;){Js.lastIndex=a;const u=Js.exec(n),o=n.slice(a,u?u.index:n.length);o&&(i?i==="#"?r.id=o:Array.isArray(r.className)?r.className.push(o):r.className=[o]:s=o,a+=o.length),u&&(i=u[0],a++)}return{type:"element",tagName:s||t||"div",properties:r,children:[]}}function Zs(e,t,n){const r=n?Wh(n):void 0;function a(i,s,...u){let o;if(i==null){o={type:"root",children:[]};const l=s;u.unshift(l)}else{o=zh(i,t);const l=o.tagName.toLowerCase(),m=r?r.get(l):void 0;if(o.tagName=m||l,Vh(s))u.unshift(s);else for(const[p,E]of Object.entries(s))Gh(e,o.properties,p,E)}for(const l of u)oa(o.children,l);return o.type==="element"&&o.tagName==="template"&&(o.content={type:"root",children:o.children},o.children=[]),o}return a}function Vh(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const a=t[r];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const i=a;for(const s of i)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function Gh(e,t,n,r){const a=Bn(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?a.spaceSeparated?i=qi(r):a.commaSeparated?i=wi(r):a.commaOrSpaceSeparated?i=qi(wi(r).join(" ")):i=eo(a,a.property,r):Array.isArray(r)?i=[...r]:i=a.property==="style"?Yh(r):String(r);if(Array.isArray(i)){const s=[];for(const u of i)s.push(eo(a,a.property,u));i=s}a.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[a.property]=i}}function oa(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 n of t)oa(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?oa(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function eo(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Wt(n)===Wt(t)))return!0}return n}function Yh(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function Wh(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const jh=["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"],Xh=Zs(jt,"div"),Kh=Zs(ut,"g",jh);function Qh(e){const t=String(e),n=[];return{toOffset:a,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let s=0;for(;;){let u=n[s];if(u===void 0){const o=to(t,n[s-1]);u=o===-1?t.length+1:o+1,n[s]=u}if(u>i)return{line:s+1,column:i-(s>0?n[s-1]:0)+1,offset:i};s++}}}function a(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const u=n[n.length-1],o=to(t,u),l=o===-1?t.length+1:o+1;if(u===l)break;n.push(l)}const s=(i.line>1?n[i.line-2]:0)+i.column-1;if(s<n[i.line-1])return s}}}function to(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
55
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const xt={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/"},no={}.hasOwnProperty,Jh=Object.prototype;function Zh(e,t){const n=t||{};return ua({file:n.file||void 0,location:!1,schema:n.space==="svg"?ut:jt,verbose:n.verbose||!1},e)}function ua(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Wn(e,r,n),n}case"#document":case"#document-fragment":{const r=t,a="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ro(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const i=String(e.file),s=Qh(i),u=s.toPoint(0),o=s.toPoint(i.length);n.position={start:u,end:o}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Wn(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Wn(e,r,n),n}default:return n=e0(e,t),n}}function ro(e,t){let n=-1;const r=[];for(;++n<t.length;){const a=ua(e,t[n]);r.push(a)}return r}function e0(e,t){const n=e.schema;e.schema=t.namespaceURI===xt.svg?ut:jt;let r=-1;const a={};for(;++r<t.attrs.length;){const u=t.attrs[r],o=(u.prefix?u.prefix+":":"")+u.name;no.call(Jh,o)||(a[o]=u.value)}const s=(e.schema.space==="svg"?Kh:Xh)(t.tagName,a,ro(e,t.childNodes));if(Wn(e,t,s),s.tagName==="template"){const u=t,o=u.sourceCodeLocation,l=o&&o.startTag&&Pt(o.startTag),m=o&&o.endTag&&Pt(o.endTag),p=ua(e,u.content);l&&m&&e.file&&(p.position={start:l.end,end:m.start}),s.content=p}return e.schema=n,s}function Wn(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=t0(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function t0(e,t,n){const r=Pt(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(r&&!n.endTag&&a&&a.position&&a.position.end&&(r.end=Object.assign({},a.position.end)),e.verbose){const i={};let s;if(n.attrs)for(s in n.attrs)no.call(n.attrs,s)&&(i[Bn(e.schema,s).property]=Pt(n.attrs[s]));n.startTag;const u=Pt(n.startTag),o=n.endTag?Pt(n.endTag):void 0,l={opening:u};o&&(l.closing=o),l.properties=i,t.data={position:l}}}return r}function Pt(e){const t=ao({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=ao({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function ao(e){return e.line&&e.column?e:void 0}const io={}.hasOwnProperty;function so(e,t){const n=t||{};function r(a,...i){let s=r.invalid;const u=r.handlers;if(a&&io.call(a,e)){const o=String(a[e]);s=io.call(u,o)?u[o]:r.unknown}if(s)return s.call(this,a,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const n0={},r0={}.hasOwnProperty,oo=so("type",{handlers:{root:i0,element:c0,text:u0,comment:l0,doctype:o0}});function a0(e,t){const r=(t||n0).space;return oo(e,r==="svg"?ut:jt)}function i0(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=la(e.children,n,t),Mt(e,n),n}function s0(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=la(e.children,n,t),Mt(e,n),n}function o0(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Mt(e,t),t}function u0(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Mt(e,t),t}function l0(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Mt(e,t),t}function c0(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=ut);const a=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&r0.call(e.properties,i)){const o=d0(r,i,e.properties[i]);o&&a.push(o)}}const s=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:xt[s],childNodes:[],parentNode:null};return u.childNodes=la(e.children,u,r),Mt(e,u),e.tagName==="template"&&e.content&&(u.content=s0(e.content,r)),u}function d0(e,t,n){const r=Bn(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Ii(n):zi(n));const a={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=a.name.indexOf(":");i<0?a.prefix="":(a.name=a.name.slice(i+1),a.prefix=r.attribute.slice(0,i)),a.namespace=xt[r.space]}return a}function la(e,t,n){let r=-1;const a=[];if(e)for(;++r<e.length;){const i=oo(e[r],n);i.parentNode=t,a.push(i)}return a}function Mt(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const f0=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],p0=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]),be="�";var I;(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"})(I||(I={}));const Pe={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uo(e){return e>=55296&&e<=57343}function h0(e){return e>=56320&&e<=57343}function m0(e,t){return(e-55296)*1024+9216+t}function lo(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function co(e){return e>=64976&&e<=65007||p0.has(e)}var V;(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"})(V||(V={}));const g0=65536;class E0{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=g0,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,n){const{line:r,col:a,offset:i}=this,s=a+n,u=i+n;return{code:t,startLine:r,endLine:r,startCol:s,endCol:s,startOffset:u,endOffset:u}}_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 n=this.html.charCodeAt(this.pos+1);if(h0(n))return this.pos++,this._addGap(),m0(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(V.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,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.LINE_FEED:r}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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uo(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){lo(t)?this._err(V.controlCharacterInInputStream):co(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var oe;(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"})(oe||(oe={}));function fo(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const b0=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))),T0=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 y0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=T0.get(e))!==null&&t!==void 0?t:e}var _e;(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"})(_e||(_e={}));const x0=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 ca(e){return e>=_e.ZERO&&e<=_e.NINE}function C0(e){return e>=_e.UPPER_A&&e<=_e.UPPER_F||e>=_e.LOWER_A&&e<=_e.LOWER_F}function S0(e){return e>=_e.UPPER_A&&e<=_e.UPPER_Z||e>=_e.LOWER_A&&e<=_e.LOWER_Z||ca(e)}function A0(e){return e===_e.EQUALS||S0(e)}var ke;(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"})(ke||(ke={}));var tt;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(tt||(tt={}));class _0{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=ke.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=tt.Strict}startEntity(t){this.decodeMode=t,this.state=ke.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case ke.EntityStart:return t.charCodeAt(n)===_e.NUM?(this.state=ke.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=ke.NamedEntity,this.stateNamedEntity(t,n));case ke.NumericStart:return this.stateNumericStart(t,n);case ke.NumericDecimal:return this.stateNumericDecimal(t,n);case ke.NumericHex:return this.stateNumericHex(t,n);case ke.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|x0)===_e.LOWER_X?(this.state=ke.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=ke.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,a){if(n!==r){const i=r-n;this.result=this.result*Math.pow(a,i)+Number.parseInt(t.substr(n,i),a),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(ca(a)||C0(a))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const a=t.charCodeAt(n);if(ca(a))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===_e.SEMI)this.consumed+=1;else if(this.decodeMode===tt.Strict)return 0;return this.emitCodePoint(y0(this.result),this.consumed),this.errors&&(t!==_e.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let a=r[this.treeIndex],i=(a&dt.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=k0(r,a,this.treeIndex+Math.max(1,i),s),this.treeIndex<0)return this.result===0||this.decodeMode===tt.Attribute&&(i===0||A0(s))?0:this.emitNotTerminatedNamedEntity();if(a=r[this.treeIndex],i=(a&dt.VALUE_LENGTH)>>14,i!==0){if(s===_e.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==tt.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,a=(r[n]&dt.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~dt.VALUE_LENGTH:a[t+1],r),n===3&&this.emitCodePoint(a[t+2],r),r}end(){var t;switch(this.state){case ke.NamedEntity:return this.result!==0&&(this.decodeMode!==tt.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case ke.NumericDecimal:return this.emitNumericEntity(0,2);case ke.NumericHex:return this.emitNumericEntity(0,3);case ke.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case ke.EntityStart:return 0}}}function k0(e,t,n,r){const a=(t&dt.BRANCH_LENGTH)>>7,i=t&dt.JUMP_TABLE;if(a===0)return i!==0&&r===i?n:-1;if(i){const o=r-i;return o<0||o>=a?-1:e[n+o]-1}let s=n,u=s+a-1;for(;s<=u;){const o=s+u>>>1,l=e[o];if(l<r)s=o+1;else if(l>r)u=o-1;else return e[o+a]}return-1}var W;(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/"})(W||(W={}));var Ct;(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"})(Ct||(Ct={}));var qe;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(qe||(qe={}));var q;(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"})(q||(q={}));var d;(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"})(d||(d={}));const v0=new Map([[q.A,d.A],[q.ADDRESS,d.ADDRESS],[q.ANNOTATION_XML,d.ANNOTATION_XML],[q.APPLET,d.APPLET],[q.AREA,d.AREA],[q.ARTICLE,d.ARTICLE],[q.ASIDE,d.ASIDE],[q.B,d.B],[q.BASE,d.BASE],[q.BASEFONT,d.BASEFONT],[q.BGSOUND,d.BGSOUND],[q.BIG,d.BIG],[q.BLOCKQUOTE,d.BLOCKQUOTE],[q.BODY,d.BODY],[q.BR,d.BR],[q.BUTTON,d.BUTTON],[q.CAPTION,d.CAPTION],[q.CENTER,d.CENTER],[q.CODE,d.CODE],[q.COL,d.COL],[q.COLGROUP,d.COLGROUP],[q.DD,d.DD],[q.DESC,d.DESC],[q.DETAILS,d.DETAILS],[q.DIALOG,d.DIALOG],[q.DIR,d.DIR],[q.DIV,d.DIV],[q.DL,d.DL],[q.DT,d.DT],[q.EM,d.EM],[q.EMBED,d.EMBED],[q.FIELDSET,d.FIELDSET],[q.FIGCAPTION,d.FIGCAPTION],[q.FIGURE,d.FIGURE],[q.FONT,d.FONT],[q.FOOTER,d.FOOTER],[q.FOREIGN_OBJECT,d.FOREIGN_OBJECT],[q.FORM,d.FORM],[q.FRAME,d.FRAME],[q.FRAMESET,d.FRAMESET],[q.H1,d.H1],[q.H2,d.H2],[q.H3,d.H3],[q.H4,d.H4],[q.H5,d.H5],[q.H6,d.H6],[q.HEAD,d.HEAD],[q.HEADER,d.HEADER],[q.HGROUP,d.HGROUP],[q.HR,d.HR],[q.HTML,d.HTML],[q.I,d.I],[q.IMG,d.IMG],[q.IMAGE,d.IMAGE],[q.INPUT,d.INPUT],[q.IFRAME,d.IFRAME],[q.KEYGEN,d.KEYGEN],[q.LABEL,d.LABEL],[q.LI,d.LI],[q.LINK,d.LINK],[q.LISTING,d.LISTING],[q.MAIN,d.MAIN],[q.MALIGNMARK,d.MALIGNMARK],[q.MARQUEE,d.MARQUEE],[q.MATH,d.MATH],[q.MENU,d.MENU],[q.META,d.META],[q.MGLYPH,d.MGLYPH],[q.MI,d.MI],[q.MO,d.MO],[q.MN,d.MN],[q.MS,d.MS],[q.MTEXT,d.MTEXT],[q.NAV,d.NAV],[q.NOBR,d.NOBR],[q.NOFRAMES,d.NOFRAMES],[q.NOEMBED,d.NOEMBED],[q.NOSCRIPT,d.NOSCRIPT],[q.OBJECT,d.OBJECT],[q.OL,d.OL],[q.OPTGROUP,d.OPTGROUP],[q.OPTION,d.OPTION],[q.P,d.P],[q.PARAM,d.PARAM],[q.PLAINTEXT,d.PLAINTEXT],[q.PRE,d.PRE],[q.RB,d.RB],[q.RP,d.RP],[q.RT,d.RT],[q.RTC,d.RTC],[q.RUBY,d.RUBY],[q.S,d.S],[q.SCRIPT,d.SCRIPT],[q.SEARCH,d.SEARCH],[q.SECTION,d.SECTION],[q.SELECT,d.SELECT],[q.SOURCE,d.SOURCE],[q.SMALL,d.SMALL],[q.SPAN,d.SPAN],[q.STRIKE,d.STRIKE],[q.STRONG,d.STRONG],[q.STYLE,d.STYLE],[q.SUB,d.SUB],[q.SUMMARY,d.SUMMARY],[q.SUP,d.SUP],[q.TABLE,d.TABLE],[q.TBODY,d.TBODY],[q.TEMPLATE,d.TEMPLATE],[q.TEXTAREA,d.TEXTAREA],[q.TFOOT,d.TFOOT],[q.TD,d.TD],[q.TH,d.TH],[q.THEAD,d.THEAD],[q.TITLE,d.TITLE],[q.TR,d.TR],[q.TRACK,d.TRACK],[q.TT,d.TT],[q.U,d.U],[q.UL,d.UL],[q.SVG,d.SVG],[q.VAR,d.VAR],[q.WBR,d.WBR],[q.XMP,d.XMP]]);function Bt(e){var t;return(t=v0.get(e))!==null&&t!==void 0?t:d.UNKNOWN}const X=d,N0={[W.HTML]:new Set([X.ADDRESS,X.APPLET,X.AREA,X.ARTICLE,X.ASIDE,X.BASE,X.BASEFONT,X.BGSOUND,X.BLOCKQUOTE,X.BODY,X.BR,X.BUTTON,X.CAPTION,X.CENTER,X.COL,X.COLGROUP,X.DD,X.DETAILS,X.DIR,X.DIV,X.DL,X.DT,X.EMBED,X.FIELDSET,X.FIGCAPTION,X.FIGURE,X.FOOTER,X.FORM,X.FRAME,X.FRAMESET,X.H1,X.H2,X.H3,X.H4,X.H5,X.H6,X.HEAD,X.HEADER,X.HGROUP,X.HR,X.HTML,X.IFRAME,X.IMG,X.INPUT,X.LI,X.LINK,X.LISTING,X.MAIN,X.MARQUEE,X.MENU,X.META,X.NAV,X.NOEMBED,X.NOFRAMES,X.NOSCRIPT,X.OBJECT,X.OL,X.P,X.PARAM,X.PLAINTEXT,X.PRE,X.SCRIPT,X.SECTION,X.SELECT,X.SOURCE,X.STYLE,X.SUMMARY,X.TABLE,X.TBODY,X.TD,X.TEMPLATE,X.TEXTAREA,X.TFOOT,X.TH,X.THEAD,X.TITLE,X.TR,X.TRACK,X.UL,X.WBR,X.XMP]),[W.MATHML]:new Set([X.MI,X.MO,X.MN,X.MS,X.MTEXT,X.ANNOTATION_XML]),[W.SVG]:new Set([X.TITLE,X.FOREIGN_OBJECT,X.DESC]),[W.XLINK]:new Set,[W.XML]:new Set,[W.XMLNS]:new Set},da=new Set([X.H1,X.H2,X.H3,X.H4,X.H5,X.H6]);q.STYLE,q.SCRIPT,q.XMP,q.IFRAME,q.NOEMBED,q.NOFRAMES,q.PLAINTEXT;var P;(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"})(P||(P={}));const Ce={DATA:P.DATA,RCDATA:P.RCDATA,RAWTEXT:P.RAWTEXT,SCRIPT_DATA:P.SCRIPT_DATA,PLAINTEXT:P.PLAINTEXT,CDATA_SECTION:P.CDATA_SECTION};function w0(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function on(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function I0(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function ft(e){return I0(e)||on(e)}function po(e){return ft(e)||w0(e)}function jn(e){return e+32}function ho(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function mo(e){return ho(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function L0(e){return e===I.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:uo(e)?V.surrogateCharacterReference:co(e)?V.noncharacterCharacterReference:lo(e)||e===I.CARRIAGE_RETURN?V.controlCharacterReference:null}class O0{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=P.DATA,this.returnState=P.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new E0(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new _0(b0,(r,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const a=L0(r);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var r,a;(a=(r=this.handler).onParseError)===null||a===void 0||a.call(r,this.preprocessor.getError(t,n))}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,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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 n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:oe.START_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:oe.END_TAG,tagName:"",tagID:d.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:oe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:oe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fo(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const a=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(V.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=Bt(t.tagName),t.type===oe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.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 oe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case oe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case oe.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:oe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ho(t)?oe.WHITESPACE_CHARACTER:t===I.NULL?oe.NULL_CHARACTER:oe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(oe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=P.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?tt.Attribute:tt.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===P.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case P.DATA:{this._stateData(t);break}case P.RCDATA:{this._stateRcdata(t);break}case P.RAWTEXT:{this._stateRawtext(t);break}case P.SCRIPT_DATA:{this._stateScriptData(t);break}case P.PLAINTEXT:{this._statePlaintext(t);break}case P.TAG_OPEN:{this._stateTagOpen(t);break}case P.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case P.TAG_NAME:{this._stateTagName(t);break}case P.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case P.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case P.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case P.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case P.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case P.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case P.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case P.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case P.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case P.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case P.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case P.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case P.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case P.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case P.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case P.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case P.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case P.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case P.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case P.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case P.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case P.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case P.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case P.BOGUS_COMMENT:{this._stateBogusComment(t);break}case P.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case P.COMMENT_START:{this._stateCommentStart(t);break}case P.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case P.COMMENT:{this._stateComment(t);break}case P.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case P.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case P.COMMENT_END:{this._stateCommentEnd(t);break}case P.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case P.DOCTYPE:{this._stateDoctype(t);break}case P.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case P.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case P.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case P.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case P.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case P.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case P.CDATA_SECTION:{this._stateCdataSection(t);break}case P.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case P.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case P.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case P.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=P.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=P.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=P.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ft(t))this._createStartTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=P.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=P.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=P.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ft(t))this._createEndTagToken(),this.state=P.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=P.DATA;break}case I.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=be;break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(on(t)?jn(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=P.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ft(t)?(this.state=P.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=P.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=P.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=P.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=P.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ft(t)?(this.state=P.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=P.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=P.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=P.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ft(t)?(this.state=P.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=P.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_ESCAPED,this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ft(t)?(this._emitChars("<"),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ft(t)?(this.state=P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&mo(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=P.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(be);break}case I.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Pe.SCRIPT,!1)&&mo(this.preprocessor.peek(Pe.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Pe.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=P.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=P.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=P.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.name+=be;break}default:this.currentAttr.name+=String.fromCodePoint(on(t)?jn(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=P.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=P.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=P.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=P.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=P.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=P.DATA,this.emitCurrentTagToken();break}default:this.state=P.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=P.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=be;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=P.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=P.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=P.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=P.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=P.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.data+=be;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Pe.DASH_DASH,!0)?(this._createCommentToken(Pe.DASH_DASH.length+1),this.state=P.COMMENT_START):this._consumeSequenceIfMatch(Pe.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Pe.DOCTYPE.length+1),this.state=P.DOCTYPE):this._consumeSequenceIfMatch(Pe.CDATA_START,!0)?this.inForeignNode?this.state=P.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Pe.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=P.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=P.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=P.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=P.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=P.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=P.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=P.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.data+=be;break}case I.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=P.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=P.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=P.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=P.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(V.nestedComment),this.state=P.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=P.COMMENT_END;break}case I.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=P.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=P.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=P.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=P.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=P.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=P.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(on(t))this._createDoctypeToken(String.fromCharCode(jn(t))),this.state=P.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(be),this.state=P.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=P.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.name+=be;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(on(t)?jn(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Pe.PUBLIC,!1)?this.state=P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Pe.SYSTEM,!1)?this.state=P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=be;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=be;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=be;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case I.APOSTROPHE:{this.state=P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=be;break}case I.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=P.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=P.DATA;break}case I.NULL:{this._err(V.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=P.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=P.CDATA_SECTION_END:(this._emitChars("]"),this.state=P.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=P.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=P.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&po(this.preprocessor.peek(1))?P.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){po(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const go=new Set([d.DD,d.DT,d.LI,d.OPTGROUP,d.OPTION,d.P,d.RB,d.RP,d.RT,d.RTC]),Eo=new Set([...go,d.CAPTION,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]),Xn=new Set([d.APPLET,d.CAPTION,d.HTML,d.MARQUEE,d.OBJECT,d.TABLE,d.TD,d.TEMPLATE,d.TH]),D0=new Set([...Xn,d.OL,d.UL]),P0=new Set([...Xn,d.BUTTON]),bo=new Set([d.ANNOTATION_XML,d.MI,d.MN,d.MO,d.MS,d.MTEXT]),To=new Set([d.DESC,d.FOREIGN_OBJECT,d.TITLE]),M0=new Set([d.TR,d.TEMPLATE,d.HTML]),B0=new Set([d.TBODY,d.TFOOT,d.THEAD,d.TEMPLATE,d.HTML]),R0=new Set([d.TABLE,d.TEMPLATE,d.HTML]),F0=new Set([d.TD,d.TH]);class H0{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=d.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===d.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===W.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,r),this.stackTop++,a===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,a===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==W.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(da,W.HTML)}popUntilTableCellPopped(){this.popUntilPopped(F0,W.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(R0,W.HTML)}clearBackToTableBodyContext(){this.clearBackTo(B0,W.HTML)}clearBackToTableRowContext(){this.clearBackTo(M0,W.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===d.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===d.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const a=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case W.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case W.SVG:{if(To.has(a))return!1;break}case W.MATHML:{if(bo.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xn)}hasInListItemScope(t){return this.hasInDynamicScope(t,D0)}hasInButtonScope(t){return this.hasInDynamicScope(t,P0)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case W.HTML:{if(da.has(n))return!0;if(Xn.has(n))return!1;break}case W.SVG:{if(To.has(n))return!1;break}case W.MATHML:{if(bo.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===W.HTML)switch(this.tagIDs[t]){case d.TBODY:case d.THEAD:case d.TFOOT:return!0;case d.TABLE:case d.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===W.HTML)switch(this.tagIDs[n]){case t:return!0;case d.OPTION:case d.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&go.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Eo.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Eo.has(this.currentTagId);)this.pop()}}const fa=3;var Je;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Je||(Je={}));const yo={type:Je.Marker};class $0{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],a=n.length,i=this.treeAdapter.getTagName(t),s=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const o=this.entries[u];if(o.type===Je.Marker)break;const{element:l}=o;if(this.treeAdapter.getTagName(l)===i&&this.treeAdapter.getNamespaceURI(l)===s){const m=this.treeAdapter.getAttrList(l);m.length===a&&r.push({idx:u,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<fa)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<fa)return;const a=new Map(n.map(s=>[s.name,s.value]));let i=0;for(let s=0;s<r.length;s++){const u=r[s];u.attrs.every(o=>a.get(o.name)===o.value)&&(i+=1,i>=fa&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(yo)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Je.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Je.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(yo);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Je.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Je.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Je.Element&&n.element===t)}}const pt={createDocument(){return{nodeName:"#document",mode:qe.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,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,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const a=e.childNodes.find(i=>i.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pt.appendChild(e,i)}},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 n=e.childNodes[e.childNodes.length-1];if(pt.isTextNode(n)){n.value+=t;return}}pt.appendChild(e,pt.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pt.isTextNode(r)?r.value+=t:pt.insertBefore(e,pt.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},xo="html",U0="about:legacy-compat",q0="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Co=["+//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//"],z0=[...Co,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],V0=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),So=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],G0=[...So,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Ao(e,t){return t.some(n=>e.startsWith(n))}function Y0(e){return e.name===xo&&e.publicId===null&&(e.systemId===null||e.systemId===U0)}function W0(e){if(e.name!==xo)return qe.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===q0)return qe.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),V0.has(n))return qe.QUIRKS;let r=t===null?z0:Co;if(Ao(n,r))return qe.QUIRKS;if(r=t===null?So:G0,Ao(n,r))return qe.LIMITED_QUIRKS}return qe.NO_QUIRKS}const _o={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},j0="definitionurl",X0="definitionURL",K0=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])),Q0=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:W.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:W.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:W.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:W.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:W.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:W.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:W.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:W.XML}],["xml:space",{prefix:"xml",name:"space",namespace:W.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:W.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:W.XMLNS}]]),J0=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([d.B,d.BIG,d.BLOCKQUOTE,d.BODY,d.BR,d.CENTER,d.CODE,d.DD,d.DIV,d.DL,d.DT,d.EM,d.EMBED,d.H1,d.H2,d.H3,d.H4,d.H5,d.H6,d.HEAD,d.HR,d.I,d.IMG,d.LI,d.LISTING,d.MENU,d.META,d.NOBR,d.OL,d.P,d.PRE,d.RUBY,d.S,d.SMALL,d.SPAN,d.STRONG,d.STRIKE,d.SUB,d.SUP,d.TABLE,d.TT,d.U,d.UL,d.VAR]);function em(e){const t=e.tagID;return t===d.FONT&&e.attrs.some(({name:r})=>r===Ct.COLOR||r===Ct.SIZE||r===Ct.FACE)||Z0.has(t)}function ko(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===j0){e.attrs[t].name=X0;break}}function vo(e){for(let t=0;t<e.attrs.length;t++){const n=K0.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function pa(e){for(let t=0;t<e.attrs.length;t++){const n=Q0.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function tm(e){const t=J0.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Bt(e.tagName))}function nm(e,t){return t===W.MATHML&&(e===d.MI||e===d.MO||e===d.MN||e===d.MS||e===d.MTEXT)}function rm(e,t,n){if(t===W.MATHML&&e===d.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Ct.ENCODING){const a=n[r].value.toLowerCase();return a===_o.TEXT_HTML||a===_o.APPLICATION_XML}}return t===W.SVG&&(e===d.FOREIGN_OBJECT||e===d.DESC||e===d.TITLE)}function am(e,t,n,r){return(!r||r===W.HTML)&&rm(e,t,n)||(!r||r===W.MATHML)&&nm(e,t)}const im="hidden",sm=8,om=3;var F;(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"})(F||(F={}));const um={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},No=new Set([d.TABLE,d.TBODY,d.TFOOT,d.THEAD,d.TR]),wo={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pt,onParseError:null};class Io{constructor(t,n,r=null,a=null){this.fragmentContext=r,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=F.INITIAL,this.originalInsertionMode=F.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={...wo,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new O0(this.options,this),this.activeFormattingElements=new $0(this.treeAdapter),this.fragmentContextID=r?Bt(this.treeAdapter.getTagName(r)):d.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new H0(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...wo,...n};t??(t=r.treeAdapter.createElement(q.TEMPLATE,W.HTML,[]));const a=r.treeAdapter.createElement("documentmock",W.HTML,[]),i=new this(r,a,t);return i.fragmentContextID===d.TEMPLATE&&i.tmplInsertionModeStack.unshift(F.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var a;if(!this.onParseError)return;const i=(a=t.location)!==null&&a!==void 0?a:um,s={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(s)}onItemPush(t,n,r){var a,i;(i=(a=this.treeAdapter).onItemPush)===null||i===void 0||i.call(a,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(r=this.treeAdapter).onItemPop)===null||a===void 0||a.call(r,t,this.openElements.current),n){let i,s;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,s=this.fragmentContextID):{current:i,currentTagId:s}=this.openElements,this._setContextModes(i,s)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===W.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,W.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=F.TEXT}switchToPlaintextParsing(){this.insertionMode=F.TEXT,this.originalInsertionMode=F.IN_BODY,this.tokenizer.state=Ce.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)===q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==W.HTML))switch(this.fragmentContextID){case d.TITLE:case d.TEXTAREA:{this.tokenizer.state=Ce.RCDATA;break}case d.STYLE:case d.XMP:case d.IFRAME:case d.NOEMBED:case d.NOFRAMES:case d.NOSCRIPT:{this.tokenizer.state=Ce.RAWTEXT;break}case d.SCRIPT:{this.tokenizer.state=Ce.SCRIPT_DATA;break}case d.PLAINTEXT:{this.tokenizer.state=Ce.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,a),t.location){const s=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));s&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,W.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,W.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(q.HTML,W.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,d.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const a=this.treeAdapter.getChildNodes(n),i=r?a.lastIndexOf(r):a.length,s=a[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:o,endCol:l,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:o,endCol:l,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,a=this.treeAdapter.getTagName(t),i=n.type===oe.END_TAG&&a===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===d.SVG&&this.treeAdapter.getTagName(n)===q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===W.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===d.MGLYPH||t.tagID===d.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,W.HTML)}_processToken(t){switch(t.type){case oe.CHARACTER:{this.onCharacter(t);break}case oe.NULL_CHARACTER:{this.onNullCharacter(t);break}case oe.COMMENT:{this.onComment(t);break}case oe.DOCTYPE:{this.onDoctype(t);break}case oe.START_TAG:{this._processStartTag(t);break}case oe.END_TAG:{this.onEndTag(t);break}case oe.EOF:{this.onEof(t);break}case oe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const a=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return am(t,a,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===Je.Marker||this.openElements.contains(a.element)),r=n===-1?t-1:n-1;for(let a=r;a>=0;a--){const i=this.activeFormattingElements.entries[a];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=F.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(d.P),this.openElements.popUntilTagNamePopped(d.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case d.TR:{this.insertionMode=F.IN_ROW;return}case d.TBODY:case d.THEAD:case d.TFOOT:{this.insertionMode=F.IN_TABLE_BODY;return}case d.CAPTION:{this.insertionMode=F.IN_CAPTION;return}case d.COLGROUP:{this.insertionMode=F.IN_COLUMN_GROUP;return}case d.TABLE:{this.insertionMode=F.IN_TABLE;return}case d.BODY:{this.insertionMode=F.IN_BODY;return}case d.FRAMESET:{this.insertionMode=F.IN_FRAMESET;return}case d.SELECT:{this._resetInsertionModeForSelect(t);return}case d.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case d.HTML:{this.insertionMode=this.headElement?F.AFTER_HEAD:F.BEFORE_HEAD;return}case d.TD:case d.TH:{if(t>0){this.insertionMode=F.IN_CELL;return}break}case d.HEAD:{if(t>0){this.insertionMode=F.IN_HEAD;return}break}}this.insertionMode=F.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===d.TEMPLATE)break;if(r===d.TABLE){this.insertionMode=F.IN_SELECT_IN_TABLE;return}}this.insertionMode=F.IN_SELECT}_isElementCausesFosterParenting(t){return No.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 n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case d.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===W.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case d.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return N0[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Fg(this,t);return}switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:{Oo(this,t);break}case F.TEXT:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_TABLE_TEXT:{$o(this,t);break}case F.IN_COLUMN_GROUP:{Jn(this,t);break}case F.AFTER_BODY:{tr(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Rg(this,t);return}switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.TEXT:{this._insertCharacters(t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_COLUMN_GROUP:{Jn(this,t);break}case F.AFTER_BODY:{tr(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ma(this,t);return}switch(this.insertionMode){case F.INITIAL:case F.BEFORE_HTML:case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_TEMPLATE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{ma(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.AFTER_BODY:{mm(this,t);break}case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{gm(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case F.INITIAL:{Em(this,t);break}case F.BEFORE_HEAD:case F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case F.IN_TABLE_TEXT:{gn(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?Hg(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{bm(this,t);break}case F.BEFORE_HEAD:{ym(this,t);break}case F.IN_HEAD:{Ge(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Sm(this,t);break}case F.AFTER_HEAD:{_m(this,t);break}case F.IN_BODY:{Ne(this,t);break}case F.IN_TABLE:{Rt(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_CAPTION:{xg(this,t);break}case F.IN_COLUMN_GROUP:{ba(this,t);break}case F.IN_TABLE_BODY:{Zn(this,t);break}case F.IN_ROW:{er(this,t);break}case F.IN_CELL:{Ag(this,t);break}case F.IN_SELECT:{zo(this,t);break}case F.IN_SELECT_IN_TABLE:{kg(this,t);break}case F.IN_TEMPLATE:{Ng(this,t);break}case F.AFTER_BODY:{Ig(this,t);break}case F.IN_FRAMESET:{Lg(this,t);break}case F.AFTER_FRAMESET:{Dg(this,t);break}case F.AFTER_AFTER_BODY:{Mg(this,t);break}case F.AFTER_AFTER_FRAMESET:{Bg(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?$g(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{Tm(this,t);break}case F.BEFORE_HEAD:{xm(this,t);break}case F.IN_HEAD:{Cm(this,t);break}case F.IN_HEAD_NO_SCRIPT:{Am(this,t);break}case F.AFTER_HEAD:{km(this,t);break}case F.IN_BODY:{Qn(this,t);break}case F.TEXT:{dg(this,t);break}case F.IN_TABLE:{hn(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_CAPTION:{Cg(this,t);break}case F.IN_COLUMN_GROUP:{Sg(this,t);break}case F.IN_TABLE_BODY:{Ta(this,t);break}case F.IN_ROW:{qo(this,t);break}case F.IN_CELL:{_g(this,t);break}case F.IN_SELECT:{Vo(this,t);break}case F.IN_SELECT_IN_TABLE:{vg(this,t);break}case F.IN_TEMPLATE:{wg(this,t);break}case F.AFTER_BODY:{Yo(this,t);break}case F.IN_FRAMESET:{Og(this,t);break}case F.AFTER_FRAMESET:{Pg(this,t);break}case F.AFTER_AFTER_BODY:{nr(this,t);break}}}onEof(t){switch(this.insertionMode){case F.INITIAL:{un(this,t);break}case F.BEFORE_HTML:{ln(this,t);break}case F.BEFORE_HEAD:{cn(this,t);break}case F.IN_HEAD:{dn(this,t);break}case F.IN_HEAD_NO_SCRIPT:{fn(this,t);break}case F.AFTER_HEAD:{pn(this,t);break}case F.IN_BODY:case F.IN_TABLE:case F.IN_CAPTION:case F.IN_COLUMN_GROUP:case F.IN_TABLE_BODY:case F.IN_ROW:case F.IN_CELL:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:{Fo(this,t);break}case F.TEXT:{fg(this,t);break}case F.IN_TABLE_TEXT:{gn(this,t);break}case F.IN_TEMPLATE:{Go(this,t);break}case F.AFTER_BODY:case F.IN_FRAMESET:case F.AFTER_FRAMESET:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{ga(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 F.IN_HEAD:case F.IN_HEAD_NO_SCRIPT:case F.AFTER_HEAD:case F.TEXT:case F.IN_COLUMN_GROUP:case F.IN_SELECT:case F.IN_SELECT_IN_TABLE:case F.IN_FRAMESET:case F.AFTER_FRAMESET:{this._insertCharacters(t);break}case F.IN_BODY:case F.IN_CAPTION:case F.IN_CELL:case F.IN_TEMPLATE:case F.AFTER_BODY:case F.AFTER_AFTER_BODY:case F.AFTER_AFTER_FRAMESET:{Lo(this,t);break}case F.IN_TABLE:case F.IN_TABLE_BODY:case F.IN_ROW:{Ea(this,t);break}case F.IN_TABLE_TEXT:{Ho(this,t);break}}}}function lm(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):Ro(e,t),n}function cm(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const a=e.openElements.items[r];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[r])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function dm(e,t,n){let r=t,a=e.openElements.getCommonAncestor(t);for(let i=0,s=a;s!==n;i++,s=a){a=e.openElements.getCommonAncestor(s);const u=e.activeFormattingElements.getElementEntry(s),o=u&&i>=om;!u||o?(o&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(s)):(s=fm(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(s,r),r=s)}return r}function fm(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function pm(e,t,n){const r=e.treeAdapter.getTagName(t),a=Bt(r);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);a===d.TEMPLATE&&i===W.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function hm(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,i=e.treeAdapter.createElement(a.tagName,r,a.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,a.tagID)}function ha(e,t){for(let n=0;n<sm;n++){const r=lm(e,t);if(!r)break;const a=cm(e,r);if(!a)break;e.activeFormattingElements.bookmark=r;const i=dm(e,a,r.element),s=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),s&&pm(e,s,i),hm(e,a,r)}}function ma(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mm(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gm(e,t){e._appendCommentNode(t,e.document)}function ga(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(r);if(a&&!a.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],s=e.treeAdapter.getNodeSourceCodeLocation(i);s&&!s.endTag&&e._setEndLocation(i,t)}}}}function Em(e,t){e._setDocumentType(t);const n=t.forceQuirks?qe.QUIRKS:W0(t);Y0(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=F.BEFORE_HTML}function un(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,qe.QUIRKS),e.insertionMode=F.BEFORE_HTML,e._processToken(t)}function bm(e,t){t.tagID===d.HTML?(e._insertElement(t,W.HTML),e.insertionMode=F.BEFORE_HEAD):ln(e,t)}function Tm(e,t){const n=t.tagID;(n===d.HTML||n===d.HEAD||n===d.BODY||n===d.BR)&&ln(e,t)}function ln(e,t){e._insertFakeRootElement(),e.insertionMode=F.BEFORE_HEAD,e._processToken(t)}function ym(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.HEAD:{e._insertElement(t,W.HTML),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD;break}default:cn(e,t)}}function xm(e,t){const n=t.tagID;n===d.HEAD||n===d.BODY||n===d.HTML||n===d.BR?cn(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function cn(e,t){e._insertFakeElement(q.HEAD,d.HEAD),e.headElement=e.openElements.current,e.insertionMode=F.IN_HEAD,e._processToken(t)}function Ge(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TITLE:{e._switchToTextParsing(t,Ce.RCDATA);break}case d.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ce.RAWTEXT):(e._insertElement(t,W.HTML),e.insertionMode=F.IN_HEAD_NO_SCRIPT);break}case d.NOFRAMES:case d.STYLE:{e._switchToTextParsing(t,Ce.RAWTEXT);break}case d.SCRIPT:{e._switchToTextParsing(t,Ce.SCRIPT_DATA);break}case d.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=F.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(F.IN_TEMPLATE);break}case d.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:dn(e,t)}}function Cm(e,t){switch(t.tagID){case d.HEAD:{e.openElements.pop(),e.insertionMode=F.AFTER_HEAD;break}case d.BODY:case d.BR:case d.HTML:{dn(e,t);break}case d.TEMPLATE:{St(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function St(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==d.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function dn(e,t){e.openElements.pop(),e.insertionMode=F.AFTER_HEAD,e._processToken(t)}function Sm(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BASEFONT:case d.BGSOUND:case d.HEAD:case d.LINK:case d.META:case d.NOFRAMES:case d.STYLE:{Ge(e,t);break}case d.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:fn(e,t)}}function Am(e,t){switch(t.tagID){case d.NOSCRIPT:{e.openElements.pop(),e.insertionMode=F.IN_HEAD;break}case d.BR:{fn(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function fn(e,t){const n=t.type===oe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=F.IN_HEAD,e._processToken(t)}function _m(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.BODY:{e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_BODY;break}case d.FRAMESET:{e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET;break}case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{e._err(t,V.abandonedHeadElementChild),e.openElements.push(e.headElement,d.HEAD),Ge(e,t),e.openElements.remove(e.headElement);break}case d.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:pn(e,t)}}function km(e,t){switch(t.tagID){case d.BODY:case d.HTML:case d.BR:{pn(e,t);break}case d.TEMPLATE:{St(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function pn(e,t){e._insertFakeElement(q.BODY,d.BODY),e.insertionMode=F.IN_BODY,Kn(e,t)}function Kn(e,t){switch(t.type){case oe.CHARACTER:{Oo(e,t);break}case oe.WHITESPACE_CHARACTER:{Lo(e,t);break}case oe.COMMENT:{ma(e,t);break}case oe.START_TAG:{Ne(e,t);break}case oe.END_TAG:{Qn(e,t);break}case oe.EOF:{Fo(e,t);break}}}function Lo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Oo(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vm(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Nm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function wm(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_FRAMESET)}function Im(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Lm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&da.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,W.HTML)}function Om(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Dm(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),n||(e.formElement=e.openElements.current))}function Pm(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const a=e.openElements.tagIDs[r];if(n===d.LI&&a===d.LI||(n===d.DD||n===d.DT)&&(a===d.DD||a===d.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==d.ADDRESS&&a!==d.DIV&&a!==d.P&&e._isSpecialElement(e.openElements.items[r],a))break}e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML)}function Mm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.tokenizer.state=Ce.PLAINTEXT}function Bm(e,t){e.openElements.hasInScope(d.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1}function Rm(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(q.A);n&&(ha(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Fm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Hm(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(d.NOBR)&&(ha(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,W.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Um(e,t){e.treeAdapter.getDocumentMode(e.document)!==qe.QUIRKS&&e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=F.IN_TABLE}function Do(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Po(e){const t=fo(e,Ct.TYPE);return t!=null&&t.toLowerCase()===im}function qm(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,W.HTML),Po(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function zm(e,t){e._appendElement(t,W.HTML),t.ackSelfClosing=!0}function Vm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._appendElement(t,W.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Gm(e,t){t.tagName=q.IMG,t.tagID=d.IMG,Do(e,t)}function Ym(e,t){e._insertElement(t,W.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ce.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=F.TEXT}function Wm(e,t){e.openElements.hasInButtonScope(d.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function jm(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ce.RAWTEXT)}function Mo(e,t){e._switchToTextParsing(t,Ce.RAWTEXT)}function Xm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===F.IN_TABLE||e.insertionMode===F.IN_CAPTION||e.insertionMode===F.IN_TABLE_BODY||e.insertionMode===F.IN_ROW||e.insertionMode===F.IN_CELL?F.IN_SELECT_IN_TABLE:F.IN_SELECT}function Km(e,t){e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Qm(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,W.HTML)}function Jm(e,t){e.openElements.hasInScope(d.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(d.RTC),e._insertElement(t,W.HTML)}function Zm(e,t){e._reconstructActiveFormattingElements(),ko(t),pa(t),t.selfClosing?e._appendElement(t,W.MATHML):e._insertElement(t,W.MATHML),t.ackSelfClosing=!0}function eg(e,t){e._reconstructActiveFormattingElements(),vo(t),pa(t),t.selfClosing?e._appendElement(t,W.SVG):e._insertElement(t,W.SVG),t.ackSelfClosing=!0}function Bo(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,W.HTML)}function Ne(e,t){switch(t.tagID){case d.I:case d.S:case d.B:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.SMALL:case d.STRIKE:case d.STRONG:{Fm(e,t);break}case d.A:{Rm(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{Lm(e,t);break}case d.P:case d.DL:case d.OL:case d.UL:case d.DIV:case d.DIR:case d.NAV:case d.MAIN:case d.MENU:case d.ASIDE:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.DETAILS:case d.ADDRESS:case d.ARTICLE:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{Im(e,t);break}case d.LI:case d.DD:case d.DT:{Pm(e,t);break}case d.BR:case d.IMG:case d.WBR:case d.AREA:case d.EMBED:case d.KEYGEN:{Do(e,t);break}case d.HR:{Vm(e,t);break}case d.RB:case d.RTC:{Qm(e,t);break}case d.RT:case d.RP:{Jm(e,t);break}case d.PRE:case d.LISTING:{Om(e,t);break}case d.XMP:{Wm(e,t);break}case d.SVG:{eg(e,t);break}case d.HTML:{vm(e,t);break}case d.BASE:case d.LINK:case d.META:case d.STYLE:case d.TITLE:case d.SCRIPT:case d.BGSOUND:case d.BASEFONT:case d.TEMPLATE:{Ge(e,t);break}case d.BODY:{Nm(e,t);break}case d.FORM:{Dm(e,t);break}case d.NOBR:{Hm(e,t);break}case d.MATH:{Zm(e,t);break}case d.TABLE:{Um(e,t);break}case d.INPUT:{qm(e,t);break}case d.PARAM:case d.TRACK:case d.SOURCE:{zm(e,t);break}case d.IMAGE:{Gm(e,t);break}case d.BUTTON:{Bm(e,t);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{$m(e,t);break}case d.IFRAME:{jm(e,t);break}case d.SELECT:{Xm(e,t);break}case d.OPTION:case d.OPTGROUP:{Km(e,t);break}case d.NOEMBED:case d.NOFRAMES:{Mo(e,t);break}case d.FRAMESET:{wm(e,t);break}case d.TEXTAREA:{Ym(e,t);break}case d.NOSCRIPT:{e.options.scriptingEnabled?Mo(e,t):Bo(e,t);break}case d.PLAINTEXT:{Mm(e,t);break}case d.COL:case d.TH:case d.TD:case d.TR:case d.HEAD:case d.FRAME:case d.TBODY:case d.TFOOT:case d.THEAD:case d.CAPTION:case d.COLGROUP:break;default:Bo(e,t)}}function tg(e,t){if(e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ng(e,t){e.openElements.hasInScope(d.BODY)&&(e.insertionMode=F.AFTER_BODY,Yo(e,t))}function rg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function ag(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(d.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(d.FORM):n&&e.openElements.remove(n))}function ig(e){e.openElements.hasInButtonScope(d.P)||e._insertFakeElement(q.P,d.P),e._closePElement()}function sg(e){e.openElements.hasInListItemScope(d.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(d.LI),e.openElements.popUntilTagNamePopped(d.LI))}function og(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function ug(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lg(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function cg(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(q.BR,d.BR),e.openElements.pop(),e.framesetOk=!1}function Ro(e,t){const n=t.tagName,r=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const i=e.openElements.items[a],s=e.openElements.tagIDs[a];if(r===s&&(r!==d.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(i,s))break}}function Qn(e,t){switch(t.tagID){case d.A:case d.B:case d.I:case d.S:case d.U:case d.EM:case d.TT:case d.BIG:case d.CODE:case d.FONT:case d.NOBR:case d.SMALL:case d.STRIKE:case d.STRONG:{ha(e,t);break}case d.P:{ig(e);break}case d.DL:case d.UL:case d.OL:case d.DIR:case d.DIV:case d.NAV:case d.PRE:case d.MAIN:case d.MENU:case d.ASIDE:case d.BUTTON:case d.CENTER:case d.FIGURE:case d.FOOTER:case d.HEADER:case d.HGROUP:case d.DIALOG:case d.ADDRESS:case d.ARTICLE:case d.DETAILS:case d.SEARCH:case d.SECTION:case d.SUMMARY:case d.LISTING:case d.FIELDSET:case d.BLOCKQUOTE:case d.FIGCAPTION:{rg(e,t);break}case d.LI:{sg(e);break}case d.DD:case d.DT:{og(e,t);break}case d.H1:case d.H2:case d.H3:case d.H4:case d.H5:case d.H6:{ug(e);break}case d.BR:{cg(e);break}case d.BODY:{tg(e,t);break}case d.HTML:{ng(e,t);break}case d.FORM:{ag(e);break}case d.APPLET:case d.OBJECT:case d.MARQUEE:{lg(e,t);break}case d.TEMPLATE:{St(e,t);break}default:Ro(e,t)}}function Fo(e,t){e.tmplInsertionModeStack.length>0?Go(e,t):ga(e,t)}function dg(e,t){var n;t.tagID===d.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function fg(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ea(e,t){if(e.openElements.currentTagId!==void 0&&No.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=F.IN_TABLE_TEXT,t.type){case oe.CHARACTER:{$o(e,t);break}case oe.WHITESPACE_CHARACTER:{Ho(e,t);break}}else mn(e,t)}function pg(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CAPTION}function hg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_COLUMN_GROUP}function mg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.COLGROUP,d.COLGROUP),e.insertionMode=F.IN_COLUMN_GROUP,ba(e,t)}function gg(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_TABLE_BODY}function Eg(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(q.TBODY,d.TBODY),e.insertionMode=F.IN_TABLE_BODY,Zn(e,t)}function bg(e,t){e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Tg(e,t){Po(t)?e._appendElement(t,W.HTML):mn(e,t),t.ackSelfClosing=!0}function yg(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,W.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Rt(e,t){switch(t.tagID){case d.TD:case d.TH:case d.TR:{Eg(e,t);break}case d.STYLE:case d.SCRIPT:case d.TEMPLATE:{Ge(e,t);break}case d.COL:{mg(e,t);break}case d.FORM:{yg(e,t);break}case d.TABLE:{bg(e,t);break}case d.TBODY:case d.TFOOT:case d.THEAD:{gg(e,t);break}case d.INPUT:{Tg(e,t);break}case d.CAPTION:{pg(e,t);break}case d.COLGROUP:{hg(e,t);break}default:mn(e,t)}}function hn(e,t){switch(t.tagID){case d.TABLE:{e.openElements.hasInTableScope(d.TABLE)&&(e.openElements.popUntilTagNamePopped(d.TABLE),e._resetInsertionMode());break}case d.TEMPLATE:{St(e,t);break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:mn(e,t)}}function mn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Kn(e,t),e.fosterParentingEnabled=n}function Ho(e,t){e.pendingCharacterTokens.push(t)}function $o(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function gn(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)mn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Uo=new Set([d.CAPTION,d.COL,d.COLGROUP,d.TBODY,d.TD,d.TFOOT,d.TH,d.THEAD,d.TR]);function xg(e,t){const n=t.tagID;Uo.has(n)?e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,Rt(e,t)):Ne(e,t)}function Cg(e,t){const n=t.tagID;switch(n){case d.CAPTION:case d.TABLE:{e.openElements.hasInTableScope(d.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(d.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_TABLE,n===d.TABLE&&hn(e,t));break}case d.BODY:case d.COL:case d.COLGROUP:case d.HTML:case d.TBODY:case d.TD:case d.TFOOT:case d.TH:case d.THEAD:case d.TR:break;default:Qn(e,t)}}function ba(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.COL:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.TEMPLATE:{Ge(e,t);break}default:Jn(e,t)}}function Sg(e,t){switch(t.tagID){case d.COLGROUP:{e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TEMPLATE:{St(e,t);break}case d.COL:break;default:Jn(e,t)}}function Jn(e,t){e.openElements.currentTagId===d.COLGROUP&&(e.openElements.pop(),e.insertionMode=F.IN_TABLE,e._processToken(t))}function Zn(e,t){switch(t.tagID){case d.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_ROW;break}case d.TH:case d.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(q.TR,d.TR),e.insertionMode=F.IN_ROW,er(e,t);break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,Rt(e,t));break}default:Rt(e,t)}}function Ta(e,t){const n=t.tagID;switch(t.tagID){case d.TBODY:case d.TFOOT:case d.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE);break}case d.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE,hn(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:case d.TR:break;default:hn(e,t)}}function er(e,t){switch(t.tagID){case d.TH:case d.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,W.HTML),e.insertionMode=F.IN_CELL,e.activeFormattingElements.insertMarker();break}case d.CAPTION:case d.COL:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Zn(e,t));break}default:Rt(e,t)}}function qo(e,t){switch(t.tagID){case d.TR:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY);break}case d.TABLE:{e.openElements.hasInTableScope(d.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ta(e,t));break}case d.TBODY:case d.TFOOT:case d.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(d.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=F.IN_TABLE_BODY,Ta(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:case d.TD:case d.TH:break;default:hn(e,t)}}function Ag(e,t){const n=t.tagID;Uo.has(n)?(e.openElements.hasInTableScope(d.TD)||e.openElements.hasInTableScope(d.TH))&&(e._closeTableCell(),er(e,t)):Ne(e,t)}function _g(e,t){const n=t.tagID;switch(n){case d.TD:case d.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=F.IN_ROW);break}case d.TABLE:case d.TBODY:case d.TFOOT:case d.THEAD:case d.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),qo(e,t));break}case d.BODY:case d.CAPTION:case d.COL:case d.COLGROUP:case d.HTML:break;default:Qn(e,t)}}function zo(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.OPTGROUP:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._insertElement(t,W.HTML);break}case d.HR:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop(),e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.INPUT:case d.KEYGEN:case d.TEXTAREA:case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),t.tagID!==d.SELECT&&e._processStartTag(t));break}case d.SCRIPT:case d.TEMPLATE:{Ge(e,t);break}}}function Vo(e,t){switch(t.tagID){case d.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===d.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===d.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===d.OPTGROUP&&e.openElements.pop();break}case d.OPTION:{e.openElements.currentTagId===d.OPTION&&e.openElements.pop();break}case d.SELECT:{e.openElements.hasInSelectScope(d.SELECT)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode());break}case d.TEMPLATE:{St(e,t);break}}}function kg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e._processStartTag(t)):zo(e,t)}function vg(e,t){const n=t.tagID;n===d.CAPTION||n===d.TABLE||n===d.TBODY||n===d.TFOOT||n===d.THEAD||n===d.TR||n===d.TD||n===d.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(d.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Vo(e,t)}function Ng(e,t){switch(t.tagID){case d.BASE:case d.BASEFONT:case d.BGSOUND:case d.LINK:case d.META:case d.NOFRAMES:case d.SCRIPT:case d.STYLE:case d.TEMPLATE:case d.TITLE:{Ge(e,t);break}case d.CAPTION:case d.COLGROUP:case d.TBODY:case d.TFOOT:case d.THEAD:{e.tmplInsertionModeStack[0]=F.IN_TABLE,e.insertionMode=F.IN_TABLE,Rt(e,t);break}case d.COL:{e.tmplInsertionModeStack[0]=F.IN_COLUMN_GROUP,e.insertionMode=F.IN_COLUMN_GROUP,ba(e,t);break}case d.TR:{e.tmplInsertionModeStack[0]=F.IN_TABLE_BODY,e.insertionMode=F.IN_TABLE_BODY,Zn(e,t);break}case d.TD:case d.TH:{e.tmplInsertionModeStack[0]=F.IN_ROW,e.insertionMode=F.IN_ROW,er(e,t);break}default:e.tmplInsertionModeStack[0]=F.IN_BODY,e.insertionMode=F.IN_BODY,Ne(e,t)}}function wg(e,t){t.tagID===d.TEMPLATE&&St(e,t)}function Go(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(d.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ga(e,t)}function Ig(e,t){t.tagID===d.HTML?Ne(e,t):tr(e,t)}function Yo(e,t){var n;if(t.tagID===d.HTML){if(e.fragmentContext||(e.insertionMode=F.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===d.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else tr(e,t)}function tr(e,t){e.insertionMode=F.IN_BODY,Kn(e,t)}function Lg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.FRAMESET:{e._insertElement(t,W.HTML);break}case d.FRAME:{e._appendElement(t,W.HTML),t.ackSelfClosing=!0;break}case d.NOFRAMES:{Ge(e,t);break}}}function Og(e,t){t.tagID===d.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==d.FRAMESET&&(e.insertionMode=F.AFTER_FRAMESET))}function Dg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.NOFRAMES:{Ge(e,t);break}}}function Pg(e,t){t.tagID===d.HTML&&(e.insertionMode=F.AFTER_AFTER_FRAMESET)}function Mg(e,t){t.tagID===d.HTML?Ne(e,t):nr(e,t)}function nr(e,t){e.insertionMode=F.IN_BODY,Kn(e,t)}function Bg(e,t){switch(t.tagID){case d.HTML:{Ne(e,t);break}case d.NOFRAMES:{Ge(e,t);break}}}function Rg(e,t){t.chars=be,e._insertCharacters(t)}function Fg(e,t){e._insertCharacters(t),e.framesetOk=!1}function Wo(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==W.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function Hg(e,t){if(em(t))Wo(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===W.MATHML?ko(t):r===W.SVG&&(tm(t),vo(t)),pa(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $g(e,t){if(t.tagID===d.P||t.tagID===d.BR){Wo(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===W.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(r);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}q.AREA,q.BASE,q.BASEFONT,q.BGSOUND,q.BR,q.COL,q.EMBED,q.FRAME,q.HR,q.IMG,q.INPUT,q.KEYGEN,q.LINK,q.META,q.PARAM,q.SOURCE,q.TRACK,q.WBR;const Ug=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,qg=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),jo={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Xo(e,t){const n=Jg(e),r=so("type",{handlers:{root:zg,element:Vg,text:Gg,comment:Qo,doctype:Yg,raw:jg},unknown:Xg}),a={parser:n?new Io(jo):Io.getFragmentParser(void 0,jo),handle(u){r(u,a)},stitches:!1,options:t||{}};r(e,a),Ft(a,je());const i=n?a.parser.document:a.parser.getFragment(),s=Zh(i,{file:a.options.file});return a.stitches&&Gn(s,"comment",function(u,o,l){const m=u;if(m.value.stitch&&l&&o!==void 0){const p=l.children;return p[o]=m.value.stitch,o}}),s.type==="root"&&s.children.length===1&&s.children[0].type===e.type?s.children[0]:s}function Ko(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function zg(e,t){Ko(e.children,t)}function Vg(e,t){Kg(e,t),Ko(e.children,t),Qg(e,t)}function Gg(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:oe.CHARACTER,chars:e.value,location:En(e)};Ft(t,je(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Yg(e,t){const n={type:oe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:En(e)};Ft(t,je(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Wg(e,t){t.stitches=!0;const n=Zg(e);if("children"in e&&"children"in n){const r=Xo({type:"root",children:e.children},t.options);n.children=r.children}Qo({type:"comment",value:{stitch:n}},t)}function Qo(e,t){const n=e.value,r={type:oe.COMMENT,data:n,location:En(e)};Ft(t,je(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function jg(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,Jo(t,je(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ug,"<$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 n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function Xg(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))Wg(n,t);else{let r="";throw qg.has(n.type)&&(r=". 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 `"+n.type+"` node"+r)}}function Ft(e,t){Jo(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,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=Ce.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 Jo(e,t){if(t&&t.offset!==void 0){const n={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=n}}function Kg(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ce.PLAINTEXT)return;Ft(t,je(e));const r=t.parser.openElements.current;let a="namespaceURI"in r?r.namespaceURI:xt.html;a===xt.html&&n==="svg"&&(a=xt.svg);const i=a0({...e,children:[]},{space:a===xt.svg?"svg":"html"}),s={type:oe.START_TAG,tagName:n,tagID:Bt(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:En(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Qg(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&f0.includes(n)||t.parser.tokenizer.state===Ce.PLAINTEXT)return;Ft(t,Rn(e));const r={type:oe.END_TAG,tagName:n,tagID:Bt(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:En(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ce.RCDATA||t.parser.tokenizer.state===Ce.RAWTEXT||t.parser.tokenizer.state===Ce.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ce.DATA)}function Jg(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function En(e){const t=je(e)||{line:void 0,column:void 0,offset:void 0},n=Rn(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Zg(e){return"children"in e?yt({...e,children:[]}):yt(e)}function ya(e){return function(t,n){return Xo(t,{...e,file:n})}}const At=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ht={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...At,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...At],h2:[["className","sr-only"]],img:[...At,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...At,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...At],table:[...At],ul:[...At,["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"]},ht={}.hasOwnProperty;function eE(e,t){let n={type:"root",children:[]};const r={schema:t?{...Ht,...t}:Ht,stack:[]},a=Zo(r,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Zo(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return tE(e,n);case"doctype":return nE(e,n);case"element":return rE(e,n);case"root":return aE(e,n);case"text":return iE(e,n)}}}function tE(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return bn(i,t),i}}function nE(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return bn(n,t),n}}function rE(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=eu(e,t.children),a=sE(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&ht.call(e.schema.ancestors,n))){const u=e.schema.ancestors[n];let o=-1;for(i=!1;++o<u.length;)e.stack.includes(u[o])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const s={type:"element",tagName:n,properties:a,children:r};return bn(s,t),s}function aE(e,t){const r={type:"root",children:eu(e,t.children)};return bn(r,t),r}function iE(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return bn(r,t),r}function eu(e,t){const n=[];if(Array.isArray(t)){const r=t;let a=-1;for(;++a<r.length;){const i=Zo(e,r[a]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function sE(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,a=e.schema.required,i=r&&ht.call(r,n)?r[n]:void 0,s=r&&ht.call(r,"*")?r["*"]:void 0,u=t&&typeof t=="object"?t:{},o={};let l;for(l in u)if(ht.call(u,l)){const m=u[l];let p=tu(e,ru(i,l),l,m);p==null&&(p=tu(e,ru(s,l),l,m)),p!=null&&(o[l]=p)}if(a&&ht.call(a,n)){const m=a[n];for(l in m)ht.call(m,l)&&!ht.call(o,l)&&(o[l]=m[l])}return o}function tu(e,t,n,r){return t?Array.isArray(r)?oE(e,t,n,r):nu(e,t,n,r):void 0}function oE(e,t,n,r){let a=-1;const i=[];for(;++a<r.length;){const s=nu(e,t,n,r[a]);(typeof s=="number"||typeof s=="string")&&i.push(s)}return i}function nu(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&uE(e,n,r)){if(typeof t=="object"&&t.length>1){let a=!1,i=0;for(;++i<t.length;){const s=t[i];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(r))){a=!0;break}}else if(s===r){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uE(e,t,n){const r=e.schema.protocols&&ht.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const a=String(n),i=a.indexOf(":"),s=a.indexOf("?"),u=a.indexOf("#"),o=a.indexOf("/");if(i<0||o>-1&&i>o||s>-1&&i>s||u>-1&&i>u)return!0;let l=-1;for(;++l<r.length;){const m=r[l];if(i===m.length&&a.slice(0,m.length)===m)return!0}return!1}function bn(e,t){const n=Xi(t);t.data&&(e.data=yt(t.data)),n&&(e.position=n)}function ru(e,t){let n,r=-1;if(e)for(;++r<e.length;){const a=e[r],i=typeof a=="string"?a:a[0];if(i===t)return a;i==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function xa(e){return function(t){return eE(t,e)}}function au(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,a=n.indexOf(t);for(;a!==-1;)r++,a=n.indexOf(t,a+t.length);return r}const lE=["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"],iu={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 su(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function cE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function dE(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function ou(e){return dE(e)||su(e)}const fE=["","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 Ca(e,t){const n=t||{},r=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let i=0,s=-1,u="",o,l;n.position&&("start"in n.position||"indent"in n.position?(l=n.position.indent,o=n.position.start):o=n.position);let m=(o?o.line:0)||1,p=(o?o.column:0)||1,E=c(),h;for(i--;++i<=e.length;)if(h===10&&(p=(l?l[s]:0)||1),h=e.charCodeAt(i),h===38){const g=e.charCodeAt(i+1);if(g===9||g===10||g===12||g===32||g===38||g===60||Number.isNaN(g)||r&&g===r){u+=String.fromCharCode(h),p++;continue}const T=i+1;let y=T,C=T,S;if(g===35){C=++y;const H=e.charCodeAt(C);H===88||H===120?(S="hexadecimal",C=++y):S="decimal"}else S="named";let A="",w="",_="";const N=S==="named"?ou:S==="decimal"?su:cE;for(C--;++C<=e.length;){const H=e.charCodeAt(C);if(!N(H))break;_+=String.fromCharCode(H),S==="named"&&lE.includes(_)&&(A=_,w=Zt(_))}let O=e.charCodeAt(C)===59;if(O){C++;const H=S==="named"?Zt(_):!1;H&&(A=_,w=H)}let L=1+C-T,B="";if(!(!O&&n.nonTerminated===!1))if(!_)S!=="named"&&f(4,L);else if(S==="named"){if(O&&!w)f(5,1);else if(A!==_&&(C=y+A.length,L=1+C-y,O=!1),!O){const H=A?1:3;if(n.attribute){const v=e.charCodeAt(C);v===61?(f(H,L),w=""):ou(v)?w="":f(H,L)}else f(H,L)}B=w}else{O||f(2,L);let H=Number.parseInt(_,S==="hexadecimal"?16:10);if(pE(H))f(7,L),B="�";else if(H in iu)f(6,L),B=iu[H];else{let v="";hE(H)&&f(6,L),H>65535&&(H-=65536,v+=String.fromCharCode(H>>>10|55296),H=56320|H&1023),B=v+String.fromCharCode(H)}}if(B){b(),E=c(),i=C-1,p+=C-T+1,a.push(B);const H=c();H.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,B,{start:E,end:H},e.slice(T-1,C)),E=H}else _=e.slice(T-1,C),u+=_,p+=_.length,i=C-1}else h===10&&(m++,s++,p=0),Number.isNaN(h)?b():(u+=String.fromCharCode(h),p++);return a.join("");function c(){return{line:m,column:p,offset:i+((o?o.offset:0)||0)}}function f(g,T){let y;n.warning&&(y=c(),y.column+=T,y.offset+=T,n.warning.call(n.warningContext||void 0,fE[g],y,g))}function b(){u&&(a.push(u),n.text&&n.text.call(n.textContext||void 0,u,{start:E,end:c()}),u="")}}function pE(e){return e>=55296&&e<=57343||e>1114111}function hE(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 mE=/["&'<>`]/g,gE=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,EE=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,bE=/[|\\{}()[\]^$+*?.]/g,uu=new WeakMap;function TE(e,t){if(e=e.replace(t.subset?yE(t.subset):mE,r),t.subset||t.escapeOnly)return e;return e.replace(gE,n).replace(EE,r);function n(a,i,s){return t.format((a.charCodeAt(0)-55296)*1024+a.charCodeAt(1)-56320+65536,s.charCodeAt(i+2),t)}function r(a,i,s){return t.format(a.charCodeAt(0),s.charCodeAt(i+1),t)}}function yE(e){let t=uu.get(e);return t||(t=xE(e),uu.set(e,t)),t}function xE(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(bE,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}function CE(e){return"&#x"+e.toString(16).toUpperCase()+";"}function SE(e,t){return TE(e,Object.assign({format:CE},t))}const AE={}.hasOwnProperty,_E={},lu=/^[^\t\n\r "#'.<=>`}]+$/,kE=/^[^\t\n\r "'<=>`}]+$/;function vE(){return{canContainEols:["textDirective"],enter:{directiveContainer:wE,directiveContainerAttributes:_a,directiveContainerLabel:OE,directiveLeaf:IE,directiveLeafAttributes:_a,directiveText:LE,directiveTextAttributes:_a},exit:{directiveContainer:La,directiveContainerAttributeClassValue:va,directiveContainerAttributeIdValue:ka,directiveContainerAttributeName:wa,directiveContainerAttributeValue:Na,directiveContainerAttributes:Ia,directiveContainerLabel:DE,directiveContainerName:Aa,directiveLeaf:La,directiveLeafAttributeClassValue:va,directiveLeafAttributeIdValue:ka,directiveLeafAttributeName:wa,directiveLeafAttributeValue:Na,directiveLeafAttributes:Ia,directiveLeafName:Aa,directiveText:La,directiveTextAttributeClassValue:va,directiveTextAttributeIdValue:ka,directiveTextAttributeName:wa,directiveTextAttributeValue:Na,directiveTextAttributes:Ia,directiveTextName:Aa}}}function NE(e){const t=_E;if(t.quote!=='"'&&t.quote!=="'"&&t.quote!==null&&t.quote!==void 0)throw new Error("Invalid quote `"+t.quote+"`, expected `'` or `\"`");return n.peek=PE,{handlers:{containerDirective:n,leafDirective:n,textDirective:n},unsafe:[{character:"\r",inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{character:`
|
|
56
|
+
`,inConstruct:["leafDirectiveLabel","containerDirectiveLabel"]},{before:"[^:]",character:":",after:"[A-Za-z]",inConstruct:["phrasing"]},{atBreak:!0,character:":",after:":"}]};function n(i,s,u,o){const l=u.createTracker(o),m=ME(i),p=u.enter(i.type);let E=l.move(m+(i.name||"")),h;if(i.type==="containerDirective"){const c=(i.children||[])[0];h=cu(c)?c:void 0}else h=i;if(h&&h.children&&h.children.length>0){const c=u.enter("label"),f=`${i.type}Label`,b=u.enter(f);E+=l.move("["),E+=l.move(u.containerPhrasing(h,{...l.current(),before:E,after:"]"})),E+=l.move("]"),b(),c()}if(E+=l.move(r(i,u)),i.type==="containerDirective"){const c=(i.children||[])[0];let f=i;cu(c)&&(f=Object.assign({},i,{children:i.children.slice(1)})),f&&f.children&&f.children.length>0&&(E+=l.move(`
|
|
57
|
+
`),E+=l.move(u.containerFlow(f,l.current()))),E+=l.move(`
|
|
58
|
+
`+m)}return p(),E}function r(i,s){const u=i.attributes||{},o=[];let l,m,p,E;for(E in u)if(AE.call(u,E)&&u[E]!==void 0&&u[E]!==null){const h=String(u[E]);if(E==="id")p=t.preferShortcut!==!1&&lu.test(h)?"#"+h:a("id",h,i,s);else if(E==="class"){const c=h.split(/[\t\n\r ]+/g),f=[],b=[];let g=-1;for(;++g<c.length;)(t.preferShortcut!==!1&&lu.test(c[g])?b:f).push(c[g]);l=f.length>0?a("class",f.join(" "),i,s):"",m=b.length>0?"."+b.join("."):""}else o.push(a(E,h,i,s))}return l&&o.unshift(l),m&&o.unshift(m),p&&o.unshift(p),o.length>0?"{"+o.join(" ")+"}":""}function a(i,s,u,o){if(t.collapseEmptyAttributes!==!1&&!s)return i;if(t.preferUnquoted&&kE.test(s))return i+"="+s;const l=t.quote||o.options.quote||'"',m=l==='"'?"'":'"',p=t.quoteSmart&&au(s,l)>au(s,m)?m:l,E=u.type==="textDirective"?[p]:[p,`
|
|
59
|
+
`,"\r"];return i+"="+p+SE(s,{subset:E})+p}}function wE(e){Sa.call(this,"containerDirective",e)}function IE(e){Sa.call(this,"leafDirective",e)}function LE(e){Sa.call(this,"textDirective",e)}function Sa(e,t){this.enter({type:e,name:"",attributes:{},children:[]},t)}function Aa(e){const t=this.stack[this.stack.length-1];t.type==="containerDirective"||t.type==="leafDirective"||t.type,t.name=this.sliceSerialize(e)}function OE(e){this.enter({type:"paragraph",data:{directiveLabel:!0},children:[]},e)}function DE(e){this.exit(e)}function _a(){this.data.directiveAttributes=[],this.buffer()}function ka(e){this.data.directiveAttributes.push(["id",Ca(this.sliceSerialize(e),{attribute:!0})])}function va(e){this.data.directiveAttributes.push(["class",Ca(this.sliceSerialize(e),{attribute:!0})])}function Na(e){const t=this.data.directiveAttributes;t[t.length-1][1]=Ca(this.sliceSerialize(e),{attribute:!0})}function wa(e){this.data.directiveAttributes.push([this.sliceSerialize(e),""])}function Ia(){const e=this.data.directiveAttributes,t={};let n=-1;for(;++n<e.length;){const a=e[n];a[0]==="class"&&t.class?t.class+=" "+a[1]:t[a[0]]=a[1]}this.data.directiveAttributes=void 0,this.resume();const r=this.stack[this.stack.length-1];r.type==="containerDirective"||r.type==="leafDirective"||r.type,r.attributes=t}function La(e){this.exit(e)}function PE(){return":"}function cu(e){return!!(e&&e.type==="paragraph"&&e.data&&e.data.directiveLabel)}function ME(e){let t=0;return e.type==="containerDirective"?(Us(e,function(n,r){if(n.type==="containerDirective"){let a=r.length,i=0;for(;a--;)r[a].type==="containerDirective"&&i++;i>t&&(t=i)}}),t+=3):e.type==="leafDirective"?t=2:t=1,":".repeat(t)}function Oa(e,t,n,r,a,i,s,u,o,l,m,p,E,h,c){let f,b;return g;function g(x){return e.enter(r),e.enter(a),e.consume(x),e.exit(a),T}function T(x){return x===35?(f=s,y(x)):x===46?(f=u,y(x)):c&&de(x)?fe(e,T,"whitespace")(x):!c&&xe(x)?et(e,T)(x):x===null||Z(x)||tn(x)||en(x)&&x!==45&&x!==95?v(x):(e.enter(i),e.enter(o),e.consume(x),A)}function y(x){const M=f+"Marker";return e.enter(i),e.enter(f),e.enter(M),e.consume(x),e.exit(M),C}function C(x){if(x===null||x===34||x===35||x===39||x===46||x===60||x===61||x===62||x===96||x===125||xe(x))return n(x);const M=f+"Value";return e.enter(M),e.consume(x),S}function S(x){if(x===null||x===34||x===39||x===60||x===61||x===62||x===96)return n(x);if(x===35||x===46||x===125||xe(x)){const M=f+"Value";return e.exit(M),e.exit(f),e.exit(i),T(x)}return e.consume(x),S}function A(x){return x===null||Z(x)||tn(x)||en(x)&&x!==45&&x!==46&&x!==58&&x!==95?(e.exit(o),c&&de(x)?fe(e,w,"whitespace")(x):!c&&xe(x)?et(e,w)(x):w(x)):(e.consume(x),A)}function w(x){return x===61?(e.enter(l),e.consume(x),e.exit(l),_):(e.exit(i),T(x))}function _(x){return x===null||x===60||x===61||x===62||x===96||x===125||c&&Z(x)?n(x):x===34||x===39?(e.enter(m),e.enter(E),e.consume(x),e.exit(E),b=x,O):c&&de(x)?fe(e,_,"whitespace")(x):!c&&xe(x)?et(e,_)(x):(e.enter(p),e.enter(h),e.consume(x),b=void 0,N)}function N(x){return x===null||x===34||x===39||x===60||x===61||x===62||x===96?n(x):x===125||xe(x)?(e.exit(h),e.exit(p),e.exit(i),T(x)):(e.consume(x),N)}function O(x){return x===b?(e.enter(E),e.consume(x),e.exit(E),e.exit(m),e.exit(i),H):(e.enter(p),L(x))}function L(x){return x===b?(e.exit(p),O(x)):x===null?n(x):Z(x)?c?n(x):et(e,L)(x):(e.enter(h),e.consume(x),B)}function B(x){return x===b||x===null||Z(x)?(e.exit(h),L(x)):(e.consume(x),B)}function H(x){return x===125||xe(x)?T(x):v(x)}function v(x){return x===125?(e.enter(a),e.consume(x),e.exit(a),e.exit(r),t):n(x)}}function Da(e,t,n,r,a,i,s){let u=0,o=0,l;return m;function m(b){return e.enter(r),e.enter(a),e.consume(b),e.exit(a),p}function p(b){return b===93?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(i),E(b))}function E(b){if(b===93&&!o)return f(b);const g=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:l});return l&&(l.next=g),l=g,h(b)}function h(b){return b===null||u>999||b===91&&++o>32?n(b):b===93&&!o--?(e.exit("chunkText"),f(b)):Z(b)?s?n(b):(e.consume(b),e.exit("chunkText"),E):(e.consume(b),b===92?c:h)}function c(b){return b===91||b===92||b===93?(e.consume(b),u++,h):h(b)}function f(b){return e.exit(i),e.enter(a),e.consume(b),e.exit(a),e.exit(r),t}}function Pa(e,t,n,r){const a=this;return i;function i(u){return u===null||Z(u)||en(u)||tn(u)?n(u):(e.enter(r),e.consume(u),s)}function s(u){return u===null||Z(u)||tn(u)||en(u)&&u!==45&&u!==95?(e.exit(r),a.previous===45||a.previous===95?n(u):t(u)):(e.consume(u),s)}}const BE={tokenize:HE,concrete:!0},RE={tokenize:$E,partial:!0},FE={tokenize:UE,partial:!0},rr={tokenize:qE,partial:!0};function HE(e,t,n){const r=this,a=r.events[r.events.length-1],i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let s=0,u;return o;function o(N){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(N)}function l(N){return N===58?(e.consume(N),s++,l):s<3?n(N):(e.exit("directiveContainerSequence"),Pa.call(r,e,m,n,"directiveContainerName")(N))}function m(N){return N===91?e.attempt(RE,p,p)(N):p(N)}function p(N){return N===123?e.attempt(FE,E,E)(N):E(N)}function E(N){return fe(e,h,"whitespace")(N)}function h(N){return e.exit("directiveContainerFence"),N===null?w(N):Z(N)?r.interrupt?t(N):e.attempt(rr,c,w)(N):n(N)}function c(N){return N===null?w(N):Z(N)?e.check(rr,y,w)(N):(e.enter("directiveContainerContent"),f(N))}function f(N){return e.attempt({tokenize:_,partial:!0},A,i?fe(e,b,"linePrefix",i+1):b)(N)}function b(N){return N===null?A(N):Z(N)?e.check(rr,T,A)(N):T(N)}function g(N){if(N===null){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(N)}return Z(N)?e.check(rr,C,S)(N):(e.consume(N),g)}function T(N){const O=e.enter("chunkDocument",{contentType:"document",previous:u});return u&&(u.next=O),u=O,g(N)}function y(N){return e.enter("directiveContainerContent"),f(N)}function C(N){e.consume(N);const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,f}function S(N){const O=e.exit("chunkDocument");return r.parser.lazy[O.start.line]=!1,A(N)}function A(N){return e.exit("directiveContainerContent"),w(N)}function w(N){return e.exit("directiveContainer"),t(N)}function _(N,O,L){let B=0;return fe(N,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function H(M){return N.enter("directiveContainerFence"),N.enter("directiveContainerSequence"),v(M)}function v(M){return M===58?(N.consume(M),B++,v):B<s?L(M):(N.exit("directiveContainerSequence"),fe(N,x,"whitespace")(M))}function x(M){return M===null||Z(M)?(N.exit("directiveContainerFence"),O(M)):L(M)}}}function $E(e,t,n){return Da(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function UE(e,t,n){return Oa(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function qE(e,t,n){const r=this;return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i}function i(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const zE={tokenize:YE},VE={tokenize:WE,partial:!0},GE={tokenize:jE,partial:!0};function YE(e,t,n){const r=this;return a;function a(m){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(m),i}function i(m){return m===58?(e.consume(m),e.exit("directiveLeafSequence"),Pa.call(r,e,s,n,"directiveLeafName")):n(m)}function s(m){return m===91?e.attempt(VE,u,u)(m):u(m)}function u(m){return m===123?e.attempt(GE,o,o)(m):o(m)}function o(m){return fe(e,l,"whitespace")(m)}function l(m){return m===null||Z(m)?(e.exit("directiveLeaf"),t(m)):n(m)}}function WE(e,t,n){return Da(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function jE(e,t,n){return Oa(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const XE={tokenize:ZE,previous:JE},KE={tokenize:e1,partial:!0},QE={tokenize:t1,partial:!0};function JE(e){return e!==58||this.events[this.events.length-1][1].type==="characterEscape"}function ZE(e,t,n){const r=this;return a;function a(o){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(o),e.exit("directiveTextMarker"),Pa.call(r,e,i,n,"directiveTextName")}function i(o){return o===58?n(o):o===91?e.attempt(KE,s,s)(o):s(o)}function s(o){return o===123?e.attempt(QE,u,u)(o):u(o)}function u(o){return e.exit("directiveText"),t(o)}}function e1(e,t,n){return Da(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function t1(e,t,n){return Oa(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function n1(){return{text:{58:XE},flow:{58:[BE,zE]}}}function Ma(){const t=this.data(),n=t.micromarkExtensions||(t.micromarkExtensions=[]),r=t.fromMarkdownExtensions||(t.fromMarkdownExtensions=[]),a=t.toMarkdownExtensions||(t.toMarkdownExtensions=[]);n.push(n1()),r.push(vE()),a.push(NE())}const Ba={...Ht,attributes:{...Ht.attributes||{},span:[...(Ht.attributes||{}).span||[],"style"],font:[...(Ht.attributes||{}).font||[],"color"]}},Ra=()=>e=>{Gn(e,t=>{const n=t;if(!n||n.type!=="textDirective"&&n.type!=="leafDirective"&&n.type!=="containerDirective"||n.name!=="color")return;const r=n.attributes||{},a=r.hex??r.color??r.value,i=typeof a=="string"?a.trim():"",s=/^#([0-9a-fA-F]{6})$/.test(i)?i:"#7C3AED",u=r.bold,l=`${u===!0||u==="true"||u===1||u==="1"?"font-weight:700;":""}color:${s};`;n.data=n.data||{},n.data.hName="span",n.data.hProperties={style:l}})},r1=e=>{const t=(e??"").trim();if(!t)return null;if(!(t.startsWith("{")&&t.endsWith("}")))return{kind:"text",text:t};try{const n=JSON.parse(t);if(!n||typeof n!="object")return{kind:"text",text:t};const r=n;return r.type==="steps"&&typeof r.title=="string"&&Array.isArray(r.images)&&Array.isArray(r.stepDescriptions)?{kind:"steps",data:n}:{kind:"text",text:t}}catch{return{kind:"text",text:t}}},a1=({config:e,files:t,debugTooltipSticky:n=!1})=>{const[r,a]=D.useState(null),[i,s]=D.useState(!1),u=D.useRef(null),o=D.useRef(null),l=D.useRef(null),m=200,p=200,E=D.useCallback(()=>{u.current&&(window.clearTimeout(u.current),u.current=null),o.current&&(window.clearTimeout(o.current),o.current=null),l.current!==null&&(window.cancelAnimationFrame(l.current),l.current=null)},[]),h=D.useCallback(()=>{E(),s(!0)},[E]),c=D.useCallback(O=>{if(E(),O){a(O),s(!1),l.current=window.requestAnimationFrame(()=>{l.current=null,s(!0)});return}u.current=window.setTimeout(()=>{u.current=null,s(!1),o.current=window.setTimeout(()=>{a(null),o.current=null},p)},m)},[E]);D.useEffect(()=>()=>{E()},[E]);const[f,b]=D.useState(0),g=D.useRef(null),[T,y]=D.useState(!1),C=D.useRef(new Map),[S,A]=D.useState(357),[w,_]=D.useState("bottom");return D.useEffect(()=>{b(0),y(!1),_("bottom")},[r?.key,r?.type]),D.useEffect(()=>{const O=C.current,L=new Set,B=H=>{if(!H||L.has(H)||O.has(H))return;L.add(H);const v=new window.Image;v.decoding="async",v.onload=()=>{const x=v.naturalWidth||v.width||0,M=v.naturalHeight||v.height||0;x>0&&M>0&&O.set(H,`${x} / ${M}`)},v.src=H};e.forEach(H=>{const v=H.tooltip;if(!v)return;const M=typeof v=="string"?(()=>{try{return JSON.parse(v)}catch{return null}})():v;if(!M||M.type!=="steps")return;const $=M.images;Array.isArray($)&&$.forEach(U=>{typeof U=="string"&&B(U)})})},[e]),D.useLayoutEffect(()=>{if(!i)return;if(r?.type!=="upload"&&r?.type!=="tag"&&r?.type!=="variable"){A(null);return}const O=requestAnimationFrame(()=>{const L=document.querySelector(".rte-steps-tooltip"),B=document.querySelector(".rte-steps-tooltip-title"),H=document.querySelector(".rte-steps-tooltip-step-badge");if(!L||!B||!H)return;const v=window.getComputedStyle(L),x=Number.parseFloat(v.paddingLeft)||0,M=Number.parseFloat(v.paddingRight)||0,$=Math.ceil(B.getBoundingClientRect().width||0),U=Math.ceil(H.getBoundingClientRect().width||0),k=$+16+U+Math.ceil(x+M),j=357,J=Math.max(240,Math.floor(window.innerWidth-32));A(Math.min(Math.max(k,j),J));const R=r?.anchorEl;if(R){const te=R.getBoundingClientRect(),ce=L.getBoundingClientRect(),ne=Math.ceil(ce.height||0),ee=Math.max(0,Math.floor(window.innerHeight-te.bottom)),pe=Math.max(0,Math.floor(te.top)),me=ee<ne+12&&pe>ee;_(me?"top":"bottom")}});return()=>cancelAnimationFrame(O)},[i,r?.key,r?.type,f,r?.anchorEl]),D.useEffect(()=>{if(!n)return;const O=L=>{L.key==="Escape"&&c(null)};return window.addEventListener("keydown",O,!0),()=>window.removeEventListener("keydown",O,!0)},[n,c]),{tooltipPortal:r?.anchorEl?(()=>{if(!document.body.contains(r.anchorEl))return null;let O="",L={background:"#fff",padding:12,borderRadius:8,border:"0.5px solid #E5E5E5",boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)"},B=!1;const H=M=>{const $=r1(M);if(!$)return null;if($.kind==="text")return{node:$.text,steps:!1};const U=$.data,G=Math.max(0,U.images?.length||0);if(G<=0)return{node:U.title,steps:!1};const k=Math.min(Math.max(f,0),G-1),j=Array.isArray(U.stepDescriptions)&&U.stepDescriptions[k]||"",J=(U.disclaimer||"").trim(),R=Array.isArray(U.images)?U.images[k]:void 0,te=typeof R=="string"?C.current.get(R):void 0;return{node:z.jsxs("div",{className:"rte-steps-tooltip",style:S?{width:`${S}px`}:void 0,onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:ne=>{ne.preventDefault(),ne.stopPropagation()},children:[z.jsxs("div",{className:"rte-steps-tooltip-header",children:[z.jsx("div",{className:"rte-steps-tooltip-title",children:U.title}),z.jsxs("div",{className:"rte-steps-tooltip-step-badge",children:["步骤 ",k+1,"/",G]})]}),U.description?z.jsx("div",{className:"rte-steps-tooltip-desc",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:U.description})}):null,z.jsx("div",{className:"rte-steps-tooltip-media",style:te?{"--rte-steps-tooltip-aspect":te}:void 0,children:z.jsx(se.Image.PreviewGroup,{preview:{visible:T,current:k,onVisibleChange:ne=>y(ne),onChange:ne=>{const ee=Math.min(Math.max(ne,0),G-1);b(ee),g.current?.slideTo(ee)}},children:z.jsx(_i,{className:"rte-steps-tooltip-swiper",modules:[Fc,Hc],navigation:!0,pagination:{clickable:!0},initialSlide:k,onSwiper:ne=>{g.current=ne},onSlideChange:ne=>b(ne.activeIndex),children:U.images.map((ne,ee)=>z.jsx(ki,{children:z.jsx(se.Image,{className:"rte-steps-tooltip-img",src:ne,alt:`step-${ee+1}`,width:"100%",style:{width:"100%",display:"block"},imgStyle:{width:"100%",height:"100%",objectFit:"contain",display:"block"},preview:{mask:null},onClick:()=>{b(ee),g.current?.slideTo(ee),y(!0)}})},`${ne}-${ee}`))},`${r.key}-${r.type}`)})}),z.jsx("div",{className:"rte-steps-tooltip-footer",children:z.jsx("div",{className:"rte-steps-tooltip-step-text",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:j})})}),J?z.jsxs("div",{className:"rte-steps-tooltip-disclaimer",children:[z.jsx("span",{className:"rte-steps-tooltip-disclaimer-icon",children:"⚠"}),z.jsx("div",{className:"rte-steps-tooltip-disclaimer-text",children:z.jsx(sa,{remarkPlugins:[Ma,Ra],rehypePlugins:[ya,[xa,Ba]],components:{p:({children:ne})=>z.jsx("p",{style:{margin:0},children:ne})},children:J})})]}):null]}),steps:!0}};if(r.type==="upload"){const M=r.anchorEl.dataset.tooltip,$=H(M);if($)O=$.node,B=$.steps;else{const U=e.find(k=>k.type==="upload"&&k.key===r.key),G=H(typeof U?.tooltip=="string"?U?.tooltip:U?.tooltip?JSON.stringify(U.tooltip):"");O=G?.node||"",B=G?.steps||!1}}else if(r.type==="tag"){const M=r.anchorEl.dataset.tooltip,$=H(M);O=$?.node||"",B=$?.steps||!1}else if(r.type==="upload-label")O=r.anchorEl.querySelector(".upload-label[data-file-name]")?.dataset.fileName||r.anchorEl.dataset.fileName||"";else if(r.type==="variable"){const M=r.anchorEl.dataset.tooltip,$=H(M);O=$?.node||"",B=$?.steps||!1}else if(r.type==="upload-preview"){const M=t[r.key],$=!!M&&(M.type?.startsWith("image/")||/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(M.name||""));if(M&&$){const U=URL.createObjectURL(M);O=z.jsx("div",{className:"rte-upload-preview",children:z.jsx("img",{className:"rte-upload-preview-img",src:U,alt:M.name})}),L={background:"#fff",padding:0,borderRadius:4,boxShadow:"0 2px 12px 0 rgba(153, 153, 153, 0.25)"},setTimeout(()=>URL.revokeObjectURL(U),1e3)}else O=""}if(!O)return null;B&&(L={background:"#fff",padding:0,borderRadius:12,boxShadow:"0 4px 20px 0 rgba(129, 124, 143, 0.2)",border:"0.5px solid #E5E5E5"});const v="#0A0A0A",x=w;return kn.createPortal(z.jsx(se.Tooltip,{arrow:!1,zIndex:999,destroyTooltipOnHide:!1,autoAdjustOverflow:!B,align:B?{points:x==="top"?["bc","tc"]:["tc","bc"],offset:x==="top"?[0,-4]:[0,4]}:void 0,title:r.type==="upload-preview"?z.jsx("div",{onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:M=>{M.preventDefault(),M.stopPropagation()},children:O}):B?O:z.jsx("div",{style:{maxWidth:"200px",fontSize:"12px",color:v},onMouseEnter:()=>h(),onMouseLeave:()=>{n||c(null)},onClick:M=>{M.preventDefault(),M.stopPropagation()},children:O}),open:i,placement:B?x==="top"?"top":"bottom":r.type==="upload-preview"?"topLeft":"top",getPopupContainer:()=>document.body,overlayInnerStyle:L,overlayClassName:"rte-tooltip-overlay",children:z.jsx("div",{style:{position:"fixed",left:`${r.anchorEl.getBoundingClientRect().left}px`,top:`${r.anchorEl.getBoundingClientRect().top-(r.type==="upload-label"?4:0)}px`,width:`${r.anchorEl.offsetWidth}px`,height:`${r.anchorEl.offsetHeight}px`,pointerEvents:"none"}})}),document.body)})():null,setPopoverVisible:c}},i1=(e,t)=>{const n=t.hideButtons==="hideTagClose",r=t.lockStructure||n?"":'<span class="tag-close-btn" title="Clear (ESC)"><svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6L6 18M6 6l12 12"/></svg></span>',a=t.lockStructure?' data-locked="true"':"",i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}" data-tag-key="${e.key||""}"`:"";return`<span contenteditable="false" class="tag-node group"${a}${s}><span class="tag-label">${e.text}</span>${r}</span>`},s1=(e,t)=>{const n=t?' data-locked="true" contenteditable="false"':' contenteditable="false"',a=(e.text??"").replace(/\n/g,"<br/>");return e.className?`<span data-type="text" class="${e.className}"${n}>${a}</span>`:t?`<span data-type="text"${n}>${a}</span>`:`<span data-type="text" contenteditable="false">${a}</span>`},o1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,du=(e,t)=>{const r=(e.key?t[e.key]:void 0)||e.text||"",a=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}" data-variable-key="${e.key||""}"`:"";if(e.useAntd===!0){const E=r?encodeURIComponent(r):"",h=le(e.placeholder||""),c=e.allowNewline===!1?' data-allow-newline="0"':' data-allow-newline="1"',f=vn(r||e.placeholder||""),b=i&&!r?18:0;return`<span contenteditable="false" data-type="variable" data-variable-render="antd-textarea" data-key="${e.key}" data-value="${E}" data-placeholder="${h}" data-estimated-width="${Math.min(600,f+b)}"${c}${a}${s} class="rte-variable-host-v2"></span>`}const u=!r,o=u?"":le(r).replace(/\n/g,"<br/>"),l=u?"show-placeholder":"",m=i&&u?"rte-variable-with-icon":"",p=i&&u?"":"hidden";return`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder||""}"${a}${s} class="variable-chip ${l}${m?` ${m}`:""}">${o}${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${p}" data-variable-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}</span>`},u1=(e,t)=>{const n=du(e,t);return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${o1}${n}</span>`:n},fu=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,l1=(e,t)=>{const n=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",r=Ye(e.tooltip),a=r?` data-tooltip="${le(r)}"`:"",i=t[e.key]!==null&&t[e.key]!==void 0,s=i?t[e.key]:null,u=i?t[e.key]?.name:e.text,o=i?"":"hidden",l=r&&!i?"":"hidden",m=i?"has-file":"",p=i&&u?` data-file-name="${u.replace(/"/g,""")}"`:"";let E="";i&&s?dr(s)?E=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(s)}" alt="preview" />`:E="<i class='iconfont icon-exlwenjian'></i>":E="<i class='iconfont icon-shangchuan1'></i>";const h=(e.text||"").trim(),f=i&&h.length>=12?`<span ${n} contenteditable="false" class="exclusion-wrapper upload-hint">${h}</span>`:"";return{uploadHtml:`<span contenteditable="false" data-type="upload" data-key="${e.key}"${a} class="upload-chip"><span class="upload-inner-wrapper ${m}"><span class="upload-icon">${E}</span><span class="upload-label"${p}>${u||e.text}</span>${r?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${l}" data-upload-key="${e.key}" data-tooltip="${le(r)}" ></i>`:""}<span class="file-remove-btn ${o}" title="移除文件">×</span></span></span>`,hintHtml:f}},c1=(e,t,n)=>{const r=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"";if(typeof e.maxCount=="number"&&typeof e.minCount=="number"&&e.maxCount>1){const y=Ye(e.tooltip),C=y?` data-tooltip="${le(y)}"`:"",S=e.minCount||1,A=e.maxCount||3;let w=0;for(let L=0;L<A;L++){const B=`${e.key}-${L}`;t[B]!=null&&(w+=1)}const _=Math.min(A,Math.max(S,w+(w<A?1:0)));let N="";for(let L=0;L<_;L++){const B=`${e.key}-${L}`,H=t[B]!==null&&t[B]!==void 0,v=H?t[B]:null,x=H?t[B]?.name:e.text,M=H?"":"hidden",$=y&&!H?"":"hidden",U=H?"has-file":"",G=H&&x?` data-file-name="${x.replace(/"/g,""")}"`:"";let k="";H&&v?dr(v)?k=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(v)}" alt="preview" />`:k="<i class='iconfont icon-exlwenjian'></i>":k="<i class='iconfont icon-shangchuan1'></i>";const j=` data-batch-key="${e.key}"`,J=` data-batch-index="${L}"`,R=`<span contenteditable="false" data-type="upload" data-key="${B}"${j}${J}${C} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${U}"><span class="upload-icon">${k}</span><span class="upload-label"${G}>${x||e.text}</span>${y?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${$}" data-upload-key="${B}" data-tooltip="${le(y)}" ></i>`:""}<span class="file-remove-btn ${M}" title="移除文件">×</span></span></span>`;N+=R}return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group rte-required-upload-batch">${fu}<span class="rte-upload-batch-chips">${N}${n}</span></span>`:`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-upload-batch-chips">${N}${n}</span>`}const i=Ye(e.tooltip),s=i?` data-tooltip="${le(i)}"`:"",u=t[e.key]!==null&&t[e.key]!==void 0,o=u?t[e.key]:null,l=u?t[e.key]?.name:e.text,m=u?"":"hidden",p=i&&!u?"":"hidden",E=u?"has-file":"",h=u&&l?` data-file-name="${l.replace(/"/g,""")}"`:"";let c="";u&&o?dr(o)?c=`<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(o)}" alt="preview" />`:c="<i class='iconfont icon-exlwenjian'></i>":c="<i class='iconfont icon-shangchuan1'></i>";const f=(e.text||"").trim(),g=u&&e.showHint===!0&&f.length>=12?`<span ${r} contenteditable="false" class="exclusion-wrapper upload-hint">${f}</span>`:"",T=`<span contenteditable="false" data-type="upload" data-key="${e.key}"${s} class="upload-chip"><span class="upload-inner-wrapper ${E}"><span class="upload-icon">${c}</span><span class="upload-label"${h}>${l||e.text}</span>${i?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${p}" data-upload-key="${e.key}" data-tooltip="${le(i)}" ></i>`:""}<span class="file-remove-btn ${m}" title="移除文件">×</span></span></span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${fu}${T}${n}</span>${g}`:T+n+g},d1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,f1=(e,t)=>{const n=t[e.key]||e.defaultValue||"",r=encodeURIComponent(JSON.stringify(e.options||[])),a=e.placeholder?` data-placeholder="${e.placeholder}"`:"",i=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",s=e.required?' data-required="true"':"",u=`<div data-type="select" data-key="${e.key}" data-value="${n}" data-options="${r}"${a}${i}${s} class="rte-select-host"></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${d1}${u}</span>`:u},p1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,h1=(e,t,n)=>{const r=t[e.key]||"",a=typeof e.maxHeight=="number"?e.maxHeight:252,i=e.placeholder?` placeholder="${e.placeholder}"`:"",s=`<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" style="max-height:${a}px;"${i}>${r}</textarea>`,u=`<div class="rte-textarea-wrapper" data-key="${e.key}">${s}</div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${p1}${u}</span>`:u},m1=(e,t,n)=>{const r=t[e.key]||e.text||"",a=typeof e.minHeight=="number"?e.minHeight:40,i=typeof e.maxHeight=="number"?e.maxHeight:160,s=Math.max(i,a),u=e.placeholder?` data-placeholder="${e.placeholder}"`:"",o=e.expandable!==!1,l=r,m=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${u} style="min-height:${a}px;max-height:${s}px;overflow:auto;">${l}</div>`,p=o?`<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>`:"",E=`<div class="rte-richtext-wrapper${o?" rte-richtext-toggleable":""}" data-key="${e.key}">${m}${p}</div>`,h=`<div class="rte-richtext-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},g1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,E1=(e,t)=>{const n=`${e.key}__url`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ye(e.tooltip),E=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",h=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-report-url ${l}${h?` ${h}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${g1}${f}</span>`:f},b1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,T1=(e,t)=>{const n=`${e.key}__name`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=Ye(e.tooltip),E=p?` data-tooltip="${le(p)}" data-variable-key="${e.key||""}"`:"",h=p&&u?"rte-variable-with-icon":"",c=p&&u?"":"hidden",f=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown-name" data-placeholder="${le(e.placeholder||"")}"${m}${E} class="variable-chip rte-markdown-name ${l}${h?` ${h}`:""}">${o}${p?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${c}" data-variable-key="${e.key}" data-tooltip="${le(p)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${b1}${f}</span>`:f},y1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,x1=(e,t)=>{const n=e.sourceTextKey||`${e.key}__sourceText`,a=Object.prototype.hasOwnProperty.call(t,n)?t[n]:void 0,i=e.key?t[e.key]:void 0,s=a??i??e.text??"",u=!s,o=u?"":s,l=u?"show-placeholder":"",m=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",p=e.sourceTextKey?` data-source-text-key="${le(e.sourceTextKey)}"`:"",E=Ye(e.tooltip),h=E?` data-tooltip="${le(E)}" data-variable-key="${e.key||""}"`:"",c=E&&u?"rte-variable-with-icon":"",f=E&&u?"":"hidden",b=`<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="markdown" data-placeholder="${le(e.placeholder||"")}"${m}${p}${h} class="variable-chip rte-markdown-input ${l}${c?` ${c}`:""}">${o}${E?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${f}" data-variable-key="${e.key}" data-tooltip="${le(E)}" ></i>`:""}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${y1}${b}</span>`:b},C1=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" data-module-index="${n}" class="rte-richtext rte-report-module"${l} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${p}</div>`,h=`<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},S1=(e,t)=>{const n=typeof e.moduleIndex=="number"?e.moduleIndex:0,r=`${e.key}__module_${n}`,i=Object.prototype.hasOwnProperty.call(t,r)?t[r]:e.text||"",s=typeof e.minHeight=="number"?e.minHeight:80,u=typeof e.maxHeight=="number"?e.maxHeight:240,o=Math.max(u,s),l=e.placeholder?` data-placeholder="${le(e.placeholder)}"`:"",m=i,p=`<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="markdown-module" data-module-index="${n}" class="rte-richtext rte-markdown-module"${l} style="min-height:${s}px;max-height:${o}px;overflow:auto;">${m}</div>`,E=`<div class="rte-richtext-wrapper rte-markdown-module-wrapper" data-key="${e.key}">${p}</div>`,h=`<div class="rte-richtext-container rte-markdown-module-container" data-key="${e.key}">${E}</div>`;return e.required?`<div ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper rte-richtext-required">${h}</div>`:h},A1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,_1=(e,t)=>{const n=t[e.key]||"",r=e.placeholder?` data-placeholder="${e.placeholder}"`:"",a=e.limitRange?` data-limit-range="${e.limitRange}"`:"",i=e.disableFuture?' data-disable-future="true"':"",s=`<div data-type="datepicker" data-key="${e.key}" data-value="${n}" class="rte-datepicker-host"${r}${a}${i}></div>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${A1}${s}</span>`:s},k1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,v1=(e,t)=>{const n=t[e.key]||(typeof e.defaultNumber=="number"?String(e.defaultNumber):""),r=typeof e.min=="number"?` min="${e.min}"`:"",a=typeof e.max=="number"?` max="${e.max}"`:"",i=e.placeholder?le(e.placeholder):"",s=i?` placeholder="${i}"`:"",u=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",o=n||e.placeholder||"",l=vn(o),m=`<input type="text" inputmode="numeric" data-type="number-input" data-key="${e.key}" class="rte-number-input" value="${le(n)}" style="width: ${l}px;"${r}${a}${s}${u} />`,E=`<span class="rte-number-input-wrap" data-placeholder="${i}" data-has-value="${n?"1":"0"}">${m}</span>`;return e.required?`<span ${e.exclusionGroup?`data-group="${e.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">${k1}${E}</span>`:E},N1=`<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`,w1=(e,t,n)=>{const r=e.maxCount||9,a=n[e.key]||1,i=Math.min(a,r);if(e.required){const o=e.exclusionGroup?`data-group="${e.exclusionGroup}"`:"",l=Ye(e.tooltip);let m="";for(let p=0;p<i;p++){const E=`${e.key}_${p}`,h=t[E]||"",c=!h,f=c?"":le(h).replace(/\n/g,"<br/>"),b=c?"show-placeholder":"",g=l&&c?"rte-variable-with-icon":"",T=l?` data-tooltip="${le(l)}" data-variable-key="${e.key||""}"`:"",y=l&&c?"":"hidden",C=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",S=`<span contenteditable="true" data-type="variable" data-key="${E}" data-multi-key="${e.key}" data-index="${p}" data-placeholder="${e.placeholder||""}"${C}${T} class="variable-chip ${b}${g?` ${g}`:""}">${f}${l?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${y}" data-variable-key="${e.key}" data-tooltip="${le(l)}" ></i>`:""}</span>`;p===0?m+=`<span ${o} class="exclusion-wrapper required-upload-group required-multi-first">${N1}${S}</span>`:m+=S}return m}const s=Ye(e.tooltip);let u="";for(let o=0;o<i;o++){const l=`${e.key}_${o}`,m=t[l]||"",p=!m,E=p?"":le(m).replace(/\n/g,"<br/>"),h=p?"show-placeholder":"",c=s&&p?"rte-variable-with-icon":"",f=s?` data-tooltip="${le(s)}" data-variable-key="${e.key||""}"`:"",b=s&&p?"":"hidden",g=e.exclusionGroup?` data-group="${e.exclusionGroup}"`:"",T=`<span contenteditable="true" data-type="variable" data-key="${l}" data-multi-key="${e.key}" data-index="${o}" data-placeholder="${e.placeholder||""}"${g}${f} class="variable-chip ${h}${c?` ${c}`:""}">${E}${s?`<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${b}" data-variable-key="${e.key}" data-tooltip="${le(s)}" ></i>`:""}</span>`;u+=T}return u};function I1(e,t,n,r,a,i={},s,u){if(!e.current)return;const o=/[;;,,。.!!??::、]/,l=c=>{const f=(c??"").trim();return f.length===1&&o.test(f)},m=c=>{const f=c??"",b=f.match(new RegExp(`^\\s*(${o.source})`));if(!b)return null;const g=b[1],T=f.replace(new RegExp(`^\\s*${o.source}`),"");return{punct:g,rest:T}},p=c=>`<span data-type="text" class="rte-inline-punct" contenteditable="false">${c}</span>`,E=[];let h=0;for(;h<t.length;){const c=t[h],f=h+1<t.length?t[h+1]:null;let b=!1;if(c.type==="text"&&(c.text?.includes("icon-bitian")||c.className==="rte-text-required")&&f){const w=f.type==="upload"&&f.exclusionGroup==="fileInput"&&c.exclusionGroup==="fileInput"&&c.exclusionGroup===f.exclusionGroup,_=f.type==="variable"&&f.exclusionGroup==="textInput"&&c.exclusionGroup==="textInput"&&c.exclusionGroup===f.exclusionGroup;if(w){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,L="</span>";let B="";c.className?B=`<span class="${c.className}">${c.text??""}</span>`:B=c.text??"";const H=f,{uploadHtml:v,hintHtml:x}=l1(H,n);E.push(O+B+v+L+x),h+=2;continue}if(_){const O=`<span ${c.exclusionGroup?`data-group="${c.exclusionGroup}"`:""} class="exclusion-wrapper required-upload-group">`,L="</span>";let B="";c.className?B=`<span class="${c.className}">${c.text??""}</span>`:B=c.text??"";const v=du(f,a);E.push(O+B+v+L),h+=2;continue}}const T=c.exclusionGroup?`data-group="${c.exclusionGroup}"`:"",y=c.exclusionGroup?`<span ${T} class="exclusion-wrapper">`:"",C=c.exclusionGroup?"</span>":"";let S="";if(c.type==="tag")S=i1(c,{lockStructure:r,hideButtons:s});else if(c.type==="text")S=s1(c,r);else if(c.type==="variable"&&c.key)S=u1(c,a);else if(c.type==="report-url"&&c.key)S=E1(c,a);else if(c.type==="markdown-name"&&c.key)S=T1(c,a);else if(c.type==="markdown"&&c.key)S=x1(c,a);else if(c.type==="upload"&&c.key){const w=!!f&&f.type==="text"&&!f.className&&!f.exclusionGroup&&l(f.text),_=w?(f.text??"").trim():"",N=_?p(_):"";w&&(b=!0),S=c1(c,n,N)}else c.type==="select"&&c.key?S=f1(c,a):c.type==="textarea"&&c.key?S=h1(c,a):c.type==="richtext"&&c.key?S=m1(c,a):c.type==="report-module"&&c.key?S=C1(c,a):c.type==="markdown-module"&&c.key?S=S1(c,a):c.type==="datepicker"&&c.key?S=_1(c,a):c.type==="number-input"&&c.key?S=v1(c,a):c.type==="multi-variable"&&c.key&&(S=w1(c,a,i));const A=y+S+C;if(c.type==="text"&&!c.className&&!c.exclusionGroup){if(l(c.text)&&E.length>0){const _=E[E.length-1],N=(c.text??"").trim();E[E.length-1]=`<span class="rte-inline-group">${_}${p(N)}</span>`,h++;continue}const w=m(c.text);if(w&&E.length>0){const _=E[E.length-1];E[E.length-1]=`<span class="rte-inline-group">${_}${p(w.punct)}</span>`;const N=w.rest;if(N){const O=N.replace(/\n/g,"<br/>");E.push(`<span data-type="text" contenteditable="false">${O}</span>`)}h++;continue}}E.push(A),h+=b?2:1}e.current&&(e.current.innerHTML=E.join(""),setTimeout(()=>{if(!e.current)return;e.current.querySelectorAll('[data-type="variable"]').forEach(f=>{if(f.dataset.variableRender==="antd-textarea")return;if(f.innerText.replace(/\n/g,"").replace(/\u200B/g,""))f.classList.remove("show-placeholder");else{const T=Array.from(f.childNodes),y=f.querySelector(".variable-info-icon");T.forEach(S=>{if(S.nodeType===Node.TEXT_NODE){f.removeChild(S);return}S.nodeType===Node.ELEMENT_NODE&&S.tagName==="BR"&&f.removeChild(S)});const C=document.createTextNode("");y&&y.parentNode===f?f.insertBefore(C,y):f.firstChild?f.insertBefore(C,f.firstChild):f.appendChild(C),f.classList.add("show-placeholder")}})},0))}function L1(e,t,n,r){if(!e.current){r(!1);return}const a=c=>{const f=c.getAttribute("data-node-type")||"";if(f!=="report-module"&&f!=="markdown-module")return(c.textContent||"").replace(/[\u200B]/g,"").trim();const b=(c.textContent||"").replace(/[\u200B]/g,"").trim(),g=Array.from(c.querySelectorAll(":scope > div"));if(g.length===0)return b;let T=-1;for(let S=0;S<g.length;S++)if((g[S].textContent||"").replace(/[\u200B]/g,"").trim().length>0){T=S;break}return g.filter((S,A)=>A!==T).map(S=>(S.textContent||"").replace(/[\u200B]/g,"").trim()).join(`
|
|
60
|
+
`).trim()||b},i=c=>c?!!c.closest('[data-rte-force-hidden="1"]'):!1,s=[];for(let c=0;c<t.length;c++){const f=t[c];if((f.type==="variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"||f.type==="upload"||f.type==="multi-variable"||f.type==="select"||f.type==="textarea"||f.type==="richtext"||f.type==="report-module"||f.type==="markdown-module"||f.type==="datepicker"||f.type==="number-input")&&f.required&&f.key){s.push({exclusionGroup:f.exclusionGroup||"",key:f.key,type:f.type==="multi-variable"||f.type==="report-url"||f.type==="markdown"||f.type==="markdown-name"?"variable":f.type==="report-module"||f.type==="markdown-module"?"richtext":f.type,isMultiVariable:f.type==="multi-variable",minCount:f.type==="multi-variable"||f.type==="upload"&&typeof f.minCount=="number"?f.minCount:void 0,moduleIndex:f.type==="report-module"||f.type==="markdown-module"?f.moduleIndex:void 0,__index:c});continue}if(f.type==="text"&&f.className?.includes("rte-text-required"))if(f.exclusionGroup)for(let b=c+1;b<t.length;b++){const g=t[b];if(g.exclusionGroup===f.exclusionGroup&&(g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:f.exclusionGroup,key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}else for(let b=c+1;b<t.length;b++){const g=t[b];if((g.type==="variable"||g.type==="markdown"||g.type==="markdown-name"||g.type==="upload"||g.type==="select"||g.type==="textarea"||g.type==="richtext"||g.type==="datepicker"||g.type==="number-input")&&g.key){s.push({exclusionGroup:g.exclusionGroup||"",key:g.key,type:g.type==="markdown"||g.type==="markdown-name"?"variable":g.type,__index:b});break}}}const u=t.some(c=>c.exclusionGroup==="separator"),o=[];if(u&&s.length>1){const c=[];t.forEach((f,b)=>{f.exclusionGroup==="separator"&&c.push(b)});for(const f of c){const g=s.filter(C=>typeof C.__index=="number"&&C.__index<f).sort((C,S)=>(S.__index??0)-(C.__index??0))[0],y=s.filter(C=>typeof C.__index=="number"&&C.__index>f).sort((C,S)=>(C.__index??0)-(S.__index??0))[0];g&&y&&o.push([g,y])}}if(s.length===0){if(t.length===0){if(!e.current){r(!1);return}const c=e.current.textContent?.replace(/[\u200B\n]/g,"").trim()||"";r(c.length>0);return}r(!0);return}const l=s.filter(c=>{if(!e.current)return!1;if(c.exclusionGroup){const f=e.current.querySelectorAll(`[data-group="${c.exclusionGroup}"]`);if(f.length>0){const b=f[0];return i(b)?!0:b.style.display!=="none"}}if(c.type==="upload"&&c.key){const f=e.current.querySelector(`[data-type="upload"][data-key="${c.key}"]`)||e.current.querySelector(`[data-type="upload"][data-batch-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);if(f.length>0){const b=f[0],g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(b){const g=b.closest("[data-group]")||b.parentElement;return i(g)?!0:g?g.style.display!=="none":!0}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(f){const b=f.closest("[data-group]")||f.parentElement;return i(b)?!0:b?b.style.display!=="none":!0}}return!1});if(l.length===0){r(!0);return}const m=new Set;o.forEach(c=>{c.forEach(f=>{f.key&&m.add(f.key)})});const p=l.filter(c=>!c.key||!m.has(c.key));let E=(o.length===0,!0);for(const c of o){const f=c.filter(g=>{if(!e.current)return!1;if(g.exclusionGroup){const T=e.current.querySelectorAll(`[data-group="${g.exclusionGroup}"]`);if(T.length>0){const y=T[0];return i(y)?!0:y.style.display!=="none"}}return!0});if(f.length===0)continue;let b=!1;for(const g of f)if(g.type==="upload"&&g.key){if(g.minCount&&g.minCount>0){let T=0;const y=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${g.key}"]`);if(y.length===0)continue;for(let C=0;C<y.length;C++){const A=y[C].dataset.key;A&&n[A]!=null&&(T+=1)}if(T>=g.minCount){b=!0;break}}else if(n[g.key]!==null&&n[g.key]!==void 0){b=!0;break}}else if(g.type==="variable"&&g.key)if(g.isMultiVariable){const T=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${g.key}"]`);let y=0;for(const S of Array.from(T)){if(S.classList.contains("show-placeholder"))continue;S.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(y+=1)}const C=g.minCount&&g.minCount>0?g.minCount:1;if(y>=C){b=!0;break}}else{const T=e.current.querySelector(`[data-type="variable"][data-key="${g.key}"]`);if(T){if(T.classList.contains("show-placeholder"))continue;if(T.innerText.replace(/[\u200B\n]/g,"").trim().length>0){b=!0;break}}}else if(g.type==="select"&&g.key){const T=e.current.querySelector(`[data-type="select"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="textarea"&&g.key){const T=e.current.querySelector(`[data-type="textarea"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}else if(g.type==="richtext"&&g.key){const T=typeof g.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${g.key}"][data-module-index="${g.moduleIndex}"]`:`[data-type="richtext"][data-key="${g.key}"]`,y=e.current.querySelector(T);if(y&&a(y).length>0){b=!0;break}}else if(g.type==="datepicker"&&g.key){const T=e.current.querySelector(`[data-type="datepicker"][data-key="${g.key}"]`);if(T&&(T.getAttribute("data-value")||"").trim().length>0){b=!0;break}}else if(g.type==="number-input"&&g.key){const T=e.current.querySelector(`[data-type="number-input"][data-key="${g.key}"]`);if(T&&(T.value||"").trim().length>0){b=!0;break}}if(!b){E=!1;break}}let h=!0;for(const c of p)if(c.type==="upload"&&c.key){if(c.minCount&&c.minCount>0){let f=0;const b=e.current.querySelectorAll(`[data-type="upload"][data-batch-key="${c.key}"]`);if(b.length===0){h=!1;break}for(let g=0;g<b.length;g++){const y=b[g].dataset.key;y&&n[y]!=null&&(f+=1)}if(f<c.minCount){h=!1;break}}else if(n[c.key]===null||n[c.key]===void 0){h=!1;break}}else if(c.type==="variable"&&c.key)if(c.isMultiVariable){const f=e.current.querySelectorAll(`[data-type="variable"][data-multi-key="${c.key}"]`);let b=0;for(const T of Array.from(f)){if(T.classList.contains("show-placeholder"))continue;T.innerText.replace(/[\u200B\n]/g,"").trim().length>0&&(b+=1)}const g=c.minCount&&c.minCount>0?c.minCount:1;if(b<g){h=!1;break}}else{const f=e.current.querySelector(`[data-type="variable"][data-key="${c.key}"]`);if(!f){h=!1;break}if(f.classList.contains("show-placeholder")){h=!1;break}if(f.innerText.replace(/[\u200B\n]/g,"").trim().length===0){h=!1;break}}else if(c.type==="select"&&c.key){const f=e.current.querySelector(`[data-type="select"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="textarea"&&c.key){const f=e.current.querySelector(`[data-type="textarea"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}else if(c.type==="richtext"&&c.key){const f=typeof c.moduleIndex=="number"?`[data-type="richtext"][data-node-type="report-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"], [data-type="richtext"][data-node-type="markdown-module"][data-key="${c.key}"][data-module-index="${c.moduleIndex}"]`:`[data-type="richtext"][data-key="${c.key}"]`,b=e.current.querySelector(f);if(!b||a(b).length===0){h=!1;break}}else if(c.type==="datepicker"&&c.key){const f=e.current.querySelector(`[data-type="datepicker"][data-key="${c.key}"]`);if(!f||(f.getAttribute("data-value")||"").trim().length===0){h=!1;break}}else if(c.type==="number-input"&&c.key){const f=e.current.querySelector(`[data-type="number-input"][data-key="${c.key}"]`);if(!f||(f.value||"").trim().length===0){h=!1;break}}r(E&&h)}function O1(e,t,n,r,a={},i,s,u,o,l){const m=D.useRef(new Set),p=D.useRef(t),E=D.useCallback(()=>{if(!e.current)return;if(t.length===0){e.current.innerHTML="";return}p.current!==t&&(m.current=new Set,p.current=t);let h={};const c=new Set;e.current&&e.current.querySelectorAll('[data-type="variable"]').forEach(T=>{const y=T.dataset.key;if(!y)return;let C="";if(T.dataset.variableRender==="antd-textarea"){const S=(T.getAttribute("data-value")||"").trim();try{C=S?decodeURIComponent(S).replace(/\r\n/g,`
|
|
61
|
+
`).trim():""}catch{C=S.trim()}}else{const S=(T.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
62
|
+
`);C=S.replace(/\n/g,"").trim().length>0?S:""}!C&&m.current.has(y)&&c.add(y)});const b=e.current.__tempVariableValues;if(b?(h=b,setTimeout(()=>{if(e.current){const g=e.current;g.__tempVariableValues===b&&delete g.__tempVariableValues}},100)):(e.current.querySelectorAll('[data-type="variable"]').forEach(w=>{const _=w.dataset.key;if(_){const O=(()=>{if(w.dataset.variableRender==="antd-textarea"){const H=(w.getAttribute("data-value")||"").trim();if(!H)return"";try{return decodeURIComponent(H).replace(/\r\n/g,`
|
|
63
|
+
`).trim()}catch{return H.trim()}}const L=(w.innerText||"").replace(/\u200B/g,"").replace(/\r\n/g,`
|
|
64
|
+
`);return L.replace(/\n/g,"").trim().length>0?L:""})();O&&(w.getAttribute("data-node-type")==="report-url"?h[`${_}__url`]=O:w.getAttribute("data-node-type")==="markdown-name"?h[`${_}__name`]=O:h[_]=O)}}),e.current.querySelectorAll('[data-type="select"]').forEach(w=>{const _=w.dataset.key;if(_){const N=(w.getAttribute("data-value")||"").trim();N&&(h[_]=N)}}),e.current.querySelectorAll('[data-type="textarea"]').forEach(w=>{const _=w.dataset.key;if(_){const N=w.value.replace(/[\u200B]/g,"").trim();N&&(h[_]=N)}}),e.current.querySelectorAll('[data-type="richtext"]').forEach(w=>{const _=w.dataset.key;if(_){const N=w.getAttribute("data-node-type")||"",O=N==="report-module"||N==="markdown-module",L=O?(w.innerHTML||"").replace(/[\u200B]/g,"").trim():(w.textContent||"").replace(/[\u200B]/g,"").trim();if(O){const B=Number.parseInt(w.getAttribute("data-module-index")||"0",10);h[`${_}__module_${Number.isFinite(B)?B:0}`]=L}else L&&(h[_]=L)}}),e.current.querySelectorAll('[data-type="datepicker"]').forEach(w=>{const _=w.dataset.key;if(_){const N=(w.getAttribute("data-value")||"").trim();N&&(h[_]=N)}}),e.current.querySelectorAll('[data-type="number-input"]').forEach(w=>{const _=w.dataset.key;if(_){const N=(w.value||"").trim();N&&(h[_]=N)}})),l&&Object.keys(l).length>0){const g={};Object.entries(l).forEach(([T,y])=>{Array.isArray(y)?y.forEach((C,S)=>{C!=null&&String(C).trim()!==""&&(g[`${T}_${S}`]=String(C))}):y!=null&&String(y).trim()!==""&&(t.find(S=>S.key===T&&S.type==="report-url")?g[`${T}__url`]=String(y):g[T]=String(y))}),Object.entries(g).forEach(([T,y])=>{!(T in h)&&!c.has(T)&&(h[T]=y)})}if(I1(e,t,n,r,h,a,u),setTimeout(()=>{Nn(e)},0),i?.current){const{key:g,offset:T}=i.current;setTimeout(()=>{if(!e.current)return;const y=e.current.querySelector(`[data-type="variable"][data-key="${g}"]`);if(y){if(y.dataset.variableRender==="antd-textarea"){const C=y.querySelector("textarea");if(C){C.focus();try{const S=C.value?.length??0;C.setSelectionRange(Math.min(T,S),Math.min(T,S))}catch{}i.current=null;return}}try{const C=document.createRange(),S=document.createTreeWalker(y,NodeFilter.SHOW_TEXT,null);let A=0,w=null,_=0;for(;S.nextNode();){const N=S.currentNode,O=N.textContent?.length||0;if(A+O>=T){w=N,_=T-A;break}A+=O}if(w){C.setStart(w,Math.min(_,w.textContent?.length||0)),C.collapse(!0);const N=window.getSelection();N&&(N.removeAllRanges(),N.addRange(C),y.focus())}else{C.selectNodeContents(y),C.collapse(!1);const N=window.getSelection();N&&(N.removeAllRanges(),N.addRange(C),y.focus())}}catch{const C=document.createRange();C.selectNodeContents(y),C.collapse(!1);const S=window.getSelection();S&&(S.removeAllRanges(),S.addRange(C),y.focus())}i.current=null}},0)}},[t,n,r,e,a,i,s,u,o,l]);D.useEffect(()=>{E()},[E])}function D1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=l=>l.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(l.name||""),u=l=>{const m=l.target?.closest(".upload-info-icon");if(m&&m.classList.contains("upload-info-icon")){const E=m.dataset.uploadKey;if(E){const h=m.dataset.tooltip||"";let c=!1;try{const b=JSON.parse(h);b&&b.type==="steps"&&Array.isArray(b.images)&&(c=!0)}catch{}if(c){const f=m.closest('[data-type="upload"]');r({key:E,anchorEl:f||m,type:"upload"})}else{const f=m.closest('[data-type="upload"]');r({key:E,anchorEl:f||m,type:"upload"})}}return}const p=l.target?.closest('[data-type="upload"]');if(p){const E=p.dataset.key;if(E){const h=n[E];h&&s(h)&&r({key:E,anchorEl:p,type:"upload-preview"})}}},o=l=>{if(a)return;const m=l.target?.closest(".upload-info-icon"),p=l.relatedTarget;if(p?.closest?.(".rte-tooltip-overlay"))return;if(m&&m.classList.contains("upload-info-icon")){const h=m.closest('[data-type="upload"]');if(p&&h&&h.contains(p))return;if(!p||!i.contains(p))r(null);else{const c=p.closest('[data-type="upload"]');(!c||c!==h)&&r(null)}return}const E=l.target?.closest('[data-type="upload"]');if(E){const h=p;if(h?.closest?.(".rte-tooltip-overlay")||h&&E.contains(h))return;r(null)}};return i.addEventListener("mouseover",u,!0),i.addEventListener("mouseout",o,!0),()=>{i.removeEventListener("mouseover",u,!0),i.removeEventListener("mouseout",o,!0)}},[t,n,e,r,a])}function P1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=m=>{if(r==="hideTagClose")return;const p=m.currentTarget,E=p.dataset.tooltip,h=p.dataset.tagKey||"";E&&n({key:h,anchorEl:p,type:"tag"})},u=m=>{a||m.relatedTarget?.closest?.(".rte-tooltip-overlay")||n(null)};let o;const l=()=>{i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.addEventListener("mouseenter",s),p.addEventListener("mouseleave",u)})};return o=requestAnimationFrame(()=>{o=requestAnimationFrame(l)}),()=>{cancelAnimationFrame(o),i.querySelectorAll(".tag-node[data-tooltip]").forEach(p=>{p.removeEventListener("mouseenter",s),p.removeEventListener("mouseleave",u)})}},[t,e,n,r,a])}function M1(e,t,n,r){D.useEffect(()=>{const a=e.current;if(!a)return;const i=u=>{const o=u.target?.closest(".variable-info-icon");if(o&&o.classList.contains("variable-info-icon")){const m=o.dataset.variableKey;m&&n({key:m,anchorEl:o,type:"variable"});return}const l=u.target?.closest('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(l){const m=l.dataset.key;m&&n({key:m,anchorEl:l,type:"variable"})}},s=u=>{if(r)return;const o=u.target,l=u.relatedTarget;if(l?.closest?.(".rte-tooltip-overlay"))return;const m=o?.closest?.(".variable-info-icon"),p=o?.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');if(m||p){if(!l||!a.contains(l)){n(null);return}const E=!!l.closest?.(".variable-info-icon"),h=!!l.closest?.('[data-type="variable"][data-node-type="report-url"][data-tooltip]');!E&&!h&&n(null)}};return a.addEventListener("mouseover",i,!0),a.addEventListener("mouseout",s,!0),()=>{a.removeEventListener("mouseover",i,!0),a.removeEventListener("mouseout",s,!0)}},[t,e,n,r])}function B1(e,t,n,r,a){D.useEffect(()=>{const i=e.current;if(!i)return;const s=p=>p.type?.startsWith("image/")?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(p.name||""),u=p=>{const E=p.currentTarget,h=E.dataset.fileName,c=E.closest('[data-type="upload"]'),f=c?.dataset.key||"",b=f?n[f]:null;if(b&&s(b)){r({key:f,anchorEl:c||E,type:"upload-preview"});return}h&&r({key:f,anchorEl:c||E,type:"upload-label"})},o=p=>{a||p.relatedTarget?.closest?.(".rte-tooltip-overlay")||r(null)};let l;const m=()=>{i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.addEventListener("mouseenter",u),E.addEventListener("mouseleave",o)})};return l=requestAnimationFrame(()=>{l=requestAnimationFrame(m)}),()=>{cancelAnimationFrame(l),i.querySelectorAll(".upload-label[data-file-name]").forEach(E=>{E.removeEventListener("mouseenter",u),E.removeEventListener("mouseleave",o)})}},[t,n,e,r,a])}function R1(e,t,n,r){D.useEffect(()=>{const a=setTimeout(()=>{pr(e,t,n),L1(e,t,n,r)},0);return()=>clearTimeout(a)},[n,t,e,r])}function F1(e,t){const n=D.useRef(0),r=D.useRef(0);D.useEffect(()=>{if(!e.current)return;let a=!1,i=0;const s=T=>T instanceof HTMLElement?!!(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker")||T.closest(".ant-picker-dropdown")):!1,u=T=>T instanceof HTMLElement?!!(T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown")):!1,o=T=>{a=!0,s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] mousedown on datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] mousedown on select target"))},l=()=>{a=!1,i=Date.now()};let m=!1,p=0;const E=()=>{m=!0},h=()=>{m=!1,p=Date.now()},c=()=>{p=Date.now()},f=T=>{s(T.target)&&(n.current=Date.now(),console.log("[SelectionCtrl] focusin datepicker target")),u(T.target)&&(r.current=Date.now(),console.log("[SelectionCtrl] focusin select target"))},b=()=>{if(Date.now()-n.current<800||Date.now()-r.current<800){console.log("[SelectionCtrl] skip selectionchange due to recent picker/select interaction");return}const T=document.activeElement;if(T&&(T.closest(".rte-datepicker-wrapper")||T.closest(".rte-datepicker-host")||T.closest(".ant-picker-dropdown")||T.tagName==="INPUT"&&T.closest(".ant-picker")||T.closest(".rte-select-wrapper")||T.closest(".rte-select-host")||T.closest(".ant-select")||T.closest(".ant-select-dropdown"))){console.log("[SelectionCtrl] activeElement is picker/select; skip");return}if(!e.current)return;const y=window.getSelection();if(!y||y.rangeCount===0||t.current||a||m||Date.now()-p<500)return;const C=y.getRangeAt(0);if(!C.collapsed)return e.current.contains(C.commonAncestorContainer),void 0;const S=y.anchorNode;if(!S||!e.current.contains(S))return;let A=!1,w=!1;if(S.nodeType===Node.ELEMENT_NODE){const N=S;(N.closest('[data-type="datepicker"]')||N.closest(".rte-datepicker-wrapper")||N.closest(".rte-datepicker-host"))&&(A=!0),(N.closest('[data-type="select"]')||N.closest(".rte-select-wrapper")||N.closest(".rte-select-host"))&&(w=!0)}else if(S.parentElement){const N=S.parentElement;(N.closest('[data-type="datepicker"]')||N.closest(".rte-datepicker-wrapper")||N.closest(".rte-datepicker-host"))&&(A=!0),(N.closest('[data-type="select"]')||N.closest(".rte-select-wrapper")||N.closest(".rte-select-host"))&&(w=!0)}if(A||w)return;let _=null;if(S.nodeType===Node.ELEMENT_NODE?_=S.closest('[data-type="variable"]'):S.nodeType===Node.TEXT_NODE&&S.parentElement&&(_=S.parentElement.closest('[data-type="variable"]')),!_){if(Date.now()-i>500)return;const N=e.current.querySelectorAll('[data-type="variable"]');if(N.length>0){let O=null;for(const L of Array.from(N))if(L.style.display!=="none"){O=L;break}if(!O&&N.length>0&&(O=N[0]),O){const L=document.createRange();L.selectNodeContents(O),L.collapse(!1),y.removeAllRanges(),y.addRange(L),O.focus()}else y.removeAllRanges()}else y.removeAllRanges()}},g=e.current;return g&&(g.addEventListener("compositionstart",E),g.addEventListener("compositionend",h),g.addEventListener("input",c)),document.addEventListener("mousedown",o),document.addEventListener("mouseup",l),document.addEventListener("focusin",f),document.addEventListener("selectionchange",b),()=>{g&&(g.removeEventListener("compositionstart",E),g.removeEventListener("compositionend",h),g.removeEventListener("input",c)),document.removeEventListener("mousedown",o),document.removeEventListener("mouseup",l),document.removeEventListener("focusin",f),document.removeEventListener("selectionchange",b)}},[e,t])}var ar={exports:{}},H1=ar.exports,pu;function hu(){return pu||(pu=1,function(e,t){(function(n,r){e.exports=r()})(H1,function(){var n=1e3,r=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",p="month",E="quarter",h="year",c="date",f="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,T={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(v){var x=["th","st","nd","rd"],M=v%100;return"["+v+(x[(M-20)%10]||x[M]||x[0])+"]"}},y=function(v,x,M){var $=String(v);return!$||$.length>=x?v:""+Array(x+1-$.length).join(M)+v},C={s:y,z:function(v){var x=-v.utcOffset(),M=Math.abs(x),$=Math.floor(M/60),U=M%60;return(x<=0?"+":"-")+y($,2,"0")+":"+y(U,2,"0")},m:function v(x,M){if(x.date()<M.date())return-v(M,x);var $=12*(M.year()-x.year())+(M.month()-x.month()),U=x.clone().add($,p),G=M-U<0,k=x.clone().add($+(G?-1:1),p);return+(-($+(M-U)/(G?U-k:k-U))||0)},a:function(v){return v<0?Math.ceil(v)||0:Math.floor(v)},p:function(v){return{M:p,y:h,w:m,d:l,D:c,h:o,m:u,s,ms:i,Q:E}[v]||String(v||"").toLowerCase().replace(/s$/,"")},u:function(v){return v===void 0}},S="en",A={};A[S]=T;var w="$isDayjsObject",_=function(v){return v instanceof B||!(!v||!v[w])},N=function v(x,M,$){var U;if(!x)return S;if(typeof x=="string"){var G=x.toLowerCase();A[G]&&(U=G),M&&(A[G]=M,U=G);var k=x.split("-");if(!U&&k.length>1)return v(k[0])}else{var j=x.name;A[j]=x,U=j}return!$&&U&&(S=U),U||!$&&S},O=function(v,x){if(_(v))return v.clone();var M=typeof x=="object"?x:{};return M.date=v,M.args=arguments,new B(M)},L=C;L.l=N,L.i=_,L.w=function(v,x){return O(v,{locale:x.$L,utc:x.$u,x:x.$x,$offset:x.$offset})};var B=function(){function v(M){this.$L=N(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[w]=!0}var x=v.prototype;return x.parse=function(M){this.$d=function($){var U=$.date,G=$.utc;if(U===null)return new Date(NaN);if(L.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var k=U.match(b);if(k){var j=k[2]-1||0,J=(k[7]||"0").substring(0,3);return G?new Date(Date.UTC(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)):new Date(k[1],j,k[3]||1,k[4]||0,k[5]||0,k[6]||0,J)}}return new Date(U)}(M),this.init()},x.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},x.$utils=function(){return L},x.isValid=function(){return this.$d.toString()!==f},x.isSame=function(M,$){var U=O(M);return this.startOf($)<=U&&U<=this.endOf($)},x.isAfter=function(M,$){return O(M)<this.startOf($)},x.isBefore=function(M,$){return this.endOf($)<O(M)},x.$g=function(M,$,U){return L.u(M)?this[$]:this.set(U,M)},x.unix=function(){return Math.floor(this.valueOf()/1e3)},x.valueOf=function(){return this.$d.getTime()},x.startOf=function(M,$){var U=this,G=!!L.u($)||$,k=L.p(M),j=function(Te,me){var Le=L.w(U.$u?Date.UTC(U.$y,me,Te):new Date(U.$y,me,Te),U);return G?Le:Le.endOf(l)},J=function(Te,me){return L.w(U.toDate()[Te].apply(U.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(me)),U)},R=this.$W,te=this.$M,ce=this.$D,ne="set"+(this.$u?"UTC":"");switch(k){case h:return G?j(1,0):j(31,11);case p:return G?j(1,te):j(0,te+1);case m:var ee=this.$locale().weekStart||0,pe=(R<ee?R+7:R)-ee;return j(G?ce-pe:ce+(6-pe),te);case l:case c:return J(ne+"Hours",0);case o:return J(ne+"Minutes",1);case u:return J(ne+"Seconds",2);case s:return J(ne+"Milliseconds",3);default:return this.clone()}},x.endOf=function(M){return this.startOf(M,!1)},x.$set=function(M,$){var U,G=L.p(M),k="set"+(this.$u?"UTC":""),j=(U={},U[l]=k+"Date",U[c]=k+"Date",U[p]=k+"Month",U[h]=k+"FullYear",U[o]=k+"Hours",U[u]=k+"Minutes",U[s]=k+"Seconds",U[i]=k+"Milliseconds",U)[G],J=G===l?this.$D+($-this.$W):$;if(G===p||G===h){var R=this.clone().set(c,1);R.$d[j](J),R.init(),this.$d=R.set(c,Math.min(this.$D,R.daysInMonth())).$d}else j&&this.$d[j](J);return this.init(),this},x.set=function(M,$){return this.clone().$set(M,$)},x.get=function(M){return this[L.p(M)]()},x.add=function(M,$){var U,G=this;M=Number(M);var k=L.p($),j=function(te){var ce=O(G);return L.w(ce.date(ce.date()+Math.round(te*M)),G)};if(k===p)return this.set(p,this.$M+M);if(k===h)return this.set(h,this.$y+M);if(k===l)return j(1);if(k===m)return j(7);var J=(U={},U[u]=r,U[o]=a,U[s]=n,U)[k]||1,R=this.$d.getTime()+M*J;return L.w(R,this)},x.subtract=function(M,$){return this.add(-1*M,$)},x.format=function(M){var $=this,U=this.$locale();if(!this.isValid())return U.invalidDate||f;var G=M||"YYYY-MM-DDTHH:mm:ssZ",k=L.z(this),j=this.$H,J=this.$m,R=this.$M,te=U.weekdays,ce=U.months,ne=U.meridiem,ee=function(me,Le,nt,mt){return me&&(me[Le]||me($,G))||nt[Le].slice(0,mt)},pe=function(me){return L.s(j%12||12,me,"0")},Te=ne||function(me,Le,nt){var mt=me<12?"AM":"PM";return nt?mt.toLowerCase():mt};return G.replace(g,function(me,Le){return Le||function(nt){switch(nt){case"YY":return String($.$y).slice(-2);case"YYYY":return L.s($.$y,4,"0");case"M":return R+1;case"MM":return L.s(R+1,2,"0");case"MMM":return ee(U.monthsShort,R,ce,3);case"MMMM":return ee(ce,R);case"D":return $.$D;case"DD":return L.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ee(U.weekdaysMin,$.$W,te,2);case"ddd":return ee(U.weekdaysShort,$.$W,te,3);case"dddd":return te[$.$W];case"H":return String(j);case"HH":return L.s(j,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return Te(j,J,!0);case"A":return Te(j,J,!1);case"m":return String(J);case"mm":return L.s(J,2,"0");case"s":return String($.$s);case"ss":return L.s($.$s,2,"0");case"SSS":return L.s($.$ms,3,"0");case"Z":return k}return null}(me)||k.replace(":","")})},x.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},x.diff=function(M,$,U){var G,k=this,j=L.p($),J=O(M),R=(J.utcOffset()-this.utcOffset())*r,te=this-J,ce=function(){return L.m(k,J)};switch(j){case h:G=ce()/12;break;case p:G=ce();break;case E:G=ce()/3;break;case m:G=(te-R)/6048e5;break;case l:G=(te-R)/864e5;break;case o:G=te/a;break;case u:G=te/r;break;case s:G=te/n;break;default:G=te}return U?G:L.a(G)},x.daysInMonth=function(){return this.endOf(p).$D},x.$locale=function(){return A[this.$L]},x.locale=function(M,$){if(!M)return this.$L;var U=this.clone(),G=N(M,$,!0);return G&&(U.$L=G),U},x.clone=function(){return L.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()},v}(),H=B.prototype;return O.prototype=H,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",p],["$y",h],["$D",c]].forEach(function(v){H[v[1]]=function(x){return this.$g(x,v[0],v[1])}}),O.extend=function(v,x){return v.$i||(v(x,B,O),v.$i=!0),O},O.locale=N,O.isDayjs=_,O.unix=function(v){return O(1e3*v)},O.en=A[S],O.Ls=A,O.p={},O})}(ar)),ar.exports}var $1=hu();const ir=Ir($1);var sr={exports:{}},U1=sr.exports,mu;function q1(){return mu||(mu=1,function(e,t){(function(n,r){e.exports=r(hu())})(U1,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var a=r(n),i={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(s,u){return u==="W"?s+"周":s+"日"},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(s,u){var o=100*s+u;return o<600?"凌晨":o<900?"早上":o<1100?"上午":o<1300?"中午":o<1800?"下午":"晚上"}};return a.default.locale(i,null,!0),i})}(sr)),sr.exports}q1();function Tn(e){"@babel/helpers - typeof";return Tn=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},Tn(e)}function z1(e,t){if(Tn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V1(e){var t=z1(e,"string");return Tn(t)=="symbol"?t:t+""}function G1(e,t,n){return(t=V1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Eu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gu(Object(n),!0).forEach(function(r){G1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Y1={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},W1=Eu(Eu({},Y1),{},{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 j1={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},bu={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},W1),timePickerLocale:Object.assign({},j1)};bu.lang.ok="确定",ir.locale("zh-cn");const{RangePicker:X1}=se.DatePicker,K1=({host:e,onChange:t})=>{const n=e.dataset.key,r=e.dataset.value,a=e.dataset.placeholder,i=e.dataset.limitRange?parseInt(e.dataset.limitRange,10):void 0,s=e.dataset.disableFuture==="true",[u,o]=D.useState(()=>{if(!r)return null;const f=r.split(",");return f.length===2&&f[0]&&f[1]?[ir(f[0]),ir(f[1])]:null}),[l,m]=D.useState(null),p=f=>f?s&&f.isAfter(ir(),"day")?!0:!i||!l||!l[0]?!1:Math.abs(f.diff(l[0],"days"))>i:!1,E=f=>{m(f)},h=f=>{if(o(f),m(null),f&&f[0]&&f[1]){const b=`${f[0].format("YYYY-MM-DD")},${f[1].format("YYYY-MM-DD")}`;e.setAttribute("data-value",b),t(n,b)}else e.setAttribute("data-value",""),t(n,"")},c=f=>{m(f?u:null)};return kn.createPortal(z.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:z.jsx(X1,{value:u,disabledDate:p,onCalendarChange:E,onChange:h,onOpenChange:c,placeholder:[a||"开始日期",a||"结束日期"],style:{width:"100%"},size:"small",allowClear:!0,locale:bu,getPopupContainer:()=>document.body,popupClassName:"rte-datepicker-dropdown"})}),e)},Q1=e=>{const[t,n]=D.useState([]);return D.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const s=r.querySelectorAll(".rte-datepicker-host"),u=[];s.forEach(o=>{const l=o.getAttribute("data-key");l&&u.push(z.jsx(K1,{host:o,onChange:()=>{if(e.current){const m=new Event("input",{bubbles:!0});e.current.dispatchEvent(m)}}},`datepicker-${l}`))}),n(u)};a();const i=new MutationObserver(s=>{let u=!1;for(const o of s)if(o.type==="childList"){let l=!1;if(o.addedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),o.removedNodes.forEach(m=>{if(m.nodeType===Node.ELEMENT_NODE){const p=m;(p.classList?.contains("rte-datepicker-host")||p.querySelector?.(".rte-datepicker-host"))&&(l=!0)}}),l){u=!0;break}}u&&a()});return i.observe(r,{childList:!0,subtree:!0}),()=>i.disconnect()},[e]),t},Tu=({config:e,onSend:t,isProcessing:n=!1,disabled:r=!1,width:a,lockStructure:i=!1,agentOptions:s=[],onAgentSelect:u,onAgentExit:o,loading:l=!1,placeholder:m,border:p,background:E="transparent",hideButtons:h,maxHeight:c,minHeight:f,collapsed:b=!1,reportAnalyze:g,markdownAnalyze:T,markdownNameAnalyze:y,onCollapsedChange:C,collapseTransitionMs:S=260,debugTooltipSticky:A=!1,nodeValues:w})=>{console.log("收到了传递的参数");const[_,N]=se.message.useMessage(),O=D.useRef(null),L=D.useRef(null),B=D.useRef(null),H=D.useRef(null),v=D.useRef(null),x=D.useRef("");if(!x.current){const ge=Math.random().toString(36).slice(2,8);x.current=`rte_${ge}`}const[M,$]=D.useState({}),[U,G]=D.useState(null),[k,j]=D.useState(null),[J,R]=D.useState(null),{tooltipPortal:te,setPopoverVisible:ce}=a1({config:e,files:M,debugTooltipSticky:A}),{handleFileChange:ne,handleRemoveFile:ee}=Wu({config:e,messageApi:_,activeBatchKey:k,activeFileKey:U,activeBatchStartIndex:J,setActiveFileKey:G,setActiveBatchKey:j,setActiveBatchStartIndex:R,setFiles:$}),pe=D.useRef(!1),Te=D.useRef(null),{handleMouseDown:me,handleMouseMove:Le,handleMouseUp:nt,handleDoubleClick:mt}=ol({lockStructure:i,onAgentExit:o,editorRef:H,setPopoverVisible:ce,isDraggingRef:pe,mouseDownPosRef:Te}),[or,_t]=D.useState(!1),Cn=D.useRef(null),[ur,lr]=D.useState(!0),cr=D.useRef(0),[Sn,Ha]=D.useState(58),[$a,Ua]=D.useState(58),[qa,za]=D.useState(!1),[Y,Q]=D.useState(null),re=D.useRef(!1),ie=D.useRef(!1),ue=D.useRef(null),[Me,Ze]=D.useState({}),ze=D.useRef(()=>{}),[Ve,rt]=D.useState({}),we=D.useRef(()=>{}),gt=D.useRef({}),$e=D.useRef(Ve);D.useEffect(()=>{$e.current=Ve},[Ve]);const[Ut,Nu]=D.useState({}),wu=D.useRef(()=>{}),Iu=D.useRef(Ut);D.useEffect(()=>{Iu.current=Ut},[Ut]);const[qt,An]=D.useState(()=>{const ge={};return e.forEach(ye=>{ye.type==="multi-variable"&&ye.key&&(ge[ye.key]=1)}),ge});Ku({config:e,editorRef:H,files:M,setFiles:$,multiVariableCounts:qt,setMultiVariableCounts:An}),D.useEffect(()=>{if(!w)return;const ge={};e.forEach(ye=>{if(ye.type==="multi-variable"&&ye.key){const at=w[ye.key];if(Array.isArray(at)&&at.length>0){const Sb=ye.maxCount??9;ge[ye.key]=Math.min(at.length,Sb)}}}),Object.keys(ge).length>0&&An(ye=>({...ye,...ge}))},[w,e]);const Be=tl({config:e,reportAnalyzeState:Me,markdownAnalyzeState:Ve,markdownNameAnalyzeState:Ut}),{handleReportUrlBlur:db,handleMarkdownBlur:fb,handleMarkdownNameBlur:pb}=Ju({reportAnalyze:g,markdownAnalyze:T,markdownNameAnalyze:y,reportAnalyzeState:Me,setReportAnalyzeState:Ze,markdownAnalyzeState:Ve,setMarkdownAnalyzeState:rt,markdownNameAnalyzeState:Ut,setMarkdownNameAnalyzeState:Nu,editorRef:H,reportAnalyzeRef:ze,markdownAnalyzeRef:we,markdownNameAnalyzeRef:wu,markdownAnalyzeStateRef:$e,markdownNameAnalyzeStateRef:Iu});Vu(H,db,[Be]),Gu(H,pb,[Be]),Yu(H,fb,[Be]),zu(H,[Be]),O1(H,Be,M,i,qt,Cn,void 0,h,void 0,w),D1(H,Be,M,ce,A),P1(H,Be,ce,h,A),B1(H,Be,M,ce,A),M1(H,Be,ce,A),R1(H,Be,M,_t),F1(H,pe);const Lu=Ru(H),Ou=qu(H);D.useEffect(()=>{if(!H.current)return;H.current.querySelectorAll(".rte-richtext-toggle").forEach(ye=>{const at=ye.getAttribute("data-expanded")==="true";ye.innerHTML=at?'<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>'})},[Be,H]);const Du=Q1(H),{measureExpandedContentHeight:_n}=Zu({collapsed:b,collapseTransitionMs:S,contentRef:L,contentBodyRef:B,editorRef:H,debugIdRef:x,setCollapsedContentMaxHeightPx:Ha,setExpandedContentMaxHeightPx:Ua,setIsCollapseAnimating:za,effectiveConfig:Be,files:M,multiVariableCounts:qt,selectPortalsLength:Lu.length,datePickerPortalsLength:Du.length,variablePortalsLength:Ou.length}),hb=()=>{if(b)return;const ge=B.current;if(!ge)return;const ye=Math.ceil(ge.getBoundingClientRect().height||0);ye>0&&Q(ye),re.current=!0,ie.current=!1,ue.current&&(window.clearTimeout(ue.current),ue.current=null)};D.useEffect(()=>{const ge=()=>{re.current&&(ie.current=!0,ue.current&&window.clearTimeout(ue.current),ue.current=window.setTimeout(()=>{ue.current=null,re.current=!1,ie.current=!1,Q(null),window.requestAnimationFrame(()=>_n())},450))};return window.addEventListener("focus",ge),()=>window.removeEventListener("focus",ge)},[_n]),D.useEffect(()=>{!re.current||!ie.current||(ue.current&&(window.clearTimeout(ue.current),ue.current=null),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{Q(null),_n(),re.current=!1,ie.current=!1})}))},[M,_n]),el({config:e,editorRef:H,setIsEmpty:lr,setIsFormValid:_t});const mb=al({disabled:r,collapsed:b,onCollapsedChange:C,config:e,lockStructure:i,editorRef:H,containerRef:O,fileInputRef:v,onBeforeFilePickerOpen:hb,files:M,setFiles:$,handleRemoveFile:ee,setActiveBatchKey:j,setActiveBatchStartIndex:R,setActiveFileKey:G,isDraggingRef:pe,richtextPrevScrollTopRef:cr}),Va=il({config:e,editorRef:H,setIsEmpty:lr,setIsFormValid:_t,setReportAnalyzeState:Ze,setMarkdownAnalyzeState:rt,setMarkdownNameAnalyzeState:Nu,collapsed:b,measureExpandedContentHeight:_n,effectiveConfig:Be,files:M,multiVariableCounts:qt,setMultiVariableCounts:An,savedCursorRef:Cn}),gb=ul({disabled:r,config:e,multiVariableCounts:qt,setMultiVariableCounts:An,editorRef:H,handleInput:Va,markdownAnalyzeRef:we,reportAnalyzeRef:ze,markdownNameAnalyzeRef:wu,markdownAnalyzeStateRef:$e,markdownRawTextRef:gt,setMarkdownAnalyzeState:rt});rl({config:e,effectiveConfig:Be,files:M,editorRef:H,setIsFormValid:_t,multiVariableCounts:qt,setMultiVariableCounts:An});const Eb=sl({disabled:r,lockStructure:i,config:e,editorRef:H,handleInput:Va}),bb=ll({config:e,files:M,onSend:t,isProcessing:n,disabled:r,loading:l,isFormValid:or,editorRef:H,markdownAnalyzeState:Ve,markdownNameAnalyzeState:Ut}),Tb={...a?{width:typeof a=="number"?`${a}px`:a}:{},...p?{border:p}:{},...E?{background:E}:{},...c?{maxHeight:typeof c=="number"?`${c}px`:c}:{},...f?{minHeight:typeof f=="number"?`${f}px`:f}:{},...c?{"--rte-richtext-fullscreen-height":typeof c=="number"?`${c}px`:c}:{}},yb=typeof S=="number"&&Number.isFinite(S)&&S>=0?S:260,xb={overflow:"hidden"},Cb={maxHeight:Y!=null?`${Y}px`:b?`${Sn}px`:`${Math.max($a,Sn)}px`,overflow:Y!=null||b||qa?"hidden":"auto",transition:Y!=null?"none":`max-height ${yb}ms cubic-bezier(0.4, 0, 0.2, 1)`,willChange:"max-height"};return z.jsxs("div",{className:"rich-text-editor",style:Tb,"data-disabled":r,ref:O,children:[N,z.jsx("div",{className:"rich-text-editor-content",ref:L,style:xb,children:z.jsxs("div",{ref:B,className:"rich-text-editor-content-body",style:Cb,children:[z.jsx("div",{ref:H,className:`rte-editor ${e.length===0?"rte-editor-default":""} ${ur&&m?"rte-editor-empty":""}`,contentEditable:e.length===0,suppressContentEditableWarning:!0,"data-placeholder":m,onMouseDown:me,onMouseMove:Le,onMouseUp:nt,onClick:mb,onDoubleClick:mt,onInput:Va,onKeyDown:Eb,onPaste:gb}),z.jsx("input",{type:"file",ref:v,className:"rte-file-input",accept:".csv,.xlsx,.xls,.txt,.pdf,image/*",onChange:ne})]})}),z.jsxs("div",{className:"rich-text-editor-footer",children:[z.jsx("div",{className:"rich-text-editor-footer-left",children:z.jsxs("div",{className:"rich-text-editor-brand",children:[z.jsxs("div",{className:"rte-brand-badge",children:[z.jsx("img",{src:"https://oospublic.sealseek.cn/file/website/ball.png",alt:""}),z.jsx("span",{className:"rte-brand-text",children:"SealSeek 1.0"})]}),h!=="hideAgent"&&z.jsx(se.Dropdown,{placement:"topLeft",menu:{items:s.filter(ge=>ge.isShowNew!==1).map(ge=>({key:ge.key,label:z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[ge.icon&&z.jsx("i",{className:ge.icon}),z.jsx("span",{children:ge.label})]}),onClick:()=>{u?.(ge)}}))},trigger:["click"],disabled:r||n,overlayClassName:"rte-agent-dropdown",children:z.jsxs("div",{className:"rte-agent-badge",style:{cursor:s.length>0?"pointer":"default"},children:[z.jsx("i",{className:"iconfont icon-zhinengti",style:{fontSize:"16px"}}),z.jsx("span",{className:"rte-agent-text",children:"智能体"})]})})]})}),z.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(()=>{const ge=e.find(at=>at.type==="tag");if(!ge||!ge.text)return null;const ye=s.find(at=>at.label===ge.text);return!ye||ye.points===void 0||ye.points===null?null:z.jsxs("div",{className:"rte-points-badge",style:{position:"relative"},children:[z.jsx("i",{className:"iconfont icon-jifen",style:{marginRight:"4px",fontSize:"16px"}}),z.jsxs("span",{style:{fontSize:"16px",lineHeight:"22px"},children:["-",String(ye.points)]}),ye.labelValue===2&&z.jsx("div",{className:"rte-limited-free-badge",children:z.jsx("span",{className:"rte-limited-free-text",children:"限时免费"})})]})})(),z.jsx("button",{type:"button",onClick:bb,disabled:n||r||l||!or,className:"rich-text-editor-send-button",children:n||l?z.jsx("span",{className:"rte-send-spinner"}):z.jsx("i",{className:"iconfont icon-fasong"})})]})]}),te,Du,Lu,Ou]})};Tu.__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 yu="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFSSURBVHgB3ZTtccIwDIaVXv83I2SDZgSP0BHMBG0naEZhA2boBGQDswHdQJUOGRxjO0Z8HPDe6eJzJD2W4gjgEYSIn2xwK6EIFHqBGysJpMP3ZB0oRbEtmal1NtIxl4OWWsoxEsvqofJ0rgTNASOYq+7SXKDsuYvAcgkq/PWwBLQWqIfdjeRStaBUc4qzgLi9/BzJNmS/sh6bpvmrTfSFacU3scWy1mQryWdSnXiFE8QVUJINLTuyhWzzz/1OZmTN9hEckqtfUOwIGlGCpVRjE+94JFqpMtTeVzO8/UmPxpZU8Qa7aln8Tb9pfwla4WHWrjPvvbbnTBsX7PmLs83EDAH0BxSw1G31+/1FoDg/vPcXR+wocQS1apj4+P92FfhOoLyuBfYlmPgYnGoCjWADzAkzUyJ430awLmphPaxWQVU22BuuApPkHaanjcXSN3t6/QNjTMSJWDcs1QAAAABJRU5ErkJggg==",J1=[{label:"5页",value:5},{label:"10页",value:10},{label:"15页",value:15},{label:"30页",value:30}],Z1=({autoLoading:e,batchSize:t,loadingProgress:n,loadIcon:r,onBatchSizeChange:a,onLoadNextPage:i,onStartAutoLoad:s,onStopLoad:u})=>e&&n?z.jsxs("div",{className:"auto_load_progress",children:[r||z.jsx("img",{src:yu,alt:"自动加载",width:14,height:14}),z.jsxs("span",{children:["正在加载第",n.currentPage,"/",n.totalPages,"页"]}),z.jsx(se.Progress,{percent:n.percentage,type:"line",size:[160,8]}),z.jsx("span",{onClick:u,className:"auto_load_stop_btn",children:"停止加载"})]}):z.jsxs("div",{className:"auto_load_container",children:[z.jsx("div",{onClick:i,className:"auto_load_next_btn",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:"加载下一页"}),z.jsxs("div",{className:"right_control_wrap",style:{backgroundColor:e?"#f5f5f5":"#2563eb"},children:[z.jsxs("div",{className:"auto_load_btn",onClick:e?void 0:s,children:[r||z.jsx("img",{src:yu,alt:"自动加载",width:14,height:14}),z.jsx("span",{children:"自动加载"})]}),z.jsx(se.Select,{value:t,onChange:a,options:J1,disabled:e,size:"small",className:"auto_load_select",popupMatchSelectWidth:84})]})]}),eb=({current:e,loadIcon:t,pageSize:n,total:r,cachedPages:a,loadedCount:i,autoLoading:s=!1,loadingProgress:u,onChange:o,onLoadNextPage:l,onStartAutoLoad:m,onStopLoading:p})=>{const[E,h]=D.useState(5),c=Math.ceil(r/n),f=D.useMemo(()=>a.length>=c,[a,c]),b=()=>Array.from({length:c},(y,C)=>C+1).filter(y=>!a.includes(y)).slice(0,E),g=(T,y,C)=>{const S=a.includes(T);return y==="prev"||y==="next"||y==="jump-prev"||y==="jump-next"?z.jsx("div",{className:"pageBox",children:C}):z.jsxs("div",{className:"pageBox",style:{backgroundColor:e===T?"#2563EB":"#f5f5f5",color:e===T?"#fff":S?"#171717":"#a3a3a3"},children:[T,!S&&z.jsx("span",{className:"unload_spot"})]})};return z.jsxs("div",{className:"pagination_footer",children:[z.jsxs("div",{className:"pagination_leftWrap",children:[z.jsxs("span",{className:"pagination_total",children:[z.jsx(st.InfoCircleOutlined,{style:{color:"#2563EB",marginRight:"4px"}}),"已加载: ",i,"/",r,"条数据"]}),!f&&z.jsx(Z1,{loadIcon:t||void 0,autoLoading:s,batchSize:E,loadingProgress:u,disabled:!l||!m,onBatchSizeChange:h,onLoadNextPage:()=>l?.(),onStartAutoLoad:()=>{const T=b();m?.(T)},onStopLoad:()=>p?.()})]}),z.jsx(se.Pagination,{current:e,pageSize:n,total:r,onChange:T=>o(T),showSizeChanger:!1,showQuickJumper:!1,showTotal:()=>"",itemRender:g})]})},xu=e=>{const{loading:t,autoLoading:n,loadingProgress:r,columns:a=[],dataSource:i=[],total:s,current:u,pageSize:o,cachedPages:l,onChangePage:m,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:h,...c}=e,f=D.useRef(null),b=D.useCallback(g=>{m(g),l.includes(g)&&f.current?.scrollTo({key:`${(g-1)*o+1}`})},[l,m,o]);return z.jsxs("div",{className:"flex flex-col",children:[z.jsx(se.Table,{ref:f,...c,columns:a,dataSource:i,pagination:!1,virtual:!0}),z.jsx(eb,{loading:t,autoLoading:n,loadingProgress:r,current:u,pageSize:o,total:s,loadedCount:i.length,cachedPages:l,onChange:b,onLoadNextPage:p,onStartAutoLoad:E,onStopLoading:h})]})};xu.__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 Cu=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a,onChange:i,...s})=>{const[u,o]=D.useState(""),[l,m]=D.useState(0),[p,E]=D.useState(!1),[h,c]=D.useState(!1),[f,b]=D.useState(!1),g=D.useRef(void 0),T=D.useRef(void 0),y=D.useRef(e),C=D.useRef(l),S=D.useRef(h),A=D.useRef(u);D.useEffect(()=>{y.current=e,C.current=l,S.current=h,A.current=u});const w=D.useCallback((v,x)=>{let M=0;b(!0);const $=()=>{M<v.length?(o(v.slice(0,M+1)),M++,T.current=window.setTimeout($,n)):(b(!1),x?.())};$()},[n]),_=D.useCallback(v=>{let x=A.current.length;const M=()=>{x>0?(o(A.current.slice(0,x-1)),x--,T.current=window.setTimeout(M,n/2)):v?.()};M()},[n]),N=D.useCallback(()=>{if(y.current.length===0||S.current)return;E(!0);const v=y.current[C.current];A.current?_(()=>{w(v,()=>{g.current=window.setTimeout(()=>{m(x=>(x+1)%y.current.length),E(!1)},2e3)})}):w(v,()=>{g.current=window.setTimeout(()=>{m(x=>(x+1)%y.current.length),E(!1)},2e3)})},[_,w]);D.useEffect(()=>(r&&e.length>0&&!h&&N(),()=>{g.current&&window.clearTimeout(g.current),T.current&&window.clearTimeout(T.current)}),[l,h,r,e.length,N]),D.useEffect(()=>{!p&&r&&e.length>0&&!h&&N()},[l,p,r,e.length,h,N]);const O=v=>{c(!0),g.current&&window.clearTimeout(g.current),T.current&&window.clearTimeout(T.current),E(!1),b(!1),s.onFocus?.(v)},L=v=>{c(!1),!a&&e.length>0&&(o(""),m(0)),s.onBlur?.(v)},B=v=>{i?.(v.target.value),s.onChange?.(v)},H=()=>h||a?t:u||t;return z.jsxs("div",{style:{position:"relative"},children:[z.jsx(se.Input,{...s,value:a,onChange:B,onFocus:O,onBlur:L,placeholder:H(),style:{...s.style,position:"relative",zIndex:1}}),!h&&!a&&u&&z.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:[z.jsx("span",{children:u}),f&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("style",{children:`
|
|
65
65
|
@keyframes blink {
|
|
66
66
|
0%, 50% { opacity: 1; }
|
|
67
67
|
51%, 100% { opacity: 0; }
|
|
68
68
|
}
|
|
69
|
-
`})]})};Cu.__docgenInfo={displayName:"DynamicInput",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"}}}};const Su=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:u=500,showCount:o=!0,submitText:l="发送",disabled:m=!1,rows:p=4,style:
|
|
69
|
+
`})]})};Cu.__docgenInfo={displayName:"DynamicInput",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"}}}};const Su=({texts:e=[],placeholder:t="请输入内容",animationSpeed:n=100,autoPlay:r=!0,value:a="",onChange:i,onSubmit:s,maxLength:u=500,showCount:o=!0,submitText:l="发送",disabled:m=!1,rows:p=4,style:E,...h})=>{const[c,f]=D.useState(""),[b,g]=D.useState(0),[T,y]=D.useState(!1),[C,S]=D.useState(!1),[A,w]=D.useState(!1),[_,N]=D.useState(a||""),O=D.useRef(void 0),L=D.useRef(void 0),B=D.useRef(e),H=D.useRef(b),v=D.useRef(C),x=D.useRef(c),M=D.useRef(null);D.useEffect(()=>{B.current=e,H.current=b,v.current=C,x.current=c});const $=D.useCallback((ee,pe)=>{let Te=0;w(!0);const me=()=>{Te<ee.length?(f(ee.slice(0,Te+1)),Te++,L.current=window.setTimeout(me,n)):(w(!1),pe?.())};me()},[n]),U=D.useCallback(ee=>{let pe=x.current.length;const Te=()=>{pe>0?(f(x.current.slice(0,pe-1)),pe--,L.current=window.setTimeout(Te,n/2)):ee?.()};Te()},[n]),G=D.useCallback(()=>{if(B.current.length===0||v.current)return;y(!0);const ee=B.current[H.current];x.current?U(()=>{$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%B.current.length),y(!1)},2e3)})}):$(ee,()=>{O.current=window.setTimeout(()=>{g(pe=>(pe+1)%B.current.length),y(!1)},2e3)})},[U,$]);D.useEffect(()=>(r&&e.length>0&&!C&&G(),()=>{O.current&&window.clearTimeout(O.current),L.current&&window.clearTimeout(L.current)}),[b,C,r,e.length,G]),D.useEffect(()=>{!T&&r&&e.length>0&&!C&&G()},[b,T,r,e.length,C,G]);const k=ee=>{S(!0),O.current&&window.clearTimeout(O.current),L.current&&window.clearTimeout(L.current),y(!1),w(!1),h.onFocus?.(ee)},j=ee=>{S(!1),!a&&e.length>0&&(f(""),g(0)),h.onBlur?.(ee)},J=ee=>{const pe=ee.target.value;u&&pe.length>u||(i?i(pe):N(pe),h.onChange?.(ee))},R=()=>{const ee=i?a:_;ee.trim()&&!m&&(s?.(ee),i||N(""))},te=ee=>{(ee.ctrlKey||ee.metaKey)&&ee.key==="Enter"&&(ee.preventDefault(),R()),h.onKeyDown?.(ee)},ce=i?a:_,ne=m||!ce.trim()||(u?ce.length>u:!1);return z.jsxs("div",{style:{position:"relative",...E},children:[z.jsxs("div",{style:{position:"relative"},children:[z.jsx("textarea",{ref:M,value:i?a:_,onChange:J,onFocus:ee=>{ee.target.style.borderColor="#1890ff",ee.target.style.boxShadow="0 0 0 2px rgba(24, 144, 255, 0.2)",k(ee)},onBlur:ee=>{ee.target.style.borderColor="#d9d9d9",ee.target.style.boxShadow="none",j(ee)},onKeyDown:te,placeholder:C||ce?t:"",maxLength:u,rows:p,disabled:m,style:{width:"100%",minHeight:`${p*24+16}px`,padding:"8px 60px 8px 12px",border:"1px solid #d9d9d9",borderRadius:"6px",fontSize:"14px",lineHeight:"1.5",fontFamily:"inherit",resize:"vertical",outline:"none",transition:"border-color 0.3s, box-shadow 0.3s",backgroundColor:"#fff",...h.style},...h}),!C&&!ce&&c&&z.jsxs("div",{style:{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"flex-start",paddingTop:8,paddingLeft:12,paddingRight:12,color:"#bfbfbf",pointerEvents:"none",zIndex:2,fontSize:14,fontFamily:"inherit",lineHeight:"1.5"},children:[z.jsx("span",{children:c}),A&&z.jsx("span",{style:{display:"inline-block",width:1,height:"1.2em",backgroundColor:"#1890ff",marginLeft:2,animation:"blink 1s infinite"}})]}),z.jsx("div",{style:{position:"absolute",bottom:8,right:8,zIndex:3},children:z.jsx(se.Button,{type:"primary",size:"small",icon:z.jsx(st.SendOutlined,{}),onClick:R,disabled:ne,style:{borderRadius:6,minWidth:32,height:32,display:"flex",alignItems:"center",justifyContent:"center"},children:l})})]}),o&&z.jsxs("div",{style:{marginTop:4,textAlign:"right",fontSize:"12px",color:"#999"},children:[ce.length,"/",u]}),z.jsx("style",{children:`
|
|
70
70
|
@keyframes blink {
|
|
71
71
|
0%, 50% { opacity: 1; }
|
|
72
72
|
51%, 100% { opacity: 0; }
|
|
73
73
|
}
|
|
74
|
-
`})]})};Su.__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 Fa=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:u=!0,onClick:o,onVideoLoaded:l,onVideoPlay:m,onVideoPause:p,onVideoEnded:b,className:g,style:c,...f})=>{const E=M.useRef(null),[h,T]=M.useState(!1),[y,C]=M.useState(!1),[S,A]=M.useState(!1),w=M.useCallback(()=>{E.current&&(E.current.play(),T(!0),m?.())},[m]),_=M.useCallback(()=>{E.current&&(E.current.pause(),T(!1),p?.())},[p]),L=M.useCallback($=>{$.stopPropagation(),h?_():w()},[h,w,_]),O=M.useCallback(()=>{C(!0),u&&!h&&w()},[u,h,w]),I=M.useCallback(()=>{C(!1),u&&h&&_()},[u,h,_]),B=M.useCallback(()=>{A(!0),l?.()},[l]),H=M.useCallback(()=>{T(!0),m?.()},[m]),v=M.useCallback(()=>{T(!1),p?.()},[p]),x=M.useCallback(()=>{T(!1),b?.()},[b]),P=M.useCallback($=>{o?.($)},[o]);return z.jsx(se.Card,{...f,className:`video-card ${g||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:o?"pointer":"default",border:"none",borderRadius:0,...c},bordered:!1,onMouseEnter:O,onMouseLeave:I,onClick:P,children:z.jsxs("div",{className:"video-card-container",children:[z.jsx("video",{ref:E,src:e,poster:t,preload:"metadata",onLoadedData:B,onPlay:H,onPause:v,onEnded:x,muted:!0,loop:!0}),s&&z.jsx("div",{className:`video-play-button ${y?"hovered":""}`,onClick:L,children:h?z.jsx(st.PauseCircleOutlined,{className:"play-icon"}):z.jsx(st.PlayCircleOutlined,{className:"play-icon"})}),!S&&z.jsx("div",{className:"video-loading-mask",children:z.jsx("div",{className:"loading-spinner"})})]})})};Fa.__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 tb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),nb=e=>e.type?e.type:tb(e.url)?"video":"image",Au=({items:e,columns:t,gap:n=0,responsive:r=!0,breakpoints:a={xs:1,sm:2,md:3,lg:4,xl:5,xxl:6},className:i,style:s,onClick:u})=>{const o=M.useRef(null),[l,m]=M.useState(t||a.md||3),p=M.useRef(new Map),b=M.useCallback(()=>{if(!r||t)return t||a.md||3;const E=window.innerWidth;return E<576?a.xs||1:E<768?a.sm||2:E<992?a.md||3:E<1200?a.lg||4:E<1600?a.xl||5:a.xxl||6},[r,t,a]),g=M.useCallback(()=>{if(!o.current)return;const E=l,h=o.current,y=(h.offsetWidth-n*(E-1))/E,C=new Array(E).fill(0);e.forEach((A,w)=>{const _=A.id||w,L=p.current.get(_);if(!L)return;const O=Math.min(...C),I=C.indexOf(O),B=I*(y+n),H=C[I];L.style.position="absolute",L.style.left=`${B}px`,L.style.top=`${H}px`,L.style.width=`${y}px`,C[I]+=L.offsetHeight+n});const S=Math.max(...C);h.style.height=`${S}px`},[e,l,n]);M.useEffect(()=>{const E=()=>{const h=b();h!==l&&m(h)};if(r)return window.addEventListener("resize",E),E(),()=>window.removeEventListener("resize",E)},[r,b,l]),M.useEffect(()=>{const E=setTimeout(()=>{g()},100);return()=>clearTimeout(E)},[e,l,g]);const c=M.useCallback(()=>{g()},[g]),f=M.useCallback(E=>{u&&u(E),E.onClick?.(E)},[u]);return z.jsx("div",{ref:o,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((E,h)=>{const T=E.id||h,y=nb(E);return z.jsx("div",{ref:C=>{C?p.current.set(T,C):p.current.delete(T)},className:"waterfall-item",children:y==="video"?z.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:u||E.onClick?"pointer":"default"},children:z.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:z.jsx(Fa,{src:E.url,poster:E.poster,width:"100%",height:"100%",onClick:()=>f(E),onVideoLoaded:c,autoPlayOnHover:!0,showPlayButton:!1})})}):z.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>f(E),style:{cursor:u||E.onClick?"pointer":"default"},children:z.jsx("img",{src:E.url,alt:`瀑布流图片 ${h+1}`,className:"waterfall-image",onLoad:c,onError:c,style:{display:"block",width:"100%",height:"auto"}})})},T)})})};Au.__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 yn=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),$t={日期:"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"},rb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],xn=e=>$t[e]??e,ab=e=>e?!!($t[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,ib=e=>{const t=e.trim();if(!t)return[];const n=t.split(/[\r\n]+/).map(s=>s.trim()).filter(Boolean);if(n.length===0)return[];const r=n[0];if(r.includes(" ")){const s=r.split(/\t/).map(o=>o.trim()).filter(Boolean),u=s.some(o=>$t[o]!==void 0);if(s.length>=2&&u)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(o=>o.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const u=s.some(o=>$t[o]!==void 0);return s.length>=2&&u?s:[]}const a=n.filter(ab);return a.some(s=>$t[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},sb=e=>{if(!e||e.trim()==="")return"";const t=e.trim();if(t.toLowerCase()==="nan")return"NaN";const n=t.match(/^(.+?)([+-]\d)/);return n?n[1].trim():t},ob=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(n=>n.trim()).filter(n=>n!==""),_u=e=>{const t=(e||"").replace(/[\u00a0\u3000]/g," "),n=/20\d{2}-\d{2}-\d{2}/g,r=t.match(n)||[];if(r.length===0)return{markdown:"",jsonData:[]};const a=t.split(n).filter(h=>h.trim()!==""),i=a.length>0?ib(a[0]):[],s=i.length>=2,u=s?i:rb,o=s||a.length>0&&a[0].includes("展现量")?1:0,l=u.filter(h=>h!=="日期"),m=l.length,p=[];r.forEach((h,T)=>{const y=T+o;if(y>=a.length)return;const C=a[y];let S=C.split(/[\r\n]+/).map(_=>_.trim()).filter(_=>_!=="");S.length<m&&(S=ob(C));const A=_=>S.length===m*2?S[_*2]??"":S[_]??"",w={};w[xn("日期")]=h,l.forEach((_,L)=>{const O=A(L),I=sb(O),B=xn(_);w[B]=I}),p.push(w)});const b=u.filter(h=>{const T=xn(h);return p.some(y=>{const C=y[T];return C!==void 0&&String(C).trim()!==""})}),g=`| ${b.join(" | ")} |`,c=`| ${b.map(()=>"---").join(" | ")} |`,f=p.map(h=>`| ${b.map(y=>{const C=xn(y);return h[C]??"-"}).join(" | ")} |`);return{markdown:[g,c,...f].join(`
|
|
74
|
+
`})]})};Su.__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 Fa=({src:e,poster:t,width:n=300,height:r,videoWidth:a,videoHeight:i,showPlayButton:s=!0,autoPlayOnHover:u=!0,onClick:o,onVideoLoaded:l,onVideoPlay:m,onVideoPause:p,onVideoEnded:E,className:h,style:c,...f})=>{const b=D.useRef(null),[g,T]=D.useState(!1),[y,C]=D.useState(!1),[S,A]=D.useState(!1),w=D.useCallback(()=>{b.current&&(b.current.play(),T(!0),m?.())},[m]),_=D.useCallback(()=>{b.current&&(b.current.pause(),T(!1),p?.())},[p]),N=D.useCallback($=>{$.stopPropagation(),g?_():w()},[g,w,_]),O=D.useCallback(()=>{C(!0),u&&!g&&w()},[u,g,w]),L=D.useCallback(()=>{C(!1),u&&g&&_()},[u,g,_]),B=D.useCallback(()=>{A(!0),l?.()},[l]),H=D.useCallback(()=>{T(!0),m?.()},[m]),v=D.useCallback(()=>{T(!1),p?.()},[p]),x=D.useCallback(()=>{T(!1),E?.()},[E]),M=D.useCallback($=>{o?.($)},[o]);return z.jsx(se.Card,{...f,className:`video-card ${h||""}`,style:{width:n,height:r,padding:0,overflow:"hidden",cursor:o?"pointer":"default",border:"none",borderRadius:0,...c},bordered:!1,onMouseEnter:O,onMouseLeave:L,onClick:M,children:z.jsxs("div",{className:"video-card-container",children:[z.jsx("video",{ref:b,src:e,poster:t,preload:"metadata",onLoadedData:B,onPlay:H,onPause:v,onEnded:x,muted:!0,loop:!0}),s&&z.jsx("div",{className:`video-play-button ${y?"hovered":""}`,onClick:N,children:g?z.jsx(st.PauseCircleOutlined,{className:"play-icon"}):z.jsx(st.PlayCircleOutlined,{className:"play-icon"})}),!S&&z.jsx("div",{className:"video-loading-mask",children:z.jsx("div",{className:"loading-spinner"})})]})})};Fa.__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 tb=e=>[".mp4",".webm",".ogg",".mov",".avi",".wmv",".flv",".mkv"].some(n=>e.toLowerCase().includes(n)),nb=e=>e.type?e.type:tb(e.url)?"video":"image",Au=({items:e,columns:t,gap:n=0,responsive:r=!0,breakpoints:a={xs:1,sm:2,md:3,lg:4,xl:5,xxl:6},className:i,style:s,onClick:u})=>{const o=D.useRef(null),[l,m]=D.useState(t||a.md||3),p=D.useRef(new Map),E=D.useCallback(()=>{if(!r||t)return t||a.md||3;const b=window.innerWidth;return b<576?a.xs||1:b<768?a.sm||2:b<992?a.md||3:b<1200?a.lg||4:b<1600?a.xl||5:a.xxl||6},[r,t,a]),h=D.useCallback(()=>{if(!o.current)return;const b=l,g=o.current,y=(g.offsetWidth-n*(b-1))/b,C=new Array(b).fill(0);e.forEach((A,w)=>{const _=A.id||w,N=p.current.get(_);if(!N)return;const O=Math.min(...C),L=C.indexOf(O),B=L*(y+n),H=C[L];N.style.position="absolute",N.style.left=`${B}px`,N.style.top=`${H}px`,N.style.width=`${y}px`,C[L]+=N.offsetHeight+n});const S=Math.max(...C);g.style.height=`${S}px`},[e,l,n]);D.useEffect(()=>{const b=()=>{const g=E();g!==l&&m(g)};if(r)return window.addEventListener("resize",b),b(),()=>window.removeEventListener("resize",b)},[r,E,l]),D.useEffect(()=>{const b=setTimeout(()=>{h()},100);return()=>clearTimeout(b)},[e,l,h]);const c=D.useCallback(()=>{h()},[h]),f=D.useCallback(b=>{u&&u(b),b.onClick?.(b)},[u]);return z.jsx("div",{ref:o,className:`waterfall-container ${i||""}`,style:{position:"relative",width:"100%",...s},children:e.map((b,g)=>{const T=b.id||g,y=nb(b);return z.jsx("div",{ref:C=>{C?p.current.set(T,C):p.current.delete(T)},className:"waterfall-item",children:y==="video"?z.jsx("div",{style:{width:"100%",position:"relative",paddingBottom:"56.25%",cursor:u||b.onClick?"pointer":"default"},children:z.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:z.jsx(Fa,{src:b.url,poster:b.poster,width:"100%",height:"100%",onClick:()=>f(b),onVideoLoaded:c,autoPlayOnHover:!0,showPlayButton:!1})})}):z.jsx("div",{className:"waterfall-image-wrapper",onClick:()=>f(b),style:{cursor:u||b.onClick?"pointer":"default"},children:z.jsx("img",{src:b.url,alt:`瀑布流图片 ${g+1}`,className:"waterfall-image",onLoad:c,onError:c,style:{display:"block",width:"100%",height:"auto"}})})},T)})})};Au.__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 yn=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),$t={日期:"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"},rb=["日期","展现量","点击量","花费(元)","点击率","平均点击花费(元)","总成交金额(元)","总成交笔数","点击转化率","总购物车数","收藏宝贝数","收藏店铺数","总收藏数","宝贝收藏成本(元)","千次展现花费(元)","总预售成交金额(元)","总预售成交笔数","直接预售成交金额(元)","直接预售成交笔数","间接预售成交金额(元)","间接预售成交笔数","拍下订单笔数","拍下订单金额(元)","直接成交金额(元)","间接成交金额(元)","直接成交笔数","间接成交笔数","投入产出比","含预售投产比","总成交成本(元)","引导访问潜客数","成交人数","人均成交笔数","人均成交金额","直接购物车数","间接购物车数","加购率","店铺收藏成本(元)","总收藏加购数","总收藏加购成本(元)","宝贝收藏加购数","宝贝收藏加购成本(元)","宝贝收藏率","加购成本(元)","直接收藏宝贝数","间接收藏宝贝数","优惠券领取量","购物金充值笔数","购物金充值金额(元)","旺旺咨询量","引导访问量","引导访问人数","引导访问潜客占比","引导访问率","深度访问量","平均访问页面数","成交新客数","成交新客占比","自然流量转化金额","自然流量曝光量"],xn=e=>$t[e]??e,ab=e=>e?!!($t[e]!==void 0||e.length<=20&&/[\u4e00-\u9fff]/.test(e)):!1,ib=e=>{const t=e.trim();if(!t)return[];const n=t.split(/[\r\n]+/).map(s=>s.trim()).filter(Boolean);if(n.length===0)return[];const r=n[0];if(r.includes(" ")){const s=r.split(/\t/).map(o=>o.trim()).filter(Boolean),u=s.some(o=>$t[o]!==void 0);if(s.length>=2&&u)return s}if(n.length===1){let s=r.split(/\s{2,}/).map(o=>o.trim()).filter(Boolean);s.length<=1&&(s=r.split(/\s+/).filter(Boolean));const u=s.some(o=>$t[o]!==void 0);return s.length>=2&&u?s:[]}const a=n.filter(ab);return a.some(s=>$t[s]!==void 0)&&a.length>=2&&a.length/n.length>=.5?a:[]},sb=e=>{if(!e||e.trim()==="")return"";const t=e.trim();if(t.toLowerCase()==="nan")return"NaN";const n=t.match(/^(.+?)([+-]\d)/);return n?n[1].trim():t},ob=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(n=>n.trim()).filter(n=>n!==""),_u=e=>{const t=(e||"").replace(/[\u00a0\u3000]/g," "),n=/20\d{2}-\d{2}-\d{2}/g,r=t.match(n)||[];if(r.length===0)return{markdown:"",jsonData:[]};const a=t.split(n).filter(g=>g.trim()!==""),i=a.length>0?ib(a[0]):[],s=i.length>=2,u=s?i:rb,o=s||a.length>0&&a[0].includes("展现量")?1:0,l=u.filter(g=>g!=="日期"),m=l.length,p=[];r.forEach((g,T)=>{const y=T+o;if(y>=a.length)return;const C=a[y];let S=C.split(/[\r\n]+/).map(_=>_.trim()).filter(_=>_!=="");S.length<m&&(S=ob(C));const A=_=>S.length===m*2?S[_*2]??"":S[_]??"",w={};w[xn("日期")]=g,l.forEach((_,N)=>{const O=A(N),L=sb(O),B=xn(_);w[B]=L}),p.push(w)});const E=u.filter(g=>{const T=xn(g);return p.some(y=>{const C=y[T];return C!==void 0&&String(C).trim()!==""})}),h=`| ${E.join(" | ")} |`,c=`| ${E.map(()=>"---").join(" | ")} |`,f=p.map(g=>`| ${E.map(y=>{const C=xn(y);return g[C]??"-"}).join(" | ")} |`);return{markdown:[h,c,...f].join(`
|
|
75
75
|
`),jsonData:p}},ku=e=>{if(!e)return"";const t=e.trim().split(`
|
|
76
|
-
`);if(t.length<2)return yn(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return yn(e);const s=t[0].split("|").map(p=>p.trim()).filter(p=>p!==""),u=t.slice(2).map(p=>p.split("|").map(
|
|
76
|
+
`);if(t.length<2)return yn(e);const n=t[1],a=/^\|[\s-|]+\|$/.test(n.trim());if(!n||!a)return yn(e);const s=t[0].split("|").map(p=>p.trim()).filter(p=>p!==""),u=t.slice(2).map(p=>p.split("|").map(E=>E.trim()).filter((E,h,c)=>h>0&&h<c.length)),o="border:1px solid #d9d9d9;padding:8px 12px;background-color:#fafafa;font-weight:600;text-align:left;white-space:nowrap;",l="border:1px solid #d9d9d9;padding:6px 12px;text-align:left;white-space:nowrap;";let m='<div style="overflow-x:auto;max-width:100%;">';return m+='<table style="border-collapse:collapse;width:100%;font-size:12px;margin:8px 0;">',m+="<thead><tr>",s.forEach(p=>{m+=`<th style="${o}">${yn(p)}</th>`}),m+="</tr></thead>",m+="<tbody>",u.forEach(p=>{m+="<tr>",s.forEach((E,h)=>{const c=p[h]||"-";m+=`<td style="${l}">${yn(c)}</td>`}),m+="</tr>"}),m+="</tbody></table></div>",m},vu=e=>{const t=[],n=e.querySelector("thead tr");if(!n)return t;const r=[];return n.querySelectorAll("th").forEach(i=>{r.push(i.textContent?.trim()||"")}),e.querySelectorAll("tbody tr").forEach(i=>{const s={};i.querySelectorAll("td").forEach((o,l)=>{const m=r[l];if(m==null)return;const p=xn(m),E=o.textContent?.trim()||"";s[p]=E==="-"?"":E}),Object.keys(s).length>0&&t.push(s)}),t},ub=e=>async t=>{const n=_u(t.text);return e&&e(n.jsonData),{modules:[{title:"推广分析表格",content:ku(n.markdown),markdown:n.markdown}]}},lb=(e,t,n)=>{const r=parseFloat(String(e.get("grossProfitMargin")||"0"))||0,a=parseFloat(String(e.get("refundRate")||"0"))||0;let i=[];if(t){const s=vu(t);s.length>0&&(i=s)}return i.length===0&&n&&n.length>0&&(i=n),{grossProfitMargin:r,refundRate:a,tableData:i}},cb={algorithm:se.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"}}};he.AdvancedTable=Za,he.AppModal=Wa,he.BackButton=Qa,he.Button=Ga,he.Card=Ya,he.DynamicInput=Cu,he.DynamicTextArea=Su,he.EmptyAndSpin=Ka,he.HEADER_TO_FIELD=$t,he.LinkButton=Ja,he.PageTable=ja,he.RichTextEditor=Tu,he.VideoCard=Fa,he.VirtualTable=xu,he.Waterfall=Au,he.XcIcon=Xa,he.buildPromotionSendPayload=lb,he.createMarkdownAnalyze=ub,he.escapeHtml=yn,he.extractTableDataFromHtml=vu,he.lightTheme=cb,he.parsePromotionTableMarkdown=_u,he.renderMarkdownToHtml=ku,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|
|
77
77
|
//# sourceMappingURL=index.umd.js.map
|