@dayinxisheng/zreadbrow 1.17.0 → 1.17.3
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/bin/zreadbrow.js +14 -2
- package/dist/public/assets/{AIPanel-CScovBuP.js → AIPanel-C-YfdAam.js} +7 -7
- package/dist/public/assets/MermaidBlock-CPVuAdRJ.js +1 -0
- package/dist/public/assets/{MermaidViewerModal-C6aHO871.js → MermaidViewerModal-BRk7-q4K.js} +1 -1
- package/dist/public/assets/{ReferenceModal-DSe6-vS0.js → ReferenceModal-B916Di7q.js} +11 -11
- package/dist/public/assets/{SettingsModal--k8PL66i.js → SettingsModal-CTBLFFSS.js} +1 -1
- package/dist/public/assets/{_baseUniq-y4by9G-Q.js → _baseUniq-m7cimItk.js} +1 -1
- package/dist/public/assets/{architectureDiagram-Q4EWVU46-BEmzXJbV.js → architectureDiagram-Q4EWVU46-DtqSqMGf.js} +1 -1
- package/dist/public/assets/{blockDiagram-DXYQGD6D-YFH-77U0.js → blockDiagram-DXYQGD6D-CgFuSL-z.js} +5 -5
- package/dist/public/assets/{c4Diagram-AHTNJAMY-CLoKIvmw.js → c4Diagram-AHTNJAMY-CUE7rn2p.js} +1 -1
- package/dist/public/assets/{chunk-4BX2VUAB-BYEuseZS.js → chunk-4BX2VUAB-zMHqNRcr.js} +1 -1
- package/dist/public/assets/{chunk-4TB4RGXK-FI8K-3Xx.js → chunk-4TB4RGXK-BpV3pxqF.js} +1 -1
- package/dist/public/assets/{chunk-55IACEB6-CTAvomwk.js → chunk-55IACEB6-1YjEpZd0.js} +1 -1
- package/dist/public/assets/{chunk-EDXVE4YY-oyJ-O6qG.js → chunk-EDXVE4YY-CeBjdSJX.js} +1 -1
- package/dist/public/assets/{chunk-FMBD7UC4-C9K9lOWs.js → chunk-FMBD7UC4-oyXy72V1.js} +1 -1
- package/dist/public/assets/{chunk-OYMX7WX6-CmKnZ9RU.js → chunk-OYMX7WX6-CQB5A9wm.js} +1 -1
- package/dist/public/assets/{chunk-QZHKN3VN-BIbiz9Rm.js → chunk-QZHKN3VN-C6V5KhDH.js} +1 -1
- package/dist/public/assets/chunk-YZCP3GAM-Cvl0MM85.js +1 -0
- package/dist/public/assets/classDiagram-6PBFFD2Q-DHxKXnDK.js +1 -0
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-DHxKXnDK.js +1 -0
- package/dist/public/assets/clone-B_44hGXQ.js +1 -0
- package/dist/public/assets/{cose-bilkent-S5V4N54A-DIBlD9wz.js → cose-bilkent-S5V4N54A-tP2GUtP-.js} +1 -1
- package/dist/public/assets/{dagre-KV5264BT-BOhPW5QL.js → dagre-KV5264BT-Evq-yC-H.js} +1 -1
- package/dist/public/assets/diagram-5BDNPKRD-C9IEP2hE.js +10 -0
- package/dist/public/assets/diagram-G4DWMVQ6-BCLMvrx-.js +24 -0
- package/dist/public/assets/{diagram-MMDJMWI5-DmCtOKnk.js → diagram-MMDJMWI5-DxJ3dga5.js} +2 -2
- package/dist/public/assets/{diagram-TYMM5635-B4qsiTWn.js → diagram-TYMM5635-BOJIcEla.js} +2 -2
- package/dist/public/assets/{erDiagram-SMLLAGMA-pXEv9R-9.js → erDiagram-SMLLAGMA-aXA9Q1fI.js} +1 -1
- package/dist/public/assets/{flowDiagram-DWJPFMVM-BP7auCOg.js → flowDiagram-DWJPFMVM-BjEk7JcK.js} +1 -1
- package/dist/public/assets/{ganttDiagram-T4ZO3ILL-CZv87GYZ.js → ganttDiagram-T4ZO3ILL-D3u7X5y3.js} +2 -2
- package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-BNsUvZWe.js → gitGraphDiagram-UUTBAWPF-oEcGoRSk.js} +5 -5
- package/dist/public/assets/{graph-p3cnnF-t.js → graph-lVZ_cjbT.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62--vm9zfDs.js → highlighted-body-OFNGDK62-DkdBx1s2.js} +1 -1
- package/dist/public/assets/index-BmQ-wOlB.js +482 -0
- package/dist/public/assets/index-F37uDERb.css +1 -0
- package/dist/public/assets/{infoDiagram-42DDH7IO-BzfFYcZ2.js → infoDiagram-42DDH7IO-C28F97oa.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-BlTbVd-H.js → ishikawaDiagram-UXIWVN3A-D59D4ZGk.js} +5 -5
- package/dist/public/assets/{journeyDiagram-VCZTEJTY-V5hNOIqg.js → journeyDiagram-VCZTEJTY-DshaLFkN.js} +1 -1
- package/dist/public/assets/{kanban-definition-6JOO6SKY-BWt5uYAr.js → kanban-definition-6JOO6SKY-C2g7cjfd.js} +2 -2
- package/dist/public/assets/{layout-D6ldE2fP.js → layout-CnqOUuXe.js} +1 -1
- package/dist/public/assets/{mermaid-CKheD1Go.js → mermaid-CF-QbALk.js} +4 -4
- package/dist/public/assets/{min-CwSB4Wao.js → min-DIoUV2Ll.js} +1 -1
- package/dist/public/assets/{mindmap-definition-QFDTVHPH-BNS4IjMS.js → mindmap-definition-QFDTVHPH-Cuart2gs.js} +7 -7
- package/dist/public/assets/{pieDiagram-DEJITSTG-DWiOvKqY.js → pieDiagram-DEJITSTG-DDYdBumO.js} +2 -2
- package/dist/public/assets/{quadrantDiagram-34T5L4WZ-BeGjJ6HS.js → quadrantDiagram-34T5L4WZ-1M4jQ4aT.js} +3 -3
- package/dist/public/assets/{requirementDiagram-MS252O5E-Bg9ysArQ.js → requirementDiagram-MS252O5E-cbWppHFa.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-XADWPNL6-BYRCYtrJ.js → sankeyDiagram-XADWPNL6-4D4rvcjw.js} +4 -4
- package/dist/public/assets/{sequenceDiagram-FGHM5R23-CQFXgNL8.js → sequenceDiagram-FGHM5R23-ComC2-Sc.js} +1 -1
- package/dist/public/assets/stateDiagram-FHFEXIEX-8nR4RqyL.js +1 -0
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-sni4Ws2p.js +1 -0
- package/dist/public/assets/{timeline-definition-GMOUNBTQ-Rn8InxFI.js → timeline-definition-GMOUNBTQ-CWEAkGhb.js} +1 -1
- package/dist/public/assets/{vennDiagram-DHZGUBPP-BWKM7U6N.js → vennDiagram-DHZGUBPP-BCUB4Y59.js} +5 -5
- package/dist/public/assets/{wardley-RL74JXVD-BGUd-VPm.js → wardley-RL74JXVD-fcUo-Wrg.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-NUSXRM2D-BJ8q8ZAA.js → wardleyDiagram-NUSXRM2D-q0nyo3Bx.js} +2 -2
- package/dist/public/assets/{xychartDiagram-5P7HB3ND-CFKLrNXJ.js → xychartDiagram-5P7HB3ND-tZNDsxpi.js} +4 -4
- package/dist/public/index.html +3 -3
- package/dist/server/index.js +1 -1
- package/dist/server/middleware/errorHandler.js +1 -1
- package/dist/server/middleware/requestId.js +1 -1
- package/dist/server/routes/ai.js +1 -1
- package/dist/server/routes/config.js +1 -1
- package/dist/server/routes/files.js +1 -1
- package/dist/server/routes/projects.js +1 -1
- package/dist/server/routes/scan.js +1 -1
- package/dist/server/routes/search.js +1 -1
- package/dist/server/routes/wiki.js +1 -1
- package/dist/server/services/ai.js +1 -1
- package/dist/server/services/cache.js +1 -1
- package/dist/server/services/config.js +1 -1
- package/dist/server/services/jieba.js +1 -1
- package/dist/server/services/logger.js +1 -1
- package/dist/server/services/scanner.js +1 -1
- package/dist/server/services/search-db.js +1 -1
- package/dist/server/services/search-index.js +1 -1
- package/dist/server/services/search-query.js +1 -1
- package/dist/server/services/tokenizer.js +1 -1
- package/dist/server/services/wiki-loader.js +1 -1
- package/dist/server/services/wire-reader.js +1 -1
- package/package.json +6 -2
- package/dist/public/assets/MermaidBlock-CwSB1vTi.js +0 -1
- package/dist/public/assets/chunk-YZCP3GAM-CipzN9Ll.js +0 -1
- package/dist/public/assets/classDiagram-6PBFFD2Q-BYEeftLU.js +0 -1
- package/dist/public/assets/classDiagram-v2-HSJHXN6E-BYEeftLU.js +0 -1
- package/dist/public/assets/clipboard-DZvD3OhL.js +0 -1
- package/dist/public/assets/clone-CSrQO5m9.js +0 -1
- package/dist/public/assets/diagram-5BDNPKRD-CokDfnAE.js +0 -10
- package/dist/public/assets/diagram-G4DWMVQ6-BRRM2XLs.js +0 -24
- package/dist/public/assets/index-5zPgI2iS.css +0 -1
- package/dist/public/assets/index-CqfyOQhq.js +0 -332
- package/dist/public/assets/index-WbpvO67V.js +0 -153
- package/dist/public/assets/stateDiagram-FHFEXIEX-axjES2Uc.js +0 -1
- package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-CADBRSGI.js +0 -1
|
@@ -1,332 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-OFNGDK62--vm9zfDs.js","assets/mermaid-CKheD1Go.js","assets/MermaidBlock-CwSB1vTi.js","assets/clipboard-DZvD3OhL.js","assets/SettingsModal--k8PL66i.js","assets/ReferenceModal-DSe6-vS0.js","assets/MermaidViewerModal-C6aHO871.js","assets/AIPanel-CScovBuP.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var D2=Object.defineProperty;var M2=(e,t,n)=>t in e?D2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ke=(e,t,n)=>M2(e,typeof t!="symbol"?t+"":t,n);import{aE as ga,ap as Mr}from"./mermaid-CKheD1Go.js";function B2(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in e)){const u=Object.getOwnPropertyDescriptor(i,a);u&&Object.defineProperty(e,a,u.get?u:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const l of u.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(a){if(a.ep)return;a.ep=!0;const u=n(a);fetch(a.href,u)}})();var bc={exports:{}},Us={},xc={exports:{}},He={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react.production.min.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var r0;function F2(){if(r0)return He;r0=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function y(M){return M===null||typeof M!="object"?null:(M=E&&M[E]||M["@@iterator"],typeof M=="function"?M:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function _(M,Q,L){this.props=M,this.context=Q,this.refs=v,this.updater=L||x}_.prototype.isReactComponent={},_.prototype.setState=function(M,Q){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Q,"setState")},_.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=_.prototype;function j(M,Q,L){this.props=M,this.context=Q,this.refs=v,this.updater=L||x}var F=j.prototype=new A;F.constructor=j,k(F,_.prototype),F.isPureReactComponent=!0;var K=Array.isArray,Y=Object.prototype.hasOwnProperty,B={current:null},ae={key:!0,ref:!0,__self:!0,__source:!0};function q(M,Q,L){var Se,Ee={},ge=null,De=null;if(Q!=null)for(Se in Q.ref!==void 0&&(De=Q.ref),Q.key!==void 0&&(ge=""+Q.key),Q)Y.call(Q,Se)&&!ae.hasOwnProperty(Se)&&(Ee[Se]=Q[Se]);var Oe=arguments.length-2;if(Oe===1)Ee.children=L;else if(1<Oe){for(var ve=Array(Oe),Je=0;Je<Oe;Je++)ve[Je]=arguments[Je+2];Ee.children=ve}if(M&&M.defaultProps)for(Se in Oe=M.defaultProps,Oe)Ee[Se]===void 0&&(Ee[Se]=Oe[Se]);return{$$typeof:e,type:M,key:ge,ref:De,props:Ee,_owner:B.current}}function de(M,Q){return{$$typeof:e,type:M.type,key:Q,ref:M.ref,props:M.props,_owner:M._owner}}function H(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function ue(M){var Q={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(L){return Q[L]})}var le=/\/+/g;function _e(M,Q){return typeof M=="object"&&M!==null&&M.key!=null?ue(""+M.key):Q.toString(36)}function he(M,Q,L,Se,Ee){var ge=typeof M;(ge==="undefined"||ge==="boolean")&&(M=null);var De=!1;if(M===null)De=!0;else switch(ge){case"string":case"number":De=!0;break;case"object":switch(M.$$typeof){case e:case t:De=!0}}if(De)return De=M,Ee=Ee(De),M=Se===""?"."+_e(De,0):Se,K(Ee)?(L="",M!=null&&(L=M.replace(le,"$&/")+"/"),he(Ee,Q,L,"",function(Je){return Je})):Ee!=null&&(H(Ee)&&(Ee=de(Ee,L+(!Ee.key||De&&De.key===Ee.key?"":(""+Ee.key).replace(le,"$&/")+"/")+M)),Q.push(Ee)),1;if(De=0,Se=Se===""?".":Se+":",K(M))for(var Oe=0;Oe<M.length;Oe++){ge=M[Oe];var ve=Se+_e(ge,Oe);De+=he(ge,Q,L,ve,Ee)}else if(ve=y(M),typeof ve=="function")for(M=ve.call(M),Oe=0;!(ge=M.next()).done;)ge=ge.value,ve=Se+_e(ge,Oe++),De+=he(ge,Q,L,ve,Ee);else if(ge==="object")throw Q=String(M),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.");return De}function te(M,Q,L){if(M==null)return M;var Se=[],Ee=0;return he(M,Se,"","",function(ge){return Q.call(L,ge,Ee++)}),Se}function X(M){if(M._status===-1){var Q=M._result;Q=Q(),Q.then(function(L){(M._status===0||M._status===-1)&&(M._status=1,M._result=L)},function(L){(M._status===0||M._status===-1)&&(M._status=2,M._result=L)}),M._status===-1&&(M._status=0,M._result=Q)}if(M._status===1)return M._result.default;throw M._result}var fe={current:null},Z={transition:null},pe={ReactCurrentDispatcher:fe,ReactCurrentBatchConfig:Z,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return He.Children={map:te,forEach:function(M,Q,L){te(M,function(){Q.apply(this,arguments)},L)},count:function(M){var Q=0;return te(M,function(){Q++}),Q},toArray:function(M){return te(M,function(Q){return Q})||[]},only:function(M){if(!H(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},He.Component=_,He.Fragment=n,He.Profiler=a,He.PureComponent=j,He.StrictMode=i,He.Suspense=f,He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pe,He.act=w,He.cloneElement=function(M,Q,L){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var Se=k({},M.props),Ee=M.key,ge=M.ref,De=M._owner;if(Q!=null){if(Q.ref!==void 0&&(ge=Q.ref,De=B.current),Q.key!==void 0&&(Ee=""+Q.key),M.type&&M.type.defaultProps)var Oe=M.type.defaultProps;for(ve in Q)Y.call(Q,ve)&&!ae.hasOwnProperty(ve)&&(Se[ve]=Q[ve]===void 0&&Oe!==void 0?Oe[ve]:Q[ve])}var ve=arguments.length-2;if(ve===1)Se.children=L;else if(1<ve){Oe=Array(ve);for(var Je=0;Je<ve;Je++)Oe[Je]=arguments[Je+2];Se.children=Oe}return{$$typeof:e,type:M.type,key:Ee,ref:ge,props:Se,_owner:De}},He.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:u,_context:M},M.Consumer=M},He.createElement=q,He.createFactory=function(M){var Q=q.bind(null,M);return Q.type=M,Q},He.createRef=function(){return{current:null}},He.forwardRef=function(M){return{$$typeof:c,render:M}},He.isValidElement=H,He.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:X}},He.memo=function(M,Q){return{$$typeof:h,type:M,compare:Q===void 0?null:Q}},He.startTransition=function(M){var Q=Z.transition;Z.transition={};try{M()}finally{Z.transition=Q}},He.unstable_act=w,He.useCallback=function(M,Q){return fe.current.useCallback(M,Q)},He.useContext=function(M){return fe.current.useContext(M)},He.useDebugValue=function(){},He.useDeferredValue=function(M){return fe.current.useDeferredValue(M)},He.useEffect=function(M,Q){return fe.current.useEffect(M,Q)},He.useId=function(){return fe.current.useId()},He.useImperativeHandle=function(M,Q,L){return fe.current.useImperativeHandle(M,Q,L)},He.useInsertionEffect=function(M,Q){return fe.current.useInsertionEffect(M,Q)},He.useLayoutEffect=function(M,Q){return fe.current.useLayoutEffect(M,Q)},He.useMemo=function(M,Q){return fe.current.useMemo(M,Q)},He.useReducer=function(M,Q,L){return fe.current.useReducer(M,Q,L)},He.useRef=function(M){return fe.current.useRef(M)},He.useState=function(M){return fe.current.useState(M)},He.useSyncExternalStore=function(M,Q,L){return fe.current.useSyncExternalStore(M,Q,L)},He.useTransition=function(){return fe.current.useTransition()},He.version="18.3.1",He}var i0;function _d(){return i0||(i0=1,xc.exports=F2()),xc.exports}/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react-jsx-runtime.production.min.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var s0;function j2(){if(s0)return Us;s0=1;var e=_d(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function l(c,f,h){var m,E={},y=null,x=null;h!==void 0&&(y=""+h),f.key!==void 0&&(y=""+f.key),f.ref!==void 0&&(x=f.ref);for(m in f)i.call(f,m)&&!u.hasOwnProperty(m)&&(E[m]=f[m]);if(c&&c.defaultProps)for(m in f=c.defaultProps,f)E[m]===void 0&&(E[m]=f[m]);return{$$typeof:t,type:c,key:y,ref:x,props:E,_owner:a.current}}return Us.Fragment=n,Us.jsx=l,Us.jsxs=l,Us}var a0;function H2(){return a0||(a0=1,bc.exports=j2()),bc.exports}var T=H2(),R=_d();const gt=ga(R),aL=B2({__proto__:null,default:gt},[R]);var Mu={},yc={exports:{}},Kt={},Tc={exports:{}},kc={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.min.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var u0;function U2(){return u0||(u0=1,(function(e){function t(Z,pe){var w=Z.length;Z.push(pe);e:for(;0<w;){var M=w-1>>>1,Q=Z[M];if(0<a(Q,pe))Z[M]=pe,Z[w]=Q,w=M;else break e}}function n(Z){return Z.length===0?null:Z[0]}function i(Z){if(Z.length===0)return null;var pe=Z[0],w=Z.pop();if(w!==pe){Z[0]=w;e:for(var M=0,Q=Z.length,L=Q>>>1;M<L;){var Se=2*(M+1)-1,Ee=Z[Se],ge=Se+1,De=Z[ge];if(0>a(Ee,w))ge<Q&&0>a(De,Ee)?(Z[M]=De,Z[ge]=w,M=ge):(Z[M]=Ee,Z[Se]=w,M=Se);else if(ge<Q&&0>a(De,w))Z[M]=De,Z[ge]=w,M=ge;else break e}}return pe}function a(Z,pe){var w=Z.sortIndex-pe.sortIndex;return w!==0?w:Z.id-pe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],m=1,E=null,y=3,x=!1,k=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function F(Z){for(var pe=n(h);pe!==null;){if(pe.callback===null)i(h);else if(pe.startTime<=Z)i(h),pe.sortIndex=pe.expirationTime,t(f,pe);else break;pe=n(h)}}function K(Z){if(v=!1,F(Z),!k)if(n(f)!==null)k=!0,X(Y);else{var pe=n(h);pe!==null&&fe(K,pe.startTime-Z)}}function Y(Z,pe){k=!1,v&&(v=!1,A(q),q=-1),x=!0;var w=y;try{for(F(pe),E=n(f);E!==null&&(!(E.expirationTime>pe)||Z&&!ue());){var M=E.callback;if(typeof M=="function"){E.callback=null,y=E.priorityLevel;var Q=M(E.expirationTime<=pe);pe=e.unstable_now(),typeof Q=="function"?E.callback=Q:E===n(f)&&i(f),F(pe)}else i(f);E=n(f)}if(E!==null)var L=!0;else{var Se=n(h);Se!==null&&fe(K,Se.startTime-pe),L=!1}return L}finally{E=null,y=w,x=!1}}var B=!1,ae=null,q=-1,de=5,H=-1;function ue(){return!(e.unstable_now()-H<de)}function le(){if(ae!==null){var Z=e.unstable_now();H=Z;var pe=!0;try{pe=ae(!0,Z)}finally{pe?_e():(B=!1,ae=null)}}else B=!1}var _e;if(typeof j=="function")_e=function(){j(le)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,te=he.port2;he.port1.onmessage=le,_e=function(){te.postMessage(null)}}else _e=function(){_(le,0)};function X(Z){ae=Z,B||(B=!0,_e())}function fe(Z,pe){q=_(function(){Z(e.unstable_now())},pe)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Z){Z.callback=null},e.unstable_continueExecution=function(){k||x||(k=!0,X(Y))},e.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<Z?Math.floor(1e3/Z):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(Z){switch(y){case 1:case 2:case 3:var pe=3;break;default:pe=y}var w=y;y=pe;try{return Z()}finally{y=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Z,pe){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var w=y;y=Z;try{return pe()}finally{y=w}},e.unstable_scheduleCallback=function(Z,pe,w){var M=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?M+w:M):w=M,Z){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=w+Q,Z={id:m++,callback:pe,priorityLevel:Z,startTime:w,expirationTime:Q,sortIndex:-1},w>M?(Z.sortIndex=w,t(h,Z),n(f)===null&&Z===n(h)&&(v?(A(q),q=-1):v=!0,fe(K,w-M))):(Z.sortIndex=Q,t(f,Z),k||x||(k=!0,X(Y))),Z},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(Z){var pe=y;return function(){var w=y;y=pe;try{return Z.apply(this,arguments)}finally{y=w}}}})(kc)),kc}var o0;function z2(){return o0||(o0=1,Tc.exports=U2()),Tc.exports}/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.min.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var l0;function $2(){if(l0)return Kt;l0=1;var e=_d(),t=z2();function n(r){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+r,o=1;o<arguments.length;o++)s+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function u(r,s){l(r,s),l(r+"Capture",s)}function l(r,s){for(a[r]=s,r=0;r<s.length;r++)i.add(s[r])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,m={},E={};function y(r){return f.call(E,r)?!0:f.call(m,r)?!1:h.test(r)?E[r]=!0:(m[r]=!0,!1)}function x(r,s,o,d){if(o!==null&&o.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return d?!1:o!==null?!o.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function k(r,s,o,d){if(s===null||typeof s>"u"||x(r,s,o,d))return!0;if(d)return!1;if(o!==null)switch(o.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(r,s,o,d,g,b,C){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=d,this.attributeNamespace=g,this.mustUseProperty=o,this.propertyName=r,this.type=s,this.sanitizeURL=b,this.removeEmptyString=C}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){_[r]=new v(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var s=r[0];_[s]=new v(s,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){_[r]=new v(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){_[r]=new v(r,2,!1,r,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(r){_[r]=new v(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){_[r]=new v(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){_[r]=new v(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){_[r]=new v(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){_[r]=new v(r,5,!1,r.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function j(r){return r[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(r){var s=r.replace(A,j);_[s]=new v(s,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var s=r.replace(A,j);_[s]=new v(s,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var s=r.replace(A,j);_[s]=new v(s,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){_[r]=new v(r,1,!1,r.toLowerCase(),null,!1,!1)}),_.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){_[r]=new v(r,1,!1,r.toLowerCase(),null,!0,!0)});function F(r,s,o,d){var g=_.hasOwnProperty(s)?_[s]:null;(g!==null?g.type!==0:d||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(k(s,o,g,d)&&(o=null),d||g===null?y(s)&&(o===null?r.removeAttribute(s):r.setAttribute(s,""+o)):g.mustUseProperty?r[g.propertyName]=o===null?g.type===3?!1:"":o:(s=g.attributeName,d=g.attributeNamespace,o===null?r.removeAttribute(s):(g=g.type,o=g===3||g===4&&o===!0?"":""+o,d?r.setAttributeNS(d,s,o):r.setAttribute(s,o))))}var K=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),B=Symbol.for("react.portal"),ae=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ue=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),_e=Symbol.for("react.suspense"),he=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),fe=Symbol.for("react.offscreen"),Z=Symbol.iterator;function pe(r){return r===null||typeof r!="object"?null:(r=Z&&r[Z]||r["@@iterator"],typeof r=="function"?r:null)}var w=Object.assign,M;function Q(r){if(M===void 0)try{throw Error()}catch(o){var s=o.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
|
|
35
|
-
`+M+r}var L=!1;function Se(r,s){if(!r||L)return"";L=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(V){var d=V}Reflect.construct(r,[],s)}else{try{s.call()}catch(V){d=V}r.call(s.prototype)}else{try{throw Error()}catch(V){d=V}r()}}catch(V){if(V&&d&&typeof V.stack=="string"){for(var g=V.stack.split(`
|
|
36
|
-
`),b=d.stack.split(`
|
|
37
|
-
`),C=g.length-1,I=b.length-1;1<=C&&0<=I&&g[C]!==b[I];)I--;for(;1<=C&&0<=I;C--,I--)if(g[C]!==b[I]){if(C!==1||I!==1)do if(C--,I--,0>I||g[C]!==b[I]){var P=`
|
|
38
|
-
`+g[C].replace(" at new "," at ");return r.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",r.displayName)),P}while(1<=C&&0<=I);break}}}finally{L=!1,Error.prepareStackTrace=o}return(r=r?r.displayName||r.name:"")?Q(r):""}function Ee(r){switch(r.tag){case 5:return Q(r.type);case 16:return Q("Lazy");case 13:return Q("Suspense");case 19:return Q("SuspenseList");case 0:case 2:case 15:return r=Se(r.type,!1),r;case 11:return r=Se(r.type.render,!1),r;case 1:return r=Se(r.type,!0),r;default:return""}}function ge(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case ae:return"Fragment";case B:return"Portal";case de:return"Profiler";case q:return"StrictMode";case _e:return"Suspense";case he:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ue:return(r.displayName||"Context")+".Consumer";case H:return(r._context.displayName||"Context")+".Provider";case le:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case te:return s=r.displayName||null,s!==null?s:ge(r.type)||"Memo";case X:s=r._payload,r=r._init;try{return ge(r(s))}catch{}}return null}function De(r){var s=r.type;switch(r.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=s.render,r=r.displayName||r.name||"",s.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(s);case 8:return s===q?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Oe(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ve(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Je(r){var s=ve(r)?"checked":"value",o=Object.getOwnPropertyDescriptor(r.constructor.prototype,s),d=""+r[s];if(!r.hasOwnProperty(s)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var g=o.get,b=o.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return g.call(this)},set:function(C){d=""+C,b.call(this,C)}}),Object.defineProperty(r,s,{enumerable:o.enumerable}),{getValue:function(){return d},setValue:function(C){d=""+C},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function It(r){r._valueTracker||(r._valueTracker=Je(r))}function cn(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var o=s.getValue(),d="";return r&&(d=ve(r)?r.checked?"true":"false":r.value),r=d,r!==o?(s.setValue(r),!0):!1}function en(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function tn(r,s){var o=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??r._wrapperState.initialChecked})}function sr(r,s){var o=s.defaultValue==null?"":s.defaultValue,d=s.checked!=null?s.checked:s.defaultChecked;o=Oe(s.value!=null?s.value:o),r._wrapperState={initialChecked:d,initialValue:o,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function Yn(r,s){s=s.checked,s!=null&&F(r,"checked",s,!1)}function ar(r,s){Yn(r,s);var o=Oe(s.value),d=s.type;if(o!=null)d==="number"?(o===0&&r.value===""||r.value!=o)&&(r.value=""+o):r.value!==""+o&&(r.value=""+o);else if(d==="submit"||d==="reset"){r.removeAttribute("value");return}s.hasOwnProperty("value")?Qe(r,s.type,o):s.hasOwnProperty("defaultValue")&&Qe(r,s.type,Oe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(r.defaultChecked=!!s.defaultChecked)}function Me(r,s,o){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var d=s.type;if(!(d!=="submit"&&d!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+r._wrapperState.initialValue,o||s===r.value||(r.value=s),r.defaultValue=s}o=r.name,o!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,o!==""&&(r.name=o)}function Qe(r,s,o){(s!=="number"||en(r.ownerDocument)!==r)&&(o==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+o&&(r.defaultValue=""+o))}var ht=Array.isArray;function _t(r,s,o,d){if(r=r.options,s){s={};for(var g=0;g<o.length;g++)s["$"+o[g]]=!0;for(o=0;o<r.length;o++)g=s.hasOwnProperty("$"+r[o].value),r[o].selected!==g&&(r[o].selected=g),g&&d&&(r[o].defaultSelected=!0)}else{for(o=""+Oe(o),s=null,g=0;g<r.length;g++){if(r[g].value===o){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}s!==null||r[g].disabled||(s=r[g])}s!==null&&(s.selected=!0)}}function kn(r,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function Sa(r,s){var o=s.value;if(o==null){if(o=s.children,s=s.defaultValue,o!=null){if(s!=null)throw Error(n(92));if(ht(o)){if(1<o.length)throw Error(n(93));o=o[0]}s=o}s==null&&(s=""),o=s}r._wrapperState={initialValue:Oe(o)}}function va(r,s){var o=Oe(s.value),d=Oe(s.defaultValue);o!=null&&(o=""+o,o!==r.value&&(r.value=o),s.defaultValue==null&&r.defaultValue!==o&&(r.defaultValue=o)),d!=null&&(r.defaultValue=""+d)}function Aa(r){var s=r.textContent;s===r._wrapperState.initialValue&&s!==""&&s!==null&&(r.value=s)}function G(r){switch(r){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ce(r,s){return r==null||r==="http://www.w3.org/1999/xhtml"?G(s):r==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Le,je=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(s,o,d,g){MSApp.execUnsafeLocalFunction(function(){return r(s,o,d,g)})}:r})(function(r,s){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=s;else{for(Le=Le||document.createElement("div"),Le.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Le.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;s.firstChild;)r.appendChild(s.firstChild)}});function We(r,s){if(s){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=s;return}}r.textContent=s}var St={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qn=["Webkit","ms","Moz","O"];Object.keys(St).forEach(function(r){qn.forEach(function(s){s=s+r.charAt(0).toUpperCase()+r.substring(1),St[s]=St[r]})});function dn(r,s,o){return s==null||typeof s=="boolean"||s===""?"":o||typeof s!="number"||s===0||St.hasOwnProperty(r)&&St[r]?(""+s).trim():s+"px"}function ur(r,s){r=r.style;for(var o in s)if(s.hasOwnProperty(o)){var d=o.indexOf("--")===0,g=dn(o,s[o],d);o==="float"&&(o="cssFloat"),d?r.setProperty(o,g):r[o]=g}}var Ur=w({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vt(r,s){if(s){if(Ur[r]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Pn(r,s){if(r.indexOf("-")===-1)return typeof s.is=="string";switch(r){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var nn=null;function Oo(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Po=null,bi=null,xi=null;function yf(r){if(r=Ss(r)){if(typeof Po!="function")throw Error(n(280));var s=r.stateNode;s&&(s=Xa(s),Po(r.stateNode,r.type,s))}}function Tf(r){bi?xi?xi.push(r):xi=[r]:bi=r}function kf(){if(bi){var r=bi,s=xi;if(xi=bi=null,yf(r),s)for(r=0;r<s.length;r++)yf(s[r])}}function Cf(r,s){return r(s)}function wf(){}var Do=!1;function _f(r,s,o){if(Do)return r(s,o);Do=!0;try{return Cf(r,s,o)}finally{Do=!1,(bi!==null||xi!==null)&&(wf(),kf())}}function ss(r,s){var o=r.stateNode;if(o===null)return null;var d=Xa(o);if(d===null)return null;o=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(n(231,s,typeof o));return o}var Mo=!1;if(c)try{var as={};Object.defineProperty(as,"passive",{get:function(){Mo=!0}}),window.addEventListener("test",as,as),window.removeEventListener("test",as,as)}catch{Mo=!1}function Ub(r,s,o,d,g,b,C,I,P){var V=Array.prototype.slice.call(arguments,3);try{s.apply(o,V)}catch(ne){this.onError(ne)}}var us=!1,Na=null,Ia=!1,Bo=null,zb={onError:function(r){us=!0,Na=r}};function $b(r,s,o,d,g,b,C,I,P){us=!1,Na=null,Ub.apply(zb,arguments)}function Vb(r,s,o,d,g,b,C,I,P){if($b.apply(this,arguments),us){if(us){var V=Na;us=!1,Na=null}else throw Error(n(198));Ia||(Ia=!0,Bo=V)}}function zr(r){var s=r,o=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(o=s.return),r=s.return;while(r)}return s.tag===3?o:null}function Sf(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function vf(r){if(zr(r)!==r)throw Error(n(188))}function Wb(r){var s=r.alternate;if(!s){if(s=zr(r),s===null)throw Error(n(188));return s!==r?null:r}for(var o=r,d=s;;){var g=o.return;if(g===null)break;var b=g.alternate;if(b===null){if(d=g.return,d!==null){o=d;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===o)return vf(g),r;if(b===d)return vf(g),s;b=b.sibling}throw Error(n(188))}if(o.return!==d.return)o=g,d=b;else{for(var C=!1,I=g.child;I;){if(I===o){C=!0,o=g,d=b;break}if(I===d){C=!0,d=g,o=b;break}I=I.sibling}if(!C){for(I=b.child;I;){if(I===o){C=!0,o=b,d=g;break}if(I===d){C=!0,d=b,o=g;break}I=I.sibling}if(!C)throw Error(n(189))}}if(o.alternate!==d)throw Error(n(190))}if(o.tag!==3)throw Error(n(188));return o.stateNode.current===o?r:s}function Af(r){return r=Wb(r),r!==null?Nf(r):null}function Nf(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var s=Nf(r);if(s!==null)return s;r=r.sibling}return null}var If=t.unstable_scheduleCallback,Lf=t.unstable_cancelCallback,Yb=t.unstable_shouldYield,qb=t.unstable_requestPaint,ct=t.unstable_now,Qb=t.unstable_getCurrentPriorityLevel,Fo=t.unstable_ImmediatePriority,Rf=t.unstable_UserBlockingPriority,La=t.unstable_NormalPriority,Gb=t.unstable_LowPriority,Of=t.unstable_IdlePriority,Ra=null,Dn=null;function Kb(r){if(Dn&&typeof Dn.onCommitFiberRoot=="function")try{Dn.onCommitFiberRoot(Ra,r,void 0,(r.current.flags&128)===128)}catch{}}var Cn=Math.clz32?Math.clz32:Jb,Xb=Math.log,Zb=Math.LN2;function Jb(r){return r>>>=0,r===0?32:31-(Xb(r)/Zb|0)|0}var Oa=64,Pa=4194304;function os(r){switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Da(r,s){var o=r.pendingLanes;if(o===0)return 0;var d=0,g=r.suspendedLanes,b=r.pingedLanes,C=o&268435455;if(C!==0){var I=C&~g;I!==0?d=os(I):(b&=C,b!==0&&(d=os(b)))}else C=o&~g,C!==0?d=os(C):b!==0&&(d=os(b));if(d===0)return 0;if(s!==0&&s!==d&&(s&g)===0&&(g=d&-d,b=s&-s,g>=b||g===16&&(b&4194240)!==0))return s;if((d&4)!==0&&(d|=o&16),s=r.entangledLanes,s!==0)for(r=r.entanglements,s&=d;0<s;)o=31-Cn(s),g=1<<o,d|=r[o],s&=~g;return d}function ex(r,s){switch(r){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tx(r,s){for(var o=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,b=r.pendingLanes;0<b;){var C=31-Cn(b),I=1<<C,P=g[C];P===-1?((I&o)===0||(I&d)!==0)&&(g[C]=ex(I,s)):P<=s&&(r.expiredLanes|=I),b&=~I}}function jo(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Pf(){var r=Oa;return Oa<<=1,(Oa&4194240)===0&&(Oa=64),r}function Ho(r){for(var s=[],o=0;31>o;o++)s.push(r);return s}function ls(r,s,o){r.pendingLanes|=s,s!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,s=31-Cn(s),r[s]=o}function nx(r,s){var o=r.pendingLanes&~s;r.pendingLanes=s,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=s,r.mutableReadLanes&=s,r.entangledLanes&=s,s=r.entanglements;var d=r.eventTimes;for(r=r.expirationTimes;0<o;){var g=31-Cn(o),b=1<<g;s[g]=0,d[g]=-1,r[g]=-1,o&=~b}}function Uo(r,s){var o=r.entangledLanes|=s;for(r=r.entanglements;o;){var d=31-Cn(o),g=1<<d;g&s|r[d]&s&&(r[d]|=s),o&=~g}}var Ge=0;function Df(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Mf,zo,Bf,Ff,jf,$o=!1,Ma=[],or=null,lr=null,cr=null,cs=new Map,ds=new Map,dr=[],rx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Hf(r,s){switch(r){case"focusin":case"focusout":or=null;break;case"dragenter":case"dragleave":lr=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":cs.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ds.delete(s.pointerId)}}function fs(r,s,o,d,g,b){return r===null||r.nativeEvent!==b?(r={blockedOn:s,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[g]},s!==null&&(s=Ss(s),s!==null&&zo(s)),r):(r.eventSystemFlags|=d,s=r.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),r)}function ix(r,s,o,d,g){switch(s){case"focusin":return or=fs(or,r,s,o,d,g),!0;case"dragenter":return lr=fs(lr,r,s,o,d,g),!0;case"mouseover":return cr=fs(cr,r,s,o,d,g),!0;case"pointerover":var b=g.pointerId;return cs.set(b,fs(cs.get(b)||null,r,s,o,d,g)),!0;case"gotpointercapture":return b=g.pointerId,ds.set(b,fs(ds.get(b)||null,r,s,o,d,g)),!0}return!1}function Uf(r){var s=$r(r.target);if(s!==null){var o=zr(s);if(o!==null){if(s=o.tag,s===13){if(s=Sf(o),s!==null){r.blockedOn=s,jf(r.priority,function(){Bf(o)});return}}else if(s===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Ba(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var o=Wo(r.domEventName,r.eventSystemFlags,s[0],r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);nn=d,o.target.dispatchEvent(d),nn=null}else return s=Ss(o),s!==null&&zo(s),r.blockedOn=o,!1;s.shift()}return!0}function zf(r,s,o){Ba(r)&&o.delete(s)}function sx(){$o=!1,or!==null&&Ba(or)&&(or=null),lr!==null&&Ba(lr)&&(lr=null),cr!==null&&Ba(cr)&&(cr=null),cs.forEach(zf),ds.forEach(zf)}function hs(r,s){r.blockedOn===s&&(r.blockedOn=null,$o||($o=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sx)))}function ps(r){function s(g){return hs(g,r)}if(0<Ma.length){hs(Ma[0],r);for(var o=1;o<Ma.length;o++){var d=Ma[o];d.blockedOn===r&&(d.blockedOn=null)}}for(or!==null&&hs(or,r),lr!==null&&hs(lr,r),cr!==null&&hs(cr,r),cs.forEach(s),ds.forEach(s),o=0;o<dr.length;o++)d=dr[o],d.blockedOn===r&&(d.blockedOn=null);for(;0<dr.length&&(o=dr[0],o.blockedOn===null);)Uf(o),o.blockedOn===null&&dr.shift()}var yi=K.ReactCurrentBatchConfig,Fa=!0;function ax(r,s,o,d){var g=Ge,b=yi.transition;yi.transition=null;try{Ge=1,Vo(r,s,o,d)}finally{Ge=g,yi.transition=b}}function ux(r,s,o,d){var g=Ge,b=yi.transition;yi.transition=null;try{Ge=4,Vo(r,s,o,d)}finally{Ge=g,yi.transition=b}}function Vo(r,s,o,d){if(Fa){var g=Wo(r,s,o,d);if(g===null)ol(r,s,d,ja,o),Hf(r,d);else if(ix(g,r,s,o,d))d.stopPropagation();else if(Hf(r,d),s&4&&-1<rx.indexOf(r)){for(;g!==null;){var b=Ss(g);if(b!==null&&Mf(b),b=Wo(r,s,o,d),b===null&&ol(r,s,d,ja,o),b===g)break;g=b}g!==null&&d.stopPropagation()}else ol(r,s,d,null,o)}}var ja=null;function Wo(r,s,o,d){if(ja=null,r=Oo(d),r=$r(r),r!==null)if(s=zr(r),s===null)r=null;else if(o=s.tag,o===13){if(r=Sf(s),r!==null)return r;r=null}else if(o===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null);return ja=r,null}function $f(r){switch(r){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qb()){case Fo:return 1;case Rf:return 4;case La:case Gb:return 16;case Of:return 536870912;default:return 16}default:return 16}}var fr=null,Yo=null,Ha=null;function Vf(){if(Ha)return Ha;var r,s=Yo,o=s.length,d,g="value"in fr?fr.value:fr.textContent,b=g.length;for(r=0;r<o&&s[r]===g[r];r++);var C=o-r;for(d=1;d<=C&&s[o-d]===g[b-d];d++);return Ha=g.slice(r,1<d?1-d:void 0)}function Ua(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function za(){return!0}function Wf(){return!1}function rn(r){function s(o,d,g,b,C){this._reactName=o,this._targetInst=g,this.type=d,this.nativeEvent=b,this.target=C,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(o=r[I],this[I]=o?o(b):b[I]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?za:Wf,this.isPropagationStopped=Wf,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=za)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=za)},persist:function(){},isPersistent:za}),s}var Ti={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qo=rn(Ti),ms=w({},Ti,{view:0,detail:0}),ox=rn(ms),Qo,Go,gs,$a=w({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xo,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==gs&&(gs&&r.type==="mousemove"?(Qo=r.screenX-gs.screenX,Go=r.screenY-gs.screenY):Go=Qo=0,gs=r),Qo)},movementY:function(r){return"movementY"in r?r.movementY:Go}}),Yf=rn($a),lx=w({},$a,{dataTransfer:0}),cx=rn(lx),dx=w({},ms,{relatedTarget:0}),Ko=rn(dx),fx=w({},Ti,{animationName:0,elapsedTime:0,pseudoElement:0}),hx=rn(fx),px=w({},Ti,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),mx=rn(px),gx=w({},Ti,{data:0}),qf=rn(gx),Ex={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bx={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yx(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=xx[r])?!!s[r]:!1}function Xo(){return yx}var Tx=w({},ms,{key:function(r){if(r.key){var s=Ex[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=Ua(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?bx[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xo,charCode:function(r){return r.type==="keypress"?Ua(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ua(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),kx=rn(Tx),Cx=w({},$a,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qf=rn(Cx),wx=w({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xo}),_x=rn(wx),Sx=w({},Ti,{propertyName:0,elapsedTime:0,pseudoElement:0}),vx=rn(Sx),Ax=w({},$a,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),Nx=rn(Ax),Ix=[9,13,27,32],Zo=c&&"CompositionEvent"in window,Es=null;c&&"documentMode"in document&&(Es=document.documentMode);var Lx=c&&"TextEvent"in window&&!Es,Gf=c&&(!Zo||Es&&8<Es&&11>=Es),Kf=" ",Xf=!1;function Zf(r,s){switch(r){case"keyup":return Ix.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ki=!1;function Rx(r,s){switch(r){case"compositionend":return Jf(s);case"keypress":return s.which!==32?null:(Xf=!0,Kf);case"textInput":return r=s.data,r===Kf&&Xf?null:r;default:return null}}function Ox(r,s){if(ki)return r==="compositionend"||!Zo&&Zf(r,s)?(r=Vf(),Ha=Yo=fr=null,ki=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Gf&&s.locale!=="ko"?null:s.data;default:return null}}var Px={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function eh(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Px[r.type]:s==="textarea"}function th(r,s,o,d){Tf(d),s=Qa(s,"onChange"),0<s.length&&(o=new qo("onChange","change",null,o,d),r.push({event:o,listeners:s}))}var bs=null,xs=null;function Dx(r){xh(r,0)}function Va(r){var s=vi(r);if(cn(s))return r}function Mx(r,s){if(r==="change")return s}var nh=!1;if(c){var Jo;if(c){var el="oninput"in document;if(!el){var rh=document.createElement("div");rh.setAttribute("oninput","return;"),el=typeof rh.oninput=="function"}Jo=el}else Jo=!1;nh=Jo&&(!document.documentMode||9<document.documentMode)}function ih(){bs&&(bs.detachEvent("onpropertychange",sh),xs=bs=null)}function sh(r){if(r.propertyName==="value"&&Va(xs)){var s=[];th(s,xs,r,Oo(r)),_f(Dx,s)}}function Bx(r,s,o){r==="focusin"?(ih(),bs=s,xs=o,bs.attachEvent("onpropertychange",sh)):r==="focusout"&&ih()}function Fx(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Va(xs)}function jx(r,s){if(r==="click")return Va(s)}function Hx(r,s){if(r==="input"||r==="change")return Va(s)}function Ux(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var wn=typeof Object.is=="function"?Object.is:Ux;function ys(r,s){if(wn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var o=Object.keys(r),d=Object.keys(s);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var g=o[d];if(!f.call(s,g)||!wn(r[g],s[g]))return!1}return!0}function ah(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function uh(r,s){var o=ah(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=s&&d>=s)return{node:o,offset:s-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ah(o)}}function oh(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?oh(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function lh(){for(var r=window,s=en();s instanceof r.HTMLIFrameElement;){try{var o=typeof s.contentWindow.location.href=="string"}catch{o=!1}if(o)r=s.contentWindow;else break;s=en(r.document)}return s}function tl(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}function zx(r){var s=lh(),o=r.focusedElem,d=r.selectionRange;if(s!==o&&o&&o.ownerDocument&&oh(o.ownerDocument.documentElement,o)){if(d!==null&&tl(o)){if(s=d.start,r=d.end,r===void 0&&(r=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(r,o.value.length);else if(r=(s=o.ownerDocument||document)&&s.defaultView||window,r.getSelection){r=r.getSelection();var g=o.textContent.length,b=Math.min(d.start,g);d=d.end===void 0?b:Math.min(d.end,g),!r.extend&&b>d&&(g=d,d=b,b=g),g=uh(o,b);var C=uh(o,d);g&&C&&(r.rangeCount!==1||r.anchorNode!==g.node||r.anchorOffset!==g.offset||r.focusNode!==C.node||r.focusOffset!==C.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),r.removeAllRanges(),b>d?(r.addRange(s),r.extend(C.node,C.offset)):(s.setEnd(C.node,C.offset),r.addRange(s)))}}for(s=[],r=o;r=r.parentNode;)r.nodeType===1&&s.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<s.length;o++)r=s[o],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var $x=c&&"documentMode"in document&&11>=document.documentMode,Ci=null,nl=null,Ts=null,rl=!1;function ch(r,s,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;rl||Ci==null||Ci!==en(d)||(d=Ci,"selectionStart"in d&&tl(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ts&&ys(Ts,d)||(Ts=d,d=Qa(nl,"onSelect"),0<d.length&&(s=new qo("onSelect","select",null,s,o),r.push({event:s,listeners:d}),s.target=Ci)))}function Wa(r,s){var o={};return o[r.toLowerCase()]=s.toLowerCase(),o["Webkit"+r]="webkit"+s,o["Moz"+r]="moz"+s,o}var wi={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionend:Wa("Transition","TransitionEnd")},il={},dh={};c&&(dh=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function Ya(r){if(il[r])return il[r];if(!wi[r])return r;var s=wi[r],o;for(o in s)if(s.hasOwnProperty(o)&&o in dh)return il[r]=s[o];return r}var fh=Ya("animationend"),hh=Ya("animationiteration"),ph=Ya("animationstart"),mh=Ya("transitionend"),gh=new Map,Eh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function hr(r,s){gh.set(r,s),u(s,[r])}for(var sl=0;sl<Eh.length;sl++){var al=Eh[sl],Vx=al.toLowerCase(),Wx=al[0].toUpperCase()+al.slice(1);hr(Vx,"on"+Wx)}hr(fh,"onAnimationEnd"),hr(hh,"onAnimationIteration"),hr(ph,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(mh,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ks="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Yx=new Set("cancel close invalid load scroll toggle".split(" ").concat(ks));function bh(r,s,o){var d=r.type||"unknown-event";r.currentTarget=o,Vb(d,s,void 0,r),r.currentTarget=null}function xh(r,s){s=(s&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],g=d.event;d=d.listeners;e:{var b=void 0;if(s)for(var C=d.length-1;0<=C;C--){var I=d[C],P=I.instance,V=I.currentTarget;if(I=I.listener,P!==b&&g.isPropagationStopped())break e;bh(g,I,V),b=P}else for(C=0;C<d.length;C++){if(I=d[C],P=I.instance,V=I.currentTarget,I=I.listener,P!==b&&g.isPropagationStopped())break e;bh(g,I,V),b=P}}}if(Ia)throw r=Bo,Ia=!1,Bo=null,r}function nt(r,s){var o=s[pl];o===void 0&&(o=s[pl]=new Set);var d=r+"__bubble";o.has(d)||(yh(s,r,2,!1),o.add(d))}function ul(r,s,o){var d=0;s&&(d|=4),yh(o,r,d,s)}var qa="_reactListening"+Math.random().toString(36).slice(2);function Cs(r){if(!r[qa]){r[qa]=!0,i.forEach(function(o){o!=="selectionchange"&&(Yx.has(o)||ul(o,!1,r),ul(o,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[qa]||(s[qa]=!0,ul("selectionchange",!1,s))}}function yh(r,s,o,d){switch($f(s)){case 1:var g=ax;break;case 4:g=ux;break;default:g=Vo}o=g.bind(null,s,o,r),g=void 0,!Mo||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(s,o,{capture:!0,passive:g}):r.addEventListener(s,o,!0):g!==void 0?r.addEventListener(s,o,{passive:g}):r.addEventListener(s,o,!1)}function ol(r,s,o,d,g){var b=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var C=d.tag;if(C===3||C===4){var I=d.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(C===4)for(C=d.return;C!==null;){var P=C.tag;if((P===3||P===4)&&(P=C.stateNode.containerInfo,P===g||P.nodeType===8&&P.parentNode===g))return;C=C.return}for(;I!==null;){if(C=$r(I),C===null)return;if(P=C.tag,P===5||P===6){d=b=C;continue e}I=I.parentNode}}d=d.return}_f(function(){var V=b,ne=Oo(o),re=[];e:{var J=gh.get(r);if(J!==void 0){var me=qo,xe=r;switch(r){case"keypress":if(Ua(o)===0)break e;case"keydown":case"keyup":me=kx;break;case"focusin":xe="focus",me=Ko;break;case"focusout":xe="blur",me=Ko;break;case"beforeblur":case"afterblur":me=Ko;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=Yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=cx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=_x;break;case fh:case hh:case ph:me=hx;break;case mh:me=vx;break;case"scroll":me=ox;break;case"wheel":me=Nx;break;case"copy":case"cut":case"paste":me=mx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=Qf}var Ce=(s&4)!==0,dt=!Ce&&r==="scroll",U=Ce?J!==null?J+"Capture":null:J;Ce=[];for(var D=V,$;D!==null;){$=D;var oe=$.stateNode;if($.tag===5&&oe!==null&&($=oe,U!==null&&(oe=ss(D,U),oe!=null&&Ce.push(ws(D,oe,$)))),dt)break;D=D.return}0<Ce.length&&(J=new me(J,xe,null,o,ne),re.push({event:J,listeners:Ce}))}}if((s&7)===0){e:{if(J=r==="mouseover"||r==="pointerover",me=r==="mouseout"||r==="pointerout",J&&o!==nn&&(xe=o.relatedTarget||o.fromElement)&&($r(xe)||xe[Qn]))break e;if((me||J)&&(J=ne.window===ne?ne:(J=ne.ownerDocument)?J.defaultView||J.parentWindow:window,me?(xe=o.relatedTarget||o.toElement,me=V,xe=xe?$r(xe):null,xe!==null&&(dt=zr(xe),xe!==dt||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(me=null,xe=V),me!==xe)){if(Ce=Yf,oe="onMouseLeave",U="onMouseEnter",D="mouse",(r==="pointerout"||r==="pointerover")&&(Ce=Qf,oe="onPointerLeave",U="onPointerEnter",D="pointer"),dt=me==null?J:vi(me),$=xe==null?J:vi(xe),J=new Ce(oe,D+"leave",me,o,ne),J.target=dt,J.relatedTarget=$,oe=null,$r(ne)===V&&(Ce=new Ce(U,D+"enter",xe,o,ne),Ce.target=$,Ce.relatedTarget=dt,oe=Ce),dt=oe,me&&xe)t:{for(Ce=me,U=xe,D=0,$=Ce;$;$=_i($))D++;for($=0,oe=U;oe;oe=_i(oe))$++;for(;0<D-$;)Ce=_i(Ce),D--;for(;0<$-D;)U=_i(U),$--;for(;D--;){if(Ce===U||U!==null&&Ce===U.alternate)break t;Ce=_i(Ce),U=_i(U)}Ce=null}else Ce=null;me!==null&&Th(re,J,me,Ce,!1),xe!==null&&dt!==null&&Th(re,dt,xe,Ce,!0)}}e:{if(J=V?vi(V):window,me=J.nodeName&&J.nodeName.toLowerCase(),me==="select"||me==="input"&&J.type==="file")var we=Mx;else if(eh(J))if(nh)we=Hx;else{we=Fx;var Ae=Bx}else(me=J.nodeName)&&me.toLowerCase()==="input"&&(J.type==="checkbox"||J.type==="radio")&&(we=jx);if(we&&(we=we(r,V))){th(re,we,o,ne);break e}Ae&&Ae(r,J,V),r==="focusout"&&(Ae=J._wrapperState)&&Ae.controlled&&J.type==="number"&&Qe(J,"number",J.value)}switch(Ae=V?vi(V):window,r){case"focusin":(eh(Ae)||Ae.contentEditable==="true")&&(Ci=Ae,nl=V,Ts=null);break;case"focusout":Ts=nl=Ci=null;break;case"mousedown":rl=!0;break;case"contextmenu":case"mouseup":case"dragend":rl=!1,ch(re,o,ne);break;case"selectionchange":if($x)break;case"keydown":case"keyup":ch(re,o,ne)}var Ne;if(Zo)e:{switch(r){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else ki?Zf(r,o)&&(Re="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(Re="onCompositionStart");Re&&(Gf&&o.locale!=="ko"&&(ki||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&ki&&(Ne=Vf()):(fr=ne,Yo="value"in fr?fr.value:fr.textContent,ki=!0)),Ae=Qa(V,Re),0<Ae.length&&(Re=new qf(Re,r,null,o,ne),re.push({event:Re,listeners:Ae}),Ne?Re.data=Ne:(Ne=Jf(o),Ne!==null&&(Re.data=Ne)))),(Ne=Lx?Rx(r,o):Ox(r,o))&&(V=Qa(V,"onBeforeInput"),0<V.length&&(ne=new qf("onBeforeInput","beforeinput",null,o,ne),re.push({event:ne,listeners:V}),ne.data=Ne))}xh(re,s)})}function ws(r,s,o){return{instance:r,listener:s,currentTarget:o}}function Qa(r,s){for(var o=s+"Capture",d=[];r!==null;){var g=r,b=g.stateNode;g.tag===5&&b!==null&&(g=b,b=ss(r,o),b!=null&&d.unshift(ws(r,b,g)),b=ss(r,s),b!=null&&d.push(ws(r,b,g))),r=r.return}return d}function _i(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Th(r,s,o,d,g){for(var b=s._reactName,C=[];o!==null&&o!==d;){var I=o,P=I.alternate,V=I.stateNode;if(P!==null&&P===d)break;I.tag===5&&V!==null&&(I=V,g?(P=ss(o,b),P!=null&&C.unshift(ws(o,P,I))):g||(P=ss(o,b),P!=null&&C.push(ws(o,P,I)))),o=o.return}C.length!==0&&r.push({event:s,listeners:C})}var qx=/\r\n?/g,Qx=/\u0000|\uFFFD/g;function kh(r){return(typeof r=="string"?r:""+r).replace(qx,`
|
|
39
|
-
`).replace(Qx,"")}function Ga(r,s,o){if(s=kh(s),kh(r)!==s&&o)throw Error(n(425))}function Ka(){}var ll=null,cl=null;function dl(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var fl=typeof setTimeout=="function"?setTimeout:void 0,Gx=typeof clearTimeout=="function"?clearTimeout:void 0,Ch=typeof Promise=="function"?Promise:void 0,Kx=typeof queueMicrotask=="function"?queueMicrotask:typeof Ch<"u"?function(r){return Ch.resolve(null).then(r).catch(Xx)}:fl;function Xx(r){setTimeout(function(){throw r})}function hl(r,s){var o=s,d=0;do{var g=o.nextSibling;if(r.removeChild(o),g&&g.nodeType===8)if(o=g.data,o==="/$"){if(d===0){r.removeChild(g),ps(s);return}d--}else o!=="$"&&o!=="$?"&&o!=="$!"||d++;o=g}while(o);ps(s)}function pr(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return r}function wh(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"){if(s===0)return r;s--}else o==="/$"&&s++}r=r.previousSibling}return null}var Si=Math.random().toString(36).slice(2),Mn="__reactFiber$"+Si,_s="__reactProps$"+Si,Qn="__reactContainer$"+Si,pl="__reactEvents$"+Si,Zx="__reactListeners$"+Si,Jx="__reactHandles$"+Si;function $r(r){var s=r[Mn];if(s)return s;for(var o=r.parentNode;o;){if(s=o[Qn]||o[Mn]){if(o=s.alternate,s.child!==null||o!==null&&o.child!==null)for(r=wh(r);r!==null;){if(o=r[Mn])return o;r=wh(r)}return s}r=o,o=r.parentNode}return null}function Ss(r){return r=r[Mn]||r[Qn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function vi(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Xa(r){return r[_s]||null}var ml=[],Ai=-1;function mr(r){return{current:r}}function rt(r){0>Ai||(r.current=ml[Ai],ml[Ai]=null,Ai--)}function et(r,s){Ai++,ml[Ai]=r.current,r.current=s}var gr={},Lt=mr(gr),Wt=mr(!1),Vr=gr;function Ni(r,s){var o=r.type.contextTypes;if(!o)return gr;var d=r.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===s)return d.__reactInternalMemoizedMaskedChildContext;var g={},b;for(b in o)g[b]=s[b];return d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=s,r.__reactInternalMemoizedMaskedChildContext=g),g}function Yt(r){return r=r.childContextTypes,r!=null}function Za(){rt(Wt),rt(Lt)}function _h(r,s,o){if(Lt.current!==gr)throw Error(n(168));et(Lt,s),et(Wt,o)}function Sh(r,s,o){var d=r.stateNode;if(s=s.childContextTypes,typeof d.getChildContext!="function")return o;d=d.getChildContext();for(var g in d)if(!(g in s))throw Error(n(108,De(r)||"Unknown",g));return w({},o,d)}function Ja(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||gr,Vr=Lt.current,et(Lt,r),et(Wt,Wt.current),!0}function vh(r,s,o){var d=r.stateNode;if(!d)throw Error(n(169));o?(r=Sh(r,s,Vr),d.__reactInternalMemoizedMergedChildContext=r,rt(Wt),rt(Lt),et(Lt,r)):rt(Wt),et(Wt,o)}var Gn=null,eu=!1,gl=!1;function Ah(r){Gn===null?Gn=[r]:Gn.push(r)}function e2(r){eu=!0,Ah(r)}function Er(){if(!gl&&Gn!==null){gl=!0;var r=0,s=Ge;try{var o=Gn;for(Ge=1;r<o.length;r++){var d=o[r];do d=d(!0);while(d!==null)}Gn=null,eu=!1}catch(g){throw Gn!==null&&(Gn=Gn.slice(r+1)),If(Fo,Er),g}finally{Ge=s,gl=!1}}return null}var Ii=[],Li=0,tu=null,nu=0,fn=[],hn=0,Wr=null,Kn=1,Xn="";function Yr(r,s){Ii[Li++]=nu,Ii[Li++]=tu,tu=r,nu=s}function Nh(r,s,o){fn[hn++]=Kn,fn[hn++]=Xn,fn[hn++]=Wr,Wr=r;var d=Kn;r=Xn;var g=32-Cn(d)-1;d&=~(1<<g),o+=1;var b=32-Cn(s)+g;if(30<b){var C=g-g%5;b=(d&(1<<C)-1).toString(32),d>>=C,g-=C,Kn=1<<32-Cn(s)+g|o<<g|d,Xn=b+r}else Kn=1<<b|o<<g|d,Xn=r}function El(r){r.return!==null&&(Yr(r,1),Nh(r,1,0))}function bl(r){for(;r===tu;)tu=Ii[--Li],Ii[Li]=null,nu=Ii[--Li],Ii[Li]=null;for(;r===Wr;)Wr=fn[--hn],fn[hn]=null,Xn=fn[--hn],fn[hn]=null,Kn=fn[--hn],fn[hn]=null}var sn=null,an=null,it=!1,_n=null;function Ih(r,s){var o=En(5,null,null,0);o.elementType="DELETED",o.stateNode=s,o.return=r,s=r.deletions,s===null?(r.deletions=[o],r.flags|=16):s.push(o)}function Lh(r,s){switch(r.tag){case 5:var o=r.type;return s=s.nodeType!==1||o.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(r.stateNode=s,sn=r,an=pr(s.firstChild),!0):!1;case 6:return s=r.pendingProps===""||s.nodeType!==3?null:s,s!==null?(r.stateNode=s,sn=r,an=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(o=Wr!==null?{id:Kn,overflow:Xn}:null,r.memoizedState={dehydrated:s,treeContext:o,retryLane:1073741824},o=En(18,null,null,0),o.stateNode=s,o.return=r,r.child=o,sn=r,an=null,!0):!1;default:return!1}}function xl(r){return(r.mode&1)!==0&&(r.flags&128)===0}function yl(r){if(it){var s=an;if(s){var o=s;if(!Lh(r,s)){if(xl(r))throw Error(n(418));s=pr(o.nextSibling);var d=sn;s&&Lh(r,s)?Ih(d,o):(r.flags=r.flags&-4097|2,it=!1,sn=r)}}else{if(xl(r))throw Error(n(418));r.flags=r.flags&-4097|2,it=!1,sn=r}}}function Rh(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;sn=r}function ru(r){if(r!==sn)return!1;if(!it)return Rh(r),it=!0,!1;var s;if((s=r.tag!==3)&&!(s=r.tag!==5)&&(s=r.type,s=s!=="head"&&s!=="body"&&!dl(r.type,r.memoizedProps)),s&&(s=an)){if(xl(r))throw Oh(),Error(n(418));for(;s;)Ih(r,s),s=pr(s.nextSibling)}if(Rh(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,s=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"){if(s===0){an=pr(r.nextSibling);break e}s--}else o!=="$"&&o!=="$!"&&o!=="$?"||s++}r=r.nextSibling}an=null}}else an=sn?pr(r.stateNode.nextSibling):null;return!0}function Oh(){for(var r=an;r;)r=pr(r.nextSibling)}function Ri(){an=sn=null,it=!1}function Tl(r){_n===null?_n=[r]:_n.push(r)}var t2=K.ReactCurrentBatchConfig;function vs(r,s,o){if(r=o.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(n(309));var d=o.stateNode}if(!d)throw Error(n(147,r));var g=d,b=""+r;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(C){var I=g.refs;C===null?delete I[b]:I[b]=C},s._stringRef=b,s)}if(typeof r!="string")throw Error(n(284));if(!o._owner)throw Error(n(290,r))}return r}function iu(r,s){throw r=Object.prototype.toString.call(s),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r))}function Ph(r){var s=r._init;return s(r._payload)}function Dh(r){function s(U,D){if(r){var $=U.deletions;$===null?(U.deletions=[D],U.flags|=16):$.push(D)}}function o(U,D){if(!r)return null;for(;D!==null;)s(U,D),D=D.sibling;return null}function d(U,D){for(U=new Map;D!==null;)D.key!==null?U.set(D.key,D):U.set(D.index,D),D=D.sibling;return U}function g(U,D){return U=_r(U,D),U.index=0,U.sibling=null,U}function b(U,D,$){return U.index=$,r?($=U.alternate,$!==null?($=$.index,$<D?(U.flags|=2,D):$):(U.flags|=2,D)):(U.flags|=1048576,D)}function C(U){return r&&U.alternate===null&&(U.flags|=2),U}function I(U,D,$,oe){return D===null||D.tag!==6?(D=fc($,U.mode,oe),D.return=U,D):(D=g(D,$),D.return=U,D)}function P(U,D,$,oe){var we=$.type;return we===ae?ne(U,D,$.props.children,oe,$.key):D!==null&&(D.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===X&&Ph(we)===D.type)?(oe=g(D,$.props),oe.ref=vs(U,D,$),oe.return=U,oe):(oe=Au($.type,$.key,$.props,null,U.mode,oe),oe.ref=vs(U,D,$),oe.return=U,oe)}function V(U,D,$,oe){return D===null||D.tag!==4||D.stateNode.containerInfo!==$.containerInfo||D.stateNode.implementation!==$.implementation?(D=hc($,U.mode,oe),D.return=U,D):(D=g(D,$.children||[]),D.return=U,D)}function ne(U,D,$,oe,we){return D===null||D.tag!==7?(D=ei($,U.mode,oe,we),D.return=U,D):(D=g(D,$),D.return=U,D)}function re(U,D,$){if(typeof D=="string"&&D!==""||typeof D=="number")return D=fc(""+D,U.mode,$),D.return=U,D;if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Y:return $=Au(D.type,D.key,D.props,null,U.mode,$),$.ref=vs(U,null,D),$.return=U,$;case B:return D=hc(D,U.mode,$),D.return=U,D;case X:var oe=D._init;return re(U,oe(D._payload),$)}if(ht(D)||pe(D))return D=ei(D,U.mode,$,null),D.return=U,D;iu(U,D)}return null}function J(U,D,$,oe){var we=D!==null?D.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return we!==null?null:I(U,D,""+$,oe);if(typeof $=="object"&&$!==null){switch($.$$typeof){case Y:return $.key===we?P(U,D,$,oe):null;case B:return $.key===we?V(U,D,$,oe):null;case X:return we=$._init,J(U,D,we($._payload),oe)}if(ht($)||pe($))return we!==null?null:ne(U,D,$,oe,null);iu(U,$)}return null}function me(U,D,$,oe,we){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return U=U.get($)||null,I(D,U,""+oe,we);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case Y:return U=U.get(oe.key===null?$:oe.key)||null,P(D,U,oe,we);case B:return U=U.get(oe.key===null?$:oe.key)||null,V(D,U,oe,we);case X:var Ae=oe._init;return me(U,D,$,Ae(oe._payload),we)}if(ht(oe)||pe(oe))return U=U.get($)||null,ne(D,U,oe,we,null);iu(D,oe)}return null}function xe(U,D,$,oe){for(var we=null,Ae=null,Ne=D,Re=D=0,kt=null;Ne!==null&&Re<$.length;Re++){Ne.index>Re?(kt=Ne,Ne=null):kt=Ne.sibling;var qe=J(U,Ne,$[Re],oe);if(qe===null){Ne===null&&(Ne=kt);break}r&&Ne&&qe.alternate===null&&s(U,Ne),D=b(qe,D,Re),Ae===null?we=qe:Ae.sibling=qe,Ae=qe,Ne=kt}if(Re===$.length)return o(U,Ne),it&&Yr(U,Re),we;if(Ne===null){for(;Re<$.length;Re++)Ne=re(U,$[Re],oe),Ne!==null&&(D=b(Ne,D,Re),Ae===null?we=Ne:Ae.sibling=Ne,Ae=Ne);return it&&Yr(U,Re),we}for(Ne=d(U,Ne);Re<$.length;Re++)kt=me(Ne,U,Re,$[Re],oe),kt!==null&&(r&&kt.alternate!==null&&Ne.delete(kt.key===null?Re:kt.key),D=b(kt,D,Re),Ae===null?we=kt:Ae.sibling=kt,Ae=kt);return r&&Ne.forEach(function(Sr){return s(U,Sr)}),it&&Yr(U,Re),we}function Ce(U,D,$,oe){var we=pe($);if(typeof we!="function")throw Error(n(150));if($=we.call($),$==null)throw Error(n(151));for(var Ae=we=null,Ne=D,Re=D=0,kt=null,qe=$.next();Ne!==null&&!qe.done;Re++,qe=$.next()){Ne.index>Re?(kt=Ne,Ne=null):kt=Ne.sibling;var Sr=J(U,Ne,qe.value,oe);if(Sr===null){Ne===null&&(Ne=kt);break}r&&Ne&&Sr.alternate===null&&s(U,Ne),D=b(Sr,D,Re),Ae===null?we=Sr:Ae.sibling=Sr,Ae=Sr,Ne=kt}if(qe.done)return o(U,Ne),it&&Yr(U,Re),we;if(Ne===null){for(;!qe.done;Re++,qe=$.next())qe=re(U,qe.value,oe),qe!==null&&(D=b(qe,D,Re),Ae===null?we=qe:Ae.sibling=qe,Ae=qe);return it&&Yr(U,Re),we}for(Ne=d(U,Ne);!qe.done;Re++,qe=$.next())qe=me(Ne,U,Re,qe.value,oe),qe!==null&&(r&&qe.alternate!==null&&Ne.delete(qe.key===null?Re:qe.key),D=b(qe,D,Re),Ae===null?we=qe:Ae.sibling=qe,Ae=qe);return r&&Ne.forEach(function(P2){return s(U,P2)}),it&&Yr(U,Re),we}function dt(U,D,$,oe){if(typeof $=="object"&&$!==null&&$.type===ae&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case Y:e:{for(var we=$.key,Ae=D;Ae!==null;){if(Ae.key===we){if(we=$.type,we===ae){if(Ae.tag===7){o(U,Ae.sibling),D=g(Ae,$.props.children),D.return=U,U=D;break e}}else if(Ae.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===X&&Ph(we)===Ae.type){o(U,Ae.sibling),D=g(Ae,$.props),D.ref=vs(U,Ae,$),D.return=U,U=D;break e}o(U,Ae);break}else s(U,Ae);Ae=Ae.sibling}$.type===ae?(D=ei($.props.children,U.mode,oe,$.key),D.return=U,U=D):(oe=Au($.type,$.key,$.props,null,U.mode,oe),oe.ref=vs(U,D,$),oe.return=U,U=oe)}return C(U);case B:e:{for(Ae=$.key;D!==null;){if(D.key===Ae)if(D.tag===4&&D.stateNode.containerInfo===$.containerInfo&&D.stateNode.implementation===$.implementation){o(U,D.sibling),D=g(D,$.children||[]),D.return=U,U=D;break e}else{o(U,D);break}else s(U,D);D=D.sibling}D=hc($,U.mode,oe),D.return=U,U=D}return C(U);case X:return Ae=$._init,dt(U,D,Ae($._payload),oe)}if(ht($))return xe(U,D,$,oe);if(pe($))return Ce(U,D,$,oe);iu(U,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,D!==null&&D.tag===6?(o(U,D.sibling),D=g(D,$),D.return=U,U=D):(o(U,D),D=fc($,U.mode,oe),D.return=U,U=D),C(U)):o(U,D)}return dt}var Oi=Dh(!0),Mh=Dh(!1),su=mr(null),au=null,Pi=null,kl=null;function Cl(){kl=Pi=au=null}function wl(r){var s=su.current;rt(su),r._currentValue=s}function _l(r,s,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),r===o)break;r=r.return}}function Di(r,s){au=r,kl=Pi=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&s)!==0&&(qt=!0),r.firstContext=null)}function pn(r){var s=r._currentValue;if(kl!==r)if(r={context:r,memoizedValue:s,next:null},Pi===null){if(au===null)throw Error(n(308));Pi=r,au.dependencies={lanes:0,firstContext:r}}else Pi=Pi.next=r;return s}var qr=null;function Sl(r){qr===null?qr=[r]:qr.push(r)}function Bh(r,s,o,d){var g=s.interleaved;return g===null?(o.next=o,Sl(s)):(o.next=g.next,g.next=o),s.interleaved=o,Zn(r,d)}function Zn(r,s){r.lanes|=s;var o=r.alternate;for(o!==null&&(o.lanes|=s),o=r,r=r.return;r!==null;)r.childLanes|=s,o=r.alternate,o!==null&&(o.childLanes|=s),o=r,r=r.return;return o.tag===3?o.stateNode:null}var br=!1;function vl(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fh(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function Jn(r,s){return{eventTime:r,lane:s,tag:0,payload:null,callback:null,next:null}}function xr(r,s,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(Ye&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,Zn(r,o)}return g=d.interleaved,g===null?(s.next=s,Sl(d)):(s.next=g.next,g.next=s),d.interleaved=s,Zn(r,o)}function uu(r,s,o){if(s=s.updateQueue,s!==null&&(s=s.shared,(o&4194240)!==0)){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,Uo(r,o)}}function jh(r,s){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var g=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var C={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};b===null?g=b=C:b=b.next=C,o=o.next}while(o!==null);b===null?g=b=s:b=b.next=s}else g=b=s;o={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:d.shared,effects:d.effects},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=s:r.next=s,o.lastBaseUpdate=s}function ou(r,s,o,d){var g=r.updateQueue;br=!1;var b=g.firstBaseUpdate,C=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var P=I,V=P.next;P.next=null,C===null?b=V:C.next=V,C=P;var ne=r.alternate;ne!==null&&(ne=ne.updateQueue,I=ne.lastBaseUpdate,I!==C&&(I===null?ne.firstBaseUpdate=V:I.next=V,ne.lastBaseUpdate=P))}if(b!==null){var re=g.baseState;C=0,ne=V=P=null,I=b;do{var J=I.lane,me=I.eventTime;if((d&J)===J){ne!==null&&(ne=ne.next={eventTime:me,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var xe=r,Ce=I;switch(J=s,me=o,Ce.tag){case 1:if(xe=Ce.payload,typeof xe=="function"){re=xe.call(me,re,J);break e}re=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Ce.payload,J=typeof xe=="function"?xe.call(me,re,J):xe,J==null)break e;re=w({},re,J);break e;case 2:br=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,J=g.effects,J===null?g.effects=[I]:J.push(I))}else me={eventTime:me,lane:J,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ne===null?(V=ne=me,P=re):ne=ne.next=me,C|=J;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;J=I,I=J.next,J.next=null,g.lastBaseUpdate=J,g.shared.pending=null}}while(!0);if(ne===null&&(P=re),g.baseState=P,g.firstBaseUpdate=V,g.lastBaseUpdate=ne,s=g.shared.interleaved,s!==null){g=s;do C|=g.lane,g=g.next;while(g!==s)}else b===null&&(g.shared.lanes=0);Kr|=C,r.lanes=C,r.memoizedState=re}}function Hh(r,s,o){if(r=s.effects,s.effects=null,r!==null)for(s=0;s<r.length;s++){var d=r[s],g=d.callback;if(g!==null){if(d.callback=null,d=o,typeof g!="function")throw Error(n(191,g));g.call(d)}}}var As={},Bn=mr(As),Ns=mr(As),Is=mr(As);function Qr(r){if(r===As)throw Error(n(174));return r}function Al(r,s){switch(et(Is,s),et(Ns,r),et(Bn,As),r=s.nodeType,r){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ce(null,"");break;default:r=r===8?s.parentNode:s,s=r.namespaceURI||null,r=r.tagName,s=ce(s,r)}rt(Bn),et(Bn,s)}function Mi(){rt(Bn),rt(Ns),rt(Is)}function Uh(r){Qr(Is.current);var s=Qr(Bn.current),o=ce(s,r.type);s!==o&&(et(Ns,r),et(Bn,o))}function Nl(r){Ns.current===r&&(rt(Bn),rt(Ns))}var at=mr(0);function lu(r){for(var s=r;s!==null;){if(s.tag===13){var o=s.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Il=[];function Ll(){for(var r=0;r<Il.length;r++)Il[r]._workInProgressVersionPrimary=null;Il.length=0}var cu=K.ReactCurrentDispatcher,Rl=K.ReactCurrentBatchConfig,Gr=0,ut=null,Et=null,yt=null,du=!1,Ls=!1,Rs=0,n2=0;function Rt(){throw Error(n(321))}function Ol(r,s){if(s===null)return!1;for(var o=0;o<s.length&&o<r.length;o++)if(!wn(r[o],s[o]))return!1;return!0}function Pl(r,s,o,d,g,b){if(Gr=b,ut=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,cu.current=r===null||r.memoizedState===null?a2:u2,r=o(d,g),Ls){b=0;do{if(Ls=!1,Rs=0,25<=b)throw Error(n(301));b+=1,yt=Et=null,s.updateQueue=null,cu.current=o2,r=o(d,g)}while(Ls)}if(cu.current=pu,s=Et!==null&&Et.next!==null,Gr=0,yt=Et=ut=null,du=!1,s)throw Error(n(300));return r}function Dl(){var r=Rs!==0;return Rs=0,r}function Fn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return yt===null?ut.memoizedState=yt=r:yt=yt.next=r,yt}function mn(){if(Et===null){var r=ut.alternate;r=r!==null?r.memoizedState:null}else r=Et.next;var s=yt===null?ut.memoizedState:yt.next;if(s!==null)yt=s,Et=r;else{if(r===null)throw Error(n(310));Et=r,r={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},yt===null?ut.memoizedState=yt=r:yt=yt.next=r}return yt}function Os(r,s){return typeof s=="function"?s(r):s}function Ml(r){var s=mn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=Et,g=d.baseQueue,b=o.pending;if(b!==null){if(g!==null){var C=g.next;g.next=b.next,b.next=C}d.baseQueue=g=b,o.pending=null}if(g!==null){b=g.next,d=d.baseState;var I=C=null,P=null,V=b;do{var ne=V.lane;if((Gr&ne)===ne)P!==null&&(P=P.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),d=V.hasEagerState?V.eagerState:r(d,V.action);else{var re={lane:ne,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};P===null?(I=P=re,C=d):P=P.next=re,ut.lanes|=ne,Kr|=ne}V=V.next}while(V!==null&&V!==b);P===null?C=d:P.next=I,wn(d,s.memoizedState)||(qt=!0),s.memoizedState=d,s.baseState=C,s.baseQueue=P,o.lastRenderedState=d}if(r=o.interleaved,r!==null){g=r;do b=g.lane,ut.lanes|=b,Kr|=b,g=g.next;while(g!==r)}else g===null&&(o.lanes=0);return[s.memoizedState,o.dispatch]}function Bl(r){var s=mn(),o=s.queue;if(o===null)throw Error(n(311));o.lastRenderedReducer=r;var d=o.dispatch,g=o.pending,b=s.memoizedState;if(g!==null){o.pending=null;var C=g=g.next;do b=r(b,C.action),C=C.next;while(C!==g);wn(b,s.memoizedState)||(qt=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),o.lastRenderedState=b}return[b,d]}function zh(){}function $h(r,s){var o=ut,d=mn(),g=s(),b=!wn(d.memoizedState,g);if(b&&(d.memoizedState=g,qt=!0),d=d.queue,Fl(Yh.bind(null,o,d,r),[r]),d.getSnapshot!==s||b||yt!==null&&yt.memoizedState.tag&1){if(o.flags|=2048,Ps(9,Wh.bind(null,o,d,g,s),void 0,null),Tt===null)throw Error(n(349));(Gr&30)!==0||Vh(o,s,g)}return g}function Vh(r,s,o){r.flags|=16384,r={getSnapshot:s,value:o},s=ut.updateQueue,s===null?(s={lastEffect:null,stores:null},ut.updateQueue=s,s.stores=[r]):(o=s.stores,o===null?s.stores=[r]:o.push(r))}function Wh(r,s,o,d){s.value=o,s.getSnapshot=d,qh(s)&&Qh(r)}function Yh(r,s,o){return o(function(){qh(s)&&Qh(r)})}function qh(r){var s=r.getSnapshot;r=r.value;try{var o=s();return!wn(r,o)}catch{return!0}}function Qh(r){var s=Zn(r,1);s!==null&&Nn(s,r,1,-1)}function Gh(r){var s=Fn();return typeof r=="function"&&(r=r()),s.memoizedState=s.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Os,lastRenderedState:r},s.queue=r,r=r.dispatch=s2.bind(null,ut,r),[s.memoizedState,r]}function Ps(r,s,o,d){return r={tag:r,create:s,destroy:o,deps:d,next:null},s=ut.updateQueue,s===null?(s={lastEffect:null,stores:null},ut.updateQueue=s,s.lastEffect=r.next=r):(o=s.lastEffect,o===null?s.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,s.lastEffect=r)),r}function Kh(){return mn().memoizedState}function fu(r,s,o,d){var g=Fn();ut.flags|=r,g.memoizedState=Ps(1|s,o,void 0,d===void 0?null:d)}function hu(r,s,o,d){var g=mn();d=d===void 0?null:d;var b=void 0;if(Et!==null){var C=Et.memoizedState;if(b=C.destroy,d!==null&&Ol(d,C.deps)){g.memoizedState=Ps(s,o,b,d);return}}ut.flags|=r,g.memoizedState=Ps(1|s,o,b,d)}function Xh(r,s){return fu(8390656,8,r,s)}function Fl(r,s){return hu(2048,8,r,s)}function Zh(r,s){return hu(4,2,r,s)}function Jh(r,s){return hu(4,4,r,s)}function ep(r,s){if(typeof s=="function")return r=r(),s(r),function(){s(null)};if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function tp(r,s,o){return o=o!=null?o.concat([r]):null,hu(4,4,ep.bind(null,s,r),o)}function jl(){}function np(r,s){var o=mn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&Ol(s,d[1])?d[0]:(o.memoizedState=[r,s],r)}function rp(r,s){var o=mn();s=s===void 0?null:s;var d=o.memoizedState;return d!==null&&s!==null&&Ol(s,d[1])?d[0]:(r=r(),o.memoizedState=[r,s],r)}function ip(r,s,o){return(Gr&21)===0?(r.baseState&&(r.baseState=!1,qt=!0),r.memoizedState=o):(wn(o,s)||(o=Pf(),ut.lanes|=o,Kr|=o,r.baseState=!0),s)}function r2(r,s){var o=Ge;Ge=o!==0&&4>o?o:4,r(!0);var d=Rl.transition;Rl.transition={};try{r(!1),s()}finally{Ge=o,Rl.transition=d}}function sp(){return mn().memoizedState}function i2(r,s,o){var d=Cr(r);if(o={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null},ap(r))up(s,o);else if(o=Bh(r,s,o,d),o!==null){var g=jt();Nn(o,r,d,g),op(o,s,d)}}function s2(r,s,o){var d=Cr(r),g={lane:d,action:o,hasEagerState:!1,eagerState:null,next:null};if(ap(r))up(s,g);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var C=s.lastRenderedState,I=b(C,o);if(g.hasEagerState=!0,g.eagerState=I,wn(I,C)){var P=s.interleaved;P===null?(g.next=g,Sl(s)):(g.next=P.next,P.next=g),s.interleaved=g;return}}catch{}finally{}o=Bh(r,s,g,d),o!==null&&(g=jt(),Nn(o,r,d,g),op(o,s,d))}}function ap(r){var s=r.alternate;return r===ut||s!==null&&s===ut}function up(r,s){Ls=du=!0;var o=r.pending;o===null?s.next=s:(s.next=o.next,o.next=s),r.pending=s}function op(r,s,o){if((o&4194240)!==0){var d=s.lanes;d&=r.pendingLanes,o|=d,s.lanes=o,Uo(r,o)}}var pu={readContext:pn,useCallback:Rt,useContext:Rt,useEffect:Rt,useImperativeHandle:Rt,useInsertionEffect:Rt,useLayoutEffect:Rt,useMemo:Rt,useReducer:Rt,useRef:Rt,useState:Rt,useDebugValue:Rt,useDeferredValue:Rt,useTransition:Rt,useMutableSource:Rt,useSyncExternalStore:Rt,useId:Rt,unstable_isNewReconciler:!1},a2={readContext:pn,useCallback:function(r,s){return Fn().memoizedState=[r,s===void 0?null:s],r},useContext:pn,useEffect:Xh,useImperativeHandle:function(r,s,o){return o=o!=null?o.concat([r]):null,fu(4194308,4,ep.bind(null,s,r),o)},useLayoutEffect:function(r,s){return fu(4194308,4,r,s)},useInsertionEffect:function(r,s){return fu(4,2,r,s)},useMemo:function(r,s){var o=Fn();return s=s===void 0?null:s,r=r(),o.memoizedState=[r,s],r},useReducer:function(r,s,o){var d=Fn();return s=o!==void 0?o(s):s,d.memoizedState=d.baseState=s,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:s},d.queue=r,r=r.dispatch=i2.bind(null,ut,r),[d.memoizedState,r]},useRef:function(r){var s=Fn();return r={current:r},s.memoizedState=r},useState:Gh,useDebugValue:jl,useDeferredValue:function(r){return Fn().memoizedState=r},useTransition:function(){var r=Gh(!1),s=r[0];return r=r2.bind(null,r[1]),Fn().memoizedState=r,[s,r]},useMutableSource:function(){},useSyncExternalStore:function(r,s,o){var d=ut,g=Fn();if(it){if(o===void 0)throw Error(n(407));o=o()}else{if(o=s(),Tt===null)throw Error(n(349));(Gr&30)!==0||Vh(d,s,o)}g.memoizedState=o;var b={value:o,getSnapshot:s};return g.queue=b,Xh(Yh.bind(null,d,b,r),[r]),d.flags|=2048,Ps(9,Wh.bind(null,d,b,o,s),void 0,null),o},useId:function(){var r=Fn(),s=Tt.identifierPrefix;if(it){var o=Xn,d=Kn;o=(d&~(1<<32-Cn(d)-1)).toString(32)+o,s=":"+s+"R"+o,o=Rs++,0<o&&(s+="H"+o.toString(32)),s+=":"}else o=n2++,s=":"+s+"r"+o.toString(32)+":";return r.memoizedState=s},unstable_isNewReconciler:!1},u2={readContext:pn,useCallback:np,useContext:pn,useEffect:Fl,useImperativeHandle:tp,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:rp,useReducer:Ml,useRef:Kh,useState:function(){return Ml(Os)},useDebugValue:jl,useDeferredValue:function(r){var s=mn();return ip(s,Et.memoizedState,r)},useTransition:function(){var r=Ml(Os)[0],s=mn().memoizedState;return[r,s]},useMutableSource:zh,useSyncExternalStore:$h,useId:sp,unstable_isNewReconciler:!1},o2={readContext:pn,useCallback:np,useContext:pn,useEffect:Fl,useImperativeHandle:tp,useInsertionEffect:Zh,useLayoutEffect:Jh,useMemo:rp,useReducer:Bl,useRef:Kh,useState:function(){return Bl(Os)},useDebugValue:jl,useDeferredValue:function(r){var s=mn();return Et===null?s.memoizedState=r:ip(s,Et.memoizedState,r)},useTransition:function(){var r=Bl(Os)[0],s=mn().memoizedState;return[r,s]},useMutableSource:zh,useSyncExternalStore:$h,useId:sp,unstable_isNewReconciler:!1};function Sn(r,s){if(r&&r.defaultProps){s=w({},s),r=r.defaultProps;for(var o in r)s[o]===void 0&&(s[o]=r[o]);return s}return s}function Hl(r,s,o,d){s=r.memoizedState,o=o(d,s),o=o==null?s:w({},s,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var mu={isMounted:function(r){return(r=r._reactInternals)?zr(r)===r:!1},enqueueSetState:function(r,s,o){r=r._reactInternals;var d=jt(),g=Cr(r),b=Jn(d,g);b.payload=s,o!=null&&(b.callback=o),s=xr(r,b,g),s!==null&&(Nn(s,r,g,d),uu(s,r,g))},enqueueReplaceState:function(r,s,o){r=r._reactInternals;var d=jt(),g=Cr(r),b=Jn(d,g);b.tag=1,b.payload=s,o!=null&&(b.callback=o),s=xr(r,b,g),s!==null&&(Nn(s,r,g,d),uu(s,r,g))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var o=jt(),d=Cr(r),g=Jn(o,d);g.tag=2,s!=null&&(g.callback=s),s=xr(r,g,d),s!==null&&(Nn(s,r,d,o),uu(s,r,d))}};function lp(r,s,o,d,g,b,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,b,C):s.prototype&&s.prototype.isPureReactComponent?!ys(o,d)||!ys(g,b):!0}function cp(r,s,o){var d=!1,g=gr,b=s.contextType;return typeof b=="object"&&b!==null?b=pn(b):(g=Yt(s)?Vr:Lt.current,d=s.contextTypes,b=(d=d!=null)?Ni(r,g):gr),s=new s(o,b),r.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=mu,r.stateNode=s,s._reactInternals=r,d&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=g,r.__reactInternalMemoizedMaskedChildContext=b),s}function dp(r,s,o,d){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(o,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(o,d),s.state!==r&&mu.enqueueReplaceState(s,s.state,null)}function Ul(r,s,o,d){var g=r.stateNode;g.props=o,g.state=r.memoizedState,g.refs={},vl(r);var b=s.contextType;typeof b=="object"&&b!==null?g.context=pn(b):(b=Yt(s)?Vr:Lt.current,g.context=Ni(r,b)),g.state=r.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hl(r,s,b,o),g.state=r.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&mu.enqueueReplaceState(g,g.state,null),ou(r,o,g,d),g.state=r.memoizedState),typeof g.componentDidMount=="function"&&(r.flags|=4194308)}function Bi(r,s){try{var o="",d=s;do o+=Ee(d),d=d.return;while(d);var g=o}catch(b){g=`
|
|
40
|
-
Error generating stack: `+b.message+`
|
|
41
|
-
`+b.stack}return{value:r,source:s,stack:g,digest:null}}function zl(r,s,o){return{value:r,source:null,stack:o??null,digest:s??null}}function $l(r,s){try{console.error(s.value)}catch(o){setTimeout(function(){throw o})}}var l2=typeof WeakMap=="function"?WeakMap:Map;function fp(r,s,o){o=Jn(-1,o),o.tag=3,o.payload={element:null};var d=s.value;return o.callback=function(){ku||(ku=!0,ic=d),$l(r,s)},o}function hp(r,s,o){o=Jn(-1,o),o.tag=3;var d=r.type.getDerivedStateFromError;if(typeof d=="function"){var g=s.value;o.payload=function(){return d(g)},o.callback=function(){$l(r,s)}}var b=r.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(o.callback=function(){$l(r,s),typeof d!="function"&&(Tr===null?Tr=new Set([this]):Tr.add(this));var C=s.stack;this.componentDidCatch(s.value,{componentStack:C!==null?C:""})}),o}function pp(r,s,o){var d=r.pingCache;if(d===null){d=r.pingCache=new l2;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(o)||(g.add(o),r=C2.bind(null,r,s,o),s.then(r,r))}function mp(r){do{var s;if((s=r.tag===13)&&(s=r.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return r;r=r.return}while(r!==null);return null}function gp(r,s,o,d,g){return(r.mode&1)===0?(r===s?r.flags|=65536:(r.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(s=Jn(-1,1),s.tag=2,xr(o,s,1))),o.lanes|=1),r):(r.flags|=65536,r.lanes=g,r)}var c2=K.ReactCurrentOwner,qt=!1;function Ft(r,s,o,d){s.child=r===null?Mh(s,null,o,d):Oi(s,r.child,o,d)}function Ep(r,s,o,d,g){o=o.render;var b=s.ref;return Di(s,g),d=Pl(r,s,o,d,b,g),o=Dl(),r!==null&&!qt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,er(r,s,g)):(it&&o&&El(s),s.flags|=1,Ft(r,s,d,g),s.child)}function bp(r,s,o,d,g){if(r===null){var b=o.type;return typeof b=="function"&&!dc(b)&&b.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(s.tag=15,s.type=b,xp(r,s,b,d,g)):(r=Au(o.type,null,d,s,s.mode,g),r.ref=s.ref,r.return=s,s.child=r)}if(b=r.child,(r.lanes&g)===0){var C=b.memoizedProps;if(o=o.compare,o=o!==null?o:ys,o(C,d)&&r.ref===s.ref)return er(r,s,g)}return s.flags|=1,r=_r(b,d),r.ref=s.ref,r.return=s,s.child=r}function xp(r,s,o,d,g){if(r!==null){var b=r.memoizedProps;if(ys(b,d)&&r.ref===s.ref)if(qt=!1,s.pendingProps=d=b,(r.lanes&g)!==0)(r.flags&131072)!==0&&(qt=!0);else return s.lanes=r.lanes,er(r,s,g)}return Vl(r,s,o,d,g)}function yp(r,s,o){var d=s.pendingProps,g=d.children,b=r!==null?r.memoizedState:null;if(d.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},et(ji,un),un|=o;else{if((o&1073741824)===0)return r=b!==null?b.baseLanes|o:o,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:r,cachePool:null,transitions:null},s.updateQueue=null,et(ji,un),un|=r,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=b!==null?b.baseLanes:o,et(ji,un),un|=d}else b!==null?(d=b.baseLanes|o,s.memoizedState=null):d=o,et(ji,un),un|=d;return Ft(r,s,g,o),s.child}function Tp(r,s){var o=s.ref;(r===null&&o!==null||r!==null&&r.ref!==o)&&(s.flags|=512,s.flags|=2097152)}function Vl(r,s,o,d,g){var b=Yt(o)?Vr:Lt.current;return b=Ni(s,b),Di(s,g),o=Pl(r,s,o,d,b,g),d=Dl(),r!==null&&!qt?(s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~g,er(r,s,g)):(it&&d&&El(s),s.flags|=1,Ft(r,s,o,g),s.child)}function kp(r,s,o,d,g){if(Yt(o)){var b=!0;Ja(s)}else b=!1;if(Di(s,g),s.stateNode===null)Eu(r,s),cp(s,o,d),Ul(s,o,d,g),d=!0;else if(r===null){var C=s.stateNode,I=s.memoizedProps;C.props=I;var P=C.context,V=o.contextType;typeof V=="object"&&V!==null?V=pn(V):(V=Yt(o)?Vr:Lt.current,V=Ni(s,V));var ne=o.getDerivedStateFromProps,re=typeof ne=="function"||typeof C.getSnapshotBeforeUpdate=="function";re||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==d||P!==V)&&dp(s,C,d,V),br=!1;var J=s.memoizedState;C.state=J,ou(s,d,C,g),P=s.memoizedState,I!==d||J!==P||Wt.current||br?(typeof ne=="function"&&(Hl(s,o,ne,d),P=s.memoizedState),(I=br||lp(s,o,I,d,J,P,V))?(re||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(s.flags|=4194308)):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=P),C.props=d,C.state=P,C.context=V,d=I):(typeof C.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{C=s.stateNode,Fh(r,s),I=s.memoizedProps,V=s.type===s.elementType?I:Sn(s.type,I),C.props=V,re=s.pendingProps,J=C.context,P=o.contextType,typeof P=="object"&&P!==null?P=pn(P):(P=Yt(o)?Vr:Lt.current,P=Ni(s,P));var me=o.getDerivedStateFromProps;(ne=typeof me=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||(I!==re||J!==P)&&dp(s,C,d,P),br=!1,J=s.memoizedState,C.state=J,ou(s,d,C,g);var xe=s.memoizedState;I!==re||J!==xe||Wt.current||br?(typeof me=="function"&&(Hl(s,o,me,d),xe=s.memoizedState),(V=br||lp(s,o,V,d,J,xe,P)||!1)?(ne||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(d,xe,P),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(d,xe,P)),typeof C.componentDidUpdate=="function"&&(s.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof C.componentDidUpdate!="function"||I===r.memoizedProps&&J===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&J===r.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=xe),C.props=d,C.state=xe,C.context=P,d=V):(typeof C.componentDidUpdate!="function"||I===r.memoizedProps&&J===r.memoizedState||(s.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&J===r.memoizedState||(s.flags|=1024),d=!1)}return Wl(r,s,o,d,b,g)}function Wl(r,s,o,d,g,b){Tp(r,s);var C=(s.flags&128)!==0;if(!d&&!C)return g&&vh(s,o,!1),er(r,s,b);d=s.stateNode,c2.current=s;var I=C&&typeof o.getDerivedStateFromError!="function"?null:d.render();return s.flags|=1,r!==null&&C?(s.child=Oi(s,r.child,null,b),s.child=Oi(s,null,I,b)):Ft(r,s,I,b),s.memoizedState=d.state,g&&vh(s,o,!0),s.child}function Cp(r){var s=r.stateNode;s.pendingContext?_h(r,s.pendingContext,s.pendingContext!==s.context):s.context&&_h(r,s.context,!1),Al(r,s.containerInfo)}function wp(r,s,o,d,g){return Ri(),Tl(g),s.flags|=256,Ft(r,s,o,d),s.child}var Yl={dehydrated:null,treeContext:null,retryLane:0};function ql(r){return{baseLanes:r,cachePool:null,transitions:null}}function _p(r,s,o){var d=s.pendingProps,g=at.current,b=!1,C=(s.flags&128)!==0,I;if((I=C)||(I=r!==null&&r.memoizedState===null?!1:(g&2)!==0),I?(b=!0,s.flags&=-129):(r===null||r.memoizedState!==null)&&(g|=1),et(at,g&1),r===null)return yl(s),r=s.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((s.mode&1)===0?s.lanes=1:r.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(C=d.children,r=d.fallback,b?(d=s.mode,b=s.child,C={mode:"hidden",children:C},(d&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=C):b=Nu(C,d,0,null),r=ei(r,d,o,null),b.return=s,r.return=s,b.sibling=r,s.child=b,s.child.memoizedState=ql(o),s.memoizedState=Yl,r):Ql(s,C));if(g=r.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return d2(r,s,C,d,I,g,o);if(b){b=d.fallback,C=s.mode,g=r.child,I=g.sibling;var P={mode:"hidden",children:d.children};return(C&1)===0&&s.child!==g?(d=s.child,d.childLanes=0,d.pendingProps=P,s.deletions=null):(d=_r(g,P),d.subtreeFlags=g.subtreeFlags&14680064),I!==null?b=_r(I,b):(b=ei(b,C,o,null),b.flags|=2),b.return=s,d.return=s,d.sibling=b,s.child=d,d=b,b=s.child,C=r.child.memoizedState,C=C===null?ql(o):{baseLanes:C.baseLanes|o,cachePool:null,transitions:C.transitions},b.memoizedState=C,b.childLanes=r.childLanes&~o,s.memoizedState=Yl,d}return b=r.child,r=b.sibling,d=_r(b,{mode:"visible",children:d.children}),(s.mode&1)===0&&(d.lanes=o),d.return=s,d.sibling=null,r!==null&&(o=s.deletions,o===null?(s.deletions=[r],s.flags|=16):o.push(r)),s.child=d,s.memoizedState=null,d}function Ql(r,s){return s=Nu({mode:"visible",children:s},r.mode,0,null),s.return=r,r.child=s}function gu(r,s,o,d){return d!==null&&Tl(d),Oi(s,r.child,null,o),r=Ql(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function d2(r,s,o,d,g,b,C){if(o)return s.flags&256?(s.flags&=-257,d=zl(Error(n(422))),gu(r,s,C,d)):s.memoizedState!==null?(s.child=r.child,s.flags|=128,null):(b=d.fallback,g=s.mode,d=Nu({mode:"visible",children:d.children},g,0,null),b=ei(b,g,C,null),b.flags|=2,d.return=s,b.return=s,d.sibling=b,s.child=d,(s.mode&1)!==0&&Oi(s,r.child,null,C),s.child.memoizedState=ql(C),s.memoizedState=Yl,b);if((s.mode&1)===0)return gu(r,s,C,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var I=d.dgst;return d=I,b=Error(n(419)),d=zl(b,d,void 0),gu(r,s,C,d)}if(I=(C&r.childLanes)!==0,qt||I){if(d=Tt,d!==null){switch(C&-C){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(d.suspendedLanes|C))!==0?0:g,g!==0&&g!==b.retryLane&&(b.retryLane=g,Zn(r,g),Nn(d,r,g,-1))}return cc(),d=zl(Error(n(421))),gu(r,s,C,d)}return g.data==="$?"?(s.flags|=128,s.child=r.child,s=w2.bind(null,r),g._reactRetry=s,null):(r=b.treeContext,an=pr(g.nextSibling),sn=s,it=!0,_n=null,r!==null&&(fn[hn++]=Kn,fn[hn++]=Xn,fn[hn++]=Wr,Kn=r.id,Xn=r.overflow,Wr=s),s=Ql(s,d.children),s.flags|=4096,s)}function Sp(r,s,o){r.lanes|=s;var d=r.alternate;d!==null&&(d.lanes|=s),_l(r.return,s,o)}function Gl(r,s,o,d,g){var b=r.memoizedState;b===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:g}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=d,b.tail=o,b.tailMode=g)}function vp(r,s,o){var d=s.pendingProps,g=d.revealOrder,b=d.tail;if(Ft(r,s,d.children,o),d=at.current,(d&2)!==0)d=d&1|2,s.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Sp(r,o,s);else if(r.tag===19)Sp(r,o,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}d&=1}if(et(at,d),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(o=s.child,g=null;o!==null;)r=o.alternate,r!==null&&lu(r)===null&&(g=o),o=o.sibling;o=g,o===null?(g=s.child,s.child=null):(g=o.sibling,o.sibling=null),Gl(s,!1,g,o,b);break;case"backwards":for(o=null,g=s.child,s.child=null;g!==null;){if(r=g.alternate,r!==null&&lu(r)===null){s.child=g;break}r=g.sibling,g.sibling=o,o=g,g=r}Gl(s,!0,o,null,b);break;case"together":Gl(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Eu(r,s){(s.mode&1)===0&&r!==null&&(r.alternate=null,s.alternate=null,s.flags|=2)}function er(r,s,o){if(r!==null&&(s.dependencies=r.dependencies),Kr|=s.lanes,(o&s.childLanes)===0)return null;if(r!==null&&s.child!==r.child)throw Error(n(153));if(s.child!==null){for(r=s.child,o=_r(r,r.pendingProps),s.child=o,o.return=s;r.sibling!==null;)r=r.sibling,o=o.sibling=_r(r,r.pendingProps),o.return=s;o.sibling=null}return s.child}function f2(r,s,o){switch(s.tag){case 3:Cp(s),Ri();break;case 5:Uh(s);break;case 1:Yt(s.type)&&Ja(s);break;case 4:Al(s,s.stateNode.containerInfo);break;case 10:var d=s.type._context,g=s.memoizedProps.value;et(su,d._currentValue),d._currentValue=g;break;case 13:if(d=s.memoizedState,d!==null)return d.dehydrated!==null?(et(at,at.current&1),s.flags|=128,null):(o&s.child.childLanes)!==0?_p(r,s,o):(et(at,at.current&1),r=er(r,s,o),r!==null?r.sibling:null);et(at,at.current&1);break;case 19:if(d=(o&s.childLanes)!==0,(r.flags&128)!==0){if(d)return vp(r,s,o);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),et(at,at.current),d)break;return null;case 22:case 23:return s.lanes=0,yp(r,s,o)}return er(r,s,o)}var Ap,Kl,Np,Ip;Ap=function(r,s){for(var o=s.child;o!==null;){if(o.tag===5||o.tag===6)r.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Kl=function(){},Np=function(r,s,o,d){var g=r.memoizedProps;if(g!==d){r=s.stateNode,Qr(Bn.current);var b=null;switch(o){case"input":g=tn(r,g),d=tn(r,d),b=[];break;case"select":g=w({},g,{value:void 0}),d=w({},d,{value:void 0}),b=[];break;case"textarea":g=kn(r,g),d=kn(r,d),b=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(r.onclick=Ka)}vt(o,d);var C;o=null;for(V in g)if(!d.hasOwnProperty(V)&&g.hasOwnProperty(V)&&g[V]!=null)if(V==="style"){var I=g[V];for(C in I)I.hasOwnProperty(C)&&(o||(o={}),o[C]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?b||(b=[]):(b=b||[]).push(V,null));for(V in d){var P=d[V];if(I=g!=null?g[V]:void 0,d.hasOwnProperty(V)&&P!==I&&(P!=null||I!=null))if(V==="style")if(I){for(C in I)!I.hasOwnProperty(C)||P&&P.hasOwnProperty(C)||(o||(o={}),o[C]="");for(C in P)P.hasOwnProperty(C)&&I[C]!==P[C]&&(o||(o={}),o[C]=P[C])}else o||(b||(b=[]),b.push(V,o)),o=P;else V==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,I=I?I.__html:void 0,P!=null&&I!==P&&(b=b||[]).push(V,P)):V==="children"?typeof P!="string"&&typeof P!="number"||(b=b||[]).push(V,""+P):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(P!=null&&V==="onScroll"&&nt("scroll",r),b||I===P||(b=[])):(b=b||[]).push(V,P))}o&&(b=b||[]).push("style",o);var V=b;(s.updateQueue=V)&&(s.flags|=4)}},Ip=function(r,s,o,d){o!==d&&(s.flags|=4)};function Ds(r,s){if(!it)switch(r.tailMode){case"hidden":s=r.tail;for(var o=null;s!==null;)s.alternate!==null&&(o=s),s=s.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Ot(r){var s=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(s)for(var g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)o|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=o,s}function h2(r,s,o){var d=s.pendingProps;switch(bl(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ot(s),null;case 1:return Yt(s.type)&&Za(),Ot(s),null;case 3:return d=s.stateNode,Mi(),rt(Wt),rt(Lt),Ll(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(ru(s)?s.flags|=4:r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,_n!==null&&(uc(_n),_n=null))),Kl(r,s),Ot(s),null;case 5:Nl(s);var g=Qr(Is.current);if(o=s.type,r!==null&&s.stateNode!=null)Np(r,s,o,d,g),r.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!d){if(s.stateNode===null)throw Error(n(166));return Ot(s),null}if(r=Qr(Bn.current),ru(s)){d=s.stateNode,o=s.type;var b=s.memoizedProps;switch(d[Mn]=s,d[_s]=b,r=(s.mode&1)!==0,o){case"dialog":nt("cancel",d),nt("close",d);break;case"iframe":case"object":case"embed":nt("load",d);break;case"video":case"audio":for(g=0;g<ks.length;g++)nt(ks[g],d);break;case"source":nt("error",d);break;case"img":case"image":case"link":nt("error",d),nt("load",d);break;case"details":nt("toggle",d);break;case"input":sr(d,b),nt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!b.multiple},nt("invalid",d);break;case"textarea":Sa(d,b),nt("invalid",d)}vt(o,b),g=null;for(var C in b)if(b.hasOwnProperty(C)){var I=b[C];C==="children"?typeof I=="string"?d.textContent!==I&&(b.suppressHydrationWarning!==!0&&Ga(d.textContent,I,r),g=["children",I]):typeof I=="number"&&d.textContent!==""+I&&(b.suppressHydrationWarning!==!0&&Ga(d.textContent,I,r),g=["children",""+I]):a.hasOwnProperty(C)&&I!=null&&C==="onScroll"&&nt("scroll",d)}switch(o){case"input":It(d),Me(d,b,!0);break;case"textarea":It(d),Aa(d);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(d.onclick=Ka)}d=g,s.updateQueue=d,d!==null&&(s.flags|=4)}else{C=g.nodeType===9?g:g.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=G(o)),r==="http://www.w3.org/1999/xhtml"?o==="script"?(r=C.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof d.is=="string"?r=C.createElement(o,{is:d.is}):(r=C.createElement(o),o==="select"&&(C=r,d.multiple?C.multiple=!0:d.size&&(C.size=d.size))):r=C.createElementNS(r,o),r[Mn]=s,r[_s]=d,Ap(r,s,!1,!1),s.stateNode=r;e:{switch(C=Pn(o,d),o){case"dialog":nt("cancel",r),nt("close",r),g=d;break;case"iframe":case"object":case"embed":nt("load",r),g=d;break;case"video":case"audio":for(g=0;g<ks.length;g++)nt(ks[g],r);g=d;break;case"source":nt("error",r),g=d;break;case"img":case"image":case"link":nt("error",r),nt("load",r),g=d;break;case"details":nt("toggle",r),g=d;break;case"input":sr(r,d),g=tn(r,d),nt("invalid",r);break;case"option":g=d;break;case"select":r._wrapperState={wasMultiple:!!d.multiple},g=w({},d,{value:void 0}),nt("invalid",r);break;case"textarea":Sa(r,d),g=kn(r,d),nt("invalid",r);break;default:g=d}vt(o,g),I=g;for(b in I)if(I.hasOwnProperty(b)){var P=I[b];b==="style"?ur(r,P):b==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&je(r,P)):b==="children"?typeof P=="string"?(o!=="textarea"||P!=="")&&We(r,P):typeof P=="number"&&We(r,""+P):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(a.hasOwnProperty(b)?P!=null&&b==="onScroll"&&nt("scroll",r):P!=null&&F(r,b,P,C))}switch(o){case"input":It(r),Me(r,d,!1);break;case"textarea":It(r),Aa(r);break;case"option":d.value!=null&&r.setAttribute("value",""+Oe(d.value));break;case"select":r.multiple=!!d.multiple,b=d.value,b!=null?_t(r,!!d.multiple,b,!1):d.defaultValue!=null&&_t(r,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(r.onclick=Ka)}switch(o){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return Ot(s),null;case 6:if(r&&s.stateNode!=null)Ip(r,s,r.memoizedProps,d);else{if(typeof d!="string"&&s.stateNode===null)throw Error(n(166));if(o=Qr(Is.current),Qr(Bn.current),ru(s)){if(d=s.stateNode,o=s.memoizedProps,d[Mn]=s,(b=d.nodeValue!==o)&&(r=sn,r!==null))switch(r.tag){case 3:Ga(d.nodeValue,o,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ga(d.nodeValue,o,(r.mode&1)!==0)}b&&(s.flags|=4)}else d=(o.nodeType===9?o:o.ownerDocument).createTextNode(d),d[Mn]=s,s.stateNode=d}return Ot(s),null;case 13:if(rt(at),d=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(it&&an!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Oh(),Ri(),s.flags|=98560,b=!1;else if(b=ru(s),d!==null&&d.dehydrated!==null){if(r===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Mn]=s}else Ri(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Ot(s),b=!1}else _n!==null&&(uc(_n),_n=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=o,s):(d=d!==null,d!==(r!==null&&r.memoizedState!==null)&&d&&(s.child.flags|=8192,(s.mode&1)!==0&&(r===null||(at.current&1)!==0?bt===0&&(bt=3):cc())),s.updateQueue!==null&&(s.flags|=4),Ot(s),null);case 4:return Mi(),Kl(r,s),r===null&&Cs(s.stateNode.containerInfo),Ot(s),null;case 10:return wl(s.type._context),Ot(s),null;case 17:return Yt(s.type)&&Za(),Ot(s),null;case 19:if(rt(at),b=s.memoizedState,b===null)return Ot(s),null;if(d=(s.flags&128)!==0,C=b.rendering,C===null)if(d)Ds(b,!1);else{if(bt!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(C=lu(r),C!==null){for(s.flags|=128,Ds(b,!1),d=C.updateQueue,d!==null&&(s.updateQueue=d,s.flags|=4),s.subtreeFlags=0,d=o,o=s.child;o!==null;)b=o,r=d,b.flags&=14680066,C=b.alternate,C===null?(b.childLanes=0,b.lanes=r,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=C.childLanes,b.lanes=C.lanes,b.child=C.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=C.memoizedProps,b.memoizedState=C.memoizedState,b.updateQueue=C.updateQueue,b.type=C.type,r=C.dependencies,b.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),o=o.sibling;return et(at,at.current&1|2),s.child}r=r.sibling}b.tail!==null&&ct()>Hi&&(s.flags|=128,d=!0,Ds(b,!1),s.lanes=4194304)}else{if(!d)if(r=lu(C),r!==null){if(s.flags|=128,d=!0,o=r.updateQueue,o!==null&&(s.updateQueue=o,s.flags|=4),Ds(b,!0),b.tail===null&&b.tailMode==="hidden"&&!C.alternate&&!it)return Ot(s),null}else 2*ct()-b.renderingStartTime>Hi&&o!==1073741824&&(s.flags|=128,d=!0,Ds(b,!1),s.lanes=4194304);b.isBackwards?(C.sibling=s.child,s.child=C):(o=b.last,o!==null?o.sibling=C:s.child=C,b.last=C)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=ct(),s.sibling=null,o=at.current,et(at,d?o&1|2:o&1),s):(Ot(s),null);case 22:case 23:return lc(),d=s.memoizedState!==null,r!==null&&r.memoizedState!==null!==d&&(s.flags|=8192),d&&(s.mode&1)!==0?(un&1073741824)!==0&&(Ot(s),s.subtreeFlags&6&&(s.flags|=8192)):Ot(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function p2(r,s){switch(bl(s),s.tag){case 1:return Yt(s.type)&&Za(),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return Mi(),rt(Wt),rt(Lt),Ll(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 5:return Nl(s),null;case 13:if(rt(at),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Ri()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return rt(at),null;case 4:return Mi(),null;case 10:return wl(s.type._context),null;case 22:case 23:return lc(),null;case 24:return null;default:return null}}var bu=!1,Pt=!1,m2=typeof WeakSet=="function"?WeakSet:Set,be=null;function Fi(r,s){var o=r.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(d){ot(r,s,d)}else o.current=null}function Xl(r,s,o){try{o()}catch(d){ot(r,s,d)}}var Lp=!1;function g2(r,s){if(ll=Fa,r=lh(),tl(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var g=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break e}var C=0,I=-1,P=-1,V=0,ne=0,re=r,J=null;t:for(;;){for(var me;re!==o||g!==0&&re.nodeType!==3||(I=C+g),re!==b||d!==0&&re.nodeType!==3||(P=C+d),re.nodeType===3&&(C+=re.nodeValue.length),(me=re.firstChild)!==null;)J=re,re=me;for(;;){if(re===r)break t;if(J===o&&++V===g&&(I=C),J===b&&++ne===d&&(P=C),(me=re.nextSibling)!==null)break;re=J,J=re.parentNode}re=me}o=I===-1||P===-1?null:{start:I,end:P}}else o=null}o=o||{start:0,end:0}}else o=null;for(cl={focusedElem:r,selectionRange:o},Fa=!1,be=s;be!==null;)if(s=be,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,be=r;else for(;be!==null;){s=be;try{var xe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var Ce=xe.memoizedProps,dt=xe.memoizedState,U=s.stateNode,D=U.getSnapshotBeforeUpdate(s.elementType===s.type?Ce:Sn(s.type,Ce),dt);U.__reactInternalSnapshotBeforeUpdate=D}break;case 3:var $=s.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(oe){ot(s,s.return,oe)}if(r=s.sibling,r!==null){r.return=s.return,be=r;break}be=s.return}return xe=Lp,Lp=!1,xe}function Ms(r,s,o){var d=s.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&r)===r){var b=g.destroy;g.destroy=void 0,b!==void 0&&Xl(s,o,b)}g=g.next}while(g!==d)}}function xu(r,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var o=s=s.next;do{if((o.tag&r)===r){var d=o.create;o.destroy=d()}o=o.next}while(o!==s)}}function Zl(r){var s=r.ref;if(s!==null){var o=r.stateNode;switch(r.tag){case 5:r=o;break;default:r=o}typeof s=="function"?s(r):s.current=r}}function Rp(r){var s=r.alternate;s!==null&&(r.alternate=null,Rp(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&(delete s[Mn],delete s[_s],delete s[pl],delete s[Zx],delete s[Jx])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Op(r){return r.tag===5||r.tag===3||r.tag===4}function Pp(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Op(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Jl(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.nodeType===8?o.parentNode.insertBefore(r,s):o.insertBefore(r,s):(o.nodeType===8?(s=o.parentNode,s.insertBefore(r,o)):(s=o,s.appendChild(r)),o=o._reactRootContainer,o!=null||s.onclick!==null||(s.onclick=Ka));else if(d!==4&&(r=r.child,r!==null))for(Jl(r,s,o),r=r.sibling;r!==null;)Jl(r,s,o),r=r.sibling}function ec(r,s,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,s?o.insertBefore(r,s):o.appendChild(r);else if(d!==4&&(r=r.child,r!==null))for(ec(r,s,o),r=r.sibling;r!==null;)ec(r,s,o),r=r.sibling}var At=null,vn=!1;function yr(r,s,o){for(o=o.child;o!==null;)Dp(r,s,o),o=o.sibling}function Dp(r,s,o){if(Dn&&typeof Dn.onCommitFiberUnmount=="function")try{Dn.onCommitFiberUnmount(Ra,o)}catch{}switch(o.tag){case 5:Pt||Fi(o,s);case 6:var d=At,g=vn;At=null,yr(r,s,o),At=d,vn=g,At!==null&&(vn?(r=At,o=o.stateNode,r.nodeType===8?r.parentNode.removeChild(o):r.removeChild(o)):At.removeChild(o.stateNode));break;case 18:At!==null&&(vn?(r=At,o=o.stateNode,r.nodeType===8?hl(r.parentNode,o):r.nodeType===1&&hl(r,o),ps(r)):hl(At,o.stateNode));break;case 4:d=At,g=vn,At=o.stateNode.containerInfo,vn=!0,yr(r,s,o),At=d,vn=g;break;case 0:case 11:case 14:case 15:if(!Pt&&(d=o.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var b=g,C=b.destroy;b=b.tag,C!==void 0&&((b&2)!==0||(b&4)!==0)&&Xl(o,s,C),g=g.next}while(g!==d)}yr(r,s,o);break;case 1:if(!Pt&&(Fi(o,s),d=o.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=o.memoizedProps,d.state=o.memoizedState,d.componentWillUnmount()}catch(I){ot(o,s,I)}yr(r,s,o);break;case 21:yr(r,s,o);break;case 22:o.mode&1?(Pt=(d=Pt)||o.memoizedState!==null,yr(r,s,o),Pt=d):yr(r,s,o);break;default:yr(r,s,o)}}function Mp(r){var s=r.updateQueue;if(s!==null){r.updateQueue=null;var o=r.stateNode;o===null&&(o=r.stateNode=new m2),s.forEach(function(d){var g=_2.bind(null,r,d);o.has(d)||(o.add(d),d.then(g,g))})}}function An(r,s){var o=s.deletions;if(o!==null)for(var d=0;d<o.length;d++){var g=o[d];try{var b=r,C=s,I=C;e:for(;I!==null;){switch(I.tag){case 5:At=I.stateNode,vn=!1;break e;case 3:At=I.stateNode.containerInfo,vn=!0;break e;case 4:At=I.stateNode.containerInfo,vn=!0;break e}I=I.return}if(At===null)throw Error(n(160));Dp(b,C,g),At=null,vn=!1;var P=g.alternate;P!==null&&(P.return=null),g.return=null}catch(V){ot(g,s,V)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)Bp(s,r),s=s.sibling}function Bp(r,s){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(An(s,r),jn(r),d&4){try{Ms(3,r,r.return),xu(3,r)}catch(Ce){ot(r,r.return,Ce)}try{Ms(5,r,r.return)}catch(Ce){ot(r,r.return,Ce)}}break;case 1:An(s,r),jn(r),d&512&&o!==null&&Fi(o,o.return);break;case 5:if(An(s,r),jn(r),d&512&&o!==null&&Fi(o,o.return),r.flags&32){var g=r.stateNode;try{We(g,"")}catch(Ce){ot(r,r.return,Ce)}}if(d&4&&(g=r.stateNode,g!=null)){var b=r.memoizedProps,C=o!==null?o.memoizedProps:b,I=r.type,P=r.updateQueue;if(r.updateQueue=null,P!==null)try{I==="input"&&b.type==="radio"&&b.name!=null&&Yn(g,b),Pn(I,C);var V=Pn(I,b);for(C=0;C<P.length;C+=2){var ne=P[C],re=P[C+1];ne==="style"?ur(g,re):ne==="dangerouslySetInnerHTML"?je(g,re):ne==="children"?We(g,re):F(g,ne,re,V)}switch(I){case"input":ar(g,b);break;case"textarea":va(g,b);break;case"select":var J=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!b.multiple;var me=b.value;me!=null?_t(g,!!b.multiple,me,!1):J!==!!b.multiple&&(b.defaultValue!=null?_t(g,!!b.multiple,b.defaultValue,!0):_t(g,!!b.multiple,b.multiple?[]:"",!1))}g[_s]=b}catch(Ce){ot(r,r.return,Ce)}}break;case 6:if(An(s,r),jn(r),d&4){if(r.stateNode===null)throw Error(n(162));g=r.stateNode,b=r.memoizedProps;try{g.nodeValue=b}catch(Ce){ot(r,r.return,Ce)}}break;case 3:if(An(s,r),jn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{ps(s.containerInfo)}catch(Ce){ot(r,r.return,Ce)}break;case 4:An(s,r),jn(r);break;case 13:An(s,r),jn(r),g=r.child,g.flags&8192&&(b=g.memoizedState!==null,g.stateNode.isHidden=b,!b||g.alternate!==null&&g.alternate.memoizedState!==null||(rc=ct())),d&4&&Mp(r);break;case 22:if(ne=o!==null&&o.memoizedState!==null,r.mode&1?(Pt=(V=Pt)||ne,An(s,r),Pt=V):An(s,r),jn(r),d&8192){if(V=r.memoizedState!==null,(r.stateNode.isHidden=V)&&!ne&&(r.mode&1)!==0)for(be=r,ne=r.child;ne!==null;){for(re=be=ne;be!==null;){switch(J=be,me=J.child,J.tag){case 0:case 11:case 14:case 15:Ms(4,J,J.return);break;case 1:Fi(J,J.return);var xe=J.stateNode;if(typeof xe.componentWillUnmount=="function"){d=J,o=J.return;try{s=d,xe.props=s.memoizedProps,xe.state=s.memoizedState,xe.componentWillUnmount()}catch(Ce){ot(d,o,Ce)}}break;case 5:Fi(J,J.return);break;case 22:if(J.memoizedState!==null){Hp(re);continue}}me!==null?(me.return=J,be=me):Hp(re)}ne=ne.sibling}e:for(ne=null,re=r;;){if(re.tag===5){if(ne===null){ne=re;try{g=re.stateNode,V?(b=g.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(I=re.stateNode,P=re.memoizedProps.style,C=P!=null&&P.hasOwnProperty("display")?P.display:null,I.style.display=dn("display",C))}catch(Ce){ot(r,r.return,Ce)}}}else if(re.tag===6){if(ne===null)try{re.stateNode.nodeValue=V?"":re.memoizedProps}catch(Ce){ot(r,r.return,Ce)}}else if((re.tag!==22&&re.tag!==23||re.memoizedState===null||re===r)&&re.child!==null){re.child.return=re,re=re.child;continue}if(re===r)break e;for(;re.sibling===null;){if(re.return===null||re.return===r)break e;ne===re&&(ne=null),re=re.return}ne===re&&(ne=null),re.sibling.return=re.return,re=re.sibling}}break;case 19:An(s,r),jn(r),d&4&&Mp(r);break;case 21:break;default:An(s,r),jn(r)}}function jn(r){var s=r.flags;if(s&2){try{e:{for(var o=r.return;o!==null;){if(Op(o)){var d=o;break e}o=o.return}throw Error(n(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(We(g,""),d.flags&=-33);var b=Pp(r);ec(r,b,g);break;case 3:case 4:var C=d.stateNode.containerInfo,I=Pp(r);Jl(r,I,C);break;default:throw Error(n(161))}}catch(P){ot(r,r.return,P)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function E2(r,s,o){be=r,Fp(r)}function Fp(r,s,o){for(var d=(r.mode&1)!==0;be!==null;){var g=be,b=g.child;if(g.tag===22&&d){var C=g.memoizedState!==null||bu;if(!C){var I=g.alternate,P=I!==null&&I.memoizedState!==null||Pt;I=bu;var V=Pt;if(bu=C,(Pt=P)&&!V)for(be=g;be!==null;)C=be,P=C.child,C.tag===22&&C.memoizedState!==null?Up(g):P!==null?(P.return=C,be=P):Up(g);for(;b!==null;)be=b,Fp(b),b=b.sibling;be=g,bu=I,Pt=V}jp(r)}else(g.subtreeFlags&8772)!==0&&b!==null?(b.return=g,be=b):jp(r)}}function jp(r){for(;be!==null;){var s=be;if((s.flags&8772)!==0){var o=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Pt||xu(5,s);break;case 1:var d=s.stateNode;if(s.flags&4&&!Pt)if(o===null)d.componentDidMount();else{var g=s.elementType===s.type?o.memoizedProps:Sn(s.type,o.memoizedProps);d.componentDidUpdate(g,o.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Hh(s,b,d);break;case 3:var C=s.updateQueue;if(C!==null){if(o=null,s.child!==null)switch(s.child.tag){case 5:o=s.child.stateNode;break;case 1:o=s.child.stateNode}Hh(s,C,o)}break;case 5:var I=s.stateNode;if(o===null&&s.flags&4){o=I;var P=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&o.focus();break;case"img":P.src&&(o.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var V=s.alternate;if(V!==null){var ne=V.memoizedState;if(ne!==null){var re=ne.dehydrated;re!==null&&ps(re)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Pt||s.flags&512&&Zl(s)}catch(J){ot(s,s.return,J)}}if(s===r){be=null;break}if(o=s.sibling,o!==null){o.return=s.return,be=o;break}be=s.return}}function Hp(r){for(;be!==null;){var s=be;if(s===r){be=null;break}var o=s.sibling;if(o!==null){o.return=s.return,be=o;break}be=s.return}}function Up(r){for(;be!==null;){var s=be;try{switch(s.tag){case 0:case 11:case 15:var o=s.return;try{xu(4,s)}catch(P){ot(s,o,P)}break;case 1:var d=s.stateNode;if(typeof d.componentDidMount=="function"){var g=s.return;try{d.componentDidMount()}catch(P){ot(s,g,P)}}var b=s.return;try{Zl(s)}catch(P){ot(s,b,P)}break;case 5:var C=s.return;try{Zl(s)}catch(P){ot(s,C,P)}}}catch(P){ot(s,s.return,P)}if(s===r){be=null;break}var I=s.sibling;if(I!==null){I.return=s.return,be=I;break}be=s.return}}var b2=Math.ceil,yu=K.ReactCurrentDispatcher,tc=K.ReactCurrentOwner,gn=K.ReactCurrentBatchConfig,Ye=0,Tt=null,pt=null,Nt=0,un=0,ji=mr(0),bt=0,Bs=null,Kr=0,Tu=0,nc=0,Fs=null,Qt=null,rc=0,Hi=1/0,tr=null,ku=!1,ic=null,Tr=null,Cu=!1,kr=null,wu=0,js=0,sc=null,_u=-1,Su=0;function jt(){return(Ye&6)!==0?ct():_u!==-1?_u:_u=ct()}function Cr(r){return(r.mode&1)===0?1:(Ye&2)!==0&&Nt!==0?Nt&-Nt:t2.transition!==null?(Su===0&&(Su=Pf()),Su):(r=Ge,r!==0||(r=window.event,r=r===void 0?16:$f(r.type)),r)}function Nn(r,s,o,d){if(50<js)throw js=0,sc=null,Error(n(185));ls(r,o,d),((Ye&2)===0||r!==Tt)&&(r===Tt&&((Ye&2)===0&&(Tu|=o),bt===4&&wr(r,Nt)),Gt(r,d),o===1&&Ye===0&&(s.mode&1)===0&&(Hi=ct()+500,eu&&Er()))}function Gt(r,s){var o=r.callbackNode;tx(r,s);var d=Da(r,r===Tt?Nt:0);if(d===0)o!==null&&Lf(o),r.callbackNode=null,r.callbackPriority=0;else if(s=d&-d,r.callbackPriority!==s){if(o!=null&&Lf(o),s===1)r.tag===0?e2($p.bind(null,r)):Ah($p.bind(null,r)),Kx(function(){(Ye&6)===0&&Er()}),o=null;else{switch(Df(d)){case 1:o=Fo;break;case 4:o=Rf;break;case 16:o=La;break;case 536870912:o=Of;break;default:o=La}o=Xp(o,zp.bind(null,r))}r.callbackPriority=s,r.callbackNode=o}}function zp(r,s){if(_u=-1,Su=0,(Ye&6)!==0)throw Error(n(327));var o=r.callbackNode;if(Ui()&&r.callbackNode!==o)return null;var d=Da(r,r===Tt?Nt:0);if(d===0)return null;if((d&30)!==0||(d&r.expiredLanes)!==0||s)s=vu(r,d);else{s=d;var g=Ye;Ye|=2;var b=Wp();(Tt!==r||Nt!==s)&&(tr=null,Hi=ct()+500,Zr(r,s));do try{T2();break}catch(I){Vp(r,I)}while(!0);Cl(),yu.current=b,Ye=g,pt!==null?s=0:(Tt=null,Nt=0,s=bt)}if(s!==0){if(s===2&&(g=jo(r),g!==0&&(d=g,s=ac(r,g))),s===1)throw o=Bs,Zr(r,0),wr(r,d),Gt(r,ct()),o;if(s===6)wr(r,d);else{if(g=r.current.alternate,(d&30)===0&&!x2(g)&&(s=vu(r,d),s===2&&(b=jo(r),b!==0&&(d=b,s=ac(r,b))),s===1))throw o=Bs,Zr(r,0),wr(r,d),Gt(r,ct()),o;switch(r.finishedWork=g,r.finishedLanes=d,s){case 0:case 1:throw Error(n(345));case 2:Jr(r,Qt,tr);break;case 3:if(wr(r,d),(d&130023424)===d&&(s=rc+500-ct(),10<s)){if(Da(r,0)!==0)break;if(g=r.suspendedLanes,(g&d)!==d){jt(),r.pingedLanes|=r.suspendedLanes&g;break}r.timeoutHandle=fl(Jr.bind(null,r,Qt,tr),s);break}Jr(r,Qt,tr);break;case 4:if(wr(r,d),(d&4194240)===d)break;for(s=r.eventTimes,g=-1;0<d;){var C=31-Cn(d);b=1<<C,C=s[C],C>g&&(g=C),d&=~b}if(d=g,d=ct()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*b2(d/1960))-d,10<d){r.timeoutHandle=fl(Jr.bind(null,r,Qt,tr),d);break}Jr(r,Qt,tr);break;case 5:Jr(r,Qt,tr);break;default:throw Error(n(329))}}}return Gt(r,ct()),r.callbackNode===o?zp.bind(null,r):null}function ac(r,s){var o=Fs;return r.current.memoizedState.isDehydrated&&(Zr(r,s).flags|=256),r=vu(r,s),r!==2&&(s=Qt,Qt=o,s!==null&&uc(s)),r}function uc(r){Qt===null?Qt=r:Qt.push.apply(Qt,r)}function x2(r){for(var s=r;;){if(s.flags&16384){var o=s.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var d=0;d<o.length;d++){var g=o[d],b=g.getSnapshot;g=g.value;try{if(!wn(b(),g))return!1}catch{return!1}}}if(o=s.child,s.subtreeFlags&16384&&o!==null)o.return=s,s=o;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function wr(r,s){for(s&=~nc,s&=~Tu,r.suspendedLanes|=s,r.pingedLanes&=~s,r=r.expirationTimes;0<s;){var o=31-Cn(s),d=1<<o;r[o]=-1,s&=~d}}function $p(r){if((Ye&6)!==0)throw Error(n(327));Ui();var s=Da(r,0);if((s&1)===0)return Gt(r,ct()),null;var o=vu(r,s);if(r.tag!==0&&o===2){var d=jo(r);d!==0&&(s=d,o=ac(r,d))}if(o===1)throw o=Bs,Zr(r,0),wr(r,s),Gt(r,ct()),o;if(o===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=s,Jr(r,Qt,tr),Gt(r,ct()),null}function oc(r,s){var o=Ye;Ye|=1;try{return r(s)}finally{Ye=o,Ye===0&&(Hi=ct()+500,eu&&Er())}}function Xr(r){kr!==null&&kr.tag===0&&(Ye&6)===0&&Ui();var s=Ye;Ye|=1;var o=gn.transition,d=Ge;try{if(gn.transition=null,Ge=1,r)return r()}finally{Ge=d,gn.transition=o,Ye=s,(Ye&6)===0&&Er()}}function lc(){un=ji.current,rt(ji)}function Zr(r,s){r.finishedWork=null,r.finishedLanes=0;var o=r.timeoutHandle;if(o!==-1&&(r.timeoutHandle=-1,Gx(o)),pt!==null)for(o=pt.return;o!==null;){var d=o;switch(bl(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&Za();break;case 3:Mi(),rt(Wt),rt(Lt),Ll();break;case 5:Nl(d);break;case 4:Mi();break;case 13:rt(at);break;case 19:rt(at);break;case 10:wl(d.type._context);break;case 22:case 23:lc()}o=o.return}if(Tt=r,pt=r=_r(r.current,null),Nt=un=s,bt=0,Bs=null,nc=Tu=Kr=0,Qt=Fs=null,qr!==null){for(s=0;s<qr.length;s++)if(o=qr[s],d=o.interleaved,d!==null){o.interleaved=null;var g=d.next,b=o.pending;if(b!==null){var C=b.next;b.next=g,d.next=C}o.pending=d}qr=null}return r}function Vp(r,s){do{var o=pt;try{if(Cl(),cu.current=pu,du){for(var d=ut.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}du=!1}if(Gr=0,yt=Et=ut=null,Ls=!1,Rs=0,tc.current=null,o===null||o.return===null){bt=1,Bs=s,pt=null;break}e:{var b=r,C=o.return,I=o,P=s;if(s=Nt,I.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var V=P,ne=I,re=ne.tag;if((ne.mode&1)===0&&(re===0||re===11||re===15)){var J=ne.alternate;J?(ne.updateQueue=J.updateQueue,ne.memoizedState=J.memoizedState,ne.lanes=J.lanes):(ne.updateQueue=null,ne.memoizedState=null)}var me=mp(C);if(me!==null){me.flags&=-257,gp(me,C,I,b,s),me.mode&1&&pp(b,V,s),s=me,P=V;var xe=s.updateQueue;if(xe===null){var Ce=new Set;Ce.add(P),s.updateQueue=Ce}else xe.add(P);break e}else{if((s&1)===0){pp(b,V,s),cc();break e}P=Error(n(426))}}else if(it&&I.mode&1){var dt=mp(C);if(dt!==null){(dt.flags&65536)===0&&(dt.flags|=256),gp(dt,C,I,b,s),Tl(Bi(P,I));break e}}b=P=Bi(P,I),bt!==4&&(bt=2),Fs===null?Fs=[b]:Fs.push(b),b=C;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var U=fp(b,P,s);jh(b,U);break e;case 1:I=P;var D=b.type,$=b.stateNode;if((b.flags&128)===0&&(typeof D.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(Tr===null||!Tr.has($)))){b.flags|=65536,s&=-s,b.lanes|=s;var oe=hp(b,I,s);jh(b,oe);break e}}b=b.return}while(b!==null)}qp(o)}catch(we){s=we,pt===o&&o!==null&&(pt=o=o.return);continue}break}while(!0)}function Wp(){var r=yu.current;return yu.current=pu,r===null?pu:r}function cc(){(bt===0||bt===3||bt===2)&&(bt=4),Tt===null||(Kr&268435455)===0&&(Tu&268435455)===0||wr(Tt,Nt)}function vu(r,s){var o=Ye;Ye|=2;var d=Wp();(Tt!==r||Nt!==s)&&(tr=null,Zr(r,s));do try{y2();break}catch(g){Vp(r,g)}while(!0);if(Cl(),Ye=o,yu.current=d,pt!==null)throw Error(n(261));return Tt=null,Nt=0,bt}function y2(){for(;pt!==null;)Yp(pt)}function T2(){for(;pt!==null&&!Yb();)Yp(pt)}function Yp(r){var s=Kp(r.alternate,r,un);r.memoizedProps=r.pendingProps,s===null?qp(r):pt=s,tc.current=null}function qp(r){var s=r;do{var o=s.alternate;if(r=s.return,(s.flags&32768)===0){if(o=h2(o,s,un),o!==null){pt=o;return}}else{if(o=p2(o,s),o!==null){o.flags&=32767,pt=o;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{bt=6,pt=null;return}}if(s=s.sibling,s!==null){pt=s;return}pt=s=r}while(s!==null);bt===0&&(bt=5)}function Jr(r,s,o){var d=Ge,g=gn.transition;try{gn.transition=null,Ge=1,k2(r,s,o,d)}finally{gn.transition=g,Ge=d}return null}function k2(r,s,o,d){do Ui();while(kr!==null);if((Ye&6)!==0)throw Error(n(327));o=r.finishedWork;var g=r.finishedLanes;if(o===null)return null;if(r.finishedWork=null,r.finishedLanes=0,o===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var b=o.lanes|o.childLanes;if(nx(r,b),r===Tt&&(pt=Tt=null,Nt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Cu||(Cu=!0,Xp(La,function(){return Ui(),null})),b=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||b){b=gn.transition,gn.transition=null;var C=Ge;Ge=1;var I=Ye;Ye|=4,tc.current=null,g2(r,o),Bp(o,r),zx(cl),Fa=!!ll,cl=ll=null,r.current=o,E2(o),qb(),Ye=I,Ge=C,gn.transition=b}else r.current=o;if(Cu&&(Cu=!1,kr=r,wu=g),b=r.pendingLanes,b===0&&(Tr=null),Kb(o.stateNode),Gt(r,ct()),s!==null)for(d=r.onRecoverableError,o=0;o<s.length;o++)g=s[o],d(g.value,{componentStack:g.stack,digest:g.digest});if(ku)throw ku=!1,r=ic,ic=null,r;return(wu&1)!==0&&r.tag!==0&&Ui(),b=r.pendingLanes,(b&1)!==0?r===sc?js++:(js=0,sc=r):js=0,Er(),null}function Ui(){if(kr!==null){var r=Df(wu),s=gn.transition,o=Ge;try{if(gn.transition=null,Ge=16>r?16:r,kr===null)var d=!1;else{if(r=kr,kr=null,wu=0,(Ye&6)!==0)throw Error(n(331));var g=Ye;for(Ye|=4,be=r.current;be!==null;){var b=be,C=b.child;if((be.flags&16)!==0){var I=b.deletions;if(I!==null){for(var P=0;P<I.length;P++){var V=I[P];for(be=V;be!==null;){var ne=be;switch(ne.tag){case 0:case 11:case 15:Ms(8,ne,b)}var re=ne.child;if(re!==null)re.return=ne,be=re;else for(;be!==null;){ne=be;var J=ne.sibling,me=ne.return;if(Rp(ne),ne===V){be=null;break}if(J!==null){J.return=me,be=J;break}be=me}}}var xe=b.alternate;if(xe!==null){var Ce=xe.child;if(Ce!==null){xe.child=null;do{var dt=Ce.sibling;Ce.sibling=null,Ce=dt}while(Ce!==null)}}be=b}}if((b.subtreeFlags&2064)!==0&&C!==null)C.return=b,be=C;else e:for(;be!==null;){if(b=be,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Ms(9,b,b.return)}var U=b.sibling;if(U!==null){U.return=b.return,be=U;break e}be=b.return}}var D=r.current;for(be=D;be!==null;){C=be;var $=C.child;if((C.subtreeFlags&2064)!==0&&$!==null)$.return=C,be=$;else e:for(C=D;be!==null;){if(I=be,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:xu(9,I)}}catch(we){ot(I,I.return,we)}if(I===C){be=null;break e}var oe=I.sibling;if(oe!==null){oe.return=I.return,be=oe;break e}be=I.return}}if(Ye=g,Er(),Dn&&typeof Dn.onPostCommitFiberRoot=="function")try{Dn.onPostCommitFiberRoot(Ra,r)}catch{}d=!0}return d}finally{Ge=o,gn.transition=s}}return!1}function Qp(r,s,o){s=Bi(o,s),s=fp(r,s,1),r=xr(r,s,1),s=jt(),r!==null&&(ls(r,1,s),Gt(r,s))}function ot(r,s,o){if(r.tag===3)Qp(r,r,o);else for(;s!==null;){if(s.tag===3){Qp(s,r,o);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Tr===null||!Tr.has(d))){r=Bi(o,r),r=hp(s,r,1),s=xr(s,r,1),r=jt(),s!==null&&(ls(s,1,r),Gt(s,r));break}}s=s.return}}function C2(r,s,o){var d=r.pingCache;d!==null&&d.delete(s),s=jt(),r.pingedLanes|=r.suspendedLanes&o,Tt===r&&(Nt&o)===o&&(bt===4||bt===3&&(Nt&130023424)===Nt&&500>ct()-rc?Zr(r,0):nc|=o),Gt(r,s)}function Gp(r,s){s===0&&((r.mode&1)===0?s=1:(s=Pa,Pa<<=1,(Pa&130023424)===0&&(Pa=4194304)));var o=jt();r=Zn(r,s),r!==null&&(ls(r,s,o),Gt(r,o))}function w2(r){var s=r.memoizedState,o=0;s!==null&&(o=s.retryLane),Gp(r,o)}function _2(r,s){var o=0;switch(r.tag){case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(o=g.retryLane);break;case 19:d=r.stateNode;break;default:throw Error(n(314))}d!==null&&d.delete(s),Gp(r,o)}var Kp;Kp=function(r,s,o){if(r!==null)if(r.memoizedProps!==s.pendingProps||Wt.current)qt=!0;else{if((r.lanes&o)===0&&(s.flags&128)===0)return qt=!1,f2(r,s,o);qt=(r.flags&131072)!==0}else qt=!1,it&&(s.flags&1048576)!==0&&Nh(s,nu,s.index);switch(s.lanes=0,s.tag){case 2:var d=s.type;Eu(r,s),r=s.pendingProps;var g=Ni(s,Lt.current);Di(s,o),g=Pl(null,s,d,r,g,o);var b=Dl();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,Yt(d)?(b=!0,Ja(s)):b=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,vl(s),g.updater=mu,s.stateNode=g,g._reactInternals=s,Ul(s,d,r,o),s=Wl(null,s,d,!0,b,o)):(s.tag=0,it&&b&&El(s),Ft(null,s,g,o),s=s.child),s;case 16:d=s.elementType;e:{switch(Eu(r,s),r=s.pendingProps,g=d._init,d=g(d._payload),s.type=d,g=s.tag=v2(d),r=Sn(d,r),g){case 0:s=Vl(null,s,d,r,o);break e;case 1:s=kp(null,s,d,r,o);break e;case 11:s=Ep(null,s,d,r,o);break e;case 14:s=bp(null,s,d,Sn(d.type,r),o);break e}throw Error(n(306,d,""))}return s;case 0:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Sn(d,g),Vl(r,s,d,g,o);case 1:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Sn(d,g),kp(r,s,d,g,o);case 3:e:{if(Cp(s),r===null)throw Error(n(387));d=s.pendingProps,b=s.memoizedState,g=b.element,Fh(r,s),ou(s,d,null,o);var C=s.memoizedState;if(d=C.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){g=Bi(Error(n(423)),s),s=wp(r,s,d,o,g);break e}else if(d!==g){g=Bi(Error(n(424)),s),s=wp(r,s,d,o,g);break e}else for(an=pr(s.stateNode.containerInfo.firstChild),sn=s,it=!0,_n=null,o=Mh(s,null,d,o),s.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Ri(),d===g){s=er(r,s,o);break e}Ft(r,s,d,o)}s=s.child}return s;case 5:return Uh(s),r===null&&yl(s),d=s.type,g=s.pendingProps,b=r!==null?r.memoizedProps:null,C=g.children,dl(d,g)?C=null:b!==null&&dl(d,b)&&(s.flags|=32),Tp(r,s),Ft(r,s,C,o),s.child;case 6:return r===null&&yl(s),null;case 13:return _p(r,s,o);case 4:return Al(s,s.stateNode.containerInfo),d=s.pendingProps,r===null?s.child=Oi(s,null,d,o):Ft(r,s,d,o),s.child;case 11:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Sn(d,g),Ep(r,s,d,g,o);case 7:return Ft(r,s,s.pendingProps,o),s.child;case 8:return Ft(r,s,s.pendingProps.children,o),s.child;case 12:return Ft(r,s,s.pendingProps.children,o),s.child;case 10:e:{if(d=s.type._context,g=s.pendingProps,b=s.memoizedProps,C=g.value,et(su,d._currentValue),d._currentValue=C,b!==null)if(wn(b.value,C)){if(b.children===g.children&&!Wt.current){s=er(r,s,o);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var I=b.dependencies;if(I!==null){C=b.child;for(var P=I.firstContext;P!==null;){if(P.context===d){if(b.tag===1){P=Jn(-1,o&-o),P.tag=2;var V=b.updateQueue;if(V!==null){V=V.shared;var ne=V.pending;ne===null?P.next=P:(P.next=ne.next,ne.next=P),V.pending=P}}b.lanes|=o,P=b.alternate,P!==null&&(P.lanes|=o),_l(b.return,o,s),I.lanes|=o;break}P=P.next}}else if(b.tag===10)C=b.type===s.type?null:b.child;else if(b.tag===18){if(C=b.return,C===null)throw Error(n(341));C.lanes|=o,I=C.alternate,I!==null&&(I.lanes|=o),_l(C,o,s),C=b.sibling}else C=b.child;if(C!==null)C.return=b;else for(C=b;C!==null;){if(C===s){C=null;break}if(b=C.sibling,b!==null){b.return=C.return,C=b;break}C=C.return}b=C}Ft(r,s,g.children,o),s=s.child}return s;case 9:return g=s.type,d=s.pendingProps.children,Di(s,o),g=pn(g),d=d(g),s.flags|=1,Ft(r,s,d,o),s.child;case 14:return d=s.type,g=Sn(d,s.pendingProps),g=Sn(d.type,g),bp(r,s,d,g,o);case 15:return xp(r,s,s.type,s.pendingProps,o);case 17:return d=s.type,g=s.pendingProps,g=s.elementType===d?g:Sn(d,g),Eu(r,s),s.tag=1,Yt(d)?(r=!0,Ja(s)):r=!1,Di(s,o),cp(s,d,g),Ul(s,d,g,o),Wl(null,s,d,!0,r,o);case 19:return vp(r,s,o);case 22:return yp(r,s,o)}throw Error(n(156,s.tag))};function Xp(r,s){return If(r,s)}function S2(r,s,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(r,s,o,d){return new S2(r,s,o,d)}function dc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function v2(r){if(typeof r=="function")return dc(r)?1:0;if(r!=null){if(r=r.$$typeof,r===le)return 11;if(r===te)return 14}return 2}function _r(r,s){var o=r.alternate;return o===null?(o=En(r.tag,s,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=s,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&14680064,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,s=r.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o}function Au(r,s,o,d,g,b){var C=2;if(d=r,typeof r=="function")dc(r)&&(C=1);else if(typeof r=="string")C=5;else e:switch(r){case ae:return ei(o.children,g,b,s);case q:C=8,g|=8;break;case de:return r=En(12,o,s,g|2),r.elementType=de,r.lanes=b,r;case _e:return r=En(13,o,s,g),r.elementType=_e,r.lanes=b,r;case he:return r=En(19,o,s,g),r.elementType=he,r.lanes=b,r;case fe:return Nu(o,g,b,s);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case H:C=10;break e;case ue:C=9;break e;case le:C=11;break e;case te:C=14;break e;case X:C=16,d=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return s=En(C,o,s,g),s.elementType=r,s.type=d,s.lanes=b,s}function ei(r,s,o,d){return r=En(7,r,d,s),r.lanes=o,r}function Nu(r,s,o,d){return r=En(22,r,d,s),r.elementType=fe,r.lanes=o,r.stateNode={isHidden:!1},r}function fc(r,s,o){return r=En(6,r,null,s),r.lanes=o,r}function hc(r,s,o){return s=En(4,r.children!==null?r.children:[],r.key,s),s.lanes=o,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}function A2(r,s,o,d,g){this.tag=s,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ho(0),this.expirationTimes=Ho(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ho(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function pc(r,s,o,d,g,b,C,I,P){return r=new A2(r,s,o,I,P),s===1?(s=1,b===!0&&(s|=8)):s=0,b=En(3,null,null,s),r.current=b,b.stateNode=r,b.memoizedState={element:d,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},vl(b),r}function N2(r,s,o){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:d==null?null:""+d,children:r,containerInfo:s,implementation:o}}function Zp(r){if(!r)return gr;r=r._reactInternals;e:{if(zr(r)!==r||r.tag!==1)throw Error(n(170));var s=r;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(Yt(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(r.tag===1){var o=r.type;if(Yt(o))return Sh(r,o,s)}return s}function Jp(r,s,o,d,g,b,C,I,P){return r=pc(o,d,!0,r,g,b,C,I,P),r.context=Zp(null),o=r.current,d=jt(),g=Cr(o),b=Jn(d,g),b.callback=s??null,xr(o,b,g),r.current.lanes=g,ls(r,g,d),Gt(r,d),r}function Iu(r,s,o,d){var g=s.current,b=jt(),C=Cr(g);return o=Zp(o),s.context===null?s.context=o:s.pendingContext=o,s=Jn(b,C),s.payload={element:r},d=d===void 0?null:d,d!==null&&(s.callback=d),r=xr(g,s,C),r!==null&&(Nn(r,g,C,b),uu(r,g,C)),C}function Lu(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 5:return r.child.stateNode;default:return r.child.stateNode}}function e0(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<s?o:s}}function mc(r,s){e0(r,s),(r=r.alternate)&&e0(r,s)}function I2(){return null}var t0=typeof reportError=="function"?reportError:function(r){console.error(r)};function gc(r){this._internalRoot=r}Ru.prototype.render=gc.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(n(409));Iu(r,s,null,null)},Ru.prototype.unmount=gc.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;Xr(function(){Iu(null,r,null,null)}),s[Qn]=null}};function Ru(r){this._internalRoot=r}Ru.prototype.unstable_scheduleHydration=function(r){if(r){var s=Ff();r={blockedOn:null,target:r,priority:s};for(var o=0;o<dr.length&&s!==0&&s<dr[o].priority;o++);dr.splice(o,0,r),o===0&&Uf(r)}};function Ec(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Ou(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function n0(){}function L2(r,s,o,d,g){if(g){if(typeof d=="function"){var b=d;d=function(){var V=Lu(C);b.call(V)}}var C=Jp(s,d,r,0,null,!1,!1,"",n0);return r._reactRootContainer=C,r[Qn]=C.current,Cs(r.nodeType===8?r.parentNode:r),Xr(),C}for(;g=r.lastChild;)r.removeChild(g);if(typeof d=="function"){var I=d;d=function(){var V=Lu(P);I.call(V)}}var P=pc(r,0,!1,null,null,!1,!1,"",n0);return r._reactRootContainer=P,r[Qn]=P.current,Cs(r.nodeType===8?r.parentNode:r),Xr(function(){Iu(s,P,o,d)}),P}function Pu(r,s,o,d,g){var b=o._reactRootContainer;if(b){var C=b;if(typeof g=="function"){var I=g;g=function(){var P=Lu(C);I.call(P)}}Iu(s,C,r,g)}else C=L2(o,s,r,g,d);return Lu(C)}Mf=function(r){switch(r.tag){case 3:var s=r.stateNode;if(s.current.memoizedState.isDehydrated){var o=os(s.pendingLanes);o!==0&&(Uo(s,o|1),Gt(s,ct()),(Ye&6)===0&&(Hi=ct()+500,Er()))}break;case 13:Xr(function(){var d=Zn(r,1);if(d!==null){var g=jt();Nn(d,r,1,g)}}),mc(r,1)}},zo=function(r){if(r.tag===13){var s=Zn(r,134217728);if(s!==null){var o=jt();Nn(s,r,134217728,o)}mc(r,134217728)}},Bf=function(r){if(r.tag===13){var s=Cr(r),o=Zn(r,s);if(o!==null){var d=jt();Nn(o,r,s,d)}mc(r,s)}},Ff=function(){return Ge},jf=function(r,s){var o=Ge;try{return Ge=r,s()}finally{Ge=o}},Po=function(r,s,o){switch(s){case"input":if(ar(r,o),s=o.name,o.type==="radio"&&s!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<o.length;s++){var d=o[s];if(d!==r&&d.form===r.form){var g=Xa(d);if(!g)throw Error(n(90));cn(d),ar(d,g)}}}break;case"textarea":va(r,o);break;case"select":s=o.value,s!=null&&_t(r,!!o.multiple,s,!1)}},Cf=oc,wf=Xr;var R2={usingClientEntryPoint:!1,Events:[Ss,vi,Xa,Tf,kf,oc]},Hs={findFiberByHostInstance:$r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},O2={bundleType:Hs.bundleType,version:Hs.version,rendererPackageName:Hs.rendererPackageName,rendererConfig:Hs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Af(r),r===null?null:r.stateNode},findFiberByHostInstance:Hs.findFiberByHostInstance||I2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Du=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Du.isDisabled&&Du.supportsFiber)try{Ra=Du.inject(O2),Dn=Du}catch{}}return Kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=R2,Kt.createPortal=function(r,s){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ec(s))throw Error(n(200));return N2(r,s,null,o)},Kt.createRoot=function(r,s){if(!Ec(r))throw Error(n(299));var o=!1,d="",g=t0;return s!=null&&(s.unstable_strictMode===!0&&(o=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=pc(r,1,!1,null,null,o,!1,d,g),r[Qn]=s.current,Cs(r.nodeType===8?r.parentNode:r),new gc(s)},Kt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Af(s),r=r===null?null:r.stateNode,r},Kt.flushSync=function(r){return Xr(r)},Kt.hydrate=function(r,s,o){if(!Ou(s))throw Error(n(200));return Pu(null,r,s,!0,o)},Kt.hydrateRoot=function(r,s,o){if(!Ec(r))throw Error(n(405));var d=o!=null&&o.hydratedSources||null,g=!1,b="",C=t0;if(o!=null&&(o.unstable_strictMode===!0&&(g=!0),o.identifierPrefix!==void 0&&(b=o.identifierPrefix),o.onRecoverableError!==void 0&&(C=o.onRecoverableError)),s=Jp(s,null,r,1,o??null,g,!1,b,C),r[Qn]=s.current,Cs(r),d)for(r=0;r<d.length;r++)o=d[r],g=o._getVersion,g=g(o._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[o,g]:s.mutableSourceEagerHydrationData.push(o,g);return new Ru(s)},Kt.render=function(r,s,o){if(!Ou(s))throw Error(n(200));return Pu(null,r,s,!1,o)},Kt.unmountComponentAtNode=function(r){if(!Ou(r))throw Error(n(40));return r._reactRootContainer?(Xr(function(){Pu(null,null,r,!1,function(){r._reactRootContainer=null,r[Qn]=null})}),!0):!1},Kt.unstable_batchedUpdates=oc,Kt.unstable_renderSubtreeIntoContainer=function(r,s,o,d){if(!Ou(o))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Pu(r,s,o,!1,d)},Kt.version="18.3.1-next-f1338f8080-20240426",Kt}var c0;function l1(){if(c0)return yc.exports;c0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yc.exports=$2(),yc.exports}var d0;function V2(){if(d0)return Mu;d0=1;var e=l1();return Mu.createRoot=e.createRoot,Mu.hydrateRoot=e.hydrateRoot,Mu}var W2=V2();const Y2=ga(W2);class q2 extends gt.Component{constructor(t){super(t),this.handleRetry=()=>{this.setState({hasError:!1,error:null})},this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught an error:",t,n)}render(){var t,n;return this.state.hasError?T.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",color:"var(--text-primary)"},children:[T.jsx("div",{style:{fontSize:"48px",marginBottom:"16px"},children:":("}),T.jsx("h2",{style:{fontSize:"18px",fontWeight:600,marginBottom:"8px"},children:"出现了一些问题"}),T.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)",marginBottom:"8px",maxWidth:"400px",textAlign:"center"},children:((t=this.state.error)==null?void 0:t.message)||"发生了未知错误"}),T.jsx("pre",{style:{fontSize:"12px",color:"var(--text-tertiary)",marginBottom:"20px",maxWidth:"600px",overflow:"auto",padding:"12px",background:"var(--bg-secondary)",borderRadius:"8px",border:"1px solid var(--border)",maxHeight:"150px",width:"100%"},children:(n=this.state.error)==null?void 0:n.stack}),T.jsx("button",{onClick:this.handleRetry,style:{padding:"8px 24px",border:"1px solid var(--border)",borderRadius:"8px",background:"var(--accent)",color:"var(--text-inverse)",fontSize:"14px",cursor:"pointer",fontWeight:500},children:"重试"})]}):this.props.children}}const f0=e=>{let t;const n=new Set,i=(h,m)=>{const E=typeof h=="function"?h(t):h;if(!Object.is(E,t)){const y=t;t=m??(typeof E!="object"||E===null)?E:Object.assign({},t,E),n.forEach(x=>x(t,y))}},a=()=>t,c={setState:i,getState:a,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(i,a,c);return c},Q2=(e=>e?f0(e):f0),G2=e=>e;function K2(e,t=G2){const n=gt.useSyncExternalStore(e.subscribe,gt.useCallback(()=>t(e.getState()),[e,t]),gt.useCallback(()=>t(e.getInitialState()),[e,t]));return gt.useDebugValue(n),n}const h0=e=>{const t=Q2(e),n=i=>K2(t,i);return Object.assign(n,t),n},c1=(e=>e?h0(e):h0),X2="/api";async function Br(e,t){const i=await(await fetch(`${X2}${e}`,{headers:{"Content-Type":"application/json",...t==null?void 0:t.headers},...t})).json();if(!i.success)throw new Error(i.error.message);return i.data}const eo=new Map,Bu=new Map,Z2=300*1e3;function Ea(e,t){const i=`GET:${e}`;{const u=eo.get(i);if(u&&u.expiry>Date.now())return u.data;const l=Bu.get(i);if(l)return l}const a=Br(e,t).then(u=>(eo.set(i,{data:u,expiry:Date.now()+Z2}),Bu.delete(`GET:${e}`),u)).catch(u=>{throw Bu.delete(`GET:${e}`),u});return Bu.set(`GET:${e}`,a),a}function mo(e){for(const t of eo.keys())t.includes(e)&&eo.delete(t)}async function J2(){return Ea("/projects")}async function Sd(e){return Ea(`/wiki/${encodeURIComponent(e)}`)}async function li(e,t,n){return Ea(`/wiki/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`)}async function Yc(e,t,n,i,a){const u=await Br(`/wiki/${encodeURIComponent(e)}/${encodeURIComponent(t)}/${encodeURIComponent(n)}`,{method:"PUT",body:JSON.stringify({content:i,expectedMtime:a})});return mo("/wiki/"),u}async function d1(e,t){return Br(`/search/${encodeURIComponent(e)}?q=${encodeURIComponent(t)}`)}async function f1(){return Ea("/config")}async function ey(e){const t=await Br("/config",{method:"PUT",body:JSON.stringify(e)});return mo("/config"),t}async function ty(e){const t=await Br("/projects",{method:"POST",body:JSON.stringify({path:e})});return mo("/projects"),t}async function ny(e){const t=await Br(`/projects/${encodeURIComponent(e)}`,{method:"DELETE"});return mo("/projects"),t}async function ry(){return Br("/scan",{method:"POST"})}async function iy(){return Br("/scan/status")}async function sy(e,t,n){const i=new URLSearchParams({path:e});return t&&i.append("startLine",t.toString()),n&&i.append("endLine",n.toString()),Ea(`/files/content?${i.toString()}`)}const ay=Object.freeze(Object.defineProperty({__proto__:null,addProject:ty,deleteProject:ny,getConfig:f1,getFileContent:sy,getPage:li,getProjects:J2,getScanStatus:iy,getWiki:Sd,putPage:Yc,searchProject:d1,triggerScan:ry,updateConfig:ey},Symbol.toStringTag,{value:"Module"})),p0={projects:[],config:null,currentWiki:null,currentView:null,sidebarOpen:!0,settingsOpen:!1,searchOpen:!1,searchQuery:"",searchResults:[],expandedSections:[],expandedGroups:[],referenceOpen:!1,referenceData:null,mermaidViewerOpen:!1,mermaidViewerData:null,loadingWiki:!1,loadingPage:!1,loadingProjects:!1},ke=c1((e,t)=>({...p0,setProjects:n=>e({projects:n}),setConfig:n=>e({config:n}),setCurrentWiki:n=>e({currentWiki:n}),setCurrentView:n=>e({currentView:n}),setCurrentProject:n=>e(i=>({config:i.config?{...i.config,lastOpenedProject:n}:i.config})),toggleSidebar:()=>e(n=>({sidebarOpen:!n.sidebarOpen})),setSidebarOpen:n=>e({sidebarOpen:n}),toggleSettings:()=>e(n=>({settingsOpen:!n.settingsOpen})),setSettingsOpen:n=>e({settingsOpen:n}),toggleSearch:()=>e(n=>({searchOpen:!n.searchOpen})),setSearchOpen:n=>e(i=>({searchOpen:n,searchQuery:n?i.searchQuery:"",searchResults:n?i.searchResults:[]})),setSearchQuery:n=>e({searchQuery:n}),setSearchResults:n=>e({searchResults:n}),openReference:(n,i,a)=>e({referenceOpen:!0,referenceData:{filePath:n,startLine:i,endLine:a}}),closeReference:()=>e({referenceOpen:!1,referenceData:null}),openMermaidViewer:(n,i)=>e({mermaidViewerOpen:!0,mermaidViewerData:{svg:n,code:i}}),closeMermaidViewer:()=>e({mermaidViewerOpen:!1,mermaidViewerData:null}),toggleSection:n=>e(i=>({expandedSections:i.expandedSections.includes(n)?i.expandedSections.filter(a=>a!==n):[...i.expandedSections,n]})),toggleGroup:n=>e(i=>({expandedGroups:i.expandedGroups.includes(n)?i.expandedGroups.filter(a=>a!==n):[...i.expandedGroups,n]})),setExpandedSections:n=>e({expandedSections:n}),setExpandedGroups:n=>e({expandedGroups:n}),setLoadingWiki:n=>e({loadingWiki:n}),setLoadingPage:n=>e({loadingPage:n}),setLoadingProjects:n=>e({loadingProjects:n}),setEditMode:()=>e(n=>n.currentView?{currentView:{...n.currentView,mode:"edit",editContent:n.currentView.content,isDirty:!1}}:n),setReadMode:()=>e(n=>n.currentView?{currentView:{...n.currentView,mode:"read",editContent:null,isDirty:!1}}:n),updateEditContent:n=>e(i=>!i.currentView||i.currentView.editContent===n?i:{currentView:{...i.currentView,editContent:n,isDirty:n!==i.currentView.content}}),savePage:async()=>{var a,u;const{currentView:n}=t();if(!n)return;const i=n.mode==="edit"?n.editContent:n.content;try{const{mtime:l}=await Yc(n.projectId,n.version,n.slug,i,n.fileMtime??void 0);e(c=>({currentView:c.currentView?{...c.currentView,content:c.currentView.mode==="edit"?c.currentView.editContent:c.currentView.content,mode:"read",editContent:null,isDirty:!1,fileMtime:l,conflictData:null}:null}))}catch(l){if(!(((a=l==null?void 0:l.message)==null?void 0:a.includes("modified since load"))||((u=l==null?void 0:l.message)==null?void 0:u.includes("CONFLICT"))))throw l;if(n.mode==="read"){const h=await li(n.projectId,n.version,n.slug);e(m=>({currentView:m.currentView?{...m.currentView,content:h.content,fileMtime:h.mtime,conflictData:null}:null}));return}const f=await li(n.projectId,n.version,n.slug);e(h=>({currentView:h.currentView?{...h.currentView,conflictData:{serverContent:f.content,serverMtime:f.mtime}}:null}))}},resolveConflict:n=>{const{currentView:i}=t();i!=null&&i.conflictData&&e(n==="server"?a=>({currentView:a.currentView?{...a.currentView,editContent:a.currentView.conflictData.serverContent,fileMtime:a.currentView.conflictData.serverMtime,isDirty:!1,conflictData:null}:null}):a=>({currentView:a.currentView?{...a.currentView,fileMtime:a.currentView.conflictData.serverMtime,conflictData:null}:null}))},saveCalloutAction:async n=>{const{currentView:i}=t();if(!i)return;const{mtime:a}=await Yc(i.projectId,i.version,i.slug,n,i.fileMtime??void 0);e(u=>({currentView:u.currentView?{...u.currentView,content:n,fileMtime:a}:null}))},reset:()=>e(p0)})),m0={aiPanelOpen:!1,aiPanelWidth:400,aiStatus:null,showInstallPrompt:!1,aiSessions:[],activeSessionId:null,aiMessages:[],aiStreaming:!1,aiConnected:!1,statusInfo:{},sessionStatus:"idle",aiError:null},to=c1(e=>({...m0,toggleAIPanel:()=>e(t=>({aiPanelOpen:!t.aiPanelOpen})),setAIPanelOpen:t=>e({aiPanelOpen:t}),setAIPanelWidth:t=>e({aiPanelWidth:t}),setAIStatus:t=>e({aiStatus:t}),setShowInstallPrompt:t=>e({showInstallPrompt:t}),setAISessions:t=>e({aiSessions:t}),setActiveSession:t=>e({activeSessionId:t}),setAIMessages:t=>e({aiMessages:t}),addMessage:t=>e(n=>({aiMessages:[...n.aiMessages,t]})),updateMessage:(t,n)=>e(i=>({aiMessages:i.aiMessages.map(a=>a.id===t?{...a,...n}:a)})),appendToMessage:(t,n,i)=>e(a=>({aiMessages:a.aiMessages.map(u=>{if(u.id!==t)return u;const l=u.content,c=l[n]||"";return{...u,content:{...l,[n]:c+i}}})})),setStreaming:t=>e({aiStreaming:t}),setConnected:t=>e({aiConnected:t}),setStatusInfo:t=>e(n=>({statusInfo:{...n.statusInfo,...t}})),setSessionStatus:t=>e({sessionStatus:t}),appendToToolCallArgs:(t,n)=>e(i=>({aiMessages:i.aiMessages.map(a=>{if(a.type!=="tool_call")return a;const u=a.content;return u.toolCallId!==t?a:{...a,content:{...u,arguments:u.arguments+n}}})})),setAIError:t=>e({aiError:t}),addSubagentEvent:(t,n,i,a)=>e(u=>{const l=u.aiMessages,c=l.findIndex(f=>f.type==="subagent"&&f.content.parentToolCallId===t&&f.content.agentId===n);if(c>=0)return{aiMessages:l.map((f,h)=>{if(h!==c)return f;const m=f.content;return{...f,content:{...m,events:[...m.events,a]}}})};{const f={id:`ai-subagent-${Date.now()}`,sessionId:u.activeSessionId,role:"assistant",type:"subagent",content:{parentToolCallId:t,agentId:n,subagentType:i,events:[a],status:"running"},timestamp:Date.now()};return{aiMessages:[...l,f]}}}),updateSubagentStatus:(t,n,i)=>e(a=>({aiMessages:a.aiMessages.map(u=>{if(u.type!=="subagent")return u;const l=u.content;return l.parentToolCallId!==t||l.agentId!==n?u:{...u,content:{...l,status:i}}})})),clearMessages:()=>e({aiMessages:[],aiStreaming:!1}),resetAI:()=>e(m0)})),uy=({size:e=16})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:T.jsx("path",{d:"M6 9l6 6 6-6"})}),oy=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"11",cy:"11",r:"8"}),T.jsx("path",{d:"M21 21l-4.35-4.35"})]}),ly=({size:e=18})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"12",cy:"12",r:"3"}),T.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),qc=({size:e=20})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),T.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),cy=({size:e=14})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",children:T.jsx("path",{d:"M12 2L14.09 8.26L20 9.27L15.55 13.97L16.91 20L12 16.9L7.09 20L8.45 13.97L4 9.27L9.91 8.26L12 2Z"})}),dy=()=>{const e=ke(h=>h.projects),t=ke(h=>h.config),n=ke(h=>h.setCurrentProject),[i,a]=R.useState(!1),u=R.useRef(null),l=t==null?void 0:t.lastOpenedProject,c=e.find(h=>h.id===l);R.useEffect(()=>{function h(m){u.current&&!u.current.contains(m.target)&&a(!1)}return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[]);const f=async h=>{n(h.id),a(!1);try{const{updateConfig:m}=await Mr(async()=>{const{updateConfig:E}=await Promise.resolve().then(()=>ay);return{updateConfig:E}},void 0);await m({lastOpenedProject:h.id})}catch(m){console.error("Failed to persist project selection:",m)}};return e.length===0?T.jsx("span",{className:"text-[13px] text-content-tertiary",children:"暂无项目"}):T.jsxs("div",{ref:u,className:"relative",children:[T.jsxs("button",{onClick:()=>a(!i),className:`
|
|
42
|
-
flex items-center gap-2
|
|
43
|
-
px-3 py-1.5 min-w-[140px]
|
|
44
|
-
border border-edge rounded-lg
|
|
45
|
-
bg-surface-secondary text-content
|
|
46
|
-
text-[13px] font-medium
|
|
47
|
-
transition-colors duration-150
|
|
48
|
-
hover:border-content-tertiary
|
|
49
|
-
`,children:[T.jsx(qc,{size:14}),T.jsx("span",{className:"flex-1 text-left truncate",children:(c==null?void 0:c.name)||"选择项目"}),T.jsx(uy,{size:14})]}),i&&T.jsx("div",{className:`
|
|
50
|
-
absolute top-full left-0 mt-1
|
|
51
|
-
min-w-[220px]
|
|
52
|
-
bg-surface border border-edge
|
|
53
|
-
rounded-lg shadow-lg
|
|
54
|
-
z-50 overflow-hidden
|
|
55
|
-
animate-fade-in
|
|
56
|
-
`,children:e.map(h=>T.jsxs("button",{onClick:()=>f(h),className:`
|
|
57
|
-
flex items-center gap-2 w-full
|
|
58
|
-
px-3 py-2
|
|
59
|
-
text-[13px] text-left
|
|
60
|
-
transition-colors duration-150
|
|
61
|
-
hover:bg-surface-hover
|
|
62
|
-
${h.id===l?"bg-accent-light text-accent-text":"text-content"}
|
|
63
|
-
`,children:[T.jsx(qc,{size:14}),T.jsx("span",{className:"truncate",children:h.name})]},h.id))})]})},fy=()=>{const e=ke(a=>a.toggleSearch),t=ke(a=>a.toggleSettings),n=to(a=>a.toggleAIPanel),i=to(a=>a.aiPanelOpen);return T.jsxs("header",{className:`
|
|
64
|
-
h-14 flex items-center justify-between
|
|
65
|
-
px-5 border-b border-edge
|
|
66
|
-
bg-surface-secondary/80 backdrop-blur-md
|
|
67
|
-
shrink-0 z-10
|
|
68
|
-
`,children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsxs("div",{className:"flex items-center gap-2.5 select-none",children:[T.jsx(qc,{size:20}),T.jsx("span",{className:"font-semibold text-[15px] text-content",children:"Zread Browser"})]}),T.jsx("div",{className:"w-px h-6 bg-edge"}),T.jsx(dy,{})]}),T.jsxs("button",{onClick:e,className:`
|
|
69
|
-
flex items-center gap-2
|
|
70
|
-
px-3.5 py-2 min-w-[200px]
|
|
71
|
-
border border-edge rounded-lg
|
|
72
|
-
bg-surface-secondary text-content-tertiary
|
|
73
|
-
text-[13px]
|
|
74
|
-
transition-colors duration-150
|
|
75
|
-
hover:border-content-tertiary hover:text-content
|
|
76
|
-
`,children:[T.jsx(oy,{size:14}),T.jsx("span",{className:"flex-1 text-left",children:"搜索..."}),T.jsx("kbd",{className:"text-[11px] px-1.5 py-0.5 rounded bg-surface-tertiary border border-edge-light font-mono",children:"⌘K"})]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsxs("button",{onClick:n,"aria-pressed":i,className:`
|
|
77
|
-
flex items-center gap-1.5 px-3 py-1.5
|
|
78
|
-
rounded-lg border
|
|
79
|
-
transition-all duration-150
|
|
80
|
-
border-edge bg-surface-secondary text-content-tertiary
|
|
81
|
-
hover:bg-surface-hover hover:text-content
|
|
82
|
-
aria-pressed:border-accent
|
|
83
|
-
aria-pressed:bg-accent-light
|
|
84
|
-
aria-pressed:text-accent-text
|
|
85
|
-
aria-pressed:hover:bg-accent-light
|
|
86
|
-
`,title:"问问 AI",children:[T.jsx(cy,{size:14}),T.jsx("span",{className:"text-[13px] font-medium",children:"问问 AI"})]}),T.jsx("button",{onClick:t,className:`
|
|
87
|
-
w-9 h-9
|
|
88
|
-
flex items-center justify-center
|
|
89
|
-
rounded-lg border border-edge
|
|
90
|
-
bg-surface-secondary text-content-tertiary
|
|
91
|
-
hover:bg-surface-hover hover:text-content
|
|
92
|
-
transition-colors duration-150
|
|
93
|
-
`,title:"设置",children:T.jsx(ly,{size:18})})]})]})},h1=({size:e=14,rotated:t})=>T.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`shrink-0 transition-transform duration-150 ${t?"rotate-90":""}`,children:T.jsx("path",{d:"M9 18l6-6-6-6"})}),hy=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),T.jsx("line",{x1:"9",y1:"3",x2:"9",y2:"21"})]}),py=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),T.jsx("line",{x1:"14",y1:"3",x2:"14",y2:"21"})]});function my(e){const t=new Map;for(const i of e.pages){t.has(i.section)||t.set(i.section,{grouped:new Map,ungrouped:[]});const a=t.get(i.section);i.group?(a.grouped.has(i.group)||a.grouped.set(i.group,[]),a.grouped.get(i.group).push(i)):a.ungrouped.push(i)}const n=[];for(const[i,a]of t){const u=[];for(const[l,c]of a.grouped)u.push({name:l,pages:c});n.push({name:i,groups:u,ungroupedPages:a.ungrouped})}return{sections:n}}const p1=gt.memo(({page:e,isActive:t,onClick:n})=>{var y,x,k;const[i,a]=R.useState(!1),[u,l]=R.useState("bottom"),c=R.useRef(null),f=R.useRef(null),h=e.level==="Beginner"?"bg-accent-light text-accent-text border-accent/15":e.level==="Intermediate"?"bg-warning-light text-[#92400e] border-warning/15":"bg-danger-light text-[#991b1b] border-danger/15",m=R.useCallback(()=>{c.current=setTimeout(()=>{var _;const v=(_=f.current)==null?void 0:_.getBoundingClientRect();if(v){const A=v.top;l(A>80?"top":"bottom")}a(!0)},300)},[]),E=R.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),a(!1)},[]);return R.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]),T.jsxs("div",{className:"relative",children:[T.jsxs("button",{ref:f,onClick:n,"aria-selected":t,className:`
|
|
94
|
-
relative flex items-center w-full
|
|
95
|
-
pl-9 pr-2.5 py-[7px]
|
|
96
|
-
text-[13px] text-content
|
|
97
|
-
rounded-lg
|
|
98
|
-
transition-colors duration-150
|
|
99
|
-
hover:bg-surface-hover
|
|
100
|
-
aria-selected:bg-accent-light
|
|
101
|
-
aria-selected:text-accent-text
|
|
102
|
-
aria-selected:hover:bg-accent-light
|
|
103
|
-
`,onMouseEnter:m,onMouseLeave:E,children:[t&&T.jsx("div",{className:"absolute left-1 top-1/2 -translate-y-1/2 w-[3px] h-3/5 rounded-r-full bg-accent"}),T.jsx("span",{className:"truncate",children:e.title})]}),i&&T.jsxs("div",{className:`
|
|
104
|
-
fixed z-[1000]
|
|
105
|
-
bg-surface border border-edge
|
|
106
|
-
rounded-lg shadow-lg
|
|
107
|
-
p-2.5 min-w-[120px]
|
|
108
|
-
pointer-events-none
|
|
109
|
-
animate-fade-in
|
|
110
|
-
`,style:{left:((y=f.current)==null?void 0:y.getBoundingClientRect().left)??0,top:u==="top"?(((x=f.current)==null?void 0:x.getBoundingClientRect().top)??0)-60:(((k=f.current)==null?void 0:k.getBoundingClientRect().bottom)??0)+8},children:[T.jsx("div",{className:"text-[13px] font-semibold text-content mb-1.5 leading-snug",children:e.title}),T.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium leading-snug border ${h}`,children:e.level})]})]})}),gy=({name:e,pages:t,expanded:n,currentSlug:i,onToggle:a,onPageClick:u})=>T.jsxs("div",{children:[T.jsxs("button",{onClick:a,className:`
|
|
111
|
-
flex items-center gap-1.5 w-full text-left
|
|
112
|
-
pl-7 pr-2.5 py-1.5
|
|
113
|
-
text-[13px] font-medium text-content-secondary
|
|
114
|
-
rounded-lg
|
|
115
|
-
transition-colors duration-150
|
|
116
|
-
hover:bg-surface-hover
|
|
117
|
-
`,children:[T.jsx(h1,{size:11,rotated:n}),T.jsx("span",{className:"flex-1 truncate",children:e}),T.jsx("span",{className:"text-[11px] text-content-muted",children:t.length})]}),n&&T.jsx("div",{children:t.map(l=>T.jsx(p1,{page:l,isActive:l.slug===i,onClick:()=>u(l)},l.slug))})]}),Ey=({section:e,expanded:t,currentSlug:n,expandedGroups:i,onToggleSection:a,onToggleGroup:u,onPageClick:l})=>T.jsxs("div",{className:"mb-0.5",children:[T.jsxs("button",{onClick:a,className:`
|
|
118
|
-
flex items-center gap-2 w-full text-left
|
|
119
|
-
px-2.5 py-2
|
|
120
|
-
text-[13px] font-semibold text-content
|
|
121
|
-
rounded-lg
|
|
122
|
-
transition-colors duration-150
|
|
123
|
-
hover:bg-surface-hover
|
|
124
|
-
`,children:[T.jsx(h1,{size:12,rotated:t}),T.jsx("span",{className:"flex-1 truncate",children:e.name})]}),t&&T.jsxs("div",{children:[e.groups.map(c=>T.jsx(gy,{name:c.name,pages:c.pages,expanded:i.includes(`${e.name}::${c.name}`),currentSlug:n,onToggle:()=>u(`${e.name}::${c.name}`),onPageClick:l},c.name)),e.ungroupedPages.map(c=>T.jsx(p1,{page:c,isActive:c.slug===n,onClick:()=>l(c)},c.slug))]})]}),by=({section:e,isActive:t,currentSlug:n,onPageClick:i})=>{var k,v,_;const[a,u]=R.useState(!1),[l,c]=R.useState(!1),f=R.useRef(null),h=R.useRef(null),m=[...e.ungroupedPages,...e.groups.flatMap(A=>A.pages)],E=R.useCallback(()=>{f.current=setTimeout(()=>{var j;const A=(j=h.current)==null?void 0:j.getBoundingClientRect();A&&c(window.innerHeight-A.bottom<200),u(!0)},200)},[]),y=R.useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=null),u(!1)},[]),x=e.name.charAt(0).toUpperCase();return T.jsxs("div",{className:"relative",onMouseEnter:E,onMouseLeave:y,children:[T.jsx("button",{ref:h,className:`
|
|
125
|
-
w-9 h-9 rounded-lg text-[13px] font-semibold
|
|
126
|
-
flex items-center justify-center
|
|
127
|
-
transition-colors duration-150 cursor-pointer
|
|
128
|
-
${t?"bg-accent-light text-accent-text":"text-content-tertiary hover:bg-surface-hover hover:text-content"}
|
|
129
|
-
`,title:e.name,children:x}),a&&T.jsxs("div",{className:`
|
|
130
|
-
fixed z-[1000]
|
|
131
|
-
bg-surface border border-edge
|
|
132
|
-
rounded-lg shadow-lg
|
|
133
|
-
py-1.5 min-w-[180px] max-h-[400px] overflow-y-auto
|
|
134
|
-
pointer-events-auto
|
|
135
|
-
`,style:{left:(((k=h.current)==null?void 0:k.getBoundingClientRect().right)??0)+8,top:l?(((v=h.current)==null?void 0:v.getBoundingClientRect().bottom)??0)-Math.min(m.length*36+40,400):((_=h.current)==null?void 0:_.getBoundingClientRect().top)??0},onMouseEnter:()=>{f.current&&(clearTimeout(f.current),f.current=null)},onMouseLeave:y,children:[T.jsx("div",{className:"px-3 py-1.5 text-[11px] font-semibold text-content-muted uppercase tracking-wider",children:e.name}),e.groups.map(A=>T.jsxs("div",{children:[T.jsx("div",{className:"px-3 py-1 text-[11px] font-medium text-content-tertiary",children:A.name}),A.pages.map(j=>T.jsx("button",{onClick:()=>{i(j),u(!1)},className:`
|
|
136
|
-
w-full text-left px-4 py-1.5 text-[12px] truncate
|
|
137
|
-
transition-colors duration-100 cursor-pointer
|
|
138
|
-
${j.slug===n?"text-accent font-medium bg-accent-light":"text-content-secondary hover:bg-surface-hover hover:text-content"}
|
|
139
|
-
`,children:j.title},j.slug))]},A.name)),e.ungroupedPages.map(A=>T.jsx("button",{onClick:()=>{i(A),u(!1)},className:`
|
|
140
|
-
w-full text-left px-4 py-1.5 text-[12px] truncate
|
|
141
|
-
transition-colors duration-100 cursor-pointer
|
|
142
|
-
${A.slug===n?"text-accent font-medium bg-accent-light":"text-content-secondary hover:bg-surface-hover hover:text-content"}
|
|
143
|
-
`,children:A.title},A.slug))]})]})},xy=()=>{const e=ke(_=>_.currentWiki),t=ke(_=>_.currentView),n=ke(_=>_.config),i=ke(_=>_.expandedSections),a=ke(_=>_.expandedGroups),u=ke(_=>_.toggleSection),l=ke(_=>_.toggleGroup),c=ke(_=>_.setCurrentView),f=ke(_=>_.setCurrentWiki),h=ke(_=>_.setLoadingWiki);ke(_=>_.setLoadingPage);const m=ke(_=>_.sidebarOpen),E=ke(_=>_.toggleSidebar),y=n==null?void 0:n.lastOpenedProject;R.useEffect(()=>{if(!y){f(null),c(null);return}let _=!1;return h(!0),c(null),Sd(y).then(A=>{_||f(A)}).catch(A=>{console.error("Failed to load wiki:",A),_||f(null)}).finally(()=>{_||h(!1)}),()=>{_=!0}},[y,f,c,h]);const x=R.useMemo(()=>e?my(e):null,[e]);R.useEffect(()=>{var _;if(x&&x.sections.length>0){const A=x.sections.map(Y=>Y.name),j=x.sections.flatMap(Y=>Y.groups.map(B=>`${Y.name}::${B.name}`));ke.getState().setExpandedSections(A),ke.getState().setExpandedGroups(j);const F=x.sections[0],K=((_=F.groups[0])==null?void 0:_.pages[0])||F.ungroupedPages[0];K&&!v&&k(K)}},[x]);const k=async _=>{if(!y)return;const A=ke.getState().projects.find(F=>F.id===y),j=(A==null?void 0:A.currentVersion)||"latest";c({projectId:y,version:j,slug:_.slug,content:"",loading:!0,mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null});try{const F=await li(y,j,_.slug);c({projectId:y,version:j,slug:_.slug,content:F.content,loading:!1,mode:"read",editContent:null,isDirty:!1,fileMtime:F.mtime,conflictData:null})}catch(F){c({projectId:y,version:j,slug:_.slug,content:"",loading:!1,error:F instanceof Error?F.message:"Failed to load page",mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null})}},v=t==null?void 0:t.slug;return m?T.jsxs("aside",{className:"w-[260px] h-full border-r border-edge bg-surface-tertiary flex flex-col shrink-0 overflow-hidden shadow-[inset_-4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsxs("div",{className:`
|
|
144
|
-
flex items-center justify-between
|
|
145
|
-
px-4 py-3.5
|
|
146
|
-
border-b border-edge
|
|
147
|
-
text-[11px] font-semibold uppercase tracking-wider
|
|
148
|
-
text-content-muted select-none
|
|
149
|
-
`,children:[T.jsx("span",{children:"导航"}),T.jsx("button",{onClick:E,className:"p-1 rounded text-content-muted hover:text-content hover:bg-surface-hover transition-colors duration-150 cursor-pointer",title:"折叠导航",children:T.jsx(hy,{size:14})})]}),T.jsx("nav",{className:"flex-1 overflow-y-auto py-2 px-2",children:x?x.sections.length===0?T.jsx("div",{className:"px-4 py-6 text-center text-[13px] text-content-tertiary",children:"暂无内容"}):x.sections.map(_=>T.jsx(Ey,{section:_,expanded:i.includes(_.name),currentSlug:v,expandedGroups:a,onToggleSection:()=>u(_.name),onToggleGroup:A=>l(A),onPageClick:k},_.name)):T.jsx("div",{className:"px-4 py-6 text-center text-[13px] text-content-tertiary",children:y?"加载中...":"请先选择一个项目"})})]}):T.jsxs("aside",{className:"w-[48px] h-full border-r border-edge bg-surface-tertiary flex flex-col shrink-0 items-center py-3 gap-1 shadow-[inset_-4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsx("button",{onClick:E,className:"p-2 rounded-lg text-content-tertiary hover:bg-surface-hover hover:text-content transition-colors duration-150 cursor-pointer",title:"展开导航",children:T.jsx(py,{size:16})}),x==null?void 0:x.sections.map(_=>{const j=[..._.ungroupedPages,..._.groups.flatMap(F=>F.pages)].some(F=>F.slug===v);return T.jsx(by,{section:_,isActive:j,currentSlug:v,onPageClick:F=>{k(F)}},_.name)})]})};function g0(e){const t=[],n=String(e||"");let i=n.indexOf(","),a=0,u=!1;for(;!u;){i===-1&&(i=n.length,u=!0);const l=n.slice(a,i).trim();(l||!u)&&t.push(l),a=i+1,i=n.indexOf(",",a)}return t}function m1(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const yy=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ty=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ky={};function E0(e,t){return(ky.jsx?Ty:yy).test(e)}const Cy=/[ \t\n\f\r]/g;function wy(e){return typeof e=="object"?e.type==="text"?b0(e.value):!1:b0(e)}function b0(e){return e.replace(Cy,"")===""}class ba{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}ba.prototype.normal={};ba.prototype.property={};ba.prototype.space=void 0;function g1(e,t){const n={},i={};for(const a of e)Object.assign(n,a.property),Object.assign(i,a.normal);return new ba(n,i,t)}function ca(e){return e.toLowerCase()}class Jt{constructor(t,n){this.attribute=n,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let _y=0;const Pe=hi(),mt=hi(),Qc=hi(),se=hi(),tt=hi(),qi=hi(),on=hi();function hi(){return 2**++_y}const Gc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:mt,commaOrSpaceSeparated:on,commaSeparated:qi,number:se,overloadedBoolean:Qc,spaceSeparated:tt},Symbol.toStringTag,{value:"Module"})),Cc=Object.keys(Gc);class vd extends Jt{constructor(t,n,i,a){let u=-1;if(super(t,n),x0(this,"space",a),typeof i=="number")for(;++u<Cc.length;){const l=Cc[u];x0(this,Cc[u],(i&Gc[l])===Gc[l])}}}vd.prototype.defined=!0;function x0(e,t,n){n&&(e[t]=n)}function Zi(e){const t={},n={};for(const[i,a]of Object.entries(e.properties)){const u=new vd(i,e.transform(e.attributes||{},i),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(u.mustUseProperty=!0),t[i]=u,n[ca(i)]=i,n[ca(u.attribute)]=i}return new ba(t,n,e.space)}const E1=Zi({properties:{ariaActiveDescendant:null,ariaAtomic:mt,ariaAutoComplete:null,ariaBusy:mt,ariaChecked:mt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:tt,ariaCurrent:null,ariaDescribedBy:tt,ariaDetails:null,ariaDisabled:mt,ariaDropEffect:tt,ariaErrorMessage:null,ariaExpanded:mt,ariaFlowTo:tt,ariaGrabbed:mt,ariaHasPopup:null,ariaHidden:mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tt,ariaLevel:se,ariaLive:null,ariaModal:mt,ariaMultiLine:mt,ariaMultiSelectable:mt,ariaOrientation:null,ariaOwns:tt,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:mt,ariaReadOnly:mt,ariaRelevant:null,ariaRequired:mt,ariaRoleDescription:tt,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:mt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function b1(e,t){return t in e?e[t]:t}function x1(e,t){return b1(e,t.toLowerCase())}const Sy=Zi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qi,acceptCharset:tt,accessKey:tt,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:tt,autoFocus:Pe,autoPlay:Pe,blocking:tt,capture:null,charSet:null,checked:Pe,cite:null,className:tt,cols:se,colSpan:null,content:null,contentEditable:mt,controls:Pe,controlsList:tt,coords:se|qi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Qc,draggable:mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:tt,height:se,hidden:Qc,high:se,href:null,hrefLang:null,htmlFor:tt,httpEquiv:tt,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:tt,itemRef:tt,itemScope:Pe,itemType:tt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,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:Pe,optimum:se,pattern:null,ping:tt,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:tt,required:Pe,reversed:Pe,rows:se,rowSpan:se,sandbox:tt,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:mt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tt,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:mt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:x1}),vy=Zi({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:on,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:tt,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:qi,g2:qi,glyphName:qi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:on,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:on,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:on,rev:on,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:on,requiredFeatures:on,requiredFonts:on,requiredFormats:on,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:on,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:on,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:on,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:b1}),y1=Zi({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()}}),T1=Zi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:x1}),k1=Zi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ay={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"},Ny=/[A-Z]/g,y0=/-[a-z]/g,Iy=/^data[-\w.:]+$/i;function go(e,t){const n=ca(t);let i=t,a=Jt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Iy.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(y0,Ry);i="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!y0.test(u)){let l=u.replace(Ny,Ly);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=vd}return new a(i,t)}function Ly(e){return"-"+e.toLowerCase()}function Ry(e){return e.charAt(1).toUpperCase()}const xa=g1([E1,Sy,y1,T1,k1],"html"),Fr=g1([E1,vy,y1,T1,k1],"svg");function T0(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function C1(e){return e.join(" ").trim()}var zi={},wc,k0;function Oy(){if(k0)return wc;k0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
150
|
-
`,h="/",m="*",E="",y="comment",x="declaration";function k(_,A){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];A=A||{};var j=1,F=1;function K(he){var te=he.match(t);te&&(j+=te.length);var X=he.lastIndexOf(f);F=~X?he.length-X:F+he.length}function Y(){var he={line:j,column:F};return function(te){return te.position=new B(he),de(),te}}function B(he){this.start=he,this.end={line:j,column:F},this.source=A.source}B.prototype.content=_;function ae(he){var te=new Error(A.source+":"+j+":"+F+": "+he);if(te.reason=he,te.filename=A.source,te.line=j,te.column=F,te.source=_,!A.silent)throw te}function q(he){var te=he.exec(_);if(te){var X=te[0];return K(X),_=_.slice(X.length),te}}function de(){q(n)}function H(he){var te;for(he=he||[];te=ue();)te!==!1&&he.push(te);return he}function ue(){var he=Y();if(!(h!=_.charAt(0)||m!=_.charAt(1))){for(var te=2;E!=_.charAt(te)&&(m!=_.charAt(te)||h!=_.charAt(te+1));)++te;if(te+=2,E===_.charAt(te-1))return ae("End of comment missing");var X=_.slice(2,te-2);return F+=2,K(X),_=_.slice(te),F+=2,he({type:y,comment:X})}}function le(){var he=Y(),te=q(i);if(te){if(ue(),!q(a))return ae("property missing ':'");var X=q(u),fe=he({type:x,property:v(te[0].replace(e,E)),value:X?v(X[0].replace(e,E)):E});return q(l),fe}}function _e(){var he=[];H(he);for(var te;te=le();)te!==!1&&(he.push(te),H(he));return he}return de(),_e()}function v(_){return _?_.replace(c,E):E}return wc=k,wc}var C0;function Py(){if(C0)return zi;C0=1;var e=zi&&zi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(zi,"__esModule",{value:!0}),zi.default=n;const t=e(Oy());function n(i,a){let u=null;if(!i||typeof i!="string")return u;const l=(0,t.default)(i),c=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:m}=f;c?a(h,m,f):m&&(u=u||{},u[h]=m)}),u}return zi}var zs={},w0;function Dy(){if(w0)return zs;w0=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},l=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},f=function(h,m){return m===void 0&&(m={}),u(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(a,c):h=h.replace(i,c),h.replace(t,l))};return zs.camelCase=f,zs}var $s,_0;function My(){if(_0)return $s;_0=1;var e=$s&&$s.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Py()),n=Dy();function i(a,u){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(c,f){c&&f&&(l[(0,n.camelCase)(c,u)]=f)}),l}return i.default=i,$s=i,$s}var By=My();const Fy=ga(By),Eo=w1("end"),$n=w1("start");function w1(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function _1(e){const t=$n(e),n=Eo(e);if(t&&n)return{start:t,end:n}}function ta(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?S0(e.position):"start"in e||"end"in e?S0(e):"line"in e||"column"in e?Kc(e):""}function Kc(e){return v0(e&&e.line)+":"+v0(e&&e.column)}function S0(e){return Kc(e&&e.start)+"-"+Kc(e&&e.end)}function v0(e){return e&&typeof e=="number"?e:1}class Mt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let a="",u={},l=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?a=t:!u.cause&&t&&(l=!0,a=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?u.ruleId=i:(u.source=i.slice(0,f),u.ruleId=i.slice(f+1))}if(!u.place&&u.ancestors&&u.ancestors){const f=u.ancestors[u.ancestors.length-1];f&&(u.place=f.position)}const c=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=ta(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=l&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mt.prototype.file="";Mt.prototype.name="";Mt.prototype.reason="";Mt.prototype.message="";Mt.prototype.stack="";Mt.prototype.column=void 0;Mt.prototype.line=void 0;Mt.prototype.ancestors=void 0;Mt.prototype.cause=void 0;Mt.prototype.fatal=void 0;Mt.prototype.place=void 0;Mt.prototype.ruleId=void 0;Mt.prototype.source=void 0;const Ad={}.hasOwnProperty,jy=new Map,Hy=/[A-Z]/g,Uy=new Set(["table","tbody","thead","tfoot","tr"]),zy=new Set(["td","th"]),S1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function v1(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=Ky(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");i=Gy(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?Fr:xa,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=A1(a,e,void 0);return u&&typeof u!="string"?u:a.create(e,a.Fragment,{children:u||void 0},void 0)}function A1(e,t,n){if(t.type==="element")return $y(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Vy(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Yy(e,t,n);if(t.type==="mdxjsEsm")return Wy(e,t);if(t.type==="root")return qy(e,t,n);if(t.type==="text")return Qy(e,t)}function $y(e,t,n){const i=e.schema;let a=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(a=Fr,e.schema=a),e.ancestors.push(t);const u=I1(e,t.tagName,!1),l=Xy(e,t);let c=Id(e,t);return Uy.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!wy(f):!0})),N1(e,l,u,t),Nd(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function Vy(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}da(e,t.position)}function Wy(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);da(e,t.position)}function Yy(e,t,n){const i=e.schema;let a=i;t.name==="svg"&&i.space==="html"&&(a=Fr,e.schema=a),e.ancestors.push(t);const u=t.name===null?e.Fragment:I1(e,t.name,!0),l=Zy(e,t),c=Id(e,t);return N1(e,l,u,t),Nd(l,c),e.ancestors.pop(),e.schema=i,e.create(t,u,l,n)}function qy(e,t,n){const i={};return Nd(i,Id(e,t)),e.create(t,e.Fragment,i,n)}function Qy(e,t){return t.value}function N1(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Nd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gy(e,t,n){return i;function i(a,u,l,c){const h=Array.isArray(l.children)?n:t;return c?h(u,l,c):h(u,l)}}function Ky(e,t){return n;function n(i,a,u,l){const c=Array.isArray(u.children),f=$n(i);return t(a,u,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function Xy(e,t){const n={};let i,a;for(a in t.properties)if(a!=="children"&&Ad.call(t.properties,a)){const u=Jy(e,a,t.properties[a]);if(u){const[l,c]=u;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&zy.has(t.tagName)?i=c:n[l]=c}}if(i){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function Zy(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const u=i.data.estree.body[0];u.type;const l=u.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else da(e,t.position);else{const a=i.name;let u;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,u=e.evaluater.evaluateExpression(c.expression)}else da(e,t.position);else u=i.value===null?!0:i.value;n[a]=u}return n}function Id(e,t){const n=[];let i=-1;const a=e.passKeys?new Map:jy;for(;++i<t.children.length;){const u=t.children[i];let l;if(e.passKeys){const f=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(f){const h=a.get(f)||0;l=f+"-"+h,a.set(f,h+1)}}const c=A1(e,u,l);c!==void 0&&n.push(c)}return n}function Jy(e,t,n){const i=go(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?m1(n):C1(n)),i.property==="style"){let a=typeof n=="object"?n:eT(e,String(n));return e.stylePropertyNameCase==="css"&&(a=tT(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&i.space?Ay[i.property]||i.property:i.attribute,n]}}function eT(e,t){try{return Fy(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,a=new Mt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=S1+"#cannot-parse-style-attribute",a}}function I1(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let u=-1,l;for(;++u<a.length;){const c=E0(a[u])?{type:"Identifier",name:a[u]}:{type:"Literal",value:a[u]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(u&&c.type==="Literal"),optional:!1}:c}i=l}else i=E0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const a=i.value;return Ad.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(i);da(e)}function da(e,t){const n=new Mt("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=S1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function tT(e){const t={};let n;for(n in e)Ad.call(e,n)&&(t[nT(n)]=e[n]);return t}function nT(e){let t=e.replace(Hy,rT);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rT(e){return"-"+e.toLowerCase()}const Qi={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"]},iT={};function Ld(e,t){const n=iT,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return L1(e,i,a)}function L1(e,t,n){if(sT(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 A0(e.children,t,n)}return Array.isArray(e)?A0(e,t,n):""}function A0(e,t,n){const i=[];let a=-1;for(;++a<e.length;)i[a]=L1(e[a],t,n);return i.join("")}function sT(e){return!!(e&&typeof e=="object")}const N0=document.createElement("i");function Rd(e){const t="&"+e+";";N0.innerHTML=t;const n=N0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ln(e,t,n,i){const a=e.length;let u=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);u<i.length;)l=i.slice(u,u+1e4),l.unshift(t,0),e.splice(...l),u+=1e4,t+=1e4}function bn(e,t){return e.length>0?(ln(e,e.length,0,t),e):t}const I0={}.hasOwnProperty;function R1(e){const t={};let n=-1;for(;++n<e.length;)aT(t,e[n]);return t}function aT(e,t){let n;for(n in t){const a=(I0.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let l;if(u)for(l in u){I0.call(a,l)||(a[l]=[]);const c=u[l];uT(a[l],Array.isArray(c)?c:c?[c]:[])}}}function uT(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);ln(e,0,0,i)}function O1(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 Ln(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=jr(/[A-Za-z]/),Dt=jr(/[\dA-Za-z]/),oT=jr(/[#-'*+\--9=?A-Z^-~]/);function no(e){return e!==null&&(e<32||e===127)}const Xc=jr(/\d/),lT=jr(/[\dA-Fa-f]/),cT=jr(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function Ze(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const bo=jr(new RegExp("\\p{P}|\\p{S}","u")),ci=jr(/\s/);function jr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ji(e){const t=[];let n=-1,i=0,a=0;for(;++n<e.length;){const u=e.charCodeAt(n);let l="";if(u===37&&Dt(e.charCodeAt(n+1))&&Dt(e.charCodeAt(n+2)))a=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(l=String.fromCharCode(u));else if(u>55295&&u<57344){const c=e.charCodeAt(n+1);u<56320&&c>56319&&c<57344?(l=String.fromCharCode(u,c),a=1):l="�"}else l=String.fromCharCode(u);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(i)}function $e(e,t,n,i){const a=i?i-1:Number.POSITIVE_INFINITY;let u=0;return l;function l(f){return ze(f)?(e.enter(n),c(f)):t(f)}function c(f){return ze(f)&&u++<a?(e.consume(f),c):(e.exit(n),t(f))}}const dT={tokenize:fT};function fT(e){const t=e.attempt(this.parser.constructs.contentInitial,i,a);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),$e(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),u(c)}function u(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Ie(c)?(e.consume(c),e.exit("chunkText"),u):(e.consume(c),l)}}const hT={tokenize:pT},L0={tokenize:mT};function pT(e){const t=this,n=[];let i=0,a,u,l;return c;function c(F){if(i<n.length){const K=n[i];return t.containerState=K[1],e.attempt(K[0].continuation,f,h)(F)}return h(F)}function f(F){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&j();const K=t.events.length;let Y=K,B;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){B=t.events[Y][1].end;break}A(i);let ae=K;for(;ae<t.events.length;)t.events[ae][1].end={...B},ae++;return ln(t.events,Y+1,0,t.events.slice(K)),t.events.length=ae,h(F)}return c(F)}function h(F){if(i===n.length){if(!a)return y(F);if(a.currentConstruct&&a.currentConstruct.concrete)return k(F);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(L0,m,E)(F)}function m(F){return a&&j(),A(i),y(F)}function E(F){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,k(F)}function y(F){return t.containerState={},e.attempt(L0,x,k)(F)}function x(F){return i++,n.push([t.currentConstruct,t.containerState]),y(F)}function k(F){if(F===null){a&&j(),A(0),e.consume(F);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:u}),v(F)}function v(F){if(F===null){_(e.exit("chunkFlow"),!0),A(0),e.consume(F);return}return Ie(F)?(e.consume(F),_(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(F),v)}function _(F,K){const Y=t.sliceStream(F);if(K&&Y.push(null),F.previous=u,u&&(u.next=F),u=F,a.defineSkip(F.start),a.write(Y),t.parser.lazy[F.start.line]){let B=a.events.length;for(;B--;)if(a.events[B][1].start.offset<l&&(!a.events[B][1].end||a.events[B][1].end.offset>l))return;const ae=t.events.length;let q=ae,de,H;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){if(de){H=t.events[q][1].end;break}de=!0}for(A(i),B=ae;B<t.events.length;)t.events[B][1].end={...H},B++;ln(t.events,q+1,0,t.events.slice(ae)),t.events.length=B}}function A(F){let K=n.length;for(;K-- >F;){const Y=n[K];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=F}function j(){a.write([null]),u=void 0,a=void 0,t.containerState._closeFlow=void 0}}function mT(e,t,n){return $e(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Gi(e){if(e===null||Ze(e)||ci(e))return 1;if(bo(e))return 2}function xo(e,t,n){const i=[];let a=-1;for(;++a<e.length;){const u=e[a].resolveAll;u&&!i.includes(u)&&(t=u(t,n),i.push(u))}return t}const Zc={name:"attention",resolveAll:gT,tokenize:ET};function gT(e,t){let n=-1,i,a,u,l,c,f,h,m;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E={...e[i][1].end},y={...e[n][1].start};R0(E,-f),R0(y,f),l={type:f>1?"strongSequence":"emphasisSequence",start:E,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},u={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=bn(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=bn(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",u,t]]),h=bn(h,xo(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=bn(h,[["exit",u,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=bn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,ln(e,i-1,n-i+3,h),n=i+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ET(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,a=Gi(i);let u;return l;function l(f){return u=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===u)return e.consume(f),c;const h=e.exit("attentionSequence"),m=Gi(f),E=!m||m===2&&a||n.includes(f),y=!a||a===2&&m||n.includes(i);return h._open=!!(u===42?E:E&&(a||!y)),h._close=!!(u===42?y:y&&(m||!E)),t(f)}}function R0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const bT={name:"autolink",tokenize:xT};function xT(e,t,n){let i=0;return a;function a(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return Ut(x)?(e.consume(x),l):x===64?n(x):h(x)}function l(x){return x===43||x===45||x===46||Dt(x)?(i=1,c(x)):h(x)}function c(x){return x===58?(e.consume(x),i=0,f):(x===43||x===45||x===46||Dt(x))&&i++<32?(e.consume(x),c):(i=0,h(x))}function f(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||no(x)?n(x):(e.consume(x),f)}function h(x){return x===64?(e.consume(x),m):oT(x)?(e.consume(x),h):n(x)}function m(x){return Dt(x)?E(x):n(x)}function E(x){return x===46?(e.consume(x),i=0,m):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):y(x)}function y(x){if((x===45||Dt(x))&&i++<63){const k=x===45?y:E;return e.consume(x),k}return n(x)}}const ya={partial:!0,tokenize:yT};function yT(e,t,n){return i;function i(u){return ze(u)?$e(e,a,"linePrefix")(u):a(u)}function a(u){return u===null||Ie(u)?t(u):n(u)}}const P1={continuation:{tokenize:kT},exit:CT,name:"blockQuote",tokenize:TT};function TT(e,t,n){const i=this;return a;function a(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),u}return n(l)}function u(l){return ze(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function kT(e,t,n){const i=this;return a;function a(l){return ze(l)?$e(e,u,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):u(l)}function u(l){return e.attempt(P1,t,n)(l)}}function CT(e){e.exit("blockQuote")}const D1={name:"characterEscape",tokenize:wT};function wT(e,t,n){return i;function i(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),a}function a(u){return cT(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const M1={name:"characterReference",tokenize:_T};function _T(e,t,n){const i=this;let a=0,u,l;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),f}function f(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,l=Dt,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,l=lT,m):(e.enter("characterReferenceValue"),u=7,l=Xc,m(E))}function m(E){if(E===59&&a){const y=e.exit("characterReferenceValue");return l===Dt&&!Rd(i.sliceSerialize(y))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(E)&&a++<u?(e.consume(E),m):n(E)}}const O0={partial:!0,tokenize:vT},P0={concrete:!0,name:"codeFenced",tokenize:ST};function ST(e,t,n){const i=this,a={partial:!0,tokenize:Y};let u=0,l=0,c;return f;function f(B){return h(B)}function h(B){const ae=i.events[i.events.length-1];return u=ae&&ae[1].type==="linePrefix"?ae[2].sliceSerialize(ae[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(B)}function m(B){return B===c?(l++,e.consume(B),m):l<3?n(B):(e.exit("codeFencedFenceSequence"),ze(B)?$e(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Ie(B)?(e.exit("codeFencedFence"),i.interrupt?t(B):e.check(O0,v,K)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(B))}function y(B){return B===null||Ie(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):ze(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),$e(e,x,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),y)}function x(B){return B===null||Ie(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(B))}function k(B){return B===null||Ie(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),k)}function v(B){return e.attempt(a,K,_)(B)}function _(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),A}function A(B){return u>0&&ze(B)?$e(e,j,"linePrefix",u+1)(B):j(B)}function j(B){return B===null||Ie(B)?e.check(O0,v,K)(B):(e.enter("codeFlowValue"),F(B))}function F(B){return B===null||Ie(B)?(e.exit("codeFlowValue"),j(B)):(e.consume(B),F)}function K(B){return e.exit("codeFenced"),t(B)}function Y(B,ae,q){let de=0;return H;function H(te){return B.enter("lineEnding"),B.consume(te),B.exit("lineEnding"),ue}function ue(te){return B.enter("codeFencedFence"),ze(te)?$e(B,le,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):le(te)}function le(te){return te===c?(B.enter("codeFencedFenceSequence"),_e(te)):q(te)}function _e(te){return te===c?(de++,B.consume(te),_e):de>=l?(B.exit("codeFencedFenceSequence"),ze(te)?$e(B,he,"whitespace")(te):he(te)):q(te)}function he(te){return te===null||Ie(te)?(B.exit("codeFencedFence"),ae(te)):q(te)}}}function vT(e,t,n){const i=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const _c={name:"codeIndented",tokenize:NT},AT={partial:!0,tokenize:IT};function NT(e,t,n){const i=this;return a;function a(h){return e.enter("codeIndented"),$e(e,u,"linePrefix",5)(h)}function u(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Ie(h)?e.attempt(AT,l,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ie(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function IT(e,t,n){const i=this;return a;function a(l){return i.parser.lazy[i.now().line]?n(l):Ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):$e(e,u,"linePrefix",5)(l)}function u(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Ie(l)?a(l):n(l)}}const LT={name:"codeText",previous:OT,resolve:RT,tokenize:PT};function RT(e){let t=e.length-4,n=3,i,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)a===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(a=i):(i===t||e[i][1].type==="lineEnding")&&(e[a][1].type="codeTextData",i!==a+2&&(e[a][1].end=e[i-1][1].end,e.splice(a+2,i-a-2),t-=i-a-2,i=a+2),a=void 0);return e}function OT(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function PT(e,t,n){let i=0,a,u;return l;function l(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),i++,c):(e.exit("codeTextSequence"),f(E))}function f(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),f):E===96?(u=e.enter("codeTextSequence"),a=0,m(E)):Ie(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Ie(E)?(e.exit("codeTextData"),f(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),a++,m):a===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(u.type="codeTextData",h(E))}}class DT{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const a=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return i&&Vs(this.left,i),u.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),Vs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Vs(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);Vs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Vs(this.left,n.reverse())}}}function Vs(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 B1(e){const t={};let n=-1,i,a,u,l,c,f,h;const m=new DT(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(i=m.get(n),n&&i[1].type==="chunkFlow"&&m.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,u=0,u<f.length&&f[u][1].type==="lineEndingBlank"&&(u+=2),u<f.length&&f[u][1].type==="content"))for(;++u<f.length&&f[u][1].type!=="content";)f[u][1].type==="chunkText"&&(f[u][1]._isInFirstContentOfListItem=!0,u++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,MT(m,n)),n=t[n],h=!0);else if(i[1]._container){for(u=n,a=void 0;u--;)if(l=m.get(u),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(m.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=u);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(i[1].end={...m.get(a)[1].start},c=m.slice(a,n),c.unshift(i),m.splice(a,n-a+1,c))}}return ln(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function MT(e,t){const n=e.get(t)[1],i=e.get(t)[2];let a=t-1;const u=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],h={};let m,E,y=-1,x=n,k=0,v=0;const _=[v];for(;x;){for(;e.get(++a)[1]!==x;);u.push(a),x._tokenizer||(m=i.sliceStream(x),x.next||m.push(null),E&&l.defineSkip(x.start),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(m),x._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),E=x,x=x.next}for(x=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(v=y+1,_.push(v),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(l.events=[],x?(x._tokenizer=void 0,x.previous=void 0):_.pop(),y=_.length;y--;){const A=c.slice(_[y],_[y+1]),j=u.pop();f.push([j,j+A.length-1]),e.splice(j,2,A)}for(f.reverse(),y=-1;++y<f.length;)h[k+f[y][0]]=k+f[y][1],k+=f[y][1]-f[y][0]-1;return h}const BT={resolve:jT,tokenize:HT},FT={partial:!0,tokenize:UT};function jT(e){return B1(e),e}function HT(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?u(c):Ie(c)?e.check(FT,l,u)(c):(e.consume(c),a)}function u(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function UT(e,t,n){const i=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),$e(e,u,"linePrefix")}function u(l){if(l===null||Ie(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function F1(e,t,n,i,a,u,l,c,f){const h=f||Number.POSITIVE_INFINITY;let m=0;return E;function E(A){return A===60?(e.enter(i),e.enter(a),e.enter(u),e.consume(A),e.exit(u),y):A===null||A===32||A===41||no(A)?n(A):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),v(A))}function y(A){return A===62?(e.enter(u),e.consume(A),e.exit(u),e.exit(a),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),x(A))}function x(A){return A===62?(e.exit("chunkString"),e.exit(c),y(A)):A===null||A===60||Ie(A)?n(A):(e.consume(A),A===92?k:x)}function k(A){return A===60||A===62||A===92?(e.consume(A),x):x(A)}function v(A){return!m&&(A===null||A===41||Ze(A))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(A)):m<h&&A===40?(e.consume(A),m++,v):A===41?(e.consume(A),m--,v):A===null||A===32||A===40||no(A)?n(A):(e.consume(A),A===92?_:v)}function _(A){return A===40||A===41||A===92?(e.consume(A),v):v(A)}}function j1(e,t,n,i,a,u){const l=this;let c=0,f;return h;function h(x){return e.enter(i),e.enter(a),e.consume(x),e.exit(a),e.enter(u),m}function m(x){return c>999||x===null||x===91||x===93&&!f||x===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(x):x===93?(e.exit(u),e.enter(a),e.consume(x),e.exit(a),e.exit(i),t):Ie(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===null||x===91||x===93||Ie(x)||c++>999?(e.exit("chunkString"),m(x)):(e.consume(x),f||(f=!ze(x)),x===92?y:E)}function y(x){return x===91||x===92||x===93?(e.consume(x),c++,E):E(x)}}function H1(e,t,n,i,a,u){let l;return c;function c(y){return y===34||y===39||y===40?(e.enter(i),e.enter(a),e.consume(y),e.exit(a),l=y===40?41:y,f):n(y)}function f(y){return y===l?(e.enter(a),e.consume(y),e.exit(a),e.exit(i),t):(e.enter(u),h(y))}function h(y){return y===l?(e.exit(u),f(l)):y===null?n(y):Ie(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),$e(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===l||y===null||Ie(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?E:m)}function E(y){return y===l||y===92?(e.consume(y),m):m(y)}}function na(e,t){let n;return i;function i(a){return Ie(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,i):ze(a)?$e(e,i,n?"linePrefix":"lineSuffix")(a):t(a)}}const zT={name:"definition",tokenize:VT},$T={partial:!0,tokenize:WT};function VT(e,t,n){const i=this;let a;return u;function u(x){return e.enter("definition"),l(x)}function l(x){return j1.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function c(x){return a=Ln(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return Ze(x)?na(e,h)(x):h(x)}function h(x){return F1(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function m(x){return e.attempt($T,E,E)(x)}function E(x){return ze(x)?$e(e,y,"whitespace")(x):y(x)}function y(x){return x===null||Ie(x)?(e.exit("definition"),i.parser.defined.push(a),t(x)):n(x)}}function WT(e,t,n){return i;function i(c){return Ze(c)?na(e,a)(c):n(c)}function a(c){return H1(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function u(c){return ze(c)?$e(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ie(c)?t(c):n(c)}}const YT={name:"hardBreakEscape",tokenize:qT};function qT(e,t,n){return i;function i(u){return e.enter("hardBreakEscape"),e.consume(u),a}function a(u){return Ie(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const QT={name:"headingAtx",resolve:GT,tokenize:KT};function GT(e,t){let n=e.length-2,i=3,a,u;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(a={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},u={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},ln(e,i,n-i+1,[["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t]])),e}function KT(e,t,n){let i=0;return a;function a(m){return e.enter("atxHeading"),u(m)}function u(m){return e.enter("atxHeadingSequence"),l(m)}function l(m){return m===35&&i++<6?(e.consume(m),l):m===null||Ze(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),f(m)):m===null||Ie(m)?(e.exit("atxHeading"),t(m)):ze(m)?$e(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function f(m){return m===35?(e.consume(m),f):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||Ze(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const XT=["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"],D0=["pre","script","style","textarea"],ZT={concrete:!0,name:"htmlFlow",resolveTo:tk,tokenize:nk},JT={partial:!0,tokenize:ik},ek={partial:!0,tokenize:rk};function tk(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 nk(e,t,n){const i=this;let a,u,l,c,f;return h;function h(L){return m(L)}function m(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),E}function E(L){return L===33?(e.consume(L),y):L===47?(e.consume(L),u=!0,v):L===63?(e.consume(L),a=3,i.interrupt?t:w):Ut(L)?(e.consume(L),l=String.fromCharCode(L),_):n(L)}function y(L){return L===45?(e.consume(L),a=2,x):L===91?(e.consume(L),a=5,c=0,k):Ut(L)?(e.consume(L),a=4,i.interrupt?t:w):n(L)}function x(L){return L===45?(e.consume(L),i.interrupt?t:w):n(L)}function k(L){const Se="CDATA[";return L===Se.charCodeAt(c++)?(e.consume(L),c===Se.length?i.interrupt?t:le:k):n(L)}function v(L){return Ut(L)?(e.consume(L),l=String.fromCharCode(L),_):n(L)}function _(L){if(L===null||L===47||L===62||Ze(L)){const Se=L===47,Ee=l.toLowerCase();return!Se&&!u&&D0.includes(Ee)?(a=1,i.interrupt?t(L):le(L)):XT.includes(l.toLowerCase())?(a=6,Se?(e.consume(L),A):i.interrupt?t(L):le(L)):(a=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(L):u?j(L):F(L))}return L===45||Dt(L)?(e.consume(L),l+=String.fromCharCode(L),_):n(L)}function A(L){return L===62?(e.consume(L),i.interrupt?t:le):n(L)}function j(L){return ze(L)?(e.consume(L),j):H(L)}function F(L){return L===47?(e.consume(L),H):L===58||L===95||Ut(L)?(e.consume(L),K):ze(L)?(e.consume(L),F):H(L)}function K(L){return L===45||L===46||L===58||L===95||Dt(L)?(e.consume(L),K):Y(L)}function Y(L){return L===61?(e.consume(L),B):ze(L)?(e.consume(L),Y):F(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),f=L,ae):ze(L)?(e.consume(L),B):q(L)}function ae(L){return L===f?(e.consume(L),f=null,de):L===null||Ie(L)?n(L):(e.consume(L),ae)}function q(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Ze(L)?Y(L):(e.consume(L),q)}function de(L){return L===47||L===62||ze(L)?F(L):n(L)}function H(L){return L===62?(e.consume(L),ue):n(L)}function ue(L){return L===null||Ie(L)?le(L):ze(L)?(e.consume(L),ue):n(L)}function le(L){return L===45&&a===2?(e.consume(L),X):L===60&&a===1?(e.consume(L),fe):L===62&&a===4?(e.consume(L),M):L===63&&a===3?(e.consume(L),w):L===93&&a===5?(e.consume(L),pe):Ie(L)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(JT,Q,_e)(L)):L===null||Ie(L)?(e.exit("htmlFlowData"),_e(L)):(e.consume(L),le)}function _e(L){return e.check(ek,he,Q)(L)}function he(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),te}function te(L){return L===null||Ie(L)?_e(L):(e.enter("htmlFlowData"),le(L))}function X(L){return L===45?(e.consume(L),w):le(L)}function fe(L){return L===47?(e.consume(L),l="",Z):le(L)}function Z(L){if(L===62){const Se=l.toLowerCase();return D0.includes(Se)?(e.consume(L),M):le(L)}return Ut(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),Z):le(L)}function pe(L){return L===93?(e.consume(L),w):le(L)}function w(L){return L===62?(e.consume(L),M):L===45&&a===2?(e.consume(L),w):le(L)}function M(L){return L===null||Ie(L)?(e.exit("htmlFlowData"),Q(L)):(e.consume(L),M)}function Q(L){return e.exit("htmlFlow"),t(L)}}function rk(e,t,n){const i=this;return a;function a(l){return Ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),u):n(l)}function u(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function ik(e,t,n){return i;function i(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ya,t,n)}}const sk={name:"htmlText",tokenize:ak};function ak(e,t,n){const i=this;let a,u,l;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),f}function f(w){return w===33?(e.consume(w),h):w===47?(e.consume(w),Y):w===63?(e.consume(w),F):Ut(w)?(e.consume(w),q):n(w)}function h(w){return w===45?(e.consume(w),m):w===91?(e.consume(w),u=0,k):Ut(w)?(e.consume(w),j):n(w)}function m(w){return w===45?(e.consume(w),x):n(w)}function E(w){return w===null?n(w):w===45?(e.consume(w),y):Ie(w)?(l=E,fe(w)):(e.consume(w),E)}function y(w){return w===45?(e.consume(w),x):E(w)}function x(w){return w===62?X(w):w===45?y(w):E(w)}function k(w){const M="CDATA[";return w===M.charCodeAt(u++)?(e.consume(w),u===M.length?v:k):n(w)}function v(w){return w===null?n(w):w===93?(e.consume(w),_):Ie(w)?(l=v,fe(w)):(e.consume(w),v)}function _(w){return w===93?(e.consume(w),A):v(w)}function A(w){return w===62?X(w):w===93?(e.consume(w),A):v(w)}function j(w){return w===null||w===62?X(w):Ie(w)?(l=j,fe(w)):(e.consume(w),j)}function F(w){return w===null?n(w):w===63?(e.consume(w),K):Ie(w)?(l=F,fe(w)):(e.consume(w),F)}function K(w){return w===62?X(w):F(w)}function Y(w){return Ut(w)?(e.consume(w),B):n(w)}function B(w){return w===45||Dt(w)?(e.consume(w),B):ae(w)}function ae(w){return Ie(w)?(l=ae,fe(w)):ze(w)?(e.consume(w),ae):X(w)}function q(w){return w===45||Dt(w)?(e.consume(w),q):w===47||w===62||Ze(w)?de(w):n(w)}function de(w){return w===47?(e.consume(w),X):w===58||w===95||Ut(w)?(e.consume(w),H):Ie(w)?(l=de,fe(w)):ze(w)?(e.consume(w),de):X(w)}function H(w){return w===45||w===46||w===58||w===95||Dt(w)?(e.consume(w),H):ue(w)}function ue(w){return w===61?(e.consume(w),le):Ie(w)?(l=ue,fe(w)):ze(w)?(e.consume(w),ue):de(w)}function le(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),a=w,_e):Ie(w)?(l=le,fe(w)):ze(w)?(e.consume(w),le):(e.consume(w),he)}function _e(w){return w===a?(e.consume(w),a=void 0,te):w===null?n(w):Ie(w)?(l=_e,fe(w)):(e.consume(w),_e)}function he(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Ze(w)?de(w):(e.consume(w),he)}function te(w){return w===47||w===62||Ze(w)?de(w):n(w)}function X(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function fe(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),Z}function Z(w){return ze(w)?$e(e,pe,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):pe(w)}function pe(w){return e.enter("htmlTextData"),l(w)}}const Od={name:"labelEnd",resolveAll:ck,resolveTo:dk,tokenize:fk},uk={tokenize:hk},ok={tokenize:pk},lk={tokenize:mk};function ck(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const a=i.type==="labelImage"?4:2;i.type="data",t+=a}}return e.length!==n.length&&ln(e,0,e.length,n),e}function dk(e,t){let n=e.length,i=0,a,u,l,c;for(;n--;)if(a=e[n][1],u){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(u=n,a.type!=="labelLink")){i=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[l][1].end}},m={type:"labelText",start:{...e[u+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=bn(c,e.slice(u+1,u+i+3)),c=bn(c,[["enter",m,t]]),c=bn(c,xo(t.parser.constructs.insideSpan.null,e.slice(u+i+4,l-3),t)),c=bn(c,[["exit",m,t],e[l-2],e[l-1],["exit",h,t]]),c=bn(c,e.slice(l+1)),c=bn(c,[["exit",f,t]]),ln(e,u,e.length,c),e}function fk(e,t,n){const i=this;let a=i.events.length,u,l;for(;a--;)if((i.events[a][1].type==="labelImage"||i.events[a][1].type==="labelLink")&&!i.events[a][1]._balanced){u=i.events[a][1];break}return c;function c(y){return u?u._inactive?E(y):(l=i.parser.defined.includes(Ln(i.sliceSerialize({start:u.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(uk,m,l?m:E)(y):y===91?e.attempt(ok,m,l?h:E)(y):l?m(y):E(y)}function h(y){return e.attempt(lk,m,E)(y)}function m(y){return t(y)}function E(y){return u._balanced=!0,n(y)}}function hk(e,t,n){return i;function i(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),a}function a(E){return Ze(E)?na(e,u)(E):u(E)}function u(E){return E===41?m(E):F1(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function l(E){return Ze(E)?na(e,f)(E):m(E)}function c(E){return n(E)}function f(E){return E===34||E===39||E===40?H1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return Ze(E)?na(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function pk(e,t,n){const i=this;return a;function a(c){return j1.call(i,e,u,l,"reference","referenceMarker","referenceString")(c)}function u(c){return i.parser.defined.includes(Ln(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function mk(e,t,n){return i;function i(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),a}function a(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const gk={name:"labelStartImage",resolveAll:Od.resolveAll,tokenize:Ek};function Ek(e,t,n){const i=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),u}function u(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const bk={name:"labelStartLink",resolveAll:Od.resolveAll,tokenize:xk};function xk(e,t,n){const i=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),u}function u(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const Sc={name:"lineEnding",tokenize:yk};function yk(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),$e(e,t,"linePrefix")}}const Gu={name:"thematicBreak",tokenize:Tk};function Tk(e,t,n){let i=0,a;return u;function u(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,c(h)}function c(h){return h===a?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||Ie(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===a?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),ze(h)?$e(e,c,"whitespace")(h):c(h))}}const Zt={continuation:{tokenize:_k},exit:vk,name:"list",tokenize:wk},kk={partial:!0,tokenize:Ak},Ck={partial:!0,tokenize:Sk};function wk(e,t,n){const i=this,a=i.events[i.events.length-1];let u=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return c;function c(x){const k=i.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||x===i.containerState.marker:Xc(x)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(Gu,n,h)(x):h(x);if(!i.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return Xc(x)&&++l<10?(e.consume(x),f):(!i.interrupt||l<2)&&(i.containerState.marker?x===i.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||x,e.check(ya,i.interrupt?n:m,e.attempt(kk,y,E))}function m(x){return i.containerState.initialBlankLine=!0,u++,y(x)}function E(x){return ze(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),y):n(x)}function y(x){return i.containerState.size=u+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function _k(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(ya,a,u);function a(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,$e(e,t,"listItemIndent",i.containerState.size+1)(c)}function u(c){return i.containerState.furtherBlankLines||!ze(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(Ck,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,$e(e,e.attempt(Zt,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Sk(e,t,n){const i=this;return $e(e,a,"listItemIndent",i.containerState.size+1);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(u):n(u)}}function vk(e){e.exit(this.containerState.type)}function Ak(e,t,n){const i=this;return $e(e,a,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(u){const l=i.events[i.events.length-1];return!ze(u)&&l&&l[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const M0={name:"setextUnderline",resolveTo:Nk,tokenize:Ik};function Nk(e,t){let n=e.length,i,a,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",u?(e.splice(a,0,["enter",l,t]),e.splice(u+1,0,["exit",e[i][1],t]),e[i][1].end={...e[u][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function Ik(e,t,n){const i=this;let a;return u;function u(h){let m=i.events.length,E;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){E=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||E)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===a?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),ze(h)?$e(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Ie(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Lk={tokenize:Rk};function Rk(e){const t=this,n=e.attempt(ya,i,e.attempt(this.parser.constructs.flowInitial,a,$e(e,e.attempt(this.parser.constructs.flow,a,e.attempt(BT,a)),"linePrefix")));return n;function i(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ok={resolveAll:z1()},Pk=U1("string"),Dk=U1("text");function U1(e){return{resolveAll:z1(e==="text"?Mk:void 0),tokenize:t};function t(n){const i=this,a=this.parser.constructs[e],u=n.attempt(a,l,c);return l;function l(m){return h(m)?u(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),f}function f(m){return h(m)?(n.exit("data"),u(m)):(n.consume(m),f)}function h(m){if(m===null)return!0;const E=a[m];let y=-1;if(E)for(;++y<E.length;){const x=E[y];if(!x.previous||x.previous.call(i,i.previous))return!0}return!1}}}function z1(e){return t;function t(n,i){let a=-1,u;for(;++a<=n.length;)u===void 0?n[a]&&n[a][1].type==="data"&&(u=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==u+2&&(n[u][1].end=n[a-1][1].end,n.splice(u+2,a-u-2),a=u+2),u=void 0);return e?e(n,i):n}}function Mk(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 i=e[n-1][1],a=t.sliceStream(i);let u=a.length,l=-1,c=0,f;for(;u--;){const h=a[u];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)f=!0,c++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?l:i.start._bufferIndex+l,_index:i.start._index+u,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Bk={42:Zt,43:Zt,45:Zt,48:Zt,49:Zt,50:Zt,51:Zt,52:Zt,53:Zt,54:Zt,55:Zt,56:Zt,57:Zt,62:P1},Fk={91:zT},jk={[-2]:_c,[-1]:_c,32:_c},Hk={35:QT,42:Gu,45:[M0,Gu],60:ZT,61:M0,95:Gu,96:P0,126:P0},Uk={38:M1,92:D1},zk={[-5]:Sc,[-4]:Sc,[-3]:Sc,33:gk,38:M1,42:Zc,60:[bT,sk],91:bk,92:[YT,D1],93:Od,95:Zc,96:LT},$k={null:[Zc,Ok]},Vk={null:[42,95]},Wk={null:[]},Yk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Vk,contentInitial:Fk,disable:Wk,document:Bk,flow:Hk,flowInitial:jk,insideSpan:$k,string:Uk,text:zk},Symbol.toStringTag,{value:"Module"}));function qk(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},u=[];let l=[],c=[];const f={attempt:ae(Y),check:ae(B),consume:j,enter:F,exit:K,interrupt:ae(B,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:k,parser:e,previous:null,sliceSerialize:y,sliceStream:x,write:E};let m=t.tokenize.call(h,f);return t.resolveAll&&u.push(t),h;function E(ue){return l=bn(l,ue),_(),l[l.length-1]!==null?[]:(q(t,0),h.events=xo(u,h.events,h),h.events)}function y(ue,le){return Gk(x(ue),le)}function x(ue){return Qk(l,ue)}function k(){const{_bufferIndex:ue,_index:le,line:_e,column:he,offset:te}=i;return{_bufferIndex:ue,_index:le,line:_e,column:he,offset:te}}function v(ue){a[ue.line]=ue.column,H()}function _(){let ue;for(;i._index<l.length;){const le=l[i._index];if(typeof le=="string")for(ue=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===ue&&i._bufferIndex<le.length;)A(le.charCodeAt(i._bufferIndex));else A(le)}}function A(ue){m=m(ue)}function j(ue){Ie(ue)?(i.line++,i.column=1,i.offset+=ue===-3?2:1,H()):ue!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=ue}function F(ue,le){const _e=le||{};return _e.type=ue,_e.start=k(),h.events.push(["enter",_e,h]),c.push(_e),_e}function K(ue){const le=c.pop();return le.end=k(),h.events.push(["exit",le,h]),le}function Y(ue,le){q(ue,le.from)}function B(ue,le){le.restore()}function ae(ue,le){return _e;function _e(he,te,X){let fe,Z,pe,w;return Array.isArray(he)?Q(he):"tokenize"in he?Q([he]):M(he);function M(ge){return De;function De(Oe){const ve=Oe!==null&&ge[Oe],Je=Oe!==null&&ge.null,It=[...Array.isArray(ve)?ve:ve?[ve]:[],...Array.isArray(Je)?Je:Je?[Je]:[]];return Q(It)(Oe)}}function Q(ge){return fe=ge,Z=0,ge.length===0?X:L(ge[Z])}function L(ge){return De;function De(Oe){return w=de(),pe=ge,ge.partial||(h.currentConstruct=ge),ge.name&&h.parser.constructs.disable.null.includes(ge.name)?Ee():ge.tokenize.call(le?Object.assign(Object.create(h),le):h,f,Se,Ee)(Oe)}}function Se(ge){return ue(pe,w),te}function Ee(ge){return w.restore(),++Z<fe.length?L(fe[Z]):X}}}function q(ue,le){ue.resolveAll&&!u.includes(ue)&&u.push(ue),ue.resolve&&ln(h.events,le,h.events.length-le,ue.resolve(h.events.slice(le),h)),ue.resolveTo&&(h.events=ue.resolveTo(h.events,h))}function de(){const ue=k(),le=h.previous,_e=h.currentConstruct,he=h.events.length,te=Array.from(c);return{from:he,restore:X};function X(){i=ue,h.previous=le,h.currentConstruct=_e,h.events.length=he,c=te,H()}}function H(){i.line in a&&i.column<2&&(i.column=a[i.line],i.offset+=a[i.line]-1)}}function Qk(e,t){const n=t.start._index,i=t.start._bufferIndex,a=t.end._index,u=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(i,u)];else{if(l=e.slice(n,a),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}u>0&&l.push(e[a].slice(0,u))}return l}function Gk(e,t){let n=-1;const i=[];let a;for(;++n<e.length;){const u=e[n];let l;if(typeof u=="string")l=u;else switch(u){case-5:{l="\r";break}case-4:{l=`
|
|
151
|
-
`;break}case-3:{l=`\r
|
|
152
|
-
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(u)}a=u===-2,i.push(l)}return i.join("")}function Kk(e){const i={constructs:R1([Yk,...(e||{}).extensions||[]]),content:a(dT),defined:[],document:a(hT),flow:a(Lk),lazy:{},string:a(Pk),text:a(Dk)};return i;function a(u){return l;function l(c){return qk(i,u,c)}}}function Xk(e){for(;!B1(e););return e}const B0=/[\0\t\n\r]/g;function Zk(){let e=1,t="",n=!0,i;return a;function a(u,l,c){const f=[];let h,m,E,y,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(l||void 0).decode(u)),E=0,t="",n&&(u.charCodeAt(0)===65279&&E++,n=void 0);E<u.length;){if(B0.lastIndex=E,h=B0.exec(u),y=h&&h.index!==void 0?h.index:u.length,x=u.charCodeAt(y),!h){t=u.slice(E);break}if(x===10&&E===y&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),E<y&&(f.push(u.slice(E,y)),e+=y-E),x){case 0:{f.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,f.push(-2);e++<m;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}E=y+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const Jk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function e3(e){return e.replace(Jk,t3)}function t3(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),u=a===120||a===88;return O1(n.slice(u?2:1),u?16:10)}return Rd(n)||e}const $1={}.hasOwnProperty;function n3(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),r3(n)(Xk(Kk(n).document().write(Zk()(e,t,!0))))}function r3(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Qe),autolinkProtocol:de,autolinkEmail:de,atxHeading:u(sr),blockQuote:u(Je),characterEscape:de,characterReference:de,codeFenced:u(It),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(It,l),codeText:u(cn,l),codeTextData:de,data:de,codeFlowValue:de,definition:u(en),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(tn),hardBreakEscape:u(Yn),hardBreakTrailing:u(Yn),htmlFlow:u(ar,l),htmlFlowData:de,htmlText:u(ar,l),htmlTextData:de,image:u(Me),label:l,link:u(Qe),listItem:u(_t),listItemValue:y,listOrdered:u(ht,E),listUnordered:u(ht),paragraph:u(kn),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(sr),strong:u(Sa),thematicBreak:u(Aa)},exit:{atxHeading:f(),atxHeadingSequence:Y,autolink:f(),autolinkEmail:ve,autolinkProtocol:Oe,blockQuote:f(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:ge,characterReference:De,codeFenced:f(_),codeFencedFence:v,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:H,codeIndented:f(A),codeText:f(te),codeTextData:H,data:H,definition:f(),definitionDestinationString:K,definitionLabelString:j,definitionTitleString:F,emphasis:f(),hardBreakEscape:f(le),hardBreakTrailing:f(le),htmlFlow:f(_e),htmlFlowData:H,htmlText:f(he),htmlTextData:H,image:f(fe),label:pe,labelText:Z,lineEnding:ue,link:f(X),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Se,resourceDestinationString:w,resourceTitleString:M,resource:Q,setextHeading:f(q),setextHeadingLineSequence:ae,setextHeadingText:B,strong:f(),thematicBreak:f()}};V1(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(G){let ce={type:"root",children:[]};const Le={stack:[ce],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:m,data:n},je=[];let We=-1;for(;++We<G.length;)if(G[We][1].type==="listOrdered"||G[We][1].type==="listUnordered")if(G[We][0]==="enter")je.push(We);else{const St=je.pop();We=a(G,St,We)}for(We=-1;++We<G.length;){const St=t[G[We][0]];$1.call(St,G[We][1].type)&&St[G[We][1].type].call(Object.assign({sliceSerialize:G[We][2].sliceSerialize},Le),G[We][1])}if(Le.tokenStack.length>0){const St=Le.tokenStack[Le.tokenStack.length-1];(St[1]||F0).call(Le,void 0,St[0])}for(ce.position={start:vr(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:vr(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)ce=t.transforms[We](ce)||ce;return ce}function a(G,ce,Le){let je=ce-1,We=-1,St=!1,qn,dn,ur,Ur;for(;++je<=Le;){const vt=G[je];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?We++:We--,Ur=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(qn&&!Ur&&!We&&!ur&&(ur=je),Ur=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ur=void 0}if(!We&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||We===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(qn){let Pn=je;for(dn=void 0;Pn--;){const nn=G[Pn];if(nn[1].type==="lineEnding"||nn[1].type==="lineEndingBlank"){if(nn[0]==="exit")continue;dn&&(G[dn][1].type="lineEndingBlank",St=!0),nn[1].type="lineEnding",dn=Pn}else if(!(nn[1].type==="linePrefix"||nn[1].type==="blockQuotePrefix"||nn[1].type==="blockQuotePrefixWhitespace"||nn[1].type==="blockQuoteMarker"||nn[1].type==="listItemIndent"))break}ur&&(!dn||ur<dn)&&(qn._spread=!0),qn.end=Object.assign({},dn?G[dn][1].start:vt[1].end),G.splice(dn||je,0,["exit",qn,vt[2]]),je++,Le++}if(vt[1].type==="listItemPrefix"){const Pn={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};qn=Pn,G.splice(je,0,["enter",Pn,vt[2]]),je++,Le++,ur=void 0,Ur=!0}}}return G[ce][1]._spread=St,Le}function u(G,ce){return Le;function Le(je){c.call(this,G(je),je),ce&&ce.call(this,je)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(G,ce,Le){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ce,Le||void 0]),G.position={start:vr(ce.start),end:void 0}}function f(G){return ce;function ce(Le){G&&G.call(this,Le),h.call(this,Le)}}function h(G,ce){const Le=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==G.type&&(ce?ce.call(this,G,je[0]):(je[1]||F0).call(this,G,je[0]));else throw new Error("Cannot close `"+G.type+"` ("+ta({start:G.start,end:G.end})+"): it’s not open");Le.position.end=vr(G.end)}function m(){return Ld(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function y(G){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function x(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=G}function k(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=G}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.value=G.replace(/(\r?\n|\r)$/g,"")}function j(G){const ce=this.resume(),Le=this.stack[this.stack.length-1];Le.label=ce,Le.identifier=Ln(this.sliceSerialize(G)).toLowerCase()}function F(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.title=G}function K(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.url=G}function Y(G){const ce=this.stack[this.stack.length-1];if(!ce.depth){const Le=this.sliceSerialize(G).length;ce.depth=Le}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function ae(G){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function de(G){const Le=this.stack[this.stack.length-1].children;let je=Le[Le.length-1];(!je||je.type!=="text")&&(je=va(),je.position={start:vr(G.start),end:void 0},Le.push(je)),this.stack.push(je)}function H(G){const ce=this.stack.pop();ce.value+=this.sliceSerialize(G),ce.position.end=vr(G.end)}function ue(G){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=ce.children[ce.children.length-1];Le.position.end=vr(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(de.call(this,G),H.call(this,G))}function le(){this.data.atHardBreak=!0}function _e(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.value=G}function he(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.value=G}function te(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.value=G}function X(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ce,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function fe(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ce,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Z(G){const ce=this.sliceSerialize(G),Le=this.stack[this.stack.length-2];Le.label=e3(ce),Le.identifier=Ln(ce).toLowerCase()}function pe(){const G=this.stack[this.stack.length-1],ce=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const je=G.children;Le.children=je}else Le.alt=ce}function w(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.url=G}function M(){const G=this.resume(),ce=this.stack[this.stack.length-1];ce.title=G}function Q(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function Se(G){const ce=this.resume(),Le=this.stack[this.stack.length-1];Le.label=ce,Le.identifier=Ln(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function Ee(G){this.data.characterReferenceType=G.type}function ge(G){const ce=this.sliceSerialize(G),Le=this.data.characterReferenceType;let je;Le?(je=O1(ce,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=Rd(ce);const We=this.stack[this.stack.length-1];We.value+=je}function De(G){const ce=this.stack.pop();ce.position.end=vr(G.end)}function Oe(G){H.call(this,G);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(G)}function ve(G){H.call(this,G);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(G)}function Je(){return{type:"blockquote",children:[]}}function It(){return{type:"code",lang:null,meta:null,value:""}}function cn(){return{type:"inlineCode",value:""}}function en(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function tn(){return{type:"emphasis",children:[]}}function sr(){return{type:"heading",depth:0,children:[]}}function Yn(){return{type:"break"}}function ar(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function Qe(){return{type:"link",title:null,url:"",children:[]}}function ht(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function _t(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function kn(){return{type:"paragraph",children:[]}}function Sa(){return{type:"strong",children:[]}}function va(){return{type:"text",value:""}}function Aa(){return{type:"thematicBreak"}}}function vr(e){return{line:e.line,column:e.column,offset:e.offset}}function V1(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?V1(e,i):i3(e,i)}}function i3(e,t){let n;for(n in t)if($1.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function F0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ta({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ta({start:t.start,end:t.end})+") is still open")}function W1(e){const t=this;t.parser=n;function n(i){return n3(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function s3(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 a3(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
153
|
-
`}]}function u3(e,t){const n=t.value?t.value+`
|
|
154
|
-
`:"",i={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(i.className=["language-"+a[0]]);let u={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function o3(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l3(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c3(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),a=Ji(i.toLowerCase()),u=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=u+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function d3(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 f3(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Y1(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const a=e.all(t),u=a[0];u&&u.type==="text"?u.value="["+u.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=i:a.push({type:"text",value:i}),a}function h3(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Y1(e,t);const a={src:Ji(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,u),e.applyData(t,u)}function p3(e,t){const n={src:Ji(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function m3(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function g3(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Y1(e,t);const a={href:Ji(i.url||"")};i.title!==null&&i.title!==void 0&&(a.title=i.title);const u={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function E3(e,t){const n={href:Ji(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function b3(e,t,n){const i=e.all(t),a=n?x3(n):q1(t),u={},l=[];if(typeof t.checked=="boolean"){const m=i[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},i.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const m=i[c];(a||c!==0||m.type!=="element"||m.tagName!=="p")&&l.push({type:"text",value:`
|
|
155
|
-
`}),m.type==="element"&&m.tagName==="p"&&!a?l.push(...m.children):l.push(m)}const f=i[i.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
156
|
-
`});const h={type:"element",tagName:"li",properties:u,children:l};return e.patch(t,h),e.applyData(t,h)}function x3(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=q1(n[i])}return t}function q1(e){const t=e.spread;return t??e.children.length>1}function y3(e,t){const n={},i=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<i.length;){const l=i[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,u),e.applyData(t,u)}function T3(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function k3(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function C3(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w3(e,t){const n=e.all(t),i=n.shift(),a=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=$n(t.children[1]),f=Eo(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),a.push(l)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function _3(e,t,n){const i=n?n.children:void 0,u=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const E=t.children[f],y={},x=l?l[f]:void 0;x&&(y.align=x);let k={type:"element",tagName:u,properties:y,children:[]};E&&(k.children=e.all(E),e.patch(E,k),k=e.applyData(E,k)),h.push(k)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function S3(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const j0=9,H0=32;function v3(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),a=0;const u=[];for(;i;)u.push(U0(t.slice(a,i.index),a>0,!0),i[0]),a=i.index+i[0].length,i=n.exec(t);return u.push(U0(t.slice(a),a>0,!1)),u.join("")}function U0(e,t,n){let i=0,a=e.length;if(t){let u=e.codePointAt(i);for(;u===j0||u===H0;)i++,u=e.codePointAt(i)}if(n){let u=e.codePointAt(a-1);for(;u===j0||u===H0;)a--,u=e.codePointAt(a-1)}return a>i?e.slice(i,a):""}function A3(e,t){const n={type:"text",value:v3(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function N3(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const I3={blockquote:s3,break:a3,code:u3,delete:o3,emphasis:l3,footnoteReference:c3,heading:d3,html:f3,imageReference:h3,image:p3,inlineCode:m3,linkReference:g3,link:E3,listItem:b3,list:y3,paragraph:T3,root:k3,strong:C3,table:w3,tableCell:S3,tableRow:_3,text:A3,thematicBreak:N3,toml:Fu,yaml:Fu,definition:Fu,footnoteDefinition:Fu};function Fu(){}const Q1=-1,yo=0,ra=1,ro=2,Pd=3,Dd=4,Md=5,Bd=6,G1=7,K1=8,z0=typeof self=="object"?self:globalThis,L3=(e,t)=>{const n=(a,u)=>(e.set(u,a),a),i=a=>{if(e.has(a))return e.get(a);const[u,l]=t[a];switch(u){case yo:case Q1:return n(l,a);case ra:{const c=n([],a);for(const f of l)c.push(i(f));return c}case ro:{const c=n({},a);for(const[f,h]of l)c[i(f)]=i(h);return c}case Pd:return n(new Date(l),a);case Dd:{const{source:c,flags:f}=l;return n(new RegExp(c,f),a)}case Md:{const c=n(new Map,a);for(const[f,h]of l)c.set(i(f),i(h));return c}case Bd:{const c=n(new Set,a);for(const f of l)c.add(i(f));return c}case G1:{const{name:c,message:f}=l;return n(new z0[c](f),a)}case K1:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new z0[u](l),a)};return i},$0=e=>L3(new Map,e)(0),$i="",{toString:R3}={},{keys:O3}=Object,Ws=e=>{const t=typeof e;if(t!=="object"||!e)return[yo,t];const n=R3.call(e).slice(8,-1);switch(n){case"Array":return[ra,$i];case"Object":return[ro,$i];case"Date":return[Pd,$i];case"RegExp":return[Dd,$i];case"Map":return[Md,$i];case"Set":return[Bd,$i];case"DataView":return[ra,n]}return n.includes("Array")?[ra,n]:n.includes("Error")?[G1,n]:[ro,n]},ju=([e,t])=>e===yo&&(t==="function"||t==="symbol"),P3=(e,t,n,i)=>{const a=(l,c)=>{const f=i.push(l)-1;return n.set(c,f),f},u=l=>{if(n.has(l))return n.get(l);let[c,f]=Ws(l);switch(c){case yo:{let m=l;switch(f){case"bigint":c=K1,m=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);m=null;break;case"undefined":return a([Q1],l)}return a([c,m],l)}case ra:{if(f){let y=l;return f==="DataView"?y=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(l)),a([f,[...y]],l)}const m=[],E=a([c,m],l);for(const y of l)m.push(u(y));return E}case ro:{if(f)switch(f){case"BigInt":return a([f,l.toString()],l);case"Boolean":case"Number":case"String":return a([f,l.valueOf()],l)}if(t&&"toJSON"in l)return u(l.toJSON());const m=[],E=a([c,m],l);for(const y of O3(l))(e||!ju(Ws(l[y])))&&m.push([u(y),u(l[y])]);return E}case Pd:return a([c,l.toISOString()],l);case Dd:{const{source:m,flags:E}=l;return a([c,{source:m,flags:E}],l)}case Md:{const m=[],E=a([c,m],l);for(const[y,x]of l)(e||!(ju(Ws(y))||ju(Ws(x))))&&m.push([u(y),u(x)]);return E}case Bd:{const m=[],E=a([c,m],l);for(const y of l)(e||!ju(Ws(y)))&&m.push(u(y));return E}}const{message:h}=l;return a([c,{name:f,message:h}],l)};return u},V0=(e,{json:t,lossy:n}={})=>{const i=[];return P3(!(t||n),!!t,new Map,i)(e),i},di=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?$0(V0(e,t)):structuredClone(e):(e,t)=>$0(V0(e,t));function D3(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 M3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function B3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||D3,i=e.options.footnoteBackLabel||M3,a=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const m=e.all(h),E=String(h.identifier).toUpperCase(),y=Ji(E.toLowerCase());let x=0;const k=[],v=e.footnoteCounts.get(E);for(;v!==void 0&&++x<=v;){k.length>0&&k.push({type:"text",value:" "});let j=typeof n=="string"?n:n(f,x);typeof j=="string"&&(j={type:"text",value:j}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,x),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const _=m[m.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const j=_.children[_.children.length-1];j&&j.type==="text"?j.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...k)}else m.push(...k);const A={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(m,!0)};e.patch(h,A),c.push(A)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...di(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
157
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
158
|
-
`}]}}const To=(function(e){if(e==null)return U3;if(typeof e=="function")return ko(e);if(typeof e=="object")return Array.isArray(e)?F3(e):j3(e);if(typeof e=="string")return H3(e);throw new Error("Expected function, string, or object as test")});function F3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=To(e[n]);return ko(i);function i(...a){let u=-1;for(;++u<t.length;)if(t[u].apply(this,a))return!0;return!1}}function j3(e){const t=e;return ko(n);function n(i){const a=i;let u;for(u in e)if(a[u]!==t[u])return!1;return!0}}function H3(e){return ko(t);function t(n){return n&&n.type===e}}function ko(e){return t;function t(n,i,a){return!!(z3(n)&&e.call(this,n,typeof i=="number"?i:void 0,a||void 0))}}function U3(){return!0}function z3(e){return e!==null&&typeof e=="object"&&"type"in e}const X1=[],Xs=!0,Jc=!1,Wi="skip";function Fd(e,t,n,i){let a;typeof t=="function"&&typeof n!="function"?(i=n,n=t):a=t;const u=To(a),l=i?-1:1;c(e,void 0,[])();function c(f,h,m){const E=f&&typeof f=="object"?f:{};if(typeof E.type=="string"){const x=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(x?"<"+x+">":""))+")"})}return y;function y(){let x=X1,k,v,_;if((!t||u(f,h,m[m.length-1]||void 0))&&(x=$3(n(f,m)),x[0]===Jc))return x;if("children"in f&&f.children){const A=f;if(A.children&&x[0]!==Wi)for(v=(i?A.children.length:-1)+l,_=m.concat(A);v>-1&&v<A.children.length;){const j=A.children[v];if(k=c(j,v,_)(),k[0]===Jc)return k;v=typeof k[1]=="number"?k[1]:v+l}}return x}}}function $3(e){return Array.isArray(e)?e:typeof e=="number"?[Xs,e]:e==null?X1:[e]}function Rn(e,t,n,i){let a,u,l;typeof t=="function"&&typeof n!="function"?(u=void 0,l=t,a=n):(u=t,l=n,a=i),Fd(e,u,c,a);function c(f,h){const m=h[h.length-1],E=m?m.children.indexOf(f):void 0;return l(f,E,m)}}const ed={}.hasOwnProperty,V3={};function W3(e,t){const n=t||V3,i=new Map,a=new Map,u=new Map,l={...I3,...n.handlers},c={all:h,applyData:q3,definitionById:i,footnoteById:a,footnoteCounts:u,footnoteOrder:[],handlers:l,one:f,options:n,patch:Y3,wrap:G3};return Rn(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const E=m.type==="definition"?i:a,y=String(m.identifier).toUpperCase();E.has(y)||E.set(y,m)}}),c;function f(m,E){const y=m.type,x=c.handlers[y];if(ed.call(c.handlers,y)&&x)return x(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in m){const{children:v,..._}=m,A=di(_);return A.children=c.all(m),A}return di(m)}return(c.options.unknownHandler||Q3)(c,m,E)}function h(m){const E=[];if("children"in m){const y=m.children;let x=-1;for(;++x<y.length;){const k=c.one(y[x],m);if(k){if(x&&y[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=W0(k.value)),!Array.isArray(k)&&k.type==="element")){const v=k.children[0];v&&v.type==="text"&&(v.value=W0(v.value))}Array.isArray(k)?E.push(...k):E.push(k)}}}return E}}function Y3(e,t){e.position&&(t.position=_1(e))}function q3(e,t){let n=t;if(e&&e.data){const i=e.data.hName,a=e.data.hChildren,u=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&u&&Object.assign(n.properties,di(u)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function Q3(e,t){const n=t.data||{},i="value"in t&&!(ed.call(n,"hProperties")||ed.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function G3(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
159
|
-
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
160
|
-
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
161
|
-
`}),n}function W0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Y0(e,t){const n=W3(e,t),i=n.one(e,void 0),a=B3(n),u=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return a&&u.children.push({type:"text",value:`
|
|
162
|
-
`},a),u}function Z1(e,t){return e&&"run"in e?async function(n,i){const a=Y0(n,{file:i,...t});await e.run(a,i)}:function(n,i){return Y0(n,{file:i,...e||t})}}function q0(e){if(e)throw e}var vc,Q0;function K3(){if(Q0)return vc;Q0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},l=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(i)return i(h,m).value}else return;return h[m]};return vc=function f(){var h,m,E,y,x,k,v=arguments[0],_=1,A=arguments.length,j=!1;for(typeof v=="boolean"&&(j=v,v=arguments[1]||{},_=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});_<A;++_)if(h=arguments[_],h!=null)for(m in h)E=c(v,m),y=c(h,m),v!==y&&(j&&y&&(u(y)||(x=a(y)))?(x?(x=!1,k=E&&a(E)?E:[]):k=E&&u(E)?E:{},l(v,{name:m,newValue:f(j,k,y)})):typeof y<"u"&&l(v,{name:m,newValue:y}));return v},vc}var X3=K3();const Ac=ga(X3);function td(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 Z3(){const e=[],t={run:n,use:i};return t;function n(...a){let u=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...a);function c(f,...h){const m=e[++u];let E=-1;if(f){l(f);return}for(;++E<a.length;)(h[E]===null||h[E]===void 0)&&(h[E]=a[E]);a=h,m?J3(m,c)(...h):l(null,...h)}}function i(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function J3(e,t){let n;return i;function i(...l){const c=e.length>l.length;let f;c&&l.push(a);try{f=e.apply(this,l)}catch(h){const m=h;if(c&&n)throw m;return a(m)}c||(f&&f.then&&typeof f.then=="function"?f.then(u,a):f instanceof Error?a(f):u(f))}function a(l,...c){n||(n=!0,t(l,...c))}function u(l){a(null,l)}}const Un={basename:eC,dirname:tC,extname:nC,join:rC,sep:"/"};function eC(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ta(e);let n=0,i=-1,a=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else i<0&&(u=!0,i=a+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(u){n=a+1;break}}else l<0&&(u=!0,l=a+1),c>-1&&(e.codePointAt(a)===t.codePointAt(c--)?c<0&&(i=a):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function tC(e){if(Ta(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function nC(e){Ta(e);let t=e.length,n=-1,i=0,a=-1,u=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?a<0?a=t:u!==1&&(u=1):a>-1&&(u=-1)}return a<0||n<0||u===0||u===1&&a===n-1&&a===i+1?"":e.slice(a,n)}function rC(...e){let t=-1,n;for(;++t<e.length;)Ta(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":iC(n)}function iC(e){Ta(e);const t=e.codePointAt(0)===47;let n=sC(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sC(e,t){let n="",i=0,a=-1,u=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(a===l-1||u===1))if(a!==l-1&&u===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),a=l,u=0;continue}}else if(n.length>0){n="",i=0,a=l,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),i=l-a-1;a=l,u=0}else c===46&&u>-1?u++:u=-1}return n}function Ta(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aC={cwd:uC};function uC(){return"/"}function nd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function oC(e){if(typeof e=="string")e=new URL(e);else if(!nd(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 lC(e)}function lC(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===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 Nc=["history","path","basename","stem","extname","dirname"];class J1{constructor(t){let n;t?nd(t)?n={path:t}:typeof t=="string"||cC(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Nc.length;){const u=Nc[i];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let a;for(a in n)Nc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Un.basename(this.path):void 0}set basename(t){Lc(t,"basename"),Ic(t,"basename"),this.path=Un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Un.dirname(this.path):void 0}set dirname(t){G0(this.basename,"dirname"),this.path=Un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Un.extname(this.path):void 0}set extname(t){if(Ic(t,"extname"),G0(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=Un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nd(t)&&(t=oC(t)),Lc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Un.basename(this.path,this.extname):void 0}set stem(t){Lc(t,"stem"),Ic(t,"stem"),this.path=Un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const a=this.message(t,n,i);throw a.fatal=!0,a}info(t,n,i){const a=this.message(t,n,i);return a.fatal=void 0,a}message(t,n,i){const a=new Mt(t,n,i);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 Ic(e,t){if(e&&e.includes(Un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Un.sep+"`")}function Lc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function G0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function cC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dC=(function(e){const i=this.constructor.prototype,a=i[e],u=function(){return a.apply(u,arguments)};return Object.setPrototypeOf(u,i),u}),fC={}.hasOwnProperty;class jd extends dC{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=Z3()}copy(){const t=new jd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Ac(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Pc("data",this.frozen),this.namespace[t]=n,this):fC.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Pc("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const a=n.call(t,...i);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Hu(t),i=this.parser||this.Parser;return Rc("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Rc("process",this.parser||this.Parser),Oc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(u,l){const c=Hu(t),f=i.parse(c);i.run(f,c,function(m,E,y){if(m||!E||!y)return h(m);const x=E,k=i.stringify(x,y);pC(k)?y.value=k:y.result=k,h(m,y)});function h(m,E){m||!E?l(m):u?u(E):n(void 0,E)}}}processSync(t){let n=!1,i;return this.freeze(),Rc("processSync",this.parser||this.Parser),Oc("processSync",this.compiler||this.Compiler),this.process(t,a),X0("processSync","process",n),i;function a(u,l){n=!0,q0(u),i=l}}run(t,n,i){K0(t),this.freeze();const a=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?u(void 0,i):new Promise(u);function u(l,c){const f=Hu(n);a.run(t,f,h);function h(m,E,y){const x=E||t;m?c(m):l?l(x):i(void 0,x,y)}}}runSync(t,n){let i=!1,a;return this.run(t,n,u),X0("runSync","run",i),a;function u(l,c){q0(l),a=c,i=!0}}stringify(t,n){this.freeze();const i=Hu(n),a=this.compiler||this.Compiler;return Oc("stringify",a),K0(t),a(t,i)}use(t,...n){const i=this.attachers,a=this.namespace;if(Pc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;f(m,E)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))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");c(h.plugins),h.settings&&(a.settings=Ac(!0,a.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];u(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,m){let E=-1,y=-1;for(;++E<i.length;)if(i[E][0]===h){y=E;break}if(y===-1)i.push([h,...m]);else if(m.length>0){let[x,...k]=m;const v=i[y][1];td(v)&&td(x)&&(x=Ac(!0,v,x)),i[y]=[h,x,...k]}}}}const eg=new jd().freeze();function Rc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Oc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Pc(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 K0(e){if(!td(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function X0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hu(e){return hC(e)?e:new J1(e)}function hC(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function pC(e){return typeof e=="string"||mC(e)}function mC(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Z0=[],J0={allowDangerousHtml:!0},EC=/^(https?|ircs?|mailto|xmpp)$/i,bC=[{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 xC(e){const t=yC(e),n=TC(e);return kC(t.runSync(t.parse(n),n),e)}function yC(e){const t=e.rehypePlugins||Z0,n=e.remarkPlugins||Z0,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...J0}:J0;return eg().use(W1).use(n).use(Z1,i).use(t)}function TC(e){const t=e.children||"",n=new J1;return typeof t=="string"&&(n.value=t),n}function kC(e,t){const n=t.allowedElements,i=t.allowElement,a=t.components,u=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||CC;for(const m of bC)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+gC+m.id,void 0);return Rn(e,h),v1(e,{Fragment:T.Fragment,components:a,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function h(m,E,y){if(m.type==="raw"&&y&&typeof E=="number")return l?y.children.splice(E,1):y.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let x;for(x in Qi)if(Object.hasOwn(Qi,x)&&Object.hasOwn(m.properties,x)){const k=m.properties[x],v=Qi[x];(v===null||v.includes(m.tagName))&&(m.properties[x]=f(String(k||""),x,m))}}if(m.type==="element"){let x=n?!n.includes(m.tagName):u?u.includes(m.tagName):!1;if(!x&&i&&typeof E=="number"&&(x=!i(m,E,y)),x&&y&&typeof E=="number")return c&&m.children?y.children.splice(E,1,...m.children):y.children.splice(E,1),E}}}function CC(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||i!==-1&&t>i||EC.test(e.slice(0,t))?e:""}function em(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,a=n.indexOf(t);for(;a!==-1;)i++,a=n.indexOf(t,a+t.length);return i}function wC(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _C(e,t,n){const a=To((n||{}).ignore||[]),u=SC(t);let l=-1;for(;++l<u.length;)Fd(e,"text",c);function c(h,m){let E=-1,y;for(;++E<m.length;){const x=m[E],k=y?y.children:void 0;if(a(x,k?k.indexOf(x):void 0,y))return;y=x}if(y)return f(h,m)}function f(h,m){const E=m[m.length-1],y=u[l][0],x=u[l][1];let k=0;const _=E.children.indexOf(h);let A=!1,j=[];y.lastIndex=0;let F=y.exec(h.value);for(;F;){const K=F.index,Y={index:F.index,input:F.input,stack:[...m,h]};let B=x(...F,Y);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?y.lastIndex=K+1:(k!==K&&j.push({type:"text",value:h.value.slice(k,K)}),Array.isArray(B)?j.push(...B):B&&j.push(B),k=K+F[0].length,A=!0),!y.global)break;F=y.exec(h.value)}return A?(k<h.value.length&&j.push({type:"text",value:h.value.slice(k)}),E.children.splice(_,1,...j)):j=[h],_+j.length}}function SC(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<n.length;){const a=n[i];t.push([vC(a[0]),AC(a[1])])}return t}function vC(e){return typeof e=="string"?new RegExp(wC(e),"g"):e}function AC(e){return typeof e=="function"?e:function(){return e}}const Dc="phrasing",Mc=["autolink","link","image","label"];function NC(){return{transforms:[MC],enter:{literalAutolink:LC,literalAutolinkEmail:Bc,literalAutolinkHttp:Bc,literalAutolinkWww:Bc},exit:{literalAutolink:DC,literalAutolinkEmail:PC,literalAutolinkHttp:RC,literalAutolinkWww:OC}}}function IC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dc,notInConstruct:Mc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dc,notInConstruct:Mc},{character:":",before:"[ps]",after:"\\/",inConstruct:Dc,notInConstruct:Mc}]}}function LC(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Bc(e){this.config.enter.autolinkProtocol.call(this,e)}function RC(e){this.config.exit.autolinkProtocol.call(this,e)}function OC(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function PC(e){this.config.exit.autolinkEmail.call(this,e)}function DC(e){this.exit(e)}function MC(e){_C(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,BC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FC]],{ignore:["link","linkReference"]})}function BC(e,t,n,i,a){let u="";if(!tg(a)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!jC(n)))return!1;const l=HC(n+i);if(!l[0])return!1;const c={type:"link",title:null,url:u+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function FC(e,t,n,i){return!tg(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jC(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function HC(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const a=em(e,"(");let u=em(e,")");for(;i!==-1&&a>u;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),u++;return[e,n]}function tg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ci(n)||bo(n))&&(!t||n!==47)}ng.peek=GC;function UC(){this.buffer()}function zC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $C(){this.buffer()}function VC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function WC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ln(this.sliceSerialize(e)).toLowerCase(),n.label=t}function YC(e){this.exit(e)}function qC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ln(this.sliceSerialize(e)).toLowerCase(),n.label=t}function QC(e){this.exit(e)}function GC(){return"["}function ng(e,t,n,i){const a=n.createTracker(i);let u=a.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return u+=a.move(n.safe(n.associationId(e),{after:"]",before:u})),c(),l(),u+=a.move("]"),u}function KC(){return{enter:{gfmFootnoteCallString:UC,gfmFootnoteCall:zC,gfmFootnoteDefinitionLabelString:$C,gfmFootnoteDefinition:VC},exit:{gfmFootnoteCallString:WC,gfmFootnoteCall:YC,gfmFootnoteDefinitionLabelString:qC,gfmFootnoteDefinition:QC}}}function XC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ng},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,a,u,l){const c=u.createTracker(l);let f=c.move("[^");const h=u.enter("footnoteDefinition"),m=u.enter("label");return f+=c.move(u.safe(u.associationId(i),{before:f,after:"]"})),m(),f+=c.move("]:"),i.children&&i.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
163
|
-
`:" ")+u.indentLines(u.containerFlow(i,c.current()),t?rg:ZC))),h(),f}}function ZC(e,t,n){return t===0?e:rg(e,t,n)}function rg(e,t,n){return(n?"":" ")+e}const JC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ig.peek=iw;function ew(){return{canContainEols:["delete"],enter:{strikethrough:nw},exit:{strikethrough:rw}}}function tw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JC}],handlers:{delete:ig}}}function nw(e){this.enter({type:"delete",children:[]},e)}function rw(e){this.exit(e)}function ig(e,t,n,i){const a=n.createTracker(i),u=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),u(),l}function iw(){return"~"}function sw(e){return e.length}function aw(e,t){const n=t||{},i=(n.align||[]).concat(),a=n.stringLength||sw,u=[],l=[],c=[],f=[];let h=0,m=-1;for(;++m<e.length;){const v=[],_=[];let A=-1;for(e[m].length>h&&(h=e[m].length);++A<e[m].length;){const j=uw(e[m][A]);if(n.alignDelimiters!==!1){const F=a(j);_[A]=F,(f[A]===void 0||F>f[A])&&(f[A]=F)}v.push(j)}l[m]=v,c[m]=_}let E=-1;if(typeof i=="object"&&"length"in i)for(;++E<h;)u[E]=tm(i[E]);else{const v=tm(i);for(;++E<h;)u[E]=v}E=-1;const y=[],x=[];for(;++E<h;){const v=u[E];let _="",A="";v===99?(_=":",A=":"):v===108?_=":":v===114&&(A=":");let j=n.alignDelimiters===!1?1:Math.max(1,f[E]-_.length-A.length);const F=_+"-".repeat(j)+A;n.alignDelimiters!==!1&&(j=_.length+j+A.length,j>f[E]&&(f[E]=j),x[E]=j),y[E]=F}l.splice(1,0,y),c.splice(1,0,x),m=-1;const k=[];for(;++m<l.length;){const v=l[m],_=c[m];E=-1;const A=[];for(;++E<h;){const j=v[E]||"";let F="",K="";if(n.alignDelimiters!==!1){const Y=f[E]-(_[E]||0),B=u[E];B===114?F=" ".repeat(Y):B===99?Y%2?(F=" ".repeat(Y/2+.5),K=" ".repeat(Y/2-.5)):(F=" ".repeat(Y/2),K=F):K=" ".repeat(Y)}n.delimiterStart!==!1&&!E&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||E)&&A.push(" "),n.alignDelimiters!==!1&&A.push(F),A.push(j),n.alignDelimiters!==!1&&A.push(K),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&A.push("|")}k.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return k.join(`
|
|
164
|
-
`)}function uw(e){return e==null?"":String(e)}function tm(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const nm={}.hasOwnProperty;function sg(e,t){const n=t||{};function i(a,...u){let l=i.invalid;const c=i.handlers;if(a&&nm.call(a,e)){const f=String(a[e]);l=nm.call(c,f)?c[f]:i.unknown}if(l)return l.call(this,a,...u)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}function ow(e,t,n,i){const a=n.enter("blockquote"),u=n.createTracker(i);u.move("> "),u.shift(2);const l=n.indentLines(n.containerFlow(e,u.current()),lw);return a(),l}function lw(e,t,n){return">"+(n?"":" ")+e}function cw(e,t){return rm(e,t.inConstruct,!0)&&!rm(e,t.notInConstruct,!1)}function rm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function im(e,t,n,i){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
165
|
-
`&&cw(n.stack,n.unsafe[a]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
166
|
-
`}function dw(e,t){const n=String(e);let i=n.indexOf(t),a=i,u=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===a?++u>l&&(l=u):u=1,a=i+t.length,i=n.indexOf(t,a);return l}function fw(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function hw(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function pw(e,t,n,i){const a=hw(n),u=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(fw(e,n)){const E=n.enter("codeIndented"),y=n.indentLines(u,mw);return E(),y}const c=n.createTracker(i),f=a.repeat(Math.max(dw(u,a)+1,3)),h=n.enter("codeFenced");let m=c.move(f);if(e.lang){const E=n.enter(`codeFencedLang${l}`);m+=c.move(n.safe(e.lang,{before:m,after:" ",encode:["`"],...c.current()})),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${l}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,{before:m,after:`
|
|
167
|
-
`,encode:["`"],...c.current()})),E()}return m+=c.move(`
|
|
168
|
-
`),u&&(m+=c.move(u+`
|
|
169
|
-
`)),m+=c.move(f),h(),m}function mw(e,t,n){return(n?"":" ")+e}function Hd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function gw(e,t,n,i){const a=Hd(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
170
|
-
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),c()),l(),h}function Ew(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fa(e){return"&#x"+e.toString(16).toUpperCase()+";"}function io(e,t,n){const i=Gi(e),a=Gi(t);return i===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===void 0?{inside:!1,outside:!1}:a===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ag.peek=bw;function ag(e,t,n,i){const a=Ew(n),u=n.enter("emphasis"),l=n.createTracker(i),c=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const h=f.charCodeAt(0),m=io(i.before.charCodeAt(i.before.length-1),h,a);m.inside&&(f=fa(h)+f.slice(1));const E=f.charCodeAt(f.length-1),y=io(i.after.charCodeAt(0),E,a);y.inside&&(f=f.slice(0,-1)+fa(E));const x=l.move(a);return u(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+f+x}function bw(e,t,n){return n.options.emphasis||"*"}function xw(e,t){let n=!1;return Rn(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,Jc}),!!((!e.depth||e.depth<3)&&Ld(e)&&(t.options.setext||n))}function yw(e,t,n,i){const a=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(i);if(xw(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),y=n.containerPhrasing(e,{...u.current(),before:`
|
|
171
|
-
`,after:`
|
|
172
|
-
`});return E(),m(),y+`
|
|
173
|
-
`+(a===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
174
|
-
`))+1))}const l="#".repeat(a),c=n.enter("headingAtx"),f=n.enter("phrasing");u.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
175
|
-
`,...u.current()});return/^[\t ]/.test(h)&&(h=fa(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),c(),h}ug.peek=Tw;function ug(e){return e.value||""}function Tw(){return"<"}og.peek=kw;function og(e,t,n,i){const a=Hd(n),u=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(i);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${u}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),c()),h+=f.move(")"),l(),h}function kw(){return"!"}lg.peek=Cw;function lg(e,t,n,i){const a=e.referenceType,u=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,u(),a==="full"||!h||h!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Cw(){return"!"}cg.peek=ww;function cg(e,t,n){let i=e.value||"",a="`",u=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(i);)a+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++u<n.unsafe.length;){const l=n.unsafe[u],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(i);){let h=f.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(f.index+1)}}return a+i+a}function ww(){return"`"}function dg(e,t){const n=Ld(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fg.peek=_w;function fg(e,t,n,i){const a=Hd(n),u=a==='"'?"Quote":"Apostrophe",l=n.createTracker(i);let c,f;if(dg(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=l.move("<");return E+=l.move(n.containerPhrasing(e,{before:E,after:">",...l.current()})),E+=l.move(">"),c(),n.stack=m,E}c=n.enter("link"),f=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(f=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${u}`),h+=l.move(" "+a),h+=l.move(n.safe(e.title,{before:h,after:a,...l.current()})),h+=l.move(a),f()),h+=l.move(")"),c(),h}function _w(e,t,n){return dg(e,n)?"<":"["}hg.peek=Sw;function hg(e,t,n,i){const a=e.referenceType,u=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(i);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const m=n.stack;n.stack=[],l=n.enter("reference");const E=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=m,u(),a==="full"||!h||h!==E?f+=c.move(E+"]"):a==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function Sw(){return"["}function Ud(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function vw(e){const t=Ud(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Aw(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function pg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Nw(e,t,n,i){const a=n.enter("list"),u=n.bulletCurrent;let l=e.ordered?Aw(n):Ud(n);const c=e.ordered?l==="."?")":".":vw(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&m&&(!m.children||!m.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),pg(n)===l&&m){let E=-1;for(;++E<e.children.length;){const y=e.children[E];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,i);return n.bulletLastUsed=l,n.bulletCurrent=u,a(),h}function Iw(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Lw(e,t,n,i){const a=Iw(n);let u=n.bulletCurrent||Ud(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let l=u.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(i);c.move(u+" ".repeat(l-u.length)),c.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return f(),h;function m(E,y,x){return y?(x?"":" ".repeat(l))+E:(x?u:u+" ".repeat(l-u.length))+E}}function Rw(e,t,n,i){const a=n.enter("paragraph"),u=n.enter("phrasing"),l=n.containerPhrasing(e,i);return u(),a(),l}const Ow=To(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Pw(e,t,n,i){return(e.children.some(function(l){return Ow(l)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function Dw(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mg.peek=Mw;function mg(e,t,n,i){const a=Dw(n),u=n.enter("strong"),l=n.createTracker(i),c=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:c,...l.current()}));const h=f.charCodeAt(0),m=io(i.before.charCodeAt(i.before.length-1),h,a);m.inside&&(f=fa(h)+f.slice(1));const E=f.charCodeAt(f.length-1),y=io(i.after.charCodeAt(0),E,a);y.inside&&(f=f.slice(0,-1)+fa(E));const x=l.move(a+a);return u(),n.attentionEncodeSurroundingInfo={after:y.outside,before:m.outside},c+f+x}function Mw(e,t,n){return n.options.strong||"*"}function Bw(e,t,n,i){return n.safe(e.value,i)}function Fw(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jw(e,t,n){const i=(pg(n)+(n.options.ruleSpaces?" ":"")).repeat(Fw(n));return n.options.ruleSpaces?i.slice(0,-1):i}const gg={blockquote:ow,break:im,code:pw,definition:gw,emphasis:ag,hardBreak:im,heading:yw,html:ug,image:og,imageReference:lg,inlineCode:cg,link:fg,linkReference:hg,list:Nw,listItem:Lw,paragraph:Rw,root:Pw,strong:mg,text:Bw,thematicBreak:jw};function Hw(){return{enter:{table:Uw,tableData:sm,tableHeader:sm,tableRow:$w},exit:{codeText:Vw,table:zw,tableData:Fc,tableHeader:Fc,tableRow:Fc}}}function Uw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function zw(e){this.exit(e),this.data.inTable=void 0}function $w(e){this.enter({type:"tableRow",children:[]},e)}function Fc(e){this.exit(e)}function sm(e){this.enter({type:"tableCell",children:[]},e)}function Vw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ww));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ww(e,t){return t==="|"?t:e}function Yw(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,a=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
176
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:f,tableRow:c}};function l(x,k,v,_){return h(m(x,v,_),x.align)}function c(x,k,v,_){const A=E(x,v,_),j=h([A]);return j.slice(0,j.indexOf(`
|
|
177
|
-
`))}function f(x,k,v,_){const A=v.enter("tableCell"),j=v.enter("phrasing"),F=v.containerPhrasing(x,{..._,before:u,after:u});return j(),A(),F}function h(x,k){return aw(x,{align:k,alignDelimiters:i,padding:n,stringLength:a})}function m(x,k,v){const _=x.children;let A=-1;const j=[],F=k.enter("table");for(;++A<_.length;)j[A]=E(_[A],k,v);return F(),j}function E(x,k,v){const _=x.children;let A=-1;const j=[],F=k.enter("tableRow");for(;++A<_.length;)j[A]=f(_[A],x,k,v);return F(),j}function y(x,k,v){let _=gg.inlineCode(x,k,v);return v.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function qw(){return{exit:{taskListCheckValueChecked:am,taskListCheckValueUnchecked:am,paragraph:Gw}}}function Qw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Kw}}}function am(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Gw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const a=t.children;let u=-1,l;for(;++u<a.length;){const c=a[u];if(c.type==="paragraph"){l=c;break}}l===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function Kw(e,t,n,i){const a=e.children[0],u=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(i);u&&c.move(l);let f=gg.listItem(e,t,n,{...i,...c.current()});return u&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(m){return m+l}}function Xw(){return[NC(),KC(),ew(),Hw(),qw()]}function Zw(e){return{extensions:[IC(),XC(e),tw(),Yw(e),Qw()]}}const Jw={tokenize:s_,partial:!0},Eg={tokenize:a_,partial:!0},bg={tokenize:u_,partial:!0},xg={tokenize:o_,partial:!0},e_={tokenize:l_,partial:!0},yg={name:"wwwAutolink",tokenize:r_,previous:kg},Tg={name:"protocolAutolink",tokenize:i_,previous:Cg},ir={name:"emailAutolink",tokenize:n_,previous:wg},Vn={};function t_(){return{text:Vn}}let ti=48;for(;ti<123;)Vn[ti]=ir,ti++,ti===58?ti=65:ti===91&&(ti=97);Vn[43]=ir;Vn[45]=ir;Vn[46]=ir;Vn[95]=ir;Vn[72]=[ir,Tg];Vn[104]=[ir,Tg];Vn[87]=[ir,yg];Vn[119]=[ir,yg];function n_(e,t,n){const i=this;let a,u;return l;function l(E){return!rd(E)||!wg.call(i,i.previous)||zd(i.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return rd(E)?(e.consume(E),c):E===64?(e.consume(E),f):n(E)}function f(E){return E===46?e.check(e_,m,h)(E):E===45||E===95||Dt(E)?(u=!0,e.consume(E),f):m(E)}function h(E){return e.consume(E),a=!0,f}function m(E){return u&&a&&Ut(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function r_(e,t,n){const i=this;return a;function a(l){return l!==87&&l!==119||!kg.call(i,i.previous)||zd(i.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Jw,e.attempt(Eg,e.attempt(bg,u),n),n)(l))}function u(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function i_(e,t,n){const i=this;let a="",u=!1;return l;function l(E){return(E===72||E===104)&&Cg.call(i,i.previous)&&!zd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(Ut(E)&&a.length<5)return a+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const y=a.toLowerCase();if(y==="http"||y==="https")return e.consume(E),f}return n(E)}function f(E){return E===47?(e.consume(E),u?h:(u=!0,f)):n(E)}function h(E){return E===null||no(E)||Ze(E)||ci(E)||bo(E)?n(E):e.attempt(Eg,e.attempt(bg,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function s_(e,t,n){let i=0;return a;function a(l){return(l===87||l===119)&&i<3?(i++,e.consume(l),a):l===46&&i===3?(e.consume(l),u):n(l)}function u(l){return l===null?n(l):t(l)}}function a_(e,t,n){let i,a,u;return l;function l(h){return h===46||h===95?e.check(xg,f,c)(h):h===null||Ze(h)||ci(h)||h!==45&&bo(h)?f(h):(u=!0,e.consume(h),l)}function c(h){return h===95?i=!0:(a=i,i=void 0),e.consume(h),l}function f(h){return a||i||!u?n(h):t(h)}}function u_(e,t){let n=0,i=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&i<n?u(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(xg,t,u)(l):l===null||Ze(l)||ci(l)?t(l):(e.consume(l),a)}function u(l){return l===41&&i++,e.consume(l),a}}function o_(e,t,n){return i;function i(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),i):c===38?(e.consume(c),u):c===93?(e.consume(c),a):c===60||c===null||Ze(c)||ci(c)?t(c):n(c)}function a(c){return c===null||c===40||c===91||Ze(c)||ci(c)?t(c):i(c)}function u(c){return Ut(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),i):Ut(c)?(e.consume(c),l):n(c)}}function l_(e,t,n){return i;function i(u){return e.consume(u),a}function a(u){return Dt(u)?n(u):t(u)}}function kg(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ze(e)}function Cg(e){return!Ut(e)}function wg(e){return!(e===47||rd(e))}function rd(e){return e===43||e===45||e===46||e===95||Dt(e)}function zd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const c_={tokenize:b_,partial:!0};function d_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:m_,continuation:{tokenize:g_},exit:E_}},text:{91:{name:"gfmFootnoteCall",tokenize:p_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:f_,resolveTo:h_}}}}function f_(e,t,n){const i=this;let a=i.events.length;const u=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let l;for(;a--;){const f=i.events[a][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const h=Ln(i.sliceSerialize({start:l.end,end:i.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function h_(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};a.end.column++,a.end.offset++,a.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},c=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",u,t],["enter",l,t],["exit",l,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...c),e}function p_(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u=0,l;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),f}function f(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(u>999||E===93&&!l||E===null||E===91||Ze(E))return n(E);if(E===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return a.includes(Ln(i.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return Ze(E)||(l=!0),u++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),u++,h):h(E)}}function m_(e,t,n){const i=this,a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u,l=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(k)}function m(k){if(l>999||k===93&&!c||k===null||k===91||Ze(k))return n(k);if(k===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return u=Ln(i.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Ze(k)||(c=!0),l++,e.consume(k),k===92?E:m}function E(k){return k===91||k===92||k===93?(e.consume(k),l++,m):m(k)}function y(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),a.includes(u)||a.push(u),$e(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}function g_(e,t,n){return e.check(ya,t,e.attempt(c_,t,n))}function E_(e){e.exit("gfmFootnoteDefinition")}function b_(e,t,n){const i=this;return $e(e,a,"gfmFootnoteDefinitionIndent",5);function a(u){const l=i.events[i.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(u):n(u)}}function x_(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:u,resolveAll:a};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function a(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},E={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},y=[["enter",m,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",E,c]],x=c.parser.constructs.insideSpan.null;x&&ln(y,y.length,0,xo(x,l.slice(h+1,f),c)),ln(y,y.length,0,[["exit",E,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",m,c]]),ln(l,h-1,f-h+3,y),f=h+y.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function u(l,c,f){const h=this.previous,m=this.events;let E=0;return y;function y(k){return h===126&&m[m.length-1][1].type!=="characterEscape"?f(k):(l.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const v=Gi(h);if(k===126)return E>1?f(k):(l.consume(k),E++,x);if(E<2&&!n)return f(k);const _=l.exit("strikethroughSequenceTemporary"),A=Gi(k);return _._open=!A||A===2&&!!v,_._close=!v||v===2&&!!A,c(k)}}}class y_{constructor(){this.map=[]}add(t,n,i){T_(this,t,n,i)}consume(t){if(this.map.sort(function(u,l){return u[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let a=i.pop();for(;a;){for(const u of a)t.push(u);a=i.pop()}this.map.length=0}}function T_(e,t,n,i){let a=0;if(!(n===0&&i.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...i);return}a+=1}e.map.push([t,n,i])}}function k_(e,t){let n=!1;const i=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=i.length-1;i[u]=i[u]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function C_(){return{flow:{null:{name:"table",tokenize:w_,resolveAll:__}}}}function w_(e,t,n){const i=this;let a=0,u=0,l;return c;function c(H){let ue=i.events.length-1;for(;ue>-1;){const he=i.events[ue][1].type;if(he==="lineEnding"||he==="linePrefix")ue--;else break}const le=ue>-1?i.events[ue][1].type:null,_e=le==="tableHead"||le==="tableRow"?B:f;return _e===B&&i.parser.lazy[i.now().line]?n(H):_e(H)}function f(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(l=!0,u+=1),m(H)}function m(H){return H===null?n(H):Ie(H)?u>1?(u=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),x):n(H):ze(H)?$e(e,m,"whitespace")(H):(u+=1,l&&(l=!1,a+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),l=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||Ze(H)?(e.exit("data"),m(H)):(e.consume(H),H===92?y:E)}function y(H){return H===92||H===124?(e.consume(H),E):E(H)}function x(H){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(H):(e.enter("tableDelimiterRow"),l=!1,ze(H)?$e(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):k(H))}function k(H){return H===45||H===58?_(H):H===124?(l=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),v):Y(H)}function v(H){return ze(H)?$e(e,_,"whitespace")(H):_(H)}function _(H){return H===58?(u+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),A):H===45?(u+=1,A(H)):H===null||Ie(H)?K(H):Y(H)}function A(H){return H===45?(e.enter("tableDelimiterFiller"),j(H)):Y(H)}function j(H){return H===45?(e.consume(H),j):H===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),F):(e.exit("tableDelimiterFiller"),F(H))}function F(H){return ze(H)?$e(e,K,"whitespace")(H):K(H)}function K(H){return H===124?k(H):H===null||Ie(H)?!l||a!==u?Y(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):Y(H)}function Y(H){return n(H)}function B(H){return e.enter("tableRow"),ae(H)}function ae(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),ae):H===null||Ie(H)?(e.exit("tableRow"),t(H)):ze(H)?$e(e,ae,"whitespace")(H):(e.enter("data"),q(H))}function q(H){return H===null||H===124||Ze(H)?(e.exit("data"),ae(H)):(e.consume(H),H===92?de:q)}function de(H){return H===92||H===124?(e.consume(H),q):q(H)}}function __(e,t){let n=-1,i=!0,a=0,u=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,h,m,E;const y=new y_;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(um(y,t,f,h,m),m=void 0,f=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,E=void 0,u=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},y.add(n,0,[["enter",m,t]])),a=k.type==="tableDelimiterRow"?2:m?3:1):a&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,l[2]===0&&(u[1]!==0&&(l[0]=l[1],E=Uu(y,t,u,a,void 0,E),u=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(i?i=!1:(u[1]!==0&&(l[0]=l[1],E=Uu(y,t,u,a,void 0,E)),u=l,l=[u[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,u[1]!==0?(l[0]=l[1],E=Uu(y,t,u,a,n,E)):l[1]!==0&&(E=Uu(y,t,l,a,n,E)),a=0):a&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&um(y,t,f,h,m),y.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=k_(t.events,n))}return e}function Uu(e,t,n,i,a,u){const l=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(u.end=Object.assign({},Vi(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const f=Vi(t.events,n[1]);if(u={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=Vi(t.events,n[2]),m=Vi(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,t]]),i!==2){const y=t.events[n[2]],x=t.events[n[3]];if(y[1].end=Object.assign({},x[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,v=n[3]-n[2]-1;e.add(k,v,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return a!==void 0&&(u.end=Object.assign({},Vi(t.events,a)),e.add(a,0,[["exit",u,t]]),u=void 0),u}function um(e,t,n,i,a){const u=[],l=Vi(t.events,n);a&&(a.end=Object.assign({},l),u.push(["exit",a,t])),i.end=Object.assign({},l),u.push(["exit",i,t]),e.add(n+1,0,u)}function Vi(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const S_={name:"tasklistCheck",tokenize:A_};function v_(){return{text:{91:S_}}}function A_(e,t,n){const i=this;return a;function a(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),u)}function u(f){return Ze(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Ie(f)?t(f):ze(f)?e.check({tokenize:N_},t,n)(f):n(f)}}function N_(e,t,n){return $e(e,i,"whitespace");function i(a){return a===null?n(a):t(a)}}function I_(e){return R1([t_(),d_(),x_(e),C_(),v_()])}const L_={};function _g(e){const t=this,n=e||L_,i=t.data(),a=i.micromarkExtensions||(i.micromarkExtensions=[]),u=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),l=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);a.push(I_(n)),u.push(Xw()),l.push(Zw(n))}const Ki={indicator:"indicator",textOnly:"text-only",remove:"remove"};function R_({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:i=!1,allowedProtocols:a=[],blockedImageClass:u="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500",linkBlockPolicy:c=Ki.indicator,imageBlockPolicy:f=Ki.indicator}){const h=t.length&&!t.every(E=>E==="*"),m=n.length&&!n.every(E=>E==="*");if(!e&&(h||m))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return E=>{const y=F_(e,t,n,i,a,u,l,c,f);Sg(E),Rn(E,y)}}function om(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function O_(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const P_=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),D_=new Set(["javascript:","data:","file:","vbscript:"]);function lm(e,t,n,i=!1,a=!1,u=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!a)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return a&&i&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const m=e.substring(5);if(m&&m.length>0&&m!=="invalid")return e}}catch{return null}return null}const l=om(e,n);if(!l||D_.has(l.protocol)||!(P_.has(l.protocol)||u.includes(l.protocol)||u.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const f=O_(e);return l&&t.some(h=>{const m=om(h,n);return!m||m.origin!==l.origin?!1:l.href.startsWith(m.href)})?f?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:f?l.pathname+l.search+l.hash:l.href:null}function Sg(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)Sg(t)}}const jc=Symbol("node-seen");function M_(e,t,n){return t===Ki.remove?{type:"remove"}:t===Ki.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function B_(e,t,n){if(t===Ki.remove)return{type:"remove"};if(t===Ki.textOnly){const i=String(e.properties.alt||"");return i?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:i}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const F_=(e,t,n,i,a,u,l,c,f)=>{const h=(m,E,y)=>{if(m.type!=="element"||m[jc])return Xs;if(m.tagName==="a"){const x=lm(m.properties.href,t,e,!1,!1,a);if(x===null){if(m[jc]=!0,Rn(m,h),y&&typeof E=="number"){const k=M_(m,c,l);if(k.type==="remove")return y.children.splice(E,1),[Wi,E];y.children[E]=k.element}return Wi}else return m.properties.href=x,m.properties.target="_blank",m.properties.rel="noopener noreferrer",Xs}if(m.tagName==="img"){const x=lm(m.properties.src,n,e,i,!0,a);if(x===null){if(m[jc]=!0,Rn(m,h),y&&typeof E=="number"){const k=B_(m,f,u);if(k.type==="remove")return y.children.splice(E,1),[Wi,E];y.children[E]=k.element}return Wi}else return m.properties.src=x,Xs}return Xs};return h},cm=/[#.]/g;function j_(e,t){const n=e||"",i={};let a=0,u,l;for(;a<n.length;){cm.lastIndex=a;const c=cm.exec(n),f=n.slice(a,c?c.index:n.length);f&&(u?u==="#"?i.id=f:Array.isArray(i.className)?i.className.push(f):i.className=[f]:l=f,a+=f.length),c&&(u=c[0],a++)}return{type:"element",tagName:l||t||"div",properties:i,children:[]}}function vg(e,t,n){const i=n?$_(n):void 0;function a(u,l,...c){let f;if(u==null){f={type:"root",children:[]};const h=l;c.unshift(h)}else{f=j_(u,t);const h=f.tagName.toLowerCase(),m=i?i.get(h):void 0;if(f.tagName=m||h,H_(l))c.unshift(l);else for(const[E,y]of Object.entries(l))U_(e,f.properties,E,y)}for(const h of c)id(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function H_(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 i of n){const a=t[i];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const u=a;for(const l of u)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function U_(e,t,n,i){const a=go(e,n);let u;if(i!=null){if(typeof i=="number"){if(Number.isNaN(i))return;u=i}else typeof i=="boolean"?u=i:typeof i=="string"?a.spaceSeparated?u=T0(i):a.commaSeparated?u=g0(i):a.commaOrSpaceSeparated?u=T0(g0(i).join(" ")):u=dm(a,a.property,i):Array.isArray(i)?u=[...i]:u=a.property==="style"?z_(i):String(i);if(Array.isArray(u)){const l=[];for(const c of u)l.push(dm(a,a.property,c));u=l}a.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[a.property]=u}}function id(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)id(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?id(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function dm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ca(n)===ca(t)))return!0}return n}function z_(e){const t=[];for(const[n,i]of Object.entries(e))t.push([n,i].join(": "));return t.join("; ")}function $_(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const V_=["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"],W_=vg(xa,"div"),Y_=vg(Fr,"g",V_);function q_(e){const t=String(e),n=[];return{toOffset:a,toPoint:i};function i(u){if(typeof u=="number"&&u>-1&&u<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=fm(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>u)return{line:l+1,column:u-(l>0?n[l-1]:0)+1,offset:u};l++}}}function a(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const c=n[n.length-1],f=fm(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const l=(u.line>1?n[u.line-2]:0)+u.column-1;if(l<n[u.line-1])return l}}}function fm(e,t){const n=e.indexOf("\r",t),i=e.indexOf(`
|
|
178
|
-
`,t);return i===-1?n:n===-1||n+1===i?i:n<i?n:i}const ai={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/"},Ag={}.hasOwnProperty,Q_=Object.prototype;function G_(e,t){const n=t||{};return $d({file:n.file||void 0,location:!1,schema:n.space==="svg"?Fr:xa,verbose:n.verbose||!1},e)}function $d(e,t){let n;switch(t.nodeName){case"#comment":{const i=t;return n={type:"comment",value:i.data},Ku(e,i,n),n}case"#document":case"#document-fragment":{const i=t,a="mode"in i?i.mode==="quirks"||i.mode==="limited-quirks":!1;if(n={type:"root",children:Ng(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const u=String(e.file),l=q_(u),c=l.toPoint(0),f=l.toPoint(u.length);n.position={start:c,end:f}}return n}case"#documentType":{const i=t;return n={type:"doctype"},Ku(e,i,n),n}case"#text":{const i=t;return n={type:"text",value:i.value},Ku(e,i,n),n}default:return n=K_(e,t),n}}function Ng(e,t){let n=-1;const i=[];for(;++n<t.length;){const a=$d(e,t[n]);i.push(a)}return i}function K_(e,t){const n=e.schema;e.schema=t.namespaceURI===ai.svg?Fr:xa;let i=-1;const a={};for(;++i<t.attrs.length;){const c=t.attrs[i],f=(c.prefix?c.prefix+":":"")+c.name;Ag.call(Q_,f)||(a[f]=c.value)}const l=(e.schema.space==="svg"?Y_:W_)(t.tagName,a,Ng(e,t.childNodes));if(Ku(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&Yi(f.startTag),m=f&&f.endTag&&Yi(f.endTag),E=$d(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),l.content=E}return e.schema=n,l}function Ku(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const i=X_(e,n,t.sourceCodeLocation);i&&(e.location=!0,n.position=i)}}function X_(e,t,n){const i=Yi(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(i&&!n.endTag&&a&&a.position&&a.position.end&&(i.end=Object.assign({},a.position.end)),e.verbose){const u={};let l;if(n.attrs)for(l in n.attrs)Ag.call(n.attrs,l)&&(u[go(e.schema,l).property]=Yi(n.attrs[l]));n.startTag;const c=Yi(n.startTag),f=n.endTag?Yi(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=u,t.data={position:h}}}return i}function Yi(e){const t=hm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=hm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function hm(e){return e.line&&e.column?e:void 0}const Z_={},J_={}.hasOwnProperty,Ig=sg("type",{handlers:{root:tS,element:aS,text:iS,comment:sS,doctype:rS}});function eS(e,t){const i=(t||Z_).space;return Ig(e,i==="svg"?Fr:xa)}function tS(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Vd(e.children,n,t),es(e,n),n}function nS(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Vd(e.children,n,t),es(e,n),n}function rS(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return es(e,t),t}function iS(e){const t={nodeName:"#text",value:e.value,parentNode:null};return es(e,t),t}function sS(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return es(e,t),t}function aS(e,t){const n=t;let i=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=Fr);const a=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&J_.call(e.properties,u)){const f=uS(i,u,e.properties[u]);f&&a.push(f)}}const l=i.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:ai[l],childNodes:[],parentNode:null};return c.childNodes=Vd(e.children,c,i),es(e,c),e.tagName==="template"&&e.content&&(c.content=nS(e.content,i)),c}function uS(e,t,n){const i=go(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&i.boolean)return;Array.isArray(n)&&(n=i.commaSeparated?m1(n):C1(n));const a={name:i.attribute,value:n===!0?"":String(n)};if(i.space&&i.space!=="html"&&i.space!=="svg"){const u=a.name.indexOf(":");u<0?a.prefix="":(a.name=a.name.slice(u+1),a.prefix=i.attribute.slice(0,u)),a.namespace=ai[i.space]}return a}function Vd(e,t,n){let i=-1;const a=[];if(e)for(;++i<e.length;){const u=Ig(e[i],n);u.parentNode=t,a.push(u)}return a}function es(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 oS=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],lS=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]),st="�";var S;(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"})(S||(S={}));const Xt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Lg(e){return e>=55296&&e<=57343}function cS(e){return e>=56320&&e<=57343}function dS(e,t){return(e-55296)*1024+9216+t}function Rg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Og(e){return e>=64976&&e<=65007||lS.has(e)}var W;(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"})(W||(W={}));const fS=65536;class hS{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=fS,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:i,col:a,offset:u}=this,l=a+n,c=u+n;return{code:t,startLine:i,endLine:i,startCol:l,endCol:l,startOffset:c,endOffset:c}}_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(cS(n))return this.pos++,this._addGap(),dS(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,S.EOF;return this._err(W.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 i=0;i<t.length;i++)if((this.html.charCodeAt(this.pos+i)|32)!==t.charCodeAt(i))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,S.EOF;const i=this.html.charCodeAt(n);return i===S.CARRIAGE_RETURN?S.LINE_FEED:i}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,S.EOF;let t=this.html.charCodeAt(this.pos);return t===S.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,S.LINE_FEED):t===S.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Lg(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===S.LINE_FEED||t===S.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Rg(t)?this._err(W.controlCharacterInInputStream):Og(t)&&this._err(W.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ue;(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"})(Ue||(Ue={}));function Pg(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 pS=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))),mS=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 gS(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=mS.get(e))!==null&&t!==void 0?t:e}var wt;(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"})(wt||(wt={}));const ES=32;var Or;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Or||(Or={}));function sd(e){return e>=wt.ZERO&&e<=wt.NINE}function bS(e){return e>=wt.UPPER_A&&e<=wt.UPPER_F||e>=wt.LOWER_A&&e<=wt.LOWER_F}function xS(e){return e>=wt.UPPER_A&&e<=wt.UPPER_Z||e>=wt.LOWER_A&&e<=wt.LOWER_Z||sd(e)}function yS(e){return e===wt.EQUALS||xS(e)}var Ct;(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"})(Ct||(Ct={}));var rr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(rr||(rr={}));class TS{constructor(t,n,i){this.decodeTree=t,this.emitCodePoint=n,this.errors=i,this.state=Ct.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=rr.Strict}startEntity(t){this.decodeMode=t,this.state=Ct.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Ct.EntityStart:return t.charCodeAt(n)===wt.NUM?(this.state=Ct.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Ct.NamedEntity,this.stateNamedEntity(t,n));case Ct.NumericStart:return this.stateNumericStart(t,n);case Ct.NumericDecimal:return this.stateNumericDecimal(t,n);case Ct.NumericHex:return this.stateNumericHex(t,n);case Ct.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|ES)===wt.LOWER_X?(this.state=Ct.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Ct.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,i,a){if(n!==i){const u=i-n;this.result=this.result*Math.pow(a,u)+Number.parseInt(t.substr(n,u),a),this.consumed+=u}}stateNumericHex(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(sd(a)||bS(a))n+=1;else return this.addToNumericResult(t,i,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,i,n,16),-1}stateNumericDecimal(t,n){const i=n;for(;n<t.length;){const a=t.charCodeAt(n);if(sd(a))n+=1;else return this.addToNumericResult(t,i,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,i,n,10),-1}emitNumericEntity(t,n){var i;if(this.consumed<=n)return(i=this.errors)===null||i===void 0||i.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===wt.SEMI)this.consumed+=1;else if(this.decodeMode===rr.Strict)return 0;return this.emitCodePoint(gS(this.result),this.consumed),this.errors&&(t!==wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:i}=this;let a=i[this.treeIndex],u=(a&Or.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=kS(i,a,this.treeIndex+Math.max(1,u),l),this.treeIndex<0)return this.result===0||this.decodeMode===rr.Attribute&&(u===0||yS(l))?0:this.emitNotTerminatedNamedEntity();if(a=i[this.treeIndex],u=(a&Or.VALUE_LENGTH)>>14,u!==0){if(l===wt.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==rr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:i}=this,a=(i[n]&Or.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,i){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Or.VALUE_LENGTH:a[t+1],i),n===3&&this.emitCodePoint(a[t+2],i),i}end(){var t;switch(this.state){case Ct.NamedEntity:return this.result!==0&&(this.decodeMode!==rr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Ct.NumericDecimal:return this.emitNumericEntity(0,2);case Ct.NumericHex:return this.emitNumericEntity(0,3);case Ct.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Ct.EntityStart:return 0}}}function kS(e,t,n,i){const a=(t&Or.BRANCH_LENGTH)>>7,u=t&Or.JUMP_TABLE;if(a===0)return u!==0&&i===u?n:-1;if(u){const f=i-u;return f<0||f>=a?-1:e[n+f]-1}let l=n,c=l+a-1;for(;l<=c;){const f=l+c>>>1,h=e[f];if(h<i)l=f+1;else if(h>i)c=f-1;else return e[f+a]}return-1}var ee;(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/"})(ee||(ee={}));var ui;(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"})(ui||(ui={}));var xn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(xn||(xn={}));var z;(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"})(z||(z={}));var p;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(p||(p={}));const CS=new Map([[z.A,p.A],[z.ADDRESS,p.ADDRESS],[z.ANNOTATION_XML,p.ANNOTATION_XML],[z.APPLET,p.APPLET],[z.AREA,p.AREA],[z.ARTICLE,p.ARTICLE],[z.ASIDE,p.ASIDE],[z.B,p.B],[z.BASE,p.BASE],[z.BASEFONT,p.BASEFONT],[z.BGSOUND,p.BGSOUND],[z.BIG,p.BIG],[z.BLOCKQUOTE,p.BLOCKQUOTE],[z.BODY,p.BODY],[z.BR,p.BR],[z.BUTTON,p.BUTTON],[z.CAPTION,p.CAPTION],[z.CENTER,p.CENTER],[z.CODE,p.CODE],[z.COL,p.COL],[z.COLGROUP,p.COLGROUP],[z.DD,p.DD],[z.DESC,p.DESC],[z.DETAILS,p.DETAILS],[z.DIALOG,p.DIALOG],[z.DIR,p.DIR],[z.DIV,p.DIV],[z.DL,p.DL],[z.DT,p.DT],[z.EM,p.EM],[z.EMBED,p.EMBED],[z.FIELDSET,p.FIELDSET],[z.FIGCAPTION,p.FIGCAPTION],[z.FIGURE,p.FIGURE],[z.FONT,p.FONT],[z.FOOTER,p.FOOTER],[z.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[z.FORM,p.FORM],[z.FRAME,p.FRAME],[z.FRAMESET,p.FRAMESET],[z.H1,p.H1],[z.H2,p.H2],[z.H3,p.H3],[z.H4,p.H4],[z.H5,p.H5],[z.H6,p.H6],[z.HEAD,p.HEAD],[z.HEADER,p.HEADER],[z.HGROUP,p.HGROUP],[z.HR,p.HR],[z.HTML,p.HTML],[z.I,p.I],[z.IMG,p.IMG],[z.IMAGE,p.IMAGE],[z.INPUT,p.INPUT],[z.IFRAME,p.IFRAME],[z.KEYGEN,p.KEYGEN],[z.LABEL,p.LABEL],[z.LI,p.LI],[z.LINK,p.LINK],[z.LISTING,p.LISTING],[z.MAIN,p.MAIN],[z.MALIGNMARK,p.MALIGNMARK],[z.MARQUEE,p.MARQUEE],[z.MATH,p.MATH],[z.MENU,p.MENU],[z.META,p.META],[z.MGLYPH,p.MGLYPH],[z.MI,p.MI],[z.MO,p.MO],[z.MN,p.MN],[z.MS,p.MS],[z.MTEXT,p.MTEXT],[z.NAV,p.NAV],[z.NOBR,p.NOBR],[z.NOFRAMES,p.NOFRAMES],[z.NOEMBED,p.NOEMBED],[z.NOSCRIPT,p.NOSCRIPT],[z.OBJECT,p.OBJECT],[z.OL,p.OL],[z.OPTGROUP,p.OPTGROUP],[z.OPTION,p.OPTION],[z.P,p.P],[z.PARAM,p.PARAM],[z.PLAINTEXT,p.PLAINTEXT],[z.PRE,p.PRE],[z.RB,p.RB],[z.RP,p.RP],[z.RT,p.RT],[z.RTC,p.RTC],[z.RUBY,p.RUBY],[z.S,p.S],[z.SCRIPT,p.SCRIPT],[z.SEARCH,p.SEARCH],[z.SECTION,p.SECTION],[z.SELECT,p.SELECT],[z.SOURCE,p.SOURCE],[z.SMALL,p.SMALL],[z.SPAN,p.SPAN],[z.STRIKE,p.STRIKE],[z.STRONG,p.STRONG],[z.STYLE,p.STYLE],[z.SUB,p.SUB],[z.SUMMARY,p.SUMMARY],[z.SUP,p.SUP],[z.TABLE,p.TABLE],[z.TBODY,p.TBODY],[z.TEMPLATE,p.TEMPLATE],[z.TEXTAREA,p.TEXTAREA],[z.TFOOT,p.TFOOT],[z.TD,p.TD],[z.TH,p.TH],[z.THEAD,p.THEAD],[z.TITLE,p.TITLE],[z.TR,p.TR],[z.TRACK,p.TRACK],[z.TT,p.TT],[z.U,p.U],[z.UL,p.UL],[z.SVG,p.SVG],[z.VAR,p.VAR],[z.WBR,p.WBR],[z.XMP,p.XMP]]);function ts(e){var t;return(t=CS.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ie=p,wS={[ee.HTML]:new Set([ie.ADDRESS,ie.APPLET,ie.AREA,ie.ARTICLE,ie.ASIDE,ie.BASE,ie.BASEFONT,ie.BGSOUND,ie.BLOCKQUOTE,ie.BODY,ie.BR,ie.BUTTON,ie.CAPTION,ie.CENTER,ie.COL,ie.COLGROUP,ie.DD,ie.DETAILS,ie.DIR,ie.DIV,ie.DL,ie.DT,ie.EMBED,ie.FIELDSET,ie.FIGCAPTION,ie.FIGURE,ie.FOOTER,ie.FORM,ie.FRAME,ie.FRAMESET,ie.H1,ie.H2,ie.H3,ie.H4,ie.H5,ie.H6,ie.HEAD,ie.HEADER,ie.HGROUP,ie.HR,ie.HTML,ie.IFRAME,ie.IMG,ie.INPUT,ie.LI,ie.LINK,ie.LISTING,ie.MAIN,ie.MARQUEE,ie.MENU,ie.META,ie.NAV,ie.NOEMBED,ie.NOFRAMES,ie.NOSCRIPT,ie.OBJECT,ie.OL,ie.P,ie.PARAM,ie.PLAINTEXT,ie.PRE,ie.SCRIPT,ie.SECTION,ie.SELECT,ie.SOURCE,ie.STYLE,ie.SUMMARY,ie.TABLE,ie.TBODY,ie.TD,ie.TEMPLATE,ie.TEXTAREA,ie.TFOOT,ie.TH,ie.THEAD,ie.TITLE,ie.TR,ie.TRACK,ie.UL,ie.WBR,ie.XMP]),[ee.MATHML]:new Set([ie.MI,ie.MO,ie.MN,ie.MS,ie.MTEXT,ie.ANNOTATION_XML]),[ee.SVG]:new Set([ie.TITLE,ie.FOREIGN_OBJECT,ie.DESC]),[ee.XLINK]:new Set,[ee.XML]:new Set,[ee.XMLNS]:new Set},ad=new Set([ie.H1,ie.H2,ie.H3,ie.H4,ie.H5,ie.H6]);z.STYLE,z.SCRIPT,z.XMP,z.IFRAME,z.NOEMBED,z.NOFRAMES,z.PLAINTEXT;var N;(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"})(N||(N={}));const ft={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function _S(e){return e>=S.DIGIT_0&&e<=S.DIGIT_9}function Zs(e){return e>=S.LATIN_CAPITAL_A&&e<=S.LATIN_CAPITAL_Z}function SS(e){return e>=S.LATIN_SMALL_A&&e<=S.LATIN_SMALL_Z}function Ir(e){return SS(e)||Zs(e)}function pm(e){return Ir(e)||_S(e)}function zu(e){return e+32}function Dg(e){return e===S.SPACE||e===S.LINE_FEED||e===S.TABULATION||e===S.FORM_FEED}function mm(e){return Dg(e)||e===S.SOLIDUS||e===S.GREATER_THAN_SIGN}function vS(e){return e===S.NULL?W.nullCharacterReference:e>1114111?W.characterReferenceOutsideUnicodeRange:Lg(e)?W.surrogateCharacterReference:Og(e)?W.noncharacterCharacterReference:Rg(e)||e===S.CARRIAGE_RETURN?W.controlCharacterReference:null}class AS{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new hS(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new TS(pS,(i,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(i)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(W.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:i=>{this._err(W.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+i)},validateNumericCharacterReference:i=>{const a=vS(i);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var i,a;(a=(i=this.handler).onParseError)===null||a===void 0||a.call(i,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==null||t())}write(t,n,i){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||i==null||i()}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:Ue.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ue.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ue.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ue.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 i=this.currentToken;if(Pg(i,this.currentAttr.name)===null){if(i.attrs.push(this.currentAttr),i.location&&this.currentLocation){const a=(t=(n=i.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(W.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=ts(t.tagName),t.type===Ue.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(W.endTagWithAttributes),t.selfClosing&&this._err(W.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 Ue.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ue.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ue.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:Ue.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=Dg(t)?Ue.WHITESPACE_CHARACTER:t===S.NULL?Ue.NULL_CHARACTER:Ue.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ue.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?rr.Attribute:rr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitCodePoint(t);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case S.AMPERSAND:{this._startCharacterReference();break}case S.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ir(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case S.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case S.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case S.QUESTION_MARK:{this._err(W.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case S.EOF:{this._err(W.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(W.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ir(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case S.GREATER_THAN_SIGN:{this._err(W.missingEndTagName),this.state=N.DATA;break}case S.EOF:{this._err(W.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(W.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.tagName+=st;break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Zs(t)?zu(t):t)}}_stateRcdataLessThanSign(t){t===S.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Ir(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case S.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case S.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===S.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Ir(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case S.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case S.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Ir(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===S.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===S.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case S.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===S.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ir(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ir(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xt.SCRIPT,!1)&&mm(this.preprocessor.peek(Xt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(W.unexpectedNullCharacter),this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case S.HYPHEN_MINUS:{this._emitChars("-");break}case S.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case S.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(st);break}case S.EOF:{this._err(W.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===S.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Xt.SCRIPT,!1)&&mm(this.preprocessor.peek(Xt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case S.EQUALS_SIGN:{this._err(W.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:case S.SOLIDUS:case S.GREATER_THAN_SIGN:case S.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case S.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:{this._err(W.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.name+=st;break}default:this.currentAttr.name+=String.fromCodePoint(Zs(t)?zu(t):t)}}_stateAfterAttributeName(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case S.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(W.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=st;break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case S.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=st;break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.AMPERSAND:{this._startCharacterReference();break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case S.NULL:{this._err(W.unexpectedNullCharacter),this.currentAttr.value+=st;break}case S.QUOTATION_MARK:case S.APOSTROPHE:case S.LESS_THAN_SIGN:case S.EQUALS_SIGN:case S.GRAVE_ACCENT:{this._err(W.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case S.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case S.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case S.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case S.EOF:{this._err(W.eofInTag),this._emitEOFToken();break}default:this._err(W.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.data+=st;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Xt.DASH_DASH,!0)?(this._createCommentToken(Xt.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(Xt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Xt.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(Xt.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(W.cdataInHtmlContent),this._createCommentToken(Xt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(W.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case S.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.data+=st;break}case S.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case S.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case S.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===S.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===S.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==S.GREATER_THAN_SIGN&&t!==S.EOF&&this._err(W.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case S.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case S.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case S.HYPHEN_MINUS:{n.data+="-";break}case S.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case S.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case S.GREATER_THAN_SIGN:{this._err(W.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case S.EOF:{this._err(W.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case S.EOF:{this._err(W.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Zs(t))this._createDoctypeToken(String.fromCharCode(zu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.NULL:{this._err(W.unexpectedNullCharacter),this._createDoctypeToken(st),this.state=N.DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this._err(W.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.name+=st;break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Zs(t)?zu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Xt.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Xt.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(W.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(W.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(W.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(W.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(W.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.publicId+=st;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.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 S.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.publicId+=st;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.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 S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case S.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.QUOTATION_MARK:{this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(W.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.QUOTATION_MARK:{this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{this._err(W.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(W.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case S.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case S.GREATER_THAN_SIGN:{this._err(W.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case S.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.systemId+=st;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.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 S.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case S.NULL:{this._err(W.unexpectedNullCharacter),n.systemId+=st;break}case S.GREATER_THAN_SIGN:{this._err(W.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.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 S.SPACE:case S.LINE_FEED:case S.TABULATION:case S.FORM_FEED:break;case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.EOF:{this._err(W.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(W.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case S.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case S.NULL:{this._err(W.unexpectedNullCharacter);break}case S.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case S.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case S.EOF:{this._err(W.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===S.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case S.GREATER_THAN_SIGN:{this.state=N.DATA;break}case S.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(S.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&pm(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){pm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===S.SEMICOLON&&this._err(W.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Mg=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),gm=new Set([...Mg,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),so=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),NS=new Set([...so,p.OL,p.UL]),IS=new Set([...so,p.BUTTON]),Em=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),bm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),LS=new Set([p.TR,p.TEMPLATE,p.HTML]),RS=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),OS=new Set([p.TABLE,p.TEMPLATE,p.HTML]),PS=new Set([p.TD,p.TH]);class DS{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,i){this.treeAdapter=n,this.handler=i,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ee.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 i=this._indexOf(t);this.items[i]=n,i===this.stackTop&&(this.current=n)}insertAfter(t,n,i){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,i),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])!==ee.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 i=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(i,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(ad,ee.HTML)}popUntilTableCellPopped(){this.popUntilPopped(PS,ee.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let i=this.stackTop;i>=0;i--)if(t.has(this.tagIDs[i])&&this.treeAdapter.getNamespaceURI(this.items[i])===n)return i;return-1}clearBackTo(t,n){const i=this._indexOfTagNames(t,n);this.shortenToLength(i+1)}clearBackToTableContext(){this.clearBackTo(OS,ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(RS,ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(LS,ee.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]===p.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]===p.HTML}hasInDynamicScope(t,n){for(let i=this.stackTop;i>=0;i--){const a=this.tagIDs[i];switch(this.treeAdapter.getNamespaceURI(this.items[i])){case ee.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case ee.SVG:{if(bm.has(a))return!1;break}case ee.MATHML:{if(Em.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,so)}hasInListItemScope(t){return this.hasInDynamicScope(t,NS)}hasInButtonScope(t){return this.hasInDynamicScope(t,IS)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ee.HTML:{if(ad.has(n))return!0;if(so.has(n))return!1;break}case ee.SVG:{if(bm.has(n))return!1;break}case ee.MATHML:{if(Em.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ee.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ee.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ee.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Mg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&gm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&gm.has(this.currentTagId);)this.pop()}}const Hc=3;var zn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(zn||(zn={}));const xm={type:zn.Marker};class MS{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const i=[],a=n.length,u=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===zn.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===l){const m=this.treeAdapter.getAttrList(h);m.length===a&&i.push({idx:c,attrs:m})}}return i}_ensureNoahArkCondition(t){if(this.entries.length<Hc)return;const n=this.treeAdapter.getAttrList(t),i=this._getNoahArkConditionCandidates(t,n);if(i.length<Hc)return;const a=new Map(n.map(l=>[l.name,l.value]));let u=0;for(let l=0;l<i.length;l++){const c=i[l];c.attrs.every(f=>a.get(f.name)===f.value)&&(u+=1,u>=Hc&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(xm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:zn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const i=this.entries.indexOf(this.bookmark);this.entries.splice(i,0,{type:zn.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(xm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(i=>i.type===zn.Marker||this.treeAdapter.getTagName(i.element)===t);return n&&n.type===zn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===zn.Element&&n.element===t)}}const Lr={createDocument(){return{nodeName:"#document",mode:xn.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 i=e.childNodes.indexOf(n);e.childNodes.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,i){const a=e.childNodes.find(u=>u.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=i;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:i,parentNode:null};Lr.appendChild(e,u)}},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(Lr.isTextNode(n)){n.value+=t;return}}Lr.appendChild(e,Lr.createTextNode(t))},insertTextBefore(e,t,n){const i=e.childNodes[e.childNodes.indexOf(n)-1];i&&Lr.isTextNode(i)?i.value+=t:Lr.insertBefore(e,Lr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(i=>i.name));for(let i=0;i<t.length;i++)n.has(t[i].name)||e.attrs.push(t[i])},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}}},Bg="html",BS="about:legacy-compat",FS="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Fg=["+//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//"],jS=[...Fg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],HS=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),jg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],US=[...jg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function ym(e,t){return t.some(n=>e.startsWith(n))}function zS(e){return e.name===Bg&&e.publicId===null&&(e.systemId===null||e.systemId===BS)}function $S(e){if(e.name!==Bg)return xn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===FS)return xn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),HS.has(n))return xn.QUIRKS;let i=t===null?jS:Fg;if(ym(n,i))return xn.QUIRKS;if(i=t===null?jg:US,ym(n,i))return xn.LIMITED_QUIRKS}return xn.NO_QUIRKS}const Tm={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},VS="definitionurl",WS="definitionURL",YS=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])),qS=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ee.XMLNS}]]),QS=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])),GS=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function KS(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:i})=>i===ui.COLOR||i===ui.SIZE||i===ui.FACE)||GS.has(t)}function Hg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===VS){e.attrs[t].name=WS;break}}function Ug(e){for(let t=0;t<e.attrs.length;t++){const n=YS.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Wd(e){for(let t=0;t<e.attrs.length;t++){const n=qS.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 XS(e){const t=QS.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ts(e.tagName))}function ZS(e,t){return t===ee.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function JS(e,t,n){if(t===ee.MATHML&&e===p.ANNOTATION_XML){for(let i=0;i<n.length;i++)if(n[i].name===ui.ENCODING){const a=n[i].value.toLowerCase();return a===Tm.TEXT_HTML||a===Tm.APPLICATION_XML}}return t===ee.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function ev(e,t,n,i){return(!i||i===ee.HTML)&&JS(e,t,n)||(!i||i===ee.MATHML)&&ZS(e,t)}const tv="hidden",nv=8,rv=3;var O;(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"})(O||(O={}));const iv={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},zg=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),km={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Lr,onParseError:null};class Cm{constructor(t,n,i=null,a=null){this.fragmentContext=i,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=O.INITIAL,this.originalInsertionMode=O.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={...km,...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 AS(this.options,this),this.activeFormattingElements=new MS(this.treeAdapter),this.fragmentContextID=i?ts(this.treeAdapter.getTagName(i)):p.UNKNOWN,this._setContextModes(i??this.document,this.fragmentContextID),this.openElements=new DS(this.document,this.treeAdapter,this)}static parse(t,n){const i=new this(n);return i.tokenizer.write(t,!0),i.document}static getFragmentParser(t,n){const i={...km,...n};t??(t=i.treeAdapter.createElement(z.TEMPLATE,ee.HTML,[]));const a=i.treeAdapter.createElement("documentmock",ee.HTML,[]),u=new this(i,a,t);return u.fragmentContextID===p.TEMPLATE&&u.tmplInsertionModeStack.unshift(O.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,i){var a;if(!this.onParseError)return;const u=(a=t.location)!==null&&a!==void 0?a:iv,l={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:i?u.startLine:u.endLine,endCol:i?u.startCol:u.endCol,endOffset:i?u.startOffset:u.endOffset};this.onParseError(l)}onItemPush(t,n,i){var a,u;(u=(a=this.treeAdapter).onItemPush)===null||u===void 0||u.call(a,t),i&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var i,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(i=this.treeAdapter).onItemPop)===null||a===void 0||a.call(i,t,this.openElements.current),n){let u,l;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,l=this.fragmentContextID):{current:u,currentTagId:l}=this.openElements,this._setContextModes(u,l)}}_setContextModes(t,n){const i=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===ee.HTML;this.currentNotInHTML=!i,this.tokenizer.inForeignNode=!i&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ee.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=O.TEXT}switchToPlaintextParsing(){this.insertionMode=O.TEXT,this.originalInsertionMode=O.IN_BODY,this.tokenizer.state=ft.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)===z.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ee.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=ft.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=ft.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=ft.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",i=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,i,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const i=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,i)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const i=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(i??this.document,t)}}_appendElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location)}_insertElement(t,n){const i=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(i,t.location),this.openElements.push(i,t.tagID)}_insertFakeElement(t,n){const i=this.treeAdapter.createElement(t,ee.HTML,[]);this._attachElementToTree(i,null),this.openElements.push(i,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ee.HTML,t.attrs),i=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,i),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.HTML)}_appendCommentNode(t,n){const i=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,i),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,t.location)}_insertCharacters(t){let n,i;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:i}=this._findFosterParentingLocation(),i?this.treeAdapter.insertTextBefore(n,t.chars,i):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),u=i?a.lastIndexOf(i):a.length,l=a[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:m})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let i=this.treeAdapter.getFirstChild(t);i;i=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(i),this.treeAdapter.appendChild(n,i)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const i=n.location,a=this.treeAdapter.getTagName(t),u=n.type===Ue.END_TAG&&a===n.tagName?{endTag:{...i},endLine:i.endLine,endCol:i.endCol,endOffset:i.endOffset}:{endLine:i.startLine,endCol:i.startCol,endOffset:i.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,i;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,i=this.fragmentContextID):{current:n,currentTagId:i}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&i!==void 0&&!this._isIntegrationPoint(i,n,ee.HTML)}_processToken(t){switch(t.type){case Ue.CHARACTER:{this.onCharacter(t);break}case Ue.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ue.COMMENT:{this.onComment(t);break}case Ue.DOCTYPE:{this.onDoctype(t);break}case Ue.START_TAG:{this._processStartTag(t);break}case Ue.END_TAG:{this.onEndTag(t);break}case Ue.EOF:{this.onEof(t);break}case Ue.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,i){const a=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return ev(t,a,u,i)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===zn.Marker||this.openElements.contains(a.element)),i=n===-1?t-1:n-1;for(let a=i;a>=0;a--){const u=this.activeFormattingElements.entries[a];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=O.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=O.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=O.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=O.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=O.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=O.IN_TABLE;return}case p.BODY:{this.insertionMode=O.IN_BODY;return}case p.FRAMESET:{this.insertionMode=O.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?O.AFTER_HEAD:O.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=O.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=O.IN_HEAD;return}break}}this.insertionMode=O.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const i=this.openElements.tagIDs[n];if(i===p.TEMPLATE)break;if(i===p.TABLE){this.insertionMode=O.IN_SELECT_IN_TABLE;return}}this.insertionMode=O.IN_SELECT}_isElementCausesFosterParenting(t){return zg.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 p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ee.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const i=this.treeAdapter.getParentNode(n);return i?{parent:i,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 i=this.treeAdapter.getNamespaceURI(t);return wS[i].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){PA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Ys(this,t);break}case O.BEFORE_HTML:{ia(this,t);break}case O.BEFORE_HEAD:{sa(this,t);break}case O.IN_HEAD:{aa(this,t);break}case O.IN_HEAD_NO_SCRIPT:{ua(this,t);break}case O.AFTER_HEAD:{oa(this,t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:{Vg(this,t);break}case O.TEXT:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Uc(this,t);break}case O.IN_TABLE_TEXT:{Kg(this,t);break}case O.IN_COLUMN_GROUP:{ao(this,t);break}case O.AFTER_BODY:{uo(this,t);break}case O.AFTER_AFTER_BODY:{Xu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){OA(this,t);return}switch(this.insertionMode){case O.INITIAL:{Ys(this,t);break}case O.BEFORE_HTML:{ia(this,t);break}case O.BEFORE_HEAD:{sa(this,t);break}case O.IN_HEAD:{aa(this,t);break}case O.IN_HEAD_NO_SCRIPT:{ua(this,t);break}case O.AFTER_HEAD:{oa(this,t);break}case O.TEXT:{this._insertCharacters(t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Uc(this,t);break}case O.IN_COLUMN_GROUP:{ao(this,t);break}case O.AFTER_BODY:{uo(this,t);break}case O.AFTER_AFTER_BODY:{Xu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){ud(this,t);return}switch(this.insertionMode){case O.INITIAL:case O.BEFORE_HTML:case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_TEMPLATE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{ud(this,t);break}case O.IN_TABLE_TEXT:{qs(this,t);break}case O.AFTER_BODY:{dv(this,t);break}case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{fv(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case O.INITIAL:{hv(this,t);break}case O.BEFORE_HEAD:case O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:{this._err(t,W.misplacedDoctype);break}case O.IN_TABLE_TEXT:{qs(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,W.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?DA(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Ys(this,t);break}case O.BEFORE_HTML:{pv(this,t);break}case O.BEFORE_HEAD:{gv(this,t);break}case O.IN_HEAD:{On(this,t);break}case O.IN_HEAD_NO_SCRIPT:{xv(this,t);break}case O.AFTER_HEAD:{Tv(this,t);break}case O.IN_BODY:{Bt(this,t);break}case O.IN_TABLE:{Xi(this,t);break}case O.IN_TABLE_TEXT:{qs(this,t);break}case O.IN_CAPTION:{EA(this,t);break}case O.IN_COLUMN_GROUP:{Qd(this,t);break}case O.IN_TABLE_BODY:{_o(this,t);break}case O.IN_ROW:{So(this,t);break}case O.IN_CELL:{yA(this,t);break}case O.IN_SELECT:{Jg(this,t);break}case O.IN_SELECT_IN_TABLE:{kA(this,t);break}case O.IN_TEMPLATE:{wA(this,t);break}case O.AFTER_BODY:{SA(this,t);break}case O.IN_FRAMESET:{vA(this,t);break}case O.AFTER_FRAMESET:{NA(this,t);break}case O.AFTER_AFTER_BODY:{LA(this,t);break}case O.AFTER_AFTER_FRAMESET:{RA(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?MA(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case O.INITIAL:{Ys(this,t);break}case O.BEFORE_HTML:{mv(this,t);break}case O.BEFORE_HEAD:{Ev(this,t);break}case O.IN_HEAD:{bv(this,t);break}case O.IN_HEAD_NO_SCRIPT:{yv(this,t);break}case O.AFTER_HEAD:{kv(this,t);break}case O.IN_BODY:{wo(this,t);break}case O.TEXT:{uA(this,t);break}case O.IN_TABLE:{ha(this,t);break}case O.IN_TABLE_TEXT:{qs(this,t);break}case O.IN_CAPTION:{bA(this,t);break}case O.IN_COLUMN_GROUP:{xA(this,t);break}case O.IN_TABLE_BODY:{od(this,t);break}case O.IN_ROW:{Zg(this,t);break}case O.IN_CELL:{TA(this,t);break}case O.IN_SELECT:{eE(this,t);break}case O.IN_SELECT_IN_TABLE:{CA(this,t);break}case O.IN_TEMPLATE:{_A(this,t);break}case O.AFTER_BODY:{nE(this,t);break}case O.IN_FRAMESET:{AA(this,t);break}case O.AFTER_FRAMESET:{IA(this,t);break}case O.AFTER_AFTER_BODY:{Xu(this,t);break}}}onEof(t){switch(this.insertionMode){case O.INITIAL:{Ys(this,t);break}case O.BEFORE_HTML:{ia(this,t);break}case O.BEFORE_HEAD:{sa(this,t);break}case O.IN_HEAD:{aa(this,t);break}case O.IN_HEAD_NO_SCRIPT:{ua(this,t);break}case O.AFTER_HEAD:{oa(this,t);break}case O.IN_BODY:case O.IN_TABLE:case O.IN_CAPTION:case O.IN_COLUMN_GROUP:case O.IN_TABLE_BODY:case O.IN_ROW:case O.IN_CELL:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:{Qg(this,t);break}case O.TEXT:{oA(this,t);break}case O.IN_TABLE_TEXT:{qs(this,t);break}case O.IN_TEMPLATE:{tE(this,t);break}case O.AFTER_BODY:case O.IN_FRAMESET:case O.AFTER_FRAMESET:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{qd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===S.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 O.IN_HEAD:case O.IN_HEAD_NO_SCRIPT:case O.AFTER_HEAD:case O.TEXT:case O.IN_COLUMN_GROUP:case O.IN_SELECT:case O.IN_SELECT_IN_TABLE:case O.IN_FRAMESET:case O.AFTER_FRAMESET:{this._insertCharacters(t);break}case O.IN_BODY:case O.IN_CAPTION:case O.IN_CELL:case O.IN_TEMPLATE:case O.AFTER_BODY:case O.AFTER_AFTER_BODY:case O.AFTER_AFTER_FRAMESET:{$g(this,t);break}case O.IN_TABLE:case O.IN_TABLE_BODY:case O.IN_ROW:{Uc(this,t);break}case O.IN_TABLE_TEXT:{Gg(this,t);break}}}}function sv(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):qg(e,t),n}function av(e,t){let n=null,i=e.openElements.stackTop;for(;i>=0;i--){const a=e.openElements.items[i];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[i])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(i,0)),e.activeFormattingElements.removeEntry(t)),n}function uv(e,t,n){let i=t,a=e.openElements.getCommonAncestor(t);for(let u=0,l=a;l!==n;u++,l=a){a=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&u>=rv;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=ov(e,c),i===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(l,i),i=l)}return i}function ov(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),i=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,i),t.element=i,i}function lv(e,t,n){const i=e.treeAdapter.getTagName(t),a=ts(i);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);a===p.TEMPLATE&&u===ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function cv(e,t,n){const i=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,u=e.treeAdapter.createElement(a.tagName,i,a.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,a.tagID)}function Yd(e,t){for(let n=0;n<nv;n++){const i=sv(e,t);if(!i)break;const a=av(e,i);if(!a)break;e.activeFormattingElements.bookmark=i;const u=uv(e,a,i.element),l=e.openElements.getCommonAncestor(i.element);e.treeAdapter.detachNode(u),l&&lv(e,l,u),cv(e,a,i)}}function ud(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function dv(e,t){e._appendCommentNode(t,e.openElements.items[0])}function fv(e,t){e._appendCommentNode(t,e.document)}function qd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let i=e.openElements.stackTop;i>=n;i--)e._setEndLocation(e.openElements.items[i],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const i=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(i);if(a&&!a.endTag&&(e._setEndLocation(i,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(u);l&&!l.endTag&&e._setEndLocation(u,t)}}}}function hv(e,t){e._setDocumentType(t);const n=t.forceQuirks?xn.QUIRKS:$S(t);zS(t)||e._err(t,W.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=O.BEFORE_HTML}function Ys(e,t){e._err(t,W.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,xn.QUIRKS),e.insertionMode=O.BEFORE_HTML,e._processToken(t)}function pv(e,t){t.tagID===p.HTML?(e._insertElement(t,ee.HTML),e.insertionMode=O.BEFORE_HEAD):ia(e,t)}function mv(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ia(e,t)}function ia(e,t){e._insertFakeRootElement(),e.insertionMode=O.BEFORE_HEAD,e._processToken(t)}function gv(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.HEAD:{e._insertElement(t,ee.HTML),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD;break}default:sa(e,t)}}function Ev(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?sa(e,t):e._err(t,W.endTagWithoutMatchingOpenElement)}function sa(e,t){e._insertFakeElement(z.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=O.IN_HEAD,e._processToken(t)}function On(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,ft.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,ft.RAWTEXT):(e._insertElement(t,ee.HTML),e.insertionMode=O.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,ft.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,ft.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=O.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(O.IN_TEMPLATE);break}case p.HEAD:{e._err(t,W.misplacedStartTagForHeadElement);break}default:aa(e,t)}}function bv(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=O.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{aa(e,t);break}case p.TEMPLATE:{pi(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function pi(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,W.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,W.endTagWithoutMatchingOpenElement)}function aa(e,t){e.openElements.pop(),e.insertionMode=O.AFTER_HEAD,e._processToken(t)}function xv(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{On(e,t);break}case p.NOSCRIPT:{e._err(t,W.nestedNoscriptInHead);break}default:ua(e,t)}}function yv(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=O.IN_HEAD;break}case p.BR:{ua(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function ua(e,t){const n=t.type===Ue.EOF?W.openElementsLeftAfterEof:W.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=O.IN_HEAD,e._processToken(t)}function Tv(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.BODY:{e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=O.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,ee.HTML),e.insertionMode=O.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,W.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),On(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,W.misplacedStartTagForHeadElement);break}default:oa(e,t)}}function kv(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{oa(e,t);break}case p.TEMPLATE:{pi(e,t);break}default:e._err(t,W.endTagWithoutMatchingOpenElement)}}function oa(e,t){e._insertFakeElement(z.BODY,p.BODY),e.insertionMode=O.IN_BODY,Co(e,t)}function Co(e,t){switch(t.type){case Ue.CHARACTER:{Vg(e,t);break}case Ue.WHITESPACE_CHARACTER:{$g(e,t);break}case Ue.COMMENT:{ud(e,t);break}case Ue.START_TAG:{Bt(e,t);break}case Ue.END_TAG:{wo(e,t);break}case Ue.EOF:{Qg(e,t);break}}}function $g(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Vg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Cv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function wv(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function _v(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_FRAMESET)}function Sv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML)}function vv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&ad.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ee.HTML)}function Av(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function Nv(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML),n||(e.formElement=e.openElements.current))}function Iv(e,t){e.framesetOk=!1;const n=t.tagID;for(let i=e.openElements.stackTop;i>=0;i--){const a=e.openElements.tagIDs[i];if(n===p.LI&&a===p.LI||(n===p.DD||n===p.DT)&&(a===p.DD||a===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.popUntilTagNamePopped(a);break}if(a!==p.ADDRESS&&a!==p.DIV&&a!==p.P&&e._isSpecialElement(e.openElements.items[i],a))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML)}function Lv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.tokenizer.state=ft.PLAINTEXT}function Rv(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1}function Ov(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(Yd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Pv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Dv(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(Yd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Mv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Bv(e,t){e.treeAdapter.getDocumentMode(e.document)!==xn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=O.IN_TABLE}function Wg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Yg(e){const t=Pg(e,ui.TYPE);return t!=null&&t.toLowerCase()===tv}function Fv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),Yg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function jv(e,t){e._appendElement(t,ee.HTML),t.ackSelfClosing=!0}function Hv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Uv(e,t){t.tagName=z.IMG,t.tagID=p.IMG,Wg(e,t)}function zv(e,t){e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=O.TEXT}function $v(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,ft.RAWTEXT)}function Vv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,ft.RAWTEXT)}function wm(e,t){e._switchToTextParsing(t,ft.RAWTEXT)}function Wv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===O.IN_TABLE||e.insertionMode===O.IN_CAPTION||e.insertionMode===O.IN_TABLE_BODY||e.insertionMode===O.IN_ROW||e.insertionMode===O.IN_CELL?O.IN_SELECT_IN_TABLE:O.IN_SELECT}function Yv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML)}function qv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ee.HTML)}function Qv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,ee.HTML)}function Gv(e,t){e._reconstructActiveFormattingElements(),Hg(t),Wd(t),t.selfClosing?e._appendElement(t,ee.MATHML):e._insertElement(t,ee.MATHML),t.ackSelfClosing=!0}function Kv(e,t){e._reconstructActiveFormattingElements(),Ug(t),Wd(t),t.selfClosing?e._appendElement(t,ee.SVG):e._insertElement(t,ee.SVG),t.ackSelfClosing=!0}function _m(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML)}function Bt(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{Pv(e,t);break}case p.A:{Ov(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{vv(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Sv(e,t);break}case p.LI:case p.DD:case p.DT:{Iv(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{Wg(e,t);break}case p.HR:{Hv(e,t);break}case p.RB:case p.RTC:{qv(e,t);break}case p.RT:case p.RP:{Qv(e,t);break}case p.PRE:case p.LISTING:{Av(e,t);break}case p.XMP:{$v(e,t);break}case p.SVG:{Kv(e,t);break}case p.HTML:{Cv(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{On(e,t);break}case p.BODY:{wv(e,t);break}case p.FORM:{Nv(e,t);break}case p.NOBR:{Dv(e,t);break}case p.MATH:{Gv(e,t);break}case p.TABLE:{Bv(e,t);break}case p.INPUT:{Fv(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{jv(e,t);break}case p.IMAGE:{Uv(e,t);break}case p.BUTTON:{Rv(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{Mv(e,t);break}case p.IFRAME:{Vv(e,t);break}case p.SELECT:{Wv(e,t);break}case p.OPTION:case p.OPTGROUP:{Yv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{wm(e,t);break}case p.FRAMESET:{_v(e,t);break}case p.TEXTAREA:{zv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?wm(e,t):_m(e,t);break}case p.PLAINTEXT:{Lv(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:_m(e,t)}}function Xv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=O.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Zv(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=O.AFTER_BODY,nE(e,t))}function Jv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function eA(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function tA(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(z.P,p.P),e._closePElement()}function nA(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function rA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function iA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function sA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function aA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function qg(e,t){const n=t.tagName,i=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const u=e.openElements.items[a],l=e.openElements.tagIDs[a];if(i===l&&(i!==p.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(u,l))break}}function wo(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{Yd(e,t);break}case p.P:{tA(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{Jv(e,t);break}case p.LI:{nA(e);break}case p.DD:case p.DT:{rA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{iA(e);break}case p.BR:{aA(e);break}case p.BODY:{Xv(e,t);break}case p.HTML:{Zv(e,t);break}case p.FORM:{eA(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{sA(e,t);break}case p.TEMPLATE:{pi(e,t);break}default:qg(e,t)}}function Qg(e,t){e.tmplInsertionModeStack.length>0?tE(e,t):qd(e,t)}function uA(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function oA(e,t){e._err(t,W.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Uc(e,t){if(e.openElements.currentTagId!==void 0&&zg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=O.IN_TABLE_TEXT,t.type){case Ue.CHARACTER:{Kg(e,t);break}case Ue.WHITESPACE_CHARACTER:{Gg(e,t);break}}else ka(e,t)}function lA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_CAPTION}function cA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_COLUMN_GROUP}function dA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,p.COLGROUP),e.insertionMode=O.IN_COLUMN_GROUP,Qd(e,t)}function fA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_TABLE_BODY}function hA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,p.TBODY),e.insertionMode=O.IN_TABLE_BODY,_o(e,t)}function pA(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function mA(e,t){Yg(t)?e._appendElement(t,ee.HTML):ka(e,t),t.ackSelfClosing=!0}function gA(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Xi(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{hA(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{On(e,t);break}case p.COL:{dA(e,t);break}case p.FORM:{gA(e,t);break}case p.TABLE:{pA(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{fA(e,t);break}case p.INPUT:{mA(e,t);break}case p.CAPTION:{lA(e,t);break}case p.COLGROUP:{cA(e,t);break}default:ka(e,t)}}function ha(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{pi(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:ka(e,t)}}function ka(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Co(e,t),e.fosterParentingEnabled=n}function Gg(e,t){e.pendingCharacterTokens.push(t)}function Kg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function qs(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)ka(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Xg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function EA(e,t){const n=t.tagID;Xg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,Xi(e,t)):Bt(e,t)}function bA(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_TABLE,n===p.TABLE&&ha(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:wo(e,t)}}function Qd(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.COL:{e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{On(e,t);break}default:ao(e,t)}}function xA(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case p.TEMPLATE:{pi(e,t);break}case p.COL:break;default:ao(e,t)}}function ao(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=O.IN_TABLE,e._processToken(t))}function _o(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,p.TR),e.insertionMode=O.IN_ROW,So(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,Xi(e,t));break}default:Xi(e,t)}}function od(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE,ha(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:ha(e,t)}}function So(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ee.HTML),e.insertionMode=O.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,_o(e,t));break}default:Xi(e,t)}}function Zg(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,od(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=O.IN_TABLE_BODY,od(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:ha(e,t)}}function yA(e,t){const n=t.tagID;Xg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),So(e,t)):Bt(e,t)}function TA(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=O.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Zg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:wo(e,t)}}function Jg(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,ee.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ee.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{On(e,t);break}}}function eE(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{pi(e,t);break}}}function kA(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Jg(e,t)}function CA(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):eE(e,t)}function wA(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{On(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=O.IN_TABLE,e.insertionMode=O.IN_TABLE,Xi(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=O.IN_COLUMN_GROUP,e.insertionMode=O.IN_COLUMN_GROUP,Qd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=O.IN_TABLE_BODY,e.insertionMode=O.IN_TABLE_BODY,_o(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=O.IN_ROW,e.insertionMode=O.IN_ROW,So(e,t);break}default:e.tmplInsertionModeStack[0]=O.IN_BODY,e.insertionMode=O.IN_BODY,Bt(e,t)}}function _A(e,t){t.tagID===p.TEMPLATE&&pi(e,t)}function tE(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):qd(e,t)}function SA(e,t){t.tagID===p.HTML?Bt(e,t):uo(e,t)}function nE(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=O.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const i=e.openElements.items[1];i&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(i))===null||n===void 0)&&n.endTag)&&e._setEndLocation(i,t)}}else uo(e,t)}function uo(e,t){e.insertionMode=O.IN_BODY,Co(e,t)}function vA(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.FRAMESET:{e._insertElement(t,ee.HTML);break}case p.FRAME:{e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{On(e,t);break}}}function AA(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=O.AFTER_FRAMESET))}function NA(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.NOFRAMES:{On(e,t);break}}}function IA(e,t){t.tagID===p.HTML&&(e.insertionMode=O.AFTER_AFTER_FRAMESET)}function LA(e,t){t.tagID===p.HTML?Bt(e,t):Xu(e,t)}function Xu(e,t){e.insertionMode=O.IN_BODY,Co(e,t)}function RA(e,t){switch(t.tagID){case p.HTML:{Bt(e,t);break}case p.NOFRAMES:{On(e,t);break}}}function OA(e,t){t.chars=st,e._insertCharacters(t)}function PA(e,t){e._insertCharacters(t),e.framesetOk=!1}function rE(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ee.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function DA(e,t){if(KS(t))rE(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),i=e.treeAdapter.getNamespaceURI(n);i===ee.MATHML?Hg(t):i===ee.SVG&&(XS(t),Ug(t)),Wd(t),t.selfClosing?e._appendElement(t,i):e._insertElement(t,i),t.ackSelfClosing=!0}}function MA(e,t){if(t.tagID===p.P||t.tagID===p.BR){rE(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const i=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(i)===ee.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(i);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}z.AREA,z.BASE,z.BASEFONT,z.BGSOUND,z.BR,z.COL,z.EMBED,z.FRAME,z.HR,z.IMG,z.INPUT,z.KEYGEN,z.LINK,z.META,z.PARAM,z.SOURCE,z.TRACK,z.WBR;const BA=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,FA=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Sm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function iE(e,t){const n=QA(e),i=sg("type",{handlers:{root:jA,element:HA,text:UA,comment:aE,doctype:zA,raw:VA},unknown:WA}),a={parser:n?new Cm(Sm):Cm.getFragmentParser(void 0,Sm),handle(c){i(c,a)},stitches:!1,options:t||{}};i(e,a),ns(a,$n());const u=n?a.parser.document:a.parser.getFragment(),l=G_(u,{file:a.options.file});return a.stitches&&Rn(l,"comment",function(c,f,h){const m=c;if(m.value.stitch&&h&&f!==void 0){const E=h.children;return E[f]=m.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function sE(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function jA(e,t){sE(e.children,t)}function HA(e,t){YA(e,t),sE(e.children,t),qA(e,t)}function UA(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ue.CHARACTER,chars:e.value,location:Ca(e)};ns(t,$n(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zA(e,t){const n={type:Ue.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ca(e)};ns(t,$n(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function $A(e,t){t.stitches=!0;const n=GA(e);if("children"in e&&"children"in n){const i=iE({type:"root",children:e.children},t.options);n.children=i.children}aE({type:"comment",value:{stitch:n}},t)}function aE(e,t){const n=e.value,i={type:Ue.COMMENT,data:n,location:Ca(e)};ns(t,$n(e)),t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken)}function VA(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,uE(t,$n(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(BA,"<$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 WA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))$A(n,t);else{let i="";throw FA.has(n.type)&&(i=". 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"+i)}}function ns(e,t){uE(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=ft.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 uE(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 YA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===ft.PLAINTEXT)return;ns(t,$n(e));const i=t.parser.openElements.current;let a="namespaceURI"in i?i.namespaceURI:ai.html;a===ai.html&&n==="svg"&&(a=ai.svg);const u=eS({...e,children:[]},{space:a===ai.svg?"svg":"html"}),l={type:Ue.START_TAG,tagName:n,tagID:ts(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:Ca(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function qA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&oS.includes(n)||t.parser.tokenizer.state===ft.PLAINTEXT)return;ns(t,Eo(e));const i={type:Ue.END_TAG,tagName:n,tagID:ts(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ca(e)};t.parser.currentToken=i,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===ft.RCDATA||t.parser.tokenizer.state===ft.RAWTEXT||t.parser.tokenizer.state===ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=ft.DATA)}function QA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ca(e){const t=$n(e)||{line:void 0,column:void 0,offset:void 0},n=Eo(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 GA(e){return"children"in e?di({...e,children:[]}):di(e)}function ld(e){return function(t,n){return iE(t,{...e,file:n})}}const ni=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],ii={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ni,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ni],h2:[["className","sr-only"]],img:[...ni,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ni,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ni],table:[...ni],ul:[...ni,["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"]},Rr={}.hasOwnProperty;function KA(e,t){let n={type:"root",children:[]};const i={schema:t?{...ii,...t}:ii,stack:[]},a=oE(i,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function oE(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return XA(e,n);case"doctype":return ZA(e,n);case"element":return JA(e,n);case"root":return eN(e,n);case"text":return tN(e,n)}}}function XA(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",i=n.indexOf("-->"),u={type:"comment",value:i<0?n:n.slice(0,i)};return wa(u,t),u}}function ZA(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return wa(n,t),n}}function JA(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const i=lE(e,t.children),a=nN(e,t.properties);e.stack.pop();let u=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(u=!0,e.schema.ancestors&&Rr.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(u=!1;++f<c.length;)e.stack.includes(c[f])&&(u=!0)}if(!u)return e.schema.strip&&!e.schema.strip.includes(n)?i:void 0;const l={type:"element",tagName:n,properties:a,children:i};return wa(l,t),l}function eN(e,t){const i={type:"root",children:lE(e,t.children)};return wa(i,t),i}function tN(e,t){const i={type:"text",value:typeof t.value=="string"?t.value:""};return wa(i,t),i}function lE(e,t){const n=[];if(Array.isArray(t)){const i=t;let a=-1;for(;++a<i.length;){const u=oE(e,i[a]);u&&(Array.isArray(u)?n.push(...u):n.push(u))}}return n}function nN(e,t){const n=e.stack[e.stack.length-1],i=e.schema.attributes,a=e.schema.required,u=i&&Rr.call(i,n)?i[n]:void 0,l=i&&Rr.call(i,"*")?i["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let h;for(h in c)if(Rr.call(c,h)){const m=c[h];let E=vm(e,Am(u,h),h,m);E==null&&(E=vm(e,Am(l,h),h,m)),E!=null&&(f[h]=E)}if(a&&Rr.call(a,n)){const m=a[n];for(h in m)Rr.call(m,h)&&!Rr.call(f,h)&&(f[h]=m[h])}return f}function vm(e,t,n,i){return t?Array.isArray(i)?rN(e,t,n,i):cE(e,t,n,i):void 0}function rN(e,t,n,i){let a=-1;const u=[];for(;++a<i.length;){const l=cE(e,t,n,i[a]);(typeof l=="number"||typeof l=="string")&&u.push(l)}return u}function cE(e,t,n,i){if(!(typeof i!="boolean"&&typeof i!="number"&&typeof i!="string")&&iN(e,n,i)){if(typeof t=="object"&&t.length>1){let a=!1,u=0;for(;++u<t.length;){const l=t[u];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(i))){a=!0;break}}else if(l===i){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+i:i}}function iN(e,t,n){const i=e.schema.protocols&&Rr.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!i||i.length===0)return!0;const a=String(n),u=a.indexOf(":"),l=a.indexOf("?"),c=a.indexOf("#"),f=a.indexOf("/");if(u<0||f>-1&&u>f||l>-1&&u>l||c>-1&&u>c)return!0;let h=-1;for(;++h<i.length;){const m=i[h];if(u===m.length&&a.slice(0,m.length)===m)return!0}return!1}function wa(e,t){const n=_1(t);t.data&&(e.data=di(t.data)),n&&(e.position=n)}function Am(e,t){let n,i=-1;if(e)for(;++i<e.length;){const a=e[i],u=typeof a=="string"?a:a[0];if(u===t)return a;u==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function dE(e){return function(t){return KA(t,e)}}var sN=Object.defineProperty,aN=Object.defineProperties,uN=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,oN=Object.prototype.hasOwnProperty,lN=Object.prototype.propertyIsEnumerable,Im=(e,t,n)=>t in e?sN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fE=(e,t)=>{for(var n in t||(t={}))oN.call(t,n)&&Im(e,n,t[n]);if(Nm)for(var n of Nm(t))lN.call(t,n)&&Im(e,n,t[n]);return e},hE=(e,t)=>aN(e,uN(t)),$t=(e,t)=>{let n=!1,i=!1;for(let a=0;a<t;a+=1){if(e[a]==="\\"&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){i=!i,a+=2;continue}!i&&e[a]==="`"&&(n=!n)}return n||i},cN=(e,t)=>{let n=e.substring(t,t+3)==="```",i=t>0&&e.substring(t-1,t+2)==="```",a=t>1&&e.substring(t-2,t+1)==="```";return n||i||a},dN=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!cN(e,n)&&(t+=1)}return t},Pr=(e,t)=>{let n=!1,i=!1,a=-1;for(let u=0;u<e.length;u+=1){if(e[u]==="\\"&&u+1<e.length&&e[u+1]==="`"){u+=1;continue}if(e.substring(u,u+3)==="```"){i=!i,u+=2;continue}if(!i&&e[u]==="`")if(n){if(a<t&&t<u)return!0;n=!1,a=-1}else n=!0,a=u}return!1},fN=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,hN=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(fN,(t,n,i,a)=>$t(e,a)?t:`${n}\\>${i}`),pN=/(\*\*)([^*]*\*?)$/,mN=/(__)([^_]*?)$/,gN=/(\*\*\*)([^*]*?)$/,EN=/(\*)([^*]*?)$/,bN=/(_)([^_]*?)$/,xN=/(`)([^`]*?)$/,yN=/(~~)([^~]*?)$/,mi=/^[\s_~*`]*$/,pE=/^[\s]*[-*+][\s]+$/,TN=/[\p{L}\p{N}_]/u,kN=/^```[^`\n]*```?$/,CN=/^\*{4,}$/,wN=/(__)([^_]+)_$/,_N=/(~~)([^~]+)~$/,Lm=/~~/g,Dr=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:TN.test(e)},SN=(e,t)=>{let n=1;for(let i=t-1;i>=0;i-=1)if(e[i]==="]")n+=1;else if(e[i]==="["&&(n-=1,n===0))return i;return-1},mE=(e,t)=>{let n=1;for(let i=t+1;i<e.length;i+=1)if(e[i]==="[")n+=1;else if(e[i]==="]"&&(n-=1,n===0))return i;return-1},vo=(e,t)=>{let n=!1,i=!1;for(let a=0;a<e.length&&a<t;a+=1){if(e[a]==="\\"&&e[a+1]==="$"){a+=1;continue}e[a]==="$"&&(e[a+1]==="$"?(i=!i,a+=1,n=!1):i||(n=!n))}return n||i},vN=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
179
|
-
`)return!1}return!1},gE=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?vN(e,t):!1;if(e[n]===`
|
|
180
|
-
`)return!1}return!1},AN=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let i=n+1<e.length?e[n+1]:"";return i>="a"&&i<="z"||i>="A"&&i<="Z"||i==="/"}if(e[n]===`
|
|
181
|
-
`)return!1}return!1},Gd=(e,t,n)=>{let i=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
|
|
182
|
-
`){i=f+1;break}let a=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
|
|
183
|
-
`){a=f;break}let u=e.substring(i,a),l=0,c=!1;for(let f of u)if(f===n)l+=1;else if(f!==" "&&f!==" "){c=!0;break}return l>=3&&!c},NN=(e,t,n,i)=>n==="\\"||e.includes("$")&&vo(e,t)?!0:n!=="*"&&i==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&i&&Dr(n)&&Dr(i)||(!n||n===" "||n===" "||n===`
|
|
184
|
-
`)&&(!i||i===" "||i===" "||i===`
|
|
185
|
-
`)),EE=e=>{let t=0,n=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]==="`"&&a+2<i&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}if(n||e[a]!=="*")continue;let u=a>0?e[a-1]:"",l=a<i-1?e[a+1]:"";NN(e,a,u,l)||(t+=1)}return t},IN=(e,t,n,i)=>!!(n==="\\"||e.includes("$")&&vo(e,t)||gE(e,t)||AN(e,t)||n==="_"||i==="_"||n&&i&&Dr(n)&&Dr(i)),LN=e=>{let t=0,n=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]==="`"&&a+2<i&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}if(n||e[a]!=="_")continue;let u=a>0?e[a-1]:"",l=a<i-1?e[a+1]:"";IN(e,a,u,l)||(t+=1)}return t},RN=e=>{let t=0,n=0,i=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,i=!i,a+=2;continue}i||(e[a]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},Kd=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="*"&&i+1<e.length&&e[i+1]==="*"&&(t+=1,i+=1)}return t},Rm=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}n||e[i]==="_"&&i+1<e.length&&e[i+1]==="_"&&(t+=1,i+=1)}return t},ON=(e,t,n)=>{if(!t||mi.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
|
|
186
|
-
`),a=i===-1?0:i+1,u=e.substring(a,n);return pE.test(u)&&t.includes(`
|
|
187
|
-
`)?!0:Gd(e,n,"*")},PN=e=>{let t=e.match(pN);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return $t(e,i)||Pr(e,i)||ON(e,n,i)?e:Kd(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},DN=(e,t,n)=>{if(!t||mi.test(t))return!0;let i=e.substring(0,n).lastIndexOf(`
|
|
188
|
-
`),a=i===-1?0:i+1,u=e.substring(a,n);return pE.test(u)&&t.includes(`
|
|
189
|
-
`)?!0:Gd(e,n,"_")},MN=e=>{let t=e.match(mN);if(!t){let a=e.match(wN);if(a){let u=e.lastIndexOf(a[1]);if(!($t(e,u)||Pr(e,u))&&Rm(e)%2===1)return`${e}_`}return e}let n=t[2],i=e.lastIndexOf(t[1]);return $t(e,i)||Pr(e,i)||DN(e,n,i)?e:Rm(e)%2===1?`${e}__`:e},BN=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!vo(e,n)){let i=n>0?e[n-1]:"",a=n<e.length-1?e[n+1]:"";if((!i||i===" "||i===" "||i===`
|
|
190
|
-
`)&&(!a||a===" "||a===" "||a===`
|
|
191
|
-
`)||i&&a&&Dr(i)&&Dr(a))continue;return n}}return-1},FN=e=>{if(!e.match(EN))return e;let t=BN(e);if(t===-1||$t(e,t)||Pr(e,t))return e;let n=e.substring(t+1);return!n||mi.test(n)?e:EE(e)%2===1?`${e}*`:e},bE=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!vo(e,n)&&!gE(e,n)){let i=n>0?e[n-1]:"",a=n<e.length-1?e[n+1]:"";if(i&&a&&Dr(i)&&Dr(a))continue;return n}}return-1},jN=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
192
|
-
`;)t-=1;if(t<e.length){let n=e.slice(0,t),i=e.slice(t);return`${n}_${i}`}return`${e}_`},HN=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(Kd(t)%2!==1)return null;let n=t.indexOf("**"),i=bE(t);return n!==-1&&i!==-1&&n<i?`${t}_**`:null},UN=e=>{if(!e.match(bN))return e;let t=bE(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||mi.test(n)||$t(e,t)||Pr(e,t))return e;if(LN(e)%2===1){let i=HN(e);return i!==null?i:jN(e)}return e},zN=e=>{let t=Kd(e),n=EE(e);return t%2===0&&n%2===0},$N=(e,t,n)=>!t||mi.test(t)||$t(e,n)||Pr(e,n)?!0:Gd(e,n,"*"),VN=e=>{if(CN.test(e))return e;let t=e.match(gN);if(!t)return e;let n=t[2],i=e.lastIndexOf(t[1]);return $N(e,n,i)?e:RN(e)%2===1?zN(e)?e:`${e}***`:e},WN=/<[a-zA-Z/][^>]*$/,YN=e=>{let t=e.match(WN);return!t||t.index===void 0||$t(e,t.index)?e:e.substring(0,t.index).trimEnd()},qN=e=>!e.match(kN)||e.includes(`
|
|
193
|
-
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,QN=e=>(e.match(/```/g)||[]).length%2===1,GN=e=>{let t=qN(e);if(t!==null)return t;let n=e.match(xN);if(n&&!QN(e)){let i=n[2];if(!i||mi.test(i))return e;if(dN(e)%2===1)return`${e}\``}return e},xE=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",KN=e=>{let t=0,n=!1;for(let i=0;i<e.length-1;i+=1)e[i]==="`"&&!xE(e,i)&&(n=!n),!n&&e[i]==="$"&&e[i+1]==="$"&&(t+=1,i+=1);return t},XN=e=>{let t=0,n=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"){i+=1;continue}if(e[i]==="`"&&!xE(e,i)){n=!n;continue}!n&&e[i]==="$"&&(i+1<e.length&&e[i+1]==="$"?i+=1:t+=1)}return t},ZN=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
194
|
-
`,t)!==-1&&!e.endsWith(`
|
|
195
|
-
`)?`${e}
|
|
196
|
-
$$`:`${e}$$`},JN=e=>KN(e)%2===0?e:ZN(e),e6=e=>XN(e)%2===1?`${e}$`:e,t6=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let i=SN(e,t);if(i===-1||$t(e,i))return null;let a=i>0&&e[i-1]==="!",u=a?i-1:i,l=e.substring(0,u);if(a)return l;let c=e.substring(i+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},Om=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!$t(e,n)){if(n>0&&e[n-1]==="!")continue;let i=mE(e,n);if(i===-1)return n;if(i+1<e.length&&e[i+1]==="("){let a=e.indexOf(")",i+2);a!==-1&&(n=a)}}return t},n6=(e,t,n)=>{let i=t>0&&e[t-1]==="!",a=i?t-1:t;if(!e.substring(t+1).includes("]")){let u=e.substring(0,a);if(i)return u;if(n==="text-only"){let l=Om(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}if(mE(e,t)===-1){let u=e.substring(0,a);if(i)return u;if(n==="text-only"){let l=Om(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}return null},yE=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!$t(e,n)){let i=t6(e,n,t);if(i!==null)return i}for(let i=e.length-1;i>=0;i-=1)if(e[i]==="["&&!$t(e,i)){let a=n6(e,i,t);if(a!==null)return a}return e},r6=/^-{1,2}$/,i6=/^[\s]*-{1,2}[\s]+$/,s6=/^={1,2}$/,a6=/^[\s]*={1,2}[\s]+$/,u6=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
197
|
-
`);if(t===-1)return e;let n=e.substring(t+1),i=e.substring(0,t),a=n.trim();if(r6.test(a)&&!n.match(i6)){let u=i.split(`
|
|
198
|
-
`).at(-1);if(u&&u.trim().length>0)return`${e}`}if(s6.test(a)&&!n.match(a6)){let u=i.split(`
|
|
199
|
-
`).at(-1);if(u&&u.trim().length>0)return`${e}`}return e},o6=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),l6=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(o6,(t,n)=>$t(e,n)?t:"\\~"),c6=e=>{var t,n;let i=e.match(yN);if(i){let a=i[2];if(!a||mi.test(a))return e;let u=e.lastIndexOf(i[1]);if($t(e,u)||Pr(e,u))return e;if(((t=e.match(Lm))==null?void 0:t.length)%2===1)return`${e}~~`}else{let a=e.match(_N);if(a){let u=e.lastIndexOf(a[0].slice(0,2));if($t(e,u)||Pr(e,u))return e;if(((n=e.match(Lm))==null?void 0:n.length)%2===1)return`${e}~`}}return e},zc=e=>e!==!1,d6=e=>e===!0,Ht={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},f6=[{handler:{name:"singleTilde",handle:l6,priority:Ht.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:hN,priority:Ht.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:YN,priority:Ht.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:u6,priority:Ht.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:yE,priority:Ht.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:VN,priority:Ht.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:PN,priority:Ht.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:MN,priority:Ht.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:FN,priority:Ht.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:UN,priority:Ht.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:GN,priority:Ht.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:c6,priority:Ht.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:JN,priority:Ht.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:e6,priority:Ht.INLINE_KATEX},optionKey:"inlineKatex"}],h6=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return f6.filter(({handler:i,optionKey:a})=>i.name==="links"?zc(e==null?void 0:e.links)||zc(e==null?void 0:e.images):i.name==="inlineKatex"?d6(e==null?void 0:e.inlineKatex):zc(e==null?void 0:e[a])).map(({handler:i,earlyReturn:a})=>i.name==="links"?{handler:hE(fE({},i),{handle:u=>yE(u,n)}),earlyReturn:n==="protocol"?a:void 0}:{handler:i,earlyReturn:a})},p6=(e,t)=>{var n;if(!e||typeof e!="string")return e;let i=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,a=h6(t),u=((n=t==null?void 0:t.handlers)!=null?n:[]).map(c=>{var f;return{handler:hE(fE({},c),{priority:(f=c.priority)!=null?f:Ht.DEFAULT}),earlyReturn:void 0}}),l=[...a,...u].sort((c,f)=>{var h,m;return((h=c.handler.priority)!=null?h:0)-((m=f.handler.priority)!=null?m:0)});for(let{handler:c,earlyReturn:f}of l)if(i=c.handle(i),f!=null&&f(i))return i;return i},m6=p6;function TE(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=TE(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function kE(){for(var e,t,n=0,i="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=TE(e))&&(i&&(i+=" "),i+=t);return i}const g6=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},E6=(e,t)=>({classGroupId:e,validator:t}),CE=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),oo="-",Pm=[],b6="arbitrary..",x6=e=>{const t=T6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return y6(l);const c=l.split(oo),f=c[0]===""&&c.length>1?1:0;return wE(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=i[l],h=n[l];return f?h?g6(h,f):f:h||Pm}return n[l]||Pm}}},wE=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],u=n.nextPart.get(a);if(u){const h=wE(e,t+1,u);if(h)return h}const l=n.validators;if(l===null)return;const c=t===0?e.join(oo):e.slice(t).join(oo),f=l.length;for(let h=0;h<f;h++){const m=l[h];if(m.validator(c))return m.classGroupId}},y6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?b6+i:void 0})(),T6=e=>{const{theme:t,classGroups:n}=e;return k6(n,t)},k6=(e,t)=>{const n=CE();for(const i in e){const a=e[i];Xd(a,n,i,t)}return n},Xd=(e,t,n,i)=>{const a=e.length;for(let u=0;u<a;u++){const l=e[u];C6(l,t,n,i)}},C6=(e,t,n,i)=>{if(typeof e=="string"){w6(e,t,n);return}if(typeof e=="function"){_6(e,t,n,i);return}S6(e,t,n,i)},w6=(e,t,n)=>{const i=e===""?t:_E(t,e);i.classGroupId=n},_6=(e,t,n,i)=>{if(v6(e)){Xd(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(E6(n,e))},S6=(e,t,n,i)=>{const a=Object.entries(e),u=a.length;for(let l=0;l<u;l++){const[c,f]=a[l];Xd(f,_E(t,c),n,i)}},_E=(e,t)=>{let n=e;const i=t.split(oo),a=i.length;for(let u=0;u<a;u++){const l=i[u];let c=n.nextPart.get(l);c||(c=CE(),n.nextPart.set(l,c)),n=c}return n},v6=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,A6=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const a=(u,l)=>{n[u]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(u){let l=n[u];if(l!==void 0)return l;if((l=i[u])!==void 0)return a(u,l),l},set(u,l){u in n?n[u]=l:a(u,l)}}},cd="!",Dm=":",N6=[],Mm=(e,t,n,i,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:a}),I6=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=a=>{const u=[];let l=0,c=0,f=0,h;const m=a.length;for(let v=0;v<m;v++){const _=a[v];if(l===0&&c===0){if(_===Dm){u.push(a.slice(f,v)),f=v+1;continue}if(_==="/"){h=v;continue}}_==="["?l++:_==="]"?l--:_==="("?c++:_===")"&&c--}const E=u.length===0?a:a.slice(f);let y=E,x=!1;E.endsWith(cd)?(y=E.slice(0,-1),x=!0):E.startsWith(cd)&&(y=E.slice(1),x=!0);const k=h&&h>f?h-f:void 0;return Mm(u,x,y,k)};if(t){const a=t+Dm,u=i;i=l=>l.startsWith(a)?u(l.slice(a.length)):Mm(N6,!1,l,void 0,!0)}if(n){const a=i;i=u=>n({className:u,parseClassName:a})}return i},L6=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let a=[];for(let u=0;u<n.length;u++){const l=n[u],c=l[0]==="[",f=t.has(l);c||f?(a.length>0&&(a.sort(),i.push(...a),a=[]),i.push(l)):a.push(l)}return a.length>0&&(a.sort(),i.push(...a)),i}},R6=e=>({cache:A6(e.cacheSize),parseClassName:I6(e),sortModifiers:L6(e),...x6(e)}),O6=/\s+/,P6=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:u}=t,l=[],c=e.trim().split(O6);let f="";for(let h=c.length-1;h>=0;h-=1){const m=c[h],{isExternal:E,modifiers:y,hasImportantModifier:x,baseClassName:k,maybePostfixModifierPosition:v}=n(m);if(E){f=m+(f.length>0?" "+f:f);continue}let _=!!v,A=i(_?k.substring(0,v):k);if(!A){if(!_){f=m+(f.length>0?" "+f:f);continue}if(A=i(k),!A){f=m+(f.length>0?" "+f:f);continue}_=!1}const j=y.length===0?"":y.length===1?y[0]:u(y).join(":"),F=x?j+cd:j,K=F+A;if(l.indexOf(K)>-1)continue;l.push(K);const Y=a(A,_);for(let B=0;B<Y.length;++B){const ae=Y[B];l.push(F+ae)}f=m+(f.length>0?" "+f:f)}return f},D6=(...e)=>{let t=0,n,i,a="";for(;t<e.length;)(n=e[t++])&&(i=SE(n))&&(a&&(a+=" "),a+=i);return a},SE=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=SE(e[i]))&&(n&&(n+=" "),n+=t);return n},M6=(e,...t)=>{let n,i,a,u;const l=f=>{const h=t.reduce((m,E)=>E(m),e());return n=R6(h),i=n.cache.get,a=n.cache.set,u=c,c(f)},c=f=>{const h=i(f);if(h)return h;const m=P6(f,n);return a(f,m),m};return u=l,(...f)=>u(D6(...f))},B6=[],xt=e=>{const t=n=>n[e]||B6;return t.isThemeGetter=!0,t},vE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,AE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F6=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,j6=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,H6=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,U6=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,z6=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$6=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ar=e=>F6.test(e),Be=e=>!!e&&!Number.isNaN(Number(e)),Nr=e=>!!e&&Number.isInteger(Number(e)),$c=e=>e.endsWith("%")&&Be(e.slice(0,-1)),nr=e=>j6.test(e),NE=()=>!0,V6=e=>H6.test(e)&&!U6.test(e),Zd=()=>!1,W6=e=>z6.test(e),Y6=e=>$6.test(e),q6=e=>!ye(e)&&!Te(e),Q6=e=>Hr(e,RE,Zd),ye=e=>vE.test(e),ri=e=>Hr(e,OE,V6),Bm=e=>Hr(e,nI,Be),G6=e=>Hr(e,DE,NE),K6=e=>Hr(e,PE,Zd),Fm=e=>Hr(e,IE,Zd),X6=e=>Hr(e,LE,Y6),$u=e=>Hr(e,ME,W6),Te=e=>AE.test(e),Qs=e=>gi(e,OE),Z6=e=>gi(e,PE),jm=e=>gi(e,IE),J6=e=>gi(e,RE),eI=e=>gi(e,LE),Vu=e=>gi(e,ME,!0),tI=e=>gi(e,DE,!0),Hr=(e,t,n)=>{const i=vE.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},gi=(e,t,n=!1)=>{const i=AE.exec(e);return i?i[1]?t(i[1]):n:!1},IE=e=>e==="position"||e==="percentage",LE=e=>e==="image"||e==="url",RE=e=>e==="length"||e==="size"||e==="bg-size",OE=e=>e==="length",nI=e=>e==="number",PE=e=>e==="family-name",DE=e=>e==="number"||e==="weight",ME=e=>e==="shadow",rI=()=>{const e=xt("color"),t=xt("font"),n=xt("text"),i=xt("font-weight"),a=xt("tracking"),u=xt("leading"),l=xt("breakpoint"),c=xt("container"),f=xt("spacing"),h=xt("radius"),m=xt("shadow"),E=xt("inset-shadow"),y=xt("text-shadow"),x=xt("drop-shadow"),k=xt("blur"),v=xt("perspective"),_=xt("aspect"),A=xt("ease"),j=xt("animate"),F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],K=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Y=()=>[...K(),Te,ye],B=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto","contain","none"],q=()=>[Te,ye,f],de=()=>[Ar,"full","auto",...q()],H=()=>[Nr,"none","subgrid",Te,ye],ue=()=>["auto",{span:["full",Nr,Te,ye]},Nr,Te,ye],le=()=>[Nr,"auto",Te,ye],_e=()=>["auto","min","max","fr",Te,ye],he=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],X=()=>["auto",...q()],fe=()=>[Ar,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...q()],Z=()=>[Ar,"screen","full","dvw","lvw","svw","min","max","fit",...q()],pe=()=>[Ar,"screen","full","lh","dvh","lvh","svh","min","max","fit",...q()],w=()=>[e,Te,ye],M=()=>[...K(),jm,Fm,{position:[Te,ye]}],Q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",J6,Q6,{size:[Te,ye]}],Se=()=>[$c,Qs,ri],Ee=()=>["","none","full",h,Te,ye],ge=()=>["",Be,Qs,ri],De=()=>["solid","dashed","dotted","double"],Oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ve=()=>[Be,$c,jm,Fm],Je=()=>["","none",k,Te,ye],It=()=>["none",Be,Te,ye],cn=()=>["none",Be,Te,ye],en=()=>[Be,Te,ye],tn=()=>[Ar,"full",...q()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[nr],breakpoint:[nr],color:[NE],container:[nr],"drop-shadow":[nr],ease:["in","out","in-out"],font:[q6],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[nr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[nr],shadow:[nr],spacing:["px",Be],text:[nr],"text-shadow":[nr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ar,ye,Te,_]}],container:["container"],columns:[{columns:[Be,ye,Te,c]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Y()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:ae()}],"overscroll-x":[{"overscroll-x":ae()}],"overscroll-y":[{"overscroll-y":ae()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:de()}],"inset-x":[{"inset-x":de()}],"inset-y":[{"inset-y":de()}],start:[{"inset-s":de(),start:de()}],end:[{"inset-e":de(),end:de()}],"inset-bs":[{"inset-bs":de()}],"inset-be":[{"inset-be":de()}],top:[{top:de()}],right:[{right:de()}],bottom:[{bottom:de()}],left:[{left:de()}],visibility:["visible","invisible","collapse"],z:[{z:[Nr,"auto",Te,ye]}],basis:[{basis:[Ar,"full","auto",c,...q()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Be,Ar,"auto","initial","none",ye]}],grow:[{grow:["",Be,Te,ye]}],shrink:[{shrink:["",Be,Te,ye]}],order:[{order:[Nr,"first","last","none",Te,ye]}],"grid-cols":[{"grid-cols":H()}],"col-start-end":[{col:ue()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":H()}],"row-start-end":[{row:ue()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_e()}],"auto-rows":[{"auto-rows":_e()}],gap:[{gap:q()}],"gap-x":[{"gap-x":q()}],"gap-y":[{"gap-y":q()}],"justify-content":[{justify:[...he(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...he()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":he()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:q()}],px:[{px:q()}],py:[{py:q()}],ps:[{ps:q()}],pe:[{pe:q()}],pbs:[{pbs:q()}],pbe:[{pbe:q()}],pt:[{pt:q()}],pr:[{pr:q()}],pb:[{pb:q()}],pl:[{pl:q()}],m:[{m:X()}],mx:[{mx:X()}],my:[{my:X()}],ms:[{ms:X()}],me:[{me:X()}],mbs:[{mbs:X()}],mbe:[{mbe:X()}],mt:[{mt:X()}],mr:[{mr:X()}],mb:[{mb:X()}],ml:[{ml:X()}],"space-x":[{"space-x":q()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":q()}],"space-y-reverse":["space-y-reverse"],size:[{size:fe()}],"inline-size":[{inline:["auto",...Z()]}],"min-inline-size":[{"min-inline":["auto",...Z()]}],"max-inline-size":[{"max-inline":["none",...Z()]}],"block-size":[{block:["auto",...pe()]}],"min-block-size":[{"min-block":["auto",...pe()]}],"max-block-size":[{"max-block":["none",...pe()]}],w:[{w:[c,"screen",...fe()]}],"min-w":[{"min-w":[c,"screen","none",...fe()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...fe()]}],h:[{h:["screen","lh",...fe()]}],"min-h":[{"min-h":["screen","lh","none",...fe()]}],"max-h":[{"max-h":["screen","lh",...fe()]}],"font-size":[{text:["base",n,Qs,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,tI,G6]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$c,ye]}],"font-family":[{font:[Z6,K6,t]}],"font-features":[{"font-features":[ye]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Te,ye]}],"line-clamp":[{"line-clamp":[Be,"none",Te,Bm]}],leading:[{leading:[u,...q()]}],"list-image":[{"list-image":["none",Te,ye]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,ye]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:[Be,"from-font","auto",Te,ri]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[Be,"auto",Te,ye]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:Q()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Nr,Te,ye],radial:["",Te,ye],conic:[Nr,Te,ye]},eI,X6]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:Se()}],"gradient-via-pos":[{via:Se()}],"gradient-to-pos":[{to:Se()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:ge()}],"border-w-x":[{"border-x":ge()}],"border-w-y":[{"border-y":ge()}],"border-w-s":[{"border-s":ge()}],"border-w-e":[{"border-e":ge()}],"border-w-bs":[{"border-bs":ge()}],"border-w-be":[{"border-be":ge()}],"border-w-t":[{"border-t":ge()}],"border-w-r":[{"border-r":ge()}],"border-w-b":[{"border-b":ge()}],"border-w-l":[{"border-l":ge()}],"divide-x":[{"divide-x":ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...De(),"hidden","none"]}],"divide-style":[{divide:[...De(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-bs":[{"border-bs":w()}],"border-color-be":[{"border-be":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...De(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Be,Te,ye]}],"outline-w":[{outline:["",Be,Qs,ri]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",m,Vu,$u]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",E,Vu,$u]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[Be,ri]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":ge()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",y,Vu,$u]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[Be,Te,ye]}],"mix-blend":[{"mix-blend":[...Oe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Oe()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Be]}],"mask-image-linear-from-pos":[{"mask-linear-from":ve()}],"mask-image-linear-to-pos":[{"mask-linear-to":ve()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":ve()}],"mask-image-t-to-pos":[{"mask-t-to":ve()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":ve()}],"mask-image-r-to-pos":[{"mask-r-to":ve()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":ve()}],"mask-image-b-to-pos":[{"mask-b-to":ve()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":ve()}],"mask-image-l-to-pos":[{"mask-l-to":ve()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":ve()}],"mask-image-x-to-pos":[{"mask-x-to":ve()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":ve()}],"mask-image-y-to-pos":[{"mask-y-to":ve()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[Te,ye]}],"mask-image-radial-from-pos":[{"mask-radial-from":ve()}],"mask-image-radial-to-pos":[{"mask-radial-to":ve()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":K()}],"mask-image-conic-pos":[{"mask-conic":[Be]}],"mask-image-conic-from-pos":[{"mask-conic-from":ve()}],"mask-image-conic-to-pos":[{"mask-conic-to":ve()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:Q()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,ye]}],filter:[{filter:["","none",Te,ye]}],blur:[{blur:Je()}],brightness:[{brightness:[Be,Te,ye]}],contrast:[{contrast:[Be,Te,ye]}],"drop-shadow":[{"drop-shadow":["","none",x,Vu,$u]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",Be,Te,ye]}],"hue-rotate":[{"hue-rotate":[Be,Te,ye]}],invert:[{invert:["",Be,Te,ye]}],saturate:[{saturate:[Be,Te,ye]}],sepia:[{sepia:["",Be,Te,ye]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,ye]}],"backdrop-blur":[{"backdrop-blur":Je()}],"backdrop-brightness":[{"backdrop-brightness":[Be,Te,ye]}],"backdrop-contrast":[{"backdrop-contrast":[Be,Te,ye]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Be,Te,ye]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Be,Te,ye]}],"backdrop-invert":[{"backdrop-invert":["",Be,Te,ye]}],"backdrop-opacity":[{"backdrop-opacity":[Be,Te,ye]}],"backdrop-saturate":[{"backdrop-saturate":[Be,Te,ye]}],"backdrop-sepia":[{"backdrop-sepia":["",Be,Te,ye]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":q()}],"border-spacing-x":[{"border-spacing-x":q()}],"border-spacing-y":[{"border-spacing-y":q()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,ye]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Be,"initial",Te,ye]}],ease:[{ease:["linear","initial",A,Te,ye]}],delay:[{delay:[Be,Te,ye]}],animate:[{animate:["none",j,Te,ye]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Te,ye]}],"perspective-origin":[{"perspective-origin":Y()}],rotate:[{rotate:It()}],"rotate-x":[{"rotate-x":It()}],"rotate-y":[{"rotate-y":It()}],"rotate-z":[{"rotate-z":It()}],scale:[{scale:cn()}],"scale-x":[{"scale-x":cn()}],"scale-y":[{"scale-y":cn()}],"scale-z":[{"scale-z":cn()}],"scale-3d":["scale-3d"],skew:[{skew:en()}],"skew-x":[{"skew-x":en()}],"skew-y":[{"skew-y":en()}],transform:[{transform:[Te,ye,"","none","gpu","cpu"]}],"transform-origin":[{origin:Y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:tn()}],"translate-x":[{"translate-x":tn()}],"translate-y":[{"translate-y":tn()}],"translate-z":[{"translate-z":tn()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,ye]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-me":[{"scroll-me":q()}],"scroll-mbs":[{"scroll-mbs":q()}],"scroll-mbe":[{"scroll-mbe":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-pe":[{"scroll-pe":q()}],"scroll-pbs":[{"scroll-pbs":q()}],"scroll-pbe":[{"scroll-pbe":q()}],"scroll-pt":[{"scroll-pt":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,ye]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[Be,Qs,ri,Bm]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},BE=M6(rI);var Jd=l1();const uL=ga(Jd);function ef(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ei=ef();function FE(e){Ei=e}var si={exec:()=>null};function Ve(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(a,u)=>{let l=typeof u=="string"?u:u.source;return l=l.replace(zt.caret,"$1"),n=n.replace(a,l),i},getRegex:()=>new RegExp(n,t)};return i}var iI=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),zt={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},sI=/^(?:[ \t]*(?:\n|$))+/,aI=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,uI=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_a=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,oI=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tf=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,jE=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,HE=Ve(jE).replace(/bull/g,tf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lI=Ve(jE).replace(/bull/g,tf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cI=/^[^\n]+/,rf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,dI=Ve(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rf).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fI=Ve(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tf).getRegex(),Ao="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",sf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hI=Ve("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",sf).replace("tag",Ao).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),UE=Ve(nf).replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ao).getRegex(),pI=Ve(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",UE).getRegex(),af={blockquote:pI,code:aI,def:dI,fences:uI,heading:oI,hr:_a,html:hI,lheading:HE,list:fI,newline:sI,paragraph:UE,table:si,text:cI},Hm=Ve("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ao).getRegex(),mI={...af,lheading:lI,table:Hm,paragraph:Ve(nf).replace("hr",_a).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Hm).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Ao).getRegex()},gI={...af,html:Ve(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",sf).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:si,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Ve(nf).replace("hr",_a).replace("heading",` *#{1,6} *[^
|
|
200
|
-
]`).replace("lheading",HE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},EI=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bI=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,zE=/^( {2,}|\\)\n(?!\s*$)/,xI=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,rs=/[\p{P}\p{S}]/u,No=/[\s\p{P}\p{S}]/u,uf=/[^\s\p{P}\p{S}]/u,yI=Ve(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,No).getRegex(),$E=/(?!~)[\p{P}\p{S}]/u,TI=/(?!~)[\s\p{P}\p{S}]/u,kI=/(?:[^\s\p{P}\p{S}]|~)/u,CI=Ve(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",iI?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),VE=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,wI=Ve(VE,"u").replace(/punct/g,rs).getRegex(),_I=Ve(VE,"u").replace(/punct/g,$E).getRegex(),WE="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",SI=Ve(WE,"gu").replace(/notPunctSpace/g,uf).replace(/punctSpace/g,No).replace(/punct/g,rs).getRegex(),vI=Ve(WE,"gu").replace(/notPunctSpace/g,kI).replace(/punctSpace/g,TI).replace(/punct/g,$E).getRegex(),AI=Ve("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,uf).replace(/punctSpace/g,No).replace(/punct/g,rs).getRegex(),NI=Ve(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,rs).getRegex(),II="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",LI=Ve(II,"gu").replace(/notPunctSpace/g,uf).replace(/punctSpace/g,No).replace(/punct/g,rs).getRegex(),RI=Ve(/\\(punct)/,"gu").replace(/punct/g,rs).getRegex(),OI=Ve(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),PI=Ve(sf).replace("(?:-->|$)","-->").getRegex(),DI=Ve("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",PI).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),lo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,MI=Ve(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",lo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),YE=Ve(/^!?\[(label)\]\[(ref)\]/).replace("label",lo).replace("ref",rf).getRegex(),qE=Ve(/^!?\[(ref)\](?:\[\])?/).replace("ref",rf).getRegex(),BI=Ve("reflink|nolink(?!\\()","g").replace("reflink",YE).replace("nolink",qE).getRegex(),Um=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,of={_backpedal:si,anyPunctuation:RI,autolink:OI,blockSkip:CI,br:zE,code:bI,del:si,delLDelim:si,delRDelim:si,emStrongLDelim:wI,emStrongRDelimAst:SI,emStrongRDelimUnd:AI,escape:EI,link:MI,nolink:qE,punctuation:yI,reflink:YE,reflinkSearch:BI,tag:DI,text:xI,url:si},FI={...of,link:Ve(/^!?\[(label)\]\((.*?)\)/).replace("label",lo).getRegex(),reflink:Ve(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lo).getRegex()},dd={...of,emStrongRDelimAst:vI,emStrongLDelim:_I,delLDelim:NI,delRDelim:LI,url:Ve(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Um).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Ve(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Um).getRegex()},jI={...dd,br:Ve(zE).replace("{2,}","*").getRegex(),text:Ve(dd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Wu={normal:af,gfm:mI,pedantic:gI},Gs={normal:of,gfm:dd,breaks:jI,pedantic:FI},HI={"&":"&","<":"<",">":">",'"':""","'":"'"},zm=e=>HI[e];function Hn(e,t){if(t){if(zt.escapeTest.test(e))return e.replace(zt.escapeReplace,zm)}else if(zt.escapeTestNoEncode.test(e))return e.replace(zt.escapeReplaceNoEncode,zm);return e}function $m(e){try{e=encodeURI(e).replace(zt.percentDecode,"%")}catch{return null}return e}function Vm(e,t){var u;let n=e.replace(zt.findPipe,(l,c,f)=>{let h=!1,m=c;for(;--m>=0&&f[m]==="\\";)h=!h;return h?"|":" |"}),i=n.split(zt.splitPipe),a=0;if(i[0].trim()||i.shift(),i.length>0&&!((u=i.at(-1))!=null&&u.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;a<i.length;a++)i[a]=i[a].trim().replace(zt.slashPipe,"|");return i}function Ks(e,t,n){let i=e.length;if(i===0)return"";let a=0;for(;a<i&&e.charAt(i-a-1)===t;)a++;return e.slice(0,i-a)}function UI(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function zI(e,t=0){let n=t,i="";for(let a of e)if(a===" "){let u=4-n%4;i+=" ".repeat(u),n+=u}else i+=a,n++;return i}function Wm(e,t,n,i,a){let u=t.href,l=t.title||null,c=e[1].replace(a.other.outputLinkReplace,"$1");i.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:u,title:l,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,f}function $I(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let a=i[1];return t.split(`
|
|
201
|
-
`).map(u=>{let l=u.match(n.other.beginningSpace);if(l===null)return u;let[c]=l;return c.length>=a.length?u.slice(a.length):u}).join(`
|
|
202
|
-
`)}var co=class{constructor(e){Ke(this,"options");Ke(this,"rules");Ke(this,"lexer");this.options=e||Ei}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ks(n,`
|
|
203
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=$I(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=Ks(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ks(t[0],`
|
|
204
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ks(t[0],`
|
|
205
|
-
`).split(`
|
|
206
|
-
`),i="",a="",u=[];for(;n.length>0;){let l=!1,c=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))c.push(n[f]),l=!0;else if(!l)c.push(n[f]);else break;n=n.slice(f);let h=c.join(`
|
|
207
|
-
`),m=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
208
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
209
|
-
${h}`:h,a=a?`${a}
|
|
210
|
-
${m}`:m;let E=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,u,!0),this.lexer.state.top=E,n.length===0)break;let y=u.at(-1);if((y==null?void 0:y.type)==="code")break;if((y==null?void 0:y.type)==="blockquote"){let x=y,k=x.raw+`
|
|
211
|
-
`+n.join(`
|
|
212
|
-
`),v=this.blockquote(k);u[u.length-1]=v,i=i.substring(0,i.length-x.raw.length)+v.raw,a=a.substring(0,a.length-x.text.length)+v.text;break}else if((y==null?void 0:y.type)==="list"){let x=y,k=x.raw+`
|
|
213
|
-
`+n.join(`
|
|
214
|
-
`),v=this.list(k);u[u.length-1]=v,i=i.substring(0,i.length-y.raw.length)+v.raw,a=a.substring(0,a.length-x.raw.length)+v.raw,n=k.substring(u.at(-1).raw.length).split(`
|
|
215
|
-
`);continue}}return{type:"blockquote",raw:i,tokens:u,text:a}}}list(e){var n,i;let t=this.rules.block.list.exec(e);if(t){let a=t[1].trim(),u=a.length>1,l={type:"list",raw:"",ordered:u,start:u?+a.slice(0,-1):"",loose:!1,items:[]};a=u?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=u?a:"[*+-]");let c=this.rules.other.listItemRegex(a),f=!1;for(;e;){let m=!1,E="",y="";if(!(t=c.exec(e))||this.rules.block.hr.test(e))break;E=t[0],e=e.substring(E.length);let x=zI(t[2].split(`
|
|
216
|
-
`,1)[0],t[1].length),k=e.split(`
|
|
217
|
-
`,1)[0],v=!x.trim(),_=0;if(this.options.pedantic?(_=2,y=x.trimStart()):v?_=t[1].length+1:(_=x.search(this.rules.other.nonSpaceChar),_=_>4?1:_,y=x.slice(_),_+=t[1].length),v&&this.rules.other.blankLine.test(k)&&(E+=k+`
|
|
218
|
-
`,e=e.substring(k.length+1),m=!0),!m){let A=this.rules.other.nextBulletRegex(_),j=this.rules.other.hrRegex(_),F=this.rules.other.fencesBeginRegex(_),K=this.rules.other.headingBeginRegex(_),Y=this.rules.other.htmlBeginRegex(_),B=this.rules.other.blockquoteBeginRegex(_);for(;e;){let ae=e.split(`
|
|
219
|
-
`,1)[0],q;if(k=ae,this.options.pedantic?(k=k.replace(this.rules.other.listReplaceNesting," "),q=k):q=k.replace(this.rules.other.tabCharGlobal," "),F.test(k)||K.test(k)||Y.test(k)||B.test(k)||A.test(k)||j.test(k))break;if(q.search(this.rules.other.nonSpaceChar)>=_||!k.trim())y+=`
|
|
220
|
-
`+q.slice(_);else{if(v||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||F.test(x)||K.test(x)||j.test(x))break;y+=`
|
|
221
|
-
`+k}v=!k.trim(),E+=ae+`
|
|
222
|
-
`,e=e.substring(ae.length+1),x=q.slice(_)}}l.loose||(f?l.loose=!0:this.rules.other.doubleBlankLine.test(E)&&(f=!0)),l.items.push({type:"list_item",raw:E,task:!!this.options.gfm&&this.rules.other.listIsTask.test(y),loose:!1,text:y,tokens:[]}),l.raw+=E}let h=l.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;l.raw=l.raw.trimEnd();for(let m of l.items){if(this.lexer.state.top=!1,m.tokens=this.lexer.blockTokens(m.text,[]),m.task){if(m.text=m.text.replace(this.rules.other.listReplaceTask,""),((n=m.tokens[0])==null?void 0:n.type)==="text"||((i=m.tokens[0])==null?void 0:i.type)==="paragraph"){m.tokens[0].raw=m.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),m.tokens[0].text=m.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let y=this.lexer.inlineQueue.length-1;y>=0;y--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[y].src)){this.lexer.inlineQueue[y].src=this.lexer.inlineQueue[y].src.replace(this.rules.other.listReplaceTask,"");break}}let E=this.rules.other.listTaskCheckbox.exec(m.raw);if(E){let y={type:"checkbox",raw:E[0]+" ",checked:E[0]!=="[ ]"};m.checked=y.checked,l.loose?m.tokens[0]&&["paragraph","text"].includes(m.tokens[0].type)&&"tokens"in m.tokens[0]&&m.tokens[0].tokens?(m.tokens[0].raw=y.raw+m.tokens[0].raw,m.tokens[0].text=y.raw+m.tokens[0].text,m.tokens[0].tokens.unshift(y)):m.tokens.unshift({type:"paragraph",raw:y.raw,text:y.raw,tokens:[y]}):m.tokens.unshift(y)}}if(!l.loose){let E=m.tokens.filter(x=>x.type==="space"),y=E.length>0&&E.some(x=>this.rules.other.anyLine.test(x.raw));l.loose=y}}if(l.loose)for(let m of l.items){m.loose=!0;for(let E of m.tokens)E.type==="text"&&(E.type="paragraph")}return l}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:i,title:a}}}table(e){var l;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Vm(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(l=t[3])!=null&&l.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
223
|
-
`):[],u={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?u.align.push("right"):this.rules.other.tableAlignCenter.test(c)?u.align.push("center"):this.rules.other.tableAlignLeft.test(c)?u.align.push("left"):u.align.push(null);for(let c=0;c<n.length;c++)u.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:u.align[c]});for(let c of a)u.rows.push(Vm(c,u.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:u.align[h]})));return u}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
224
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let u=Ks(n.slice(0,-1),"\\");if((n.length-u.length)%2===0)return}else{let u=UI(t[2],"()");if(u===-2)return;if(u>-1){let l=(t[0].indexOf("!")===0?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let i=t[2],a="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(i);u&&(i=u[1],a=u[3])}else a=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),Wm(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=t[i.toLowerCase()];if(!a){let u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return Wm(n,a,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,u,l,c=a,f=0,h=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+a);(i=h.exec(t))!==null;){if(u=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!u)continue;if(l=[...u].length,i[3]||i[4]){c+=l;continue}else if((i[5]||i[6])&&a%3&&!((a+l)%3)){f+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c+f);let m=[...i[0]][0].length,E=e.slice(0,a+i.index+m+l);if(Math.min(a,l)%2){let x=E.slice(1,-1);return{type:"em",raw:E,text:x,tokens:this.lexer.inlineTokens(x)}}let y=E.slice(2,-2);return{type:"strong",raw:E,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,u,l,c=a,f=this.rules.inline.delRDelim;for(f.lastIndex=0,t=t.slice(-1*e.length+a);(i=f.exec(t))!==null;){if(u=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!u||(l=[...u].length,l!==a))continue;if(i[3]||i[4]){c+=l;continue}if(c-=l,c>0)continue;l=Math.min(l,l+c);let h=[...i[0]][0].length,m=e.slice(0,a+i.index+h+l),E=m.slice(a,-a);return{type:"del",raw:m,text:E,tokens:this.lexer.inlineTokens(E)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let i,a;if(t[2]==="@")i=t[0],a="mailto:"+i;else{let u;do u=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(u!==t[0]);i=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},yn=class fd{constructor(t){Ke(this,"tokens");Ke(this,"options");Ke(this,"state");Ke(this,"inlineQueue");Ke(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ei,this.options.tokenizer=this.options.tokenizer||new co,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:zt,block:Wu.normal,inline:Gs.normal};this.options.pedantic?(n.block=Wu.pedantic,n.inline=Gs.pedantic):this.options.gfm&&(n.block=Wu.gfm,this.options.breaks?n.inline=Gs.breaks:n.inline=Gs.gfm),this.tokenizer.rules=n}static get rules(){return{block:Wu,inline:Gs}}static lex(t,n){return new fd(n).lex(t)}static lexInline(t,n){return new fd(n).inlineTokens(t)}lex(t){t=t.replace(zt.carriageReturn,`
|
|
225
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){var a,u,l;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(zt.tabCharGlobal," ").replace(zt.spaceLine,""));t;){let c;if((u=(a=this.options.extensions)==null?void 0:a.block)!=null&&u.some(h=>(c=h.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(t)){t=t.substring(c.raw.length);let h=n.at(-1);c.raw.length===1&&h!==void 0?h.raw+=`
|
|
226
|
-
`:n.push(c);continue}if(c=this.tokenizer.code(t)){t=t.substring(c.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
227
|
-
`)?"":`
|
|
228
|
-
`)+c.raw,h.text+=`
|
|
229
|
-
`+c.text,this.inlineQueue.at(-1).src=h.text):n.push(c);continue}if(c=this.tokenizer.fences(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(t)){t=t.substring(c.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
230
|
-
`)?"":`
|
|
231
|
-
`)+c.raw,h.text+=`
|
|
232
|
-
`+c.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title},n.push(c));continue}if(c=this.tokenizer.table(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(t)){t=t.substring(c.raw.length),n.push(c);continue}let f=t;if((l=this.options.extensions)!=null&&l.startBlock){let h=1/0,m=t.slice(1),E;this.options.extensions.startBlock.forEach(y=>{E=y.call({lexer:this},m),typeof E=="number"&&E>=0&&(h=Math.min(h,E))}),h<1/0&&h>=0&&(f=t.substring(0,h+1))}if(this.state.top&&(c=this.tokenizer.paragraph(f))){let h=n.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
233
|
-
`)?"":`
|
|
234
|
-
`)+c.raw,h.text+=`
|
|
235
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(c),i=f.length!==t.length,t=t.substring(c.raw.length);continue}if(c=this.tokenizer.text(t)){t=t.substring(c.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
236
|
-
`)?"":`
|
|
237
|
-
`)+c.raw,h.text+=`
|
|
238
|
-
`+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(c);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var f,h,m,E,y;this.tokenizer.lexer=this;let i=t,a=null;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(a=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)x.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(a=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let u;for(;(a=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)u=a[2]?a[2].length:0,i=i.slice(0,a.index+u)+"["+"a".repeat(a[0].length-u-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(f=this.options.hooks)==null?void 0:f.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let l=!1,c="";for(;t;){l||(c=""),l=!1;let x;if((E=(m=this.options.extensions)==null?void 0:m.inline)!=null&&E.some(v=>(x=v.call({lexer:this},t,n))?(t=t.substring(x.raw.length),n.push(x),!0):!1))continue;if(x=this.tokenizer.escape(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.tag(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.link(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(x.raw.length);let v=n.at(-1);x.type==="text"&&(v==null?void 0:v.type)==="text"?(v.raw+=x.raw,v.text+=x.text):n.push(x);continue}if(x=this.tokenizer.emStrong(t,i,c)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.codespan(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.br(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.del(t,i,c)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.autolink(t)){t=t.substring(x.raw.length),n.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(t))){t=t.substring(x.raw.length),n.push(x);continue}let k=t;if((y=this.options.extensions)!=null&&y.startInline){let v=1/0,_=t.slice(1),A;this.options.extensions.startInline.forEach(j=>{A=j.call({lexer:this},_),typeof A=="number"&&A>=0&&(v=Math.min(v,A))}),v<1/0&&v>=0&&(k=t.substring(0,v+1))}if(x=this.tokenizer.inlineText(k)){t=t.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(c=x.raw.slice(-1)),l=!0;let v=n.at(-1);(v==null?void 0:v.type)==="text"?(v.raw+=x.raw,v.text+=x.text):n.push(x);continue}if(t){let v="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return n}},fo=class{constructor(t){Ke(this,"options");Ke(this,"parser");this.options=t||Ei}space(t){return""}code({text:t,lang:n,escaped:i}){var l;let a=(l=(n||"").match(zt.notSpaceStart))==null?void 0:l[0],u=t.replace(zt.endingNewline,"")+`
|
|
239
|
-
`;return a?'<pre><code class="language-'+Hn(a)+'">'+(i?u:Hn(u,!0))+`</code></pre>
|
|
240
|
-
`:"<pre><code>"+(i?u:Hn(u,!0))+`</code></pre>
|
|
241
|
-
`}blockquote({tokens:t}){return`<blockquote>
|
|
242
|
-
${this.parser.parse(t)}</blockquote>
|
|
243
|
-
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
244
|
-
`}hr(t){return`<hr>
|
|
245
|
-
`}list(t){let n=t.ordered,i=t.start,a="";for(let c=0;c<t.items.length;c++){let f=t.items[c];a+=this.listitem(f)}let u=n?"ol":"ul",l=n&&i!==1?' start="'+i+'"':"";return"<"+u+l+`>
|
|
246
|
-
`+a+"</"+u+`>
|
|
247
|
-
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
248
|
-
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
249
|
-
`}table(t){let n="",i="";for(let u=0;u<t.header.length;u++)i+=this.tablecell(t.header[u]);n+=this.tablerow({text:i});let a="";for(let u=0;u<t.rows.length;u++){let l=t.rows[u];i="";for(let c=0;c<l.length;c++)i+=this.tablecell(l[c]);a+=this.tablerow({text:i})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
|
|
250
|
-
<thead>
|
|
251
|
-
`+n+`</thead>
|
|
252
|
-
`+a+`</table>
|
|
253
|
-
`}tablerow({text:t}){return`<tr>
|
|
254
|
-
${t}</tr>
|
|
255
|
-
`}tablecell(t){let n=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+n+`</${i}>
|
|
256
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Hn(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:i}){let a=this.parser.parseInline(i),u=$m(t);if(u===null)return a;t=u;let l='<a href="'+t+'"';return n&&(l+=' title="'+Hn(n)+'"'),l+=">"+a+"</a>",l}image({href:t,title:n,text:i,tokens:a}){a&&(i=this.parser.parseInline(a,this.parser.textRenderer));let u=$m(t);if(u===null)return Hn(i);t=u;let l=`<img src="${t}" alt="${Hn(i)}"`;return n&&(l+=` title="${Hn(n)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Hn(t.text)}},lf=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},In=class hd{constructor(t){Ke(this,"options");Ke(this,"renderer");Ke(this,"textRenderer");this.options=t||Ei,this.options.renderer=this.options.renderer||new fo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new lf}static parse(t,n){return new hd(n).parse(t)}static parseInline(t,n){return new hd(n).parseInline(t)}parse(t){var i,a;this.renderer.parser=this;let n="";for(let u=0;u<t.length;u++){let l=t[u];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[l.type]){let f=l,h=this.options.extensions.renderers[f.type].call({parser:this},f);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=h||"";continue}}let c=l;switch(c.type){case"space":{n+=this.renderer.space(c);break}case"hr":{n+=this.renderer.hr(c);break}case"heading":{n+=this.renderer.heading(c);break}case"code":{n+=this.renderer.code(c);break}case"table":{n+=this.renderer.table(c);break}case"blockquote":{n+=this.renderer.blockquote(c);break}case"list":{n+=this.renderer.list(c);break}case"checkbox":{n+=this.renderer.checkbox(c);break}case"html":{n+=this.renderer.html(c);break}case"def":{n+=this.renderer.def(c);break}case"paragraph":{n+=this.renderer.paragraph(c);break}case"text":{n+=this.renderer.text(c);break}default:{let f='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(t,n=this.renderer){var a,u;this.renderer.parser=this;let i="";for(let l=0;l<t.length;l++){let c=t[l];if((u=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&u[c.type]){let h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=h||"";continue}}let f=c;switch(f.type){case"escape":{i+=n.text(f);break}case"html":{i+=n.html(f);break}case"link":{i+=n.link(f);break}case"image":{i+=n.image(f);break}case"checkbox":{i+=n.checkbox(f);break}case"strong":{i+=n.strong(f);break}case"em":{i+=n.em(f);break}case"codespan":{i+=n.codespan(f);break}case"br":{i+=n.br(f);break}case"del":{i+=n.del(f);break}case"text":{i+=n.text(f);break}default:{let h='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Qu,Js=(Qu=class{constructor(e){Ke(this,"options");Ke(this,"block");this.options=e||Ei}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?yn.lex:yn.lexInline}provideParser(e=this.block){return e?In.parse:In.parseInline}},Ke(Qu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Ke(Qu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Qu),VI=class{constructor(...t){Ke(this,"defaults",ef());Ke(this,"options",this.setOptions);Ke(this,"parse",this.parseMarkdown(!0));Ke(this,"parseInline",this.parseMarkdown(!1));Ke(this,"Parser",In);Ke(this,"Renderer",fo);Ke(this,"TextRenderer",lf);Ke(this,"Lexer",yn);Ke(this,"Tokenizer",co);Ke(this,"Hooks",Js);this.use(...t)}walkTokens(t,n){var a,u;let i=[];for(let l of t)switch(i=i.concat(n.call(this,l)),l.type){case"table":{let c=l;for(let f of c.header)i=i.concat(this.walkTokens(f.tokens,n));for(let f of c.rows)for(let h of f)i=i.concat(this.walkTokens(h.tokens,n));break}case"list":{let c=l;i=i.concat(this.walkTokens(c.items,n));break}default:{let c=l;(u=(a=this.defaults.extensions)==null?void 0:a.childTokens)!=null&&u[c.type]?this.defaults.extensions.childTokens[c.type].forEach(f=>{let h=c[f].flat(1/0);i=i.concat(this.walkTokens(h,n))}):c.tokens&&(i=i.concat(this.walkTokens(c.tokens,n)))}}return i}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let a={...i};if(a.async=this.defaults.async||a.async||!1,i.extensions&&(i.extensions.forEach(u=>{if(!u.name)throw new Error("extension name required");if("renderer"in u){let l=n.renderers[u.name];l?n.renderers[u.name]=function(...c){let f=u.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}:n.renderers[u.name]=u.renderer}if("tokenizer"in u){if(!u.level||u.level!=="block"&&u.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[u.level];l?l.unshift(u.tokenizer):n[u.level]=[u.tokenizer],u.start&&(u.level==="block"?n.startBlock?n.startBlock.push(u.start):n.startBlock=[u.start]:u.level==="inline"&&(n.startInline?n.startInline.push(u.start):n.startInline=[u.start]))}"childTokens"in u&&u.childTokens&&(n.childTokens[u.name]=u.childTokens)}),a.extensions=n),i.renderer){let u=this.defaults.renderer||new fo(this.defaults);for(let l in i.renderer){if(!(l in u))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,f=i.renderer[c],h=u[c];u[c]=(...m)=>{let E=f.apply(u,m);return E===!1&&(E=h.apply(u,m)),E||""}}a.renderer=u}if(i.tokenizer){let u=this.defaults.tokenizer||new co(this.defaults);for(let l in i.tokenizer){if(!(l in u))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,f=i.tokenizer[c],h=u[c];u[c]=(...m)=>{let E=f.apply(u,m);return E===!1&&(E=h.apply(u,m)),E}}a.tokenizer=u}if(i.hooks){let u=this.defaults.hooks||new Js;for(let l in i.hooks){if(!(l in u))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,f=i.hooks[c],h=u[c];Js.passThroughHooks.has(l)?u[c]=m=>{if(this.defaults.async&&Js.passThroughHooksRespectAsync.has(l))return(async()=>{let y=await f.call(u,m);return h.call(u,y)})();let E=f.call(u,m);return h.call(u,E)}:u[c]=(...m)=>{if(this.defaults.async)return(async()=>{let y=await f.apply(u,m);return y===!1&&(y=await h.apply(u,m)),y})();let E=f.apply(u,m);return E===!1&&(E=h.apply(u,m)),E}}a.hooks=u}if(i.walkTokens){let u=this.defaults.walkTokens,l=i.walkTokens;a.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),u&&(f=f.concat(u.call(this,c))),f}}this.defaults={...this.defaults,...a}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return yn.lex(t,n??this.defaults)}parser(t,n){return In.parse(t,n??this.defaults)}parseMarkdown(t){return(n,i)=>{let a={...i},u={...this.defaults,...a},l=this.onError(!!u.silent,!!u.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(u.hooks&&(u.hooks.options=u,u.hooks.block=t),u.async)return(async()=>{let c=u.hooks?await u.hooks.preprocess(n):n,f=await(u.hooks?await u.hooks.provideLexer(t):t?yn.lex:yn.lexInline)(c,u),h=u.hooks?await u.hooks.processAllTokens(f):f;u.walkTokens&&await Promise.all(this.walkTokens(h,u.walkTokens));let m=await(u.hooks?await u.hooks.provideParser(t):t?In.parse:In.parseInline)(h,u);return u.hooks?await u.hooks.postprocess(m):m})().catch(l);try{u.hooks&&(n=u.hooks.preprocess(n));let c=(u.hooks?u.hooks.provideLexer(t):t?yn.lex:yn.lexInline)(n,u);u.hooks&&(c=u.hooks.processAllTokens(c)),u.walkTokens&&this.walkTokens(c,u.walkTokens);let f=(u.hooks?u.hooks.provideParser(t):t?In.parse:In.parseInline)(c,u);return u.hooks&&(f=u.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,n){return i=>{if(i.message+=`
|
|
257
|
-
Please report this to https://github.com/markedjs/marked.`,t){let a="<p>An error occurred:</p><pre>"+Hn(i.message+"",!0)+"</pre>";return n?Promise.resolve(a):a}if(n)return Promise.reject(i);throw i}}},fi=new VI;function Xe(e,t){return fi.parse(e,t)}Xe.options=Xe.setOptions=function(e){return fi.setOptions(e),Xe.defaults=fi.defaults,FE(Xe.defaults),Xe};Xe.getDefaults=ef;Xe.defaults=Ei;Xe.use=function(...e){return fi.use(...e),Xe.defaults=fi.defaults,FE(Xe.defaults),Xe};Xe.walkTokens=function(e,t){return fi.walkTokens(e,t)};Xe.parseInline=fi.parseInline;Xe.Parser=In;Xe.parser=In.parse;Xe.Renderer=fo;Xe.TextRenderer=lf;Xe.Lexer=yn;Xe.lexer=yn.lex;Xe.Tokenizer=co;Xe.Hooks=Js;Xe.parse=Xe;Xe.options;Xe.setOptions;Xe.use;Xe.walkTokens;Xe.parseInline;In.parse;yn.lex;var WI=300,YI="300px",qI=500;function QI(e={}){let{immediate:t=!1,debounceDelay:n=WI,rootMargin:i=YI,idleTimeout:a=qI}=e,[u,l]=R.useState(!1),c=R.useRef(null),f=R.useRef(null),h=R.useRef(null),m=R.useMemo(()=>x=>{let k=Date.now();return window.setTimeout(()=>{x({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-k))})},1)},[]),E=R.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(x,k)=>window.requestIdleCallback(x,k):m,[m]),y=R.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?x=>window.cancelIdleCallback(x):x=>{clearTimeout(x)},[]);return R.useEffect(()=>{if(t){l(!0);return}let x=c.current;if(!x)return;f.current&&(clearTimeout(f.current),f.current=null),h.current&&(y(h.current),h.current=null);let k=()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(y(h.current),h.current=null)},v=F=>{h.current=E(K=>{K.timeRemaining()>0||K.didTimeout?(l(!0),F.disconnect()):h.current=E(()=>{l(!0),F.disconnect()},{timeout:a/2})},{timeout:a})},_=F=>{k(),f.current=window.setTimeout(()=>{var K,Y;let B=F.takeRecords();(B.length===0||(Y=(K=B.at(-1))==null?void 0:K.isIntersecting)!=null&&Y)&&v(F)},n)},A=(F,K)=>{F.isIntersecting?_(K):k()},j=new IntersectionObserver(F=>{for(let K of F)A(K,j)},{rootMargin:i,threshold:0});return j.observe(x),()=>{f.current&&clearTimeout(f.current),h.current&&y(h.current),j.disconnect()}},[t,n,i,a,y,E]),{shouldRender:u,containerRef:c}}var QE=/\s/,GI=/^\s+$/,KI=new Set(["code","pre","svg","math","annotation"]),XI=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",ZI=e=>e.some(t=>XI(t)&&KI.has(t.tagName)),JI=e=>{let t=[],n="",i=!1;for(let a of e){let u=QE.test(a);u!==i&&n&&(t.push(n),n=""),n+=a,i=u}return n&&t.push(n),t},e4=e=>{let t=[],n="";for(let i of e)QE.test(i)?n+=i:(n&&(t.push(n),n=""),t.push(i));return n&&t.push(n),t},t4=(e,t,n,i,a,u)=>{let l=`--sd-animation:sd-${t};--sd-duration:${a?0:n}ms;--sd-easing:${i}`;return u&&(l+=`;--sd-delay:${u}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:l},children:[{type:"text",value:e}]}},n4=(e,t,n,i,a)=>{let u=t.at(-1);if(!(u&&"children"in u))return;if(ZI(t))return Wi;let l=u,c=l.children.indexOf(e);if(c===-1)return;let f=e.value;if(!f.trim()){a.count+=f.length;return}let h=n.sep==="char"?e4(f):JI(f),m=i.prevContentLength,E=h.map(y=>{let x=a.count;if(a.count+=y.length,GI.test(y))return{type:"text",value:y};let k=m>0&&x<m,v=k?0:a.newIndex++*n.stagger;return t4(y,n.animation,n.duration,n.easing,k,v)});return l.children.splice(c,1,...E),c+E.length},r4=0;function ho(e){var t,n,i,a,u;let l={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(i=e==null?void 0:e.easing)!=null?i:"ease",sep:(a=e==null?void 0:e.sep)!=null?a:"word",stagger:(u=e==null?void 0:e.stagger)!=null?u:40},c={prevContentLength:0,lastRenderCharCount:0},f=r4++,h=()=>m=>{let E={count:0,newIndex:0};Fd(m,"text",(y,x)=>n4(y,x,l,c,E)),c.lastRenderCharCount=E.count,c.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${f}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(m){c.prevContentLength=m},getLastRenderCharCount(){let m=c.lastRenderCharCount;return c.lastRenderCharCount=0,m}}}ho();var GE=R.createContext(!1),KE=()=>R.useContext(GE),cf=(...e)=>BE(kE(e)),i4=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(i=>i.startsWith(n)?i:`${e}:${i}`).join(" ")},s4=e=>e?(...t)=>i4(e,BE(kE(t))):cf,oi=(e,t,n)=>{let i=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",a=typeof t=="string"?new Blob([i+t],{type:n}):t,u=URL.createObjectURL(a),l=document.createElement("a");l.href=u,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(u)},pd=R.createContext(cf),Fe=()=>R.useContext(pd),a4=cf("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),u4=e=>{let t={};for(let n of e.split(";")){let i=n.indexOf(":");if(i>0){let a=n.slice(0,i).trim(),u=n.slice(i+1).trim();a&&u&&(t[a]=u)}}return t},o4=R.memo(({children:e,result:t,language:n,className:i,startLine:a,lineNumbers:u=!0,...l})=>{let c=Fe(),f=R.useMemo(()=>c(a4),[c]),h=R.useMemo(()=>{let m={};return t.bg&&(m["--sdm-bg"]=t.bg),t.fg&&(m["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(m,u4(t.rootStyle)),m},[t.bg,t.fg,t.rootStyle]);return T.jsx("div",{className:c(i,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:T.jsx("pre",{className:c(i,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:T.jsx("code",{className:u?c("[counter-increment:line_0] [counter-reset:line]"):void 0,style:u&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((m,E)=>T.jsx("span",{className:u?f:void 0,children:m.length===0||m.length===1&&m[0].content===""?`
|
|
258
|
-
`:m.map((y,x)=>{let k={},v=!!y.bgColor;if(y.color&&(k["--sdm-c"]=y.color),y.bgColor&&(k["--sdm-tbg"]=y.bgColor),y.htmlStyle)for(let[_,A]of Object.entries(y.htmlStyle))_==="color"?k["--sdm-c"]=A:_==="background-color"?(k["--sdm-tbg"]=A,v=!0):k[_]=A;return T.jsx("span",{className:c("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",v&&"bg-[var(--sdm-tbg)]",v&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:k,...y.htmlAttrs,children:y.content},x)})},E))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),XE=({className:e,language:t,style:n,isIncomplete:i,...a})=>{let u=Fe();return T.jsx("div",{className:u("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":i||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...a})},ZE=R.createContext({code:""}),JE=()=>R.useContext(ZE),eb=({language:e})=>{let t=Fe();return T.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:T.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},l4=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
259
|
-
`;)t--;return e.slice(0,t)},c4=R.lazy(()=>Mr(()=>import("./highlighted-body-OFNGDK62--vm9zfDs.js"),__vite__mapDeps([0,1])).then(e=>({default:e.HighlightedCodeBlockBody}))),tb=({code:e,language:t,className:n,children:i,isIncomplete:a=!1,startLine:u,lineNumbers:l,...c})=>{let f=Fe(),h=R.useMemo(()=>l4(e),[e]),m=R.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
|
|
260
|
-
`).map(E=>[{content:E,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return T.jsx(ZE.Provider,{value:{code:e},children:T.jsxs(XE,{isIncomplete:a,language:t,children:[T.jsx(eb,{language:t}),i?T.jsx("div",{className:f("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsx("div",{className:f("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:i})}):null,T.jsx(R.Suspense,{fallback:T.jsx(o4,{className:n,language:t,lineNumbers:l,result:m,startLine:u,...c}),children:T.jsx(c4,{className:n,code:h,language:t,lineNumbers:l,raw:m,startLine:u,...c})})]})})},d4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),f4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),h4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),p4=e=>T.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[T.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),m4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),g4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),E4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),b4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),x4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),y4=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),ea={CheckIcon:d4,CopyIcon:f4,DownloadIcon:h4,ExternalLinkIcon:b4,Loader2Icon:p4,Maximize2Icon:m4,RotateCcwIcon:g4,XIcon:E4,ZoomInIcon:x4,ZoomOutIcon:y4},nb=R.createContext(ea),T4=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),i=Object.keys(t);return n.length!==i.length?!1:n.every(a=>e[a]===t[a])},Ym=({icons:e,children:t})=>{let n=R.useRef(e),i=R.useRef(e?{...ea,...e}:ea);T4(n.current,e)||(n.current=e,i.current=e?{...ea,...e}:ea);let a=i.current;return T.jsx(nb.Provider,{value:a,children:t})},Tn=()=>R.useContext(nb),df={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},md=R.createContext(df),Wn=()=>R.useContext(md),gd=({onCopy:e,onError:t,timeout:n=2e3,children:i,className:a,code:u,...l})=>{let c=Fe(),[f,h]=R.useState(!1),m=R.useRef(0),{code:E}=JE(),{isAnimating:y}=R.useContext(Vt),x=Wn(),k=u??E,v=async()=>{var j;if(typeof window>"u"||!((j=navigator==null?void 0:navigator.clipboard)!=null&&j.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{f||(await navigator.clipboard.writeText(k),h(!0),e==null||e(),m.current=window.setTimeout(()=>h(!1),n))}catch(F){t==null||t(F)}};R.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let _=Tn(),A=f?_.CheckIcon:_.CopyIcon;return T.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-copy-button",disabled:y,onClick:v,title:x.copyCode,type:"button",...l,children:i??T.jsx(A,{size:14})})},qm={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},rb=({onDownload:e,onError:t,language:n,children:i,className:a,code:u,...l})=>{let c=Fe(),{code:f}=JE(),{isAnimating:h}=R.useContext(Vt),m=Wn(),E=Tn(),y=u??f,x=`file.${n&&n in qm?qm[n]:"txt"}`,k="text/plain",v=()=>{try{oi(x,y,k),e==null||e()}catch(_){t==null||t(_)}};return T.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),"data-streamdown":"code-block-download-button",disabled:h,onClick:v,title:m.downloadFile,type:"button",...l,children:i??T.jsx(E.DownloadIcon,{size:14})})},Ed=()=>{let{Loader2Icon:e}=Tn(),t=Fe();return T.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[T.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),T.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:T.jsx(e,{className:t("size-4 animate-spin")})})]})},k4=/\.[^/.]+$/,C4=({node:e,className:t,src:n,alt:i,onLoad:a,onError:u,...l})=>{let{DownloadIcon:c}=Tn(),f=Fe(),h=R.useRef(null),[m,E]=R.useState(!1),[y,x]=R.useState(!1),k=Wn(),v=l.width!=null||l.height!=null,_=(m||v)&&!y,A=y&&!v;R.useEffect(()=>{let Y=h.current;if(Y!=null&&Y.complete){let B=Y.naturalWidth>0;E(B),x(!B)}},[]);let j=R.useCallback(Y=>{E(!0),x(!1),a==null||a(Y)},[a]),F=R.useCallback(Y=>{E(!1),x(!0),u==null||u(Y)},[u]),K=async()=>{if(n)try{let Y=await(await fetch(n)).blob(),B=new URL(n,window.location.origin).pathname.split("/").pop()||"",ae=B.split(".").pop(),q=B.includes(".")&&ae!==void 0&&ae.length<=4,de="";if(q)de=B;else{let H=Y.type,ue="png";H.includes("jpeg")||H.includes("jpg")?ue="jpg":H.includes("png")?ue="png":H.includes("svg")?ue="svg":H.includes("gif")?ue="gif":H.includes("webp")&&(ue="webp"),de=`${(i||B||"image").replace(k4,"")}.${ue}`}oi(de,Y,Y.type)}catch{window.open(n,"_blank")}};return n?T.jsxs("div",{className:f("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[T.jsx("img",{alt:i,className:f("max-w-full rounded-lg",A&&"hidden",t),"data-streamdown":"image",onError:F,onLoad:j,ref:h,src:n,...l}),A&&T.jsx("span",{className:f("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:k.imageNotAvailable}),T.jsx("div",{className:f("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),_&&T.jsx("button",{className:f("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:K,title:k.downloadImage,type:"button",children:T.jsx(c,{size:14})})]}):null},la=0,ff=()=>{la+=1,la===1&&(document.body.style.overflow="hidden")},hf=()=>{la=Math.max(0,la-1),la===0&&(document.body.style.overflow="")},w4=({url:e,isOpen:t,onClose:n,onConfirm:i})=>{let{CheckIcon:a,CopyIcon:u,ExternalLinkIcon:l,XIcon:c}=Tn(),f=Fe(),[h,m]=R.useState(!1),E=Wn(),y=R.useCallback(async()=>{try{await navigator.clipboard.writeText(e),m(!0),setTimeout(()=>m(!1),2e3)}catch{}},[e]),x=R.useCallback(()=>{i(),n()},[i,n]);return R.useEffect(()=>{if(t){ff();let k=v=>{v.key==="Escape"&&n()};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k),hf()}}},[t,n]),t?T.jsx("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:k=>{k.key==="Escape"&&n()},role:"button",tabIndex:0,children:T.jsxs("div",{className:f("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),role:"presentation",children:[T.jsx("button",{className:f("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:E.close,type:"button",children:T.jsx(c,{size:16})}),T.jsxs("div",{className:f("flex flex-col gap-2"),children:[T.jsxs("div",{className:f("flex items-center gap-2 font-semibold text-lg"),children:[T.jsx(l,{size:20}),T.jsx("span",{children:E.openExternalLink})]}),T.jsx("p",{className:f("text-muted-foreground text-sm"),children:E.externalLinkWarning})]}),T.jsx("div",{className:f("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),T.jsxs("div",{className:f("flex gap-2"),children:[T.jsx("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:y,type:"button",children:h?T.jsxs(T.Fragment,{children:[T.jsx(a,{size:14}),T.jsx("span",{children:E.copied})]}):T.jsxs(T.Fragment,{children:[T.jsx(u,{size:14}),T.jsx("span",{children:E.copyLink})]})}),T.jsxs("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:x,type:"button",children:[T.jsx(l,{size:14}),T.jsx("span",{children:E.openLink})]})]})]})}):null},bd=R.createContext(null),pf=()=>R.useContext(bd),cL=()=>{var e;let t=pf();return(e=t==null?void 0:t.code)!=null?e:null},mf=()=>{var e;let t=pf();return(e=t==null?void 0:t.mermaid)!=null?e:null},_4=e=>{var t;let n=pf();return n!=null&&n.renderers&&e&&(t=n.renderers.find(i=>Array.isArray(i.language)?i.language.includes(e):i.language===e))!=null?t:null},S4=(e,t)=>{var n;let i=(n=void 0)!=null?n:5;return new Promise((a,u)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let f=document.createElement("canvas"),h=c.width*i,m=c.height*i;f.width=h,f.height=m;let E=f.getContext("2d");if(!E){u(new Error("Failed to create 2D canvas context for PNG export"));return}E.drawImage(c,0,0,h,m),f.toBlob(y=>{if(!y){u(new Error("Failed to create PNG blob"));return}a(y)},"image/png")},c.onerror=()=>u(new Error("Failed to load SVG image")),c.src=l})},v4=({chart:e,children:t,className:n,onDownload:i,config:a,onError:u})=>{let l=Fe(),[c,f]=R.useState(!1),h=R.useRef(null),{isAnimating:m}=R.useContext(Vt),E=Tn(),y=mf(),x=Wn(),k=async v=>{try{if(v==="mmd"){oi("diagram.mmd",e,"text/plain"),f(!1),i==null||i(v);return}if(!y){u==null||u(new Error("Mermaid plugin not available"));return}let _=y.getMermaid(a),A=e.split("").reduce((K,Y)=>(K<<5)-K+Y.charCodeAt(0)|0,0),j=`mermaid-${Math.abs(A)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:F}=await _.render(j,e);if(!F){u==null||u(new Error("SVG not found. Please wait for the diagram to render."));return}if(v==="svg"){oi("diagram.svg",F,"image/svg+xml"),f(!1),i==null||i(v);return}if(v==="png"){let K=await S4(F);oi("diagram.png",K,"image/png"),i==null||i(v),f(!1);return}}catch(_){u==null||u(_)}};return R.useEffect(()=>{let v=_=>{let A=_.composedPath();h.current&&!A.includes(h.current)&&f(!1)};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]),T.jsxs("div",{className:l("relative"),ref:h,children:[T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>f(!c),title:x.downloadDiagram,type:"button",children:t??T.jsx(E.DownloadIcon,{size:14})}),c?T.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("svg"),title:x.downloadDiagramAsSvg,type:"button",children:x.mermaidFormatSvg}),T.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("png"),title:x.downloadDiagramAsPng,type:"button",children:x.mermaidFormatPng}),T.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("mmd"),title:x.downloadDiagramAsMmd,type:"button",children:x.mermaidFormatMmd})]}):null]})},A4=({chart:e,config:t,onFullscreen:n,onExit:i,className:a,...u})=>{let{Maximize2Icon:l,XIcon:c}=Tn(),f=Fe(),[h,m]=R.useState(!1),{isAnimating:E,controls:y}=R.useContext(Vt),x=Wn(),k=(()=>{if(typeof y=="boolean")return y;let _=y.mermaid;return _===!1?!1:_===!0||_===void 0?!0:_.panZoom!==!1})(),v=()=>{m(!h)};return R.useEffect(()=>{if(h){ff();let _=A=>{A.key==="Escape"&&m(!1)};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_),hf()}}},[h]),R.useEffect(()=>{h?n==null||n():i&&i()},[h,n,i]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",a),disabled:E,onClick:v,title:x.viewFullscreen,type:"button",...u,children:T.jsx(l,{size:14})}),h?Jd.createPortal(T.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:v,onKeyDown:_=>{_.key==="Escape"&&v()},role:"button",tabIndex:0,children:[T.jsx("button",{className:f("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:v,title:x.exitFullscreen,type:"button",children:T.jsx(c,{size:20})}),T.jsx("div",{className:f("flex size-full items-center justify-center p-4"),onClick:_=>_.stopPropagation(),onKeyDown:_=>_.stopPropagation(),role:"presentation",children:T.jsx(Bb,{chart:e,className:f("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:k})})]}),document.body):null]})},Io=e=>{var t,n;let i=[],a=[],u=e.querySelectorAll("thead th");for(let c of u)i.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let f=[],h=c.querySelectorAll("td");for(let m of h)f.push(((n=m.textContent)==null?void 0:n.trim())||"");a.push(f)}return{headers:i,rows:a}},pa=e=>{let{headers:t,rows:n}=e,i=c=>{let f=!1,h=!1;for(let m of c){if(m==='"'){f=!0,h=!0;break}(m===","||m===`
|
|
261
|
-
`)&&(f=!0)}return f?h?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},a=t.length>0?n.length+1:n.length,u=new Array(a),l=0;t.length>0&&(u[l]=t.map(i).join(","),l+=1);for(let c of n)u[l]=c.map(i).join(","),l+=1;return u.join(`
|
|
262
|
-
`)},ib=e=>{let{headers:t,rows:n}=e,i=c=>{let f=!1;for(let m of c)if(m===" "||m===`
|
|
263
|
-
`||m==="\r"){f=!0;break}if(!f)return c;let h=[];for(let m of c)m===" "?h.push("\\t"):m===`
|
|
264
|
-
`?h.push("\\n"):m==="\r"?h.push("\\r"):h.push(m);return h.join("")},a=t.length>0?n.length+1:n.length,u=new Array(a),l=0;t.length>0&&(u[l]=t.map(i).join(" "),l+=1);for(let c of n)u[l]=c.map(i).join(" "),l+=1;return u.join(`
|
|
265
|
-
`)},Zu=e=>{let t=!1;for(let i of e)if(i==="\\"||i==="|"){t=!0;break}if(!t)return e;let n=[];for(let i of e)i==="\\"?n.push("\\\\"):i==="|"?n.push("\\|"):n.push(i);return n.join("")},ma=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let i=new Array(n.length+2),a=0,u=t.map(c=>Zu(c));i[a]=`| ${u.join(" | ")} |`,a+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";i[a]=`| ${l.join(" | ")} |`,a+=1;for(let c of n)if(c.length<t.length){let f=new Array(t.length);for(let h=0;h<t.length;h+=1)f[h]=h<c.length?Zu(c[h]):"";i[a]=`| ${f.join(" | ")} |`,a+=1}else{let f=c.map(h=>Zu(h));i[a]=`| ${f.join(" | ")} |`,a+=1}return i.join(`
|
|
266
|
-
`)},gf=({children:e,className:t,onCopy:n,onError:i,timeout:a=2e3})=>{let u=Fe(),[l,c]=R.useState(!1),[f,h]=R.useState(!1),m=R.useRef(null),E=R.useRef(0),{isAnimating:y}=R.useContext(Vt),x=Wn(),k=async A=>{var j,F;if(typeof window>"u"||!((j=navigator==null?void 0:navigator.clipboard)!=null&&j.write)){i==null||i(new Error("Clipboard API not available"));return}try{let K=(F=m.current)==null?void 0:F.closest('[data-streamdown="table-wrapper"]'),Y=K==null?void 0:K.querySelector("table");if(!Y){i==null||i(new Error("Table not found"));return}let B=Io(Y),ae=({csv:pa,tsv:ib,md:ma}[A]||ma)(B),q=new ClipboardItem({"text/plain":new Blob([ae],{type:"text/plain"}),"text/html":new Blob([Y.outerHTML],{type:"text/html"})});await navigator.clipboard.write([q]),h(!0),c(!1),n==null||n(A),E.current=window.setTimeout(()=>h(!1),a)}catch(K){i==null||i(K)}};R.useEffect(()=>{let A=j=>{let F=j.composedPath();m.current&&!F.includes(m.current)&&c(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A),window.clearTimeout(E.current)}},[]);let v=Tn(),_=f?v.CheckIcon:v.CopyIcon;return T.jsxs("div",{className:u("relative"),ref:m,children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:y,onClick:()=>c(!l),title:x.copyTable,type:"button",children:e??T.jsx(_,{height:14,width:14})}),l?T.jsxs("div",{className:u("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("md"),title:x.copyTableAsMarkdown,type:"button",children:x.tableFormatMarkdown}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("csv"),title:x.copyTableAsCsv,type:"button",children:x.tableFormatCsv}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>k("tsv"),title:x.copyTableAsTsv,type:"button",children:x.tableFormatTsv})]}):null]})},N4=({children:e,className:t,onDownload:n,onError:i,format:a="csv",filename:u})=>{let l=Fe(),{isAnimating:c}=R.useContext(Vt),f=Wn(),h=Tn(),m=E=>{try{let y=E.currentTarget.closest('[data-streamdown="table-wrapper"]'),x=y==null?void 0:y.querySelector("table");if(!x){i==null||i(new Error("Table not found"));return}let k=Io(x),v="",_="",A="";switch(a){case"csv":v=pa(k),_="text/csv",A="csv";break;case"markdown":v=ma(k),_="text/markdown",A="md";break;default:v=pa(k),_="text/csv",A="csv"}oi(`${u||"table"}.${A}`,v,_),n==null||n()}catch(y){i==null||i(y)}};return T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:m,title:a==="csv"?f.downloadTableAsCsv:f.downloadTableAsMarkdown,type:"button",children:e??T.jsx(h.DownloadIcon,{size:14})})},Ef=({children:e,className:t,onDownload:n,onError:i})=>{let a=Fe(),[u,l]=R.useState(!1),c=R.useRef(null),{isAnimating:f}=R.useContext(Vt),h=Wn(),m=Tn(),E=y=>{var x;try{let k=(x=c.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),v=k==null?void 0:k.querySelector("table");if(!v){i==null||i(new Error("Table not found"));return}let _=Io(v),A=y==="csv"?pa(_):ma(_);oi(`table.${y==="csv"?"csv":"md"}`,A,y==="csv"?"text/csv":"text/markdown"),l(!1),n==null||n(y)}catch(k){i==null||i(k)}};return R.useEffect(()=>{let y=x=>{let k=x.composedPath();c.current&&!k.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),T.jsxs("div",{className:a("relative"),ref:c,children:[T.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>l(!u),title:h.downloadTable,type:"button",children:e??T.jsx(m.DownloadIcon,{size:14})}),u?T.jsxs("div",{className:a("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),T.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>E("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},I4=({children:e,className:t,showCopy:n=!0,showDownload:i=!0})=>{let{Maximize2Icon:a,XIcon:u}=Tn(),l=Fe(),[c,f]=R.useState(!1),{isAnimating:h}=R.useContext(Vt),m=Wn(),E=()=>{f(!0)},y=()=>{f(!1)};return R.useEffect(()=>{if(c){ff();let x=k=>{k.key==="Escape"&&f(!1)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x),hf()}}},[c]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:E,title:m.viewFullscreen,type:"button",children:T.jsx(a,{size:14})}),c?Jd.createPortal(T.jsx("div",{"aria-label":m.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:y,onKeyDown:x=>{x.key==="Escape"&&y()},role:"dialog",children:T.jsxs("div",{className:l("flex h-full flex-col"),onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),role:"presentation",children:[T.jsxs("div",{className:l("flex items-center justify-end gap-1 p-4"),children:[n?T.jsx(gf,{}):null,i?T.jsx(Ef,{}):null,T.jsx("button",{className:l("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:y,title:m.exitFullscreen,type:"button",children:T.jsx(u,{size:20})})]}),T.jsx("div",{className:l("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:T.jsx("table",{className:l("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},L4=({children:e,className:t,showControls:n,showCopy:i=!0,showDownload:a=!0,showFullscreen:u=!0,...l})=>{let c=Fe(),f=n&&i,h=n&&a,m=n&&u,E=f||h||m;return T.jsxs("div",{className:c("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[E?T.jsxs("div",{className:c("flex items-center justify-end gap-1"),children:[f?T.jsx(gf,{}):null,h?T.jsx(Ef,{}):null,m?T.jsx(I4,{showCopy:f,showDownload:h,children:e}):null]}):null,T.jsx("div",{className:c("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:T.jsx("table",{className:c("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},R4=/startLine=(\d+)/,O4=/\bnoLineNumbers\b/,P4=R.lazy(()=>Mr(()=>Promise.resolve().then(()=>rL),void 0).then(e=>({default:e.Mermaid}))),D4=/language-([^\s]+)/;function Lo(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,i=t.position.start,a=e.position.end,u=t.position.end;return(n==null?void 0:n.line)===(i==null?void 0:i.line)&&(n==null?void 0:n.column)===(i==null?void 0:i.column)&&(a==null?void 0:a.line)===(u==null?void 0:u.line)&&(a==null?void 0:a.column)===(u==null?void 0:u.column)}function lt(e,t){return e.className===t.className&&Lo(e.node,t.node)}var xd=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Vc=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Qm=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Yu=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},bf=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("ol",{className:a("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...i,children:e})},(e,t)=>lt(e,t));bf.displayName="MarkdownOl";var sb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("li",{className:a("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...i,children:e})},(e,t)=>e.className===t.className&&Lo(e.node,t.node));sb.displayName="MarkdownLi";var ab=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("ul",{className:a("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...i,children:e})},(e,t)=>lt(e,t));ab.displayName="MarkdownUl";var ub=R.memo(({className:e,node:t,...n})=>{let i=Fe();return T.jsx("hr",{className:i("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>lt(e,t));ub.displayName="MarkdownHr";var ob=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("span",{className:a("font-semibold",t),"data-streamdown":"strong",...i,children:e})},(e,t)=>lt(e,t));ob.displayName="MarkdownStrong";var M4=({children:e,className:t,href:n,node:i,...a})=>{let u=Fe(),{linkSafety:l}=R.useContext(Vt),[c,f]=R.useState(!1),h=n==="streamdown:incomplete-link",m=R.useCallback(async k=>{if(!(!(l!=null&&l.enabled&&n)||h)){if(k.preventDefault(),l.onLinkCheck&&await l.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}f(!0)}},[l,n,h]),E=R.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),y=R.useCallback(()=>{f(!1)},[]),x={url:n??"",isOpen:c,onClose:y,onConfirm:E};return l!=null&&l.enabled&&n?T.jsxs(T.Fragment,{children:[T.jsx("button",{className:u("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:m,type:"button",children:e}),l.renderModal?l.renderModal(x):T.jsx(w4,{...x})]}):T.jsx("a",{className:u("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...a,children:e})},lb=R.memo(M4,(e,t)=>lt(e,t)&&e.href===t.href);lb.displayName="MarkdownA";var cb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h1",{className:a("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...i,children:e})},(e,t)=>lt(e,t));cb.displayName="MarkdownH1";var db=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h2",{className:a("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...i,children:e})},(e,t)=>lt(e,t));db.displayName="MarkdownH2";var fb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h3",{className:a("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...i,children:e})},(e,t)=>lt(e,t));fb.displayName="MarkdownH3";var hb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h4",{className:a("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...i,children:e})},(e,t)=>lt(e,t));hb.displayName="MarkdownH4";var pb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h5",{className:a("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...i,children:e})},(e,t)=>lt(e,t));pb.displayName="MarkdownH5";var mb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("h6",{className:a("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...i,children:e})},(e,t)=>lt(e,t));mb.displayName="MarkdownH6";var gb=R.memo(({children:e,className:t,node:n,...i})=>{let{controls:a}=R.useContext(Vt),u=xd(a,"table"),l=Vc(a,"copy"),c=Vc(a,"download"),f=Vc(a,"fullscreen");return T.jsx(L4,{className:t,showControls:u,showCopy:l,showDownload:c,showFullscreen:f,...i,children:e})},(e,t)=>lt(e,t));gb.displayName="MarkdownTable";var Eb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("thead",{className:a("bg-muted/80",t),"data-streamdown":"table-header",...i,children:e})},(e,t)=>lt(e,t));Eb.displayName="MarkdownThead";var bb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("tbody",{className:a("divide-y divide-border",t),"data-streamdown":"table-body",...i,children:e})},(e,t)=>lt(e,t));bb.displayName="MarkdownTbody";var xb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("tr",{className:a("border-border",t),"data-streamdown":"table-row",...i,children:e})},(e,t)=>lt(e,t));xb.displayName="MarkdownTr";var yb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("th",{className:a("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...i,children:e})},(e,t)=>lt(e,t));yb.displayName="MarkdownTh";var Tb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("td",{className:a("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...i,children:e})},(e,t)=>lt(e,t));Tb.displayName="MarkdownTd";var kb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("blockquote",{className:a("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...i,children:e})},(e,t)=>lt(e,t));kb.displayName="MarkdownBlockquote";var Cb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("sup",{className:a("text-sm",t),"data-streamdown":"superscript",...i,children:e})},(e,t)=>lt(e,t));Cb.displayName="MarkdownSup";var wb=R.memo(({children:e,className:t,node:n,...i})=>{let a=Fe();return T.jsx("sub",{className:a("text-sm",t),"data-streamdown":"subscript",...i,children:e})},(e,t)=>lt(e,t));wb.displayName="MarkdownSub";var _b=R.memo(({children:e,className:t,node:n,...i})=>{if("data-footnotes"in i){let a=l=>{var c,f;if(!R.isValidElement(l))return!1;let h=Array.isArray(l.props.children)?l.props.children:[l.props.children],m=!1,E=!1;for(let y of h)if(y){if(typeof y=="string")y.trim()!==""&&(m=!0);else if(R.isValidElement(y))if(((c=y.props)==null?void 0:c["data-footnote-backref"])!==void 0)E=!0;else{let x=Array.isArray(y.props.children)?y.props.children:[y.props.children];for(let k of x){if(typeof k=="string"&&k.trim()!==""){m=!0;break}if(R.isValidElement(k)&&((f=k.props)==null?void 0:f["data-footnote-backref"])===void 0){m=!0;break}}}}return E&&!m},u=Array.isArray(e)?e.map(l=>{if(!R.isValidElement(l))return l;if(l.type===bf){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(f=>!a(f));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(u)?u.some(l=>l!==null):u!==null)?T.jsx("section",{className:t,...i,children:u}):null}return T.jsx("section",{className:t,...i,children:e})},(e,t)=>lt(e,t));_b.displayName="MarkdownSection";var B4=({node:e,className:t,children:n,...i})=>{var a,u;let l=Fe(),c=!("data-block"in i),{mermaid:f,controls:h,lineNumbers:m}=R.useContext(Vt),E=mf(),y=KE(),x=t==null?void 0:t.match(D4),k=(a=x==null?void 0:x.at(1))!=null?a:"",v=_4(k);if(c)return T.jsx("code",{className:l("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...i,children:n});let _=(u=e==null?void 0:e.properties)==null?void 0:u.metastring,A=_==null?void 0:_.match(R4),j=A?Number.parseInt(A[1],10):void 0,F=j!==void 0&&j>=1?j:void 0,K=!(_&&O4.test(_))&&m!==!1,Y="";if(R.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?Y=n.props.children:typeof n=="string"&&(Y=n),v){let de=v.component;return T.jsx(R.Suspense,{fallback:T.jsx(Ed,{}),children:T.jsx(de,{code:Y,isIncomplete:y,language:k,meta:_})})}if(k==="mermaid"&&E){let de=xd(h,"mermaid"),H=Yu(h,"download"),ue=Yu(h,"copy"),le=Yu(h,"fullscreen"),_e=Yu(h,"panZoom"),he=de&&(H||ue||le);return T.jsx(R.Suspense,{fallback:T.jsx(Ed,{}),children:T.jsxs("div",{className:l("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[T.jsx("div",{className:l("flex h-8 items-center text-muted-foreground text-xs"),children:T.jsx("span",{className:l("ml-1 font-mono lowercase"),children:"mermaid"})}),he?T.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsxs("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[H?T.jsx(v4,{chart:Y,config:f==null?void 0:f.config}):null,ue?T.jsx(gd,{code:Y}):null,le?T.jsx(A4,{chart:Y,config:f==null?void 0:f.config}):null]})}):null,T.jsx("div",{className:l("rounded-md border border-border bg-background"),children:T.jsx(P4,{chart:Y,config:f==null?void 0:f.config,showControls:_e})})]})})}let B=xd(h,"code"),ae=Qm(h,"download"),q=Qm(h,"copy");return T.jsx(tb,{className:t,code:Y,isIncomplete:y,language:k,lineNumbers:K,startLine:F,children:B?T.jsxs(T.Fragment,{children:[ae?T.jsx(rb,{code:Y,language:k}):null,q?T.jsx(gd,{}):null]}):null})},Sb=R.memo(B4,(e,t)=>e.className===t.className&&Lo(e.node,t.node));Sb.displayName="MarkdownCode";var vb=R.memo(C4,(e,t)=>e.className===t.className&&Lo(e.node,t.node));vb.displayName="MarkdownImg";var Ab=R.memo(({children:e,node:t,...n})=>{let i=(Array.isArray(e)?e:[e]).filter(a=>a!=null&&a!=="");if(i.length===1&&R.isValidElement(i[0])){let a=i[0].props.node,u=a==null?void 0:a.tagName;if(u==="img")return T.jsx(T.Fragment,{children:e});if(u==="code"&&"data-block"in i[0].props)return T.jsx(T.Fragment,{children:e})}return T.jsx("p",{...n,children:e})},(e,t)=>lt(e,t));Ab.displayName="MarkdownParagraph";var F4={ol:bf,li:sb,ul:ab,hr:ub,strong:ob,a:lb,h1:cb,h2:db,h3:fb,h4:hb,h5:pb,h6:mb,table:gb,thead:Eb,tbody:bb,tr:xb,th:yb,td:Tb,blockquote:kb,code:Sb,img:vb,pre:({children:e})=>R.isValidElement(e)?R.cloneElement(e,{"data-block":"true"}):e,sup:Cb,sub:wb,p:Ab,section:_b},j4=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,H4=new RegExp("\\p{L}","u");function yd(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(j4.test(n))return"rtl";if(H4.test(n))return"ltr"}return"ltr"}var U4=/^[ \t]{0,3}(`{3,}|~{3,})/,z4=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Gm=e=>{let t=e.split(`
|
|
267
|
-
`),n=null,i=0;for(let a of t){let u=U4.exec(a);if(n===null){if(u){let l=u[1];n=l[0],i=l.length}}else if(u){let l=u[1],c=l[0],f=l.length;c===n&&f>=i&&(n=null,i=0)}}return n!==null},$4=e=>{let t=e.split(`
|
|
268
|
-
`);for(let n of t){let i=n.trim();if(i.length>0&&i.includes("|")&&z4.test(i))return!0}return!1},V4=()=>e=>{Rn(e,"html",(t,n,i)=>{!i||typeof n!="number"||(i.children[n]={type:"text",value:t.value})})},Km=[],Xm={allowDangerousHtml:!0},qu=new WeakMap,W4=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,i=e.remarkPlugins,a=e.remarkRehypeOptions;if(!(n||i||a)){let m="default";return this.keyCache.set(e,m),m}let u=m=>{if(!m||m.length===0)return"";let E="";for(let y=0;y<m.length;y+=1){let x=m[y];if(y>0&&(E+=","),Array.isArray(x)){let[k,v]=x;if(typeof k=="function"){let _=qu.get(k);_||(_=k.name,qu.set(k,_)),E+=_}else E+=String(k);E+=":",E+=JSON.stringify(v)}else if(typeof x=="function"){let k=qu.get(x);k||(k=x.name,qu.set(x,k)),E+=k}else E+=String(x)}return E},l=u(n),c=u(i),f=a?JSON.stringify(a):"",h=`${c}::${l}::${f}`;return this.keyCache.set(e,h),h}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(n,t)}clear(){this.cache.clear()}},Zm=new W4,Nb=e=>{let t=Y4(e),n=e.children||"",i=t.runSync(t.parse(n),n);return Z4(i,e)},Y4=e=>{let t=Zm.get(e);if(t)return t;let n=Q4(e);return Zm.set(e,n),n},q4=e=>e.some(t=>Array.isArray(t)?t[0]===ld:t===ld),Q4=e=>{let t=e.rehypePlugins||Km,n=e.remarkPlugins||Km,i=q4(t)?n:[...n,V4],a=e.remarkRehypeOptions?{...Xm,...e.remarkRehypeOptions}:Xm;return eg().use(W1).use(i).use(Z1,a).use(t)},Ib=e=>e,G4=(e,t,n,i)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:i}},K4=(e,t)=>{var n;for(let i in Qi)if(Object.hasOwn(Qi,i)&&Object.hasOwn(e.properties,i)){let a=e.properties[i],u=Qi[i];(u===null||u.includes(e.tagName))&&(e.properties[i]=(n=t(String(a||""),i,e))!=null?n:void 0)}},X4=(e,t,n,i,a,u)=>{let l=!1;return i?l=!i.includes(e.tagName):a&&(l=a.includes(e.tagName)),!l&&u&&typeof t=="number"&&(l=!u(e,t,n)),l},Z4=(e,t)=>{let{allowElement:n,allowedElements:i,disallowedElements:a,skipHtml:u,unwrapDisallowed:l,urlTransform:c}=t;if(n||i||a||u||c){let f=c||Ib;Rn(e,(h,m,E)=>{if(h.type==="raw"&&E&&typeof m=="number")return G4(E,m,u,h.value),m;if(h.type==="element"&&(K4(h,f),X4(h,m,E,i,a,n)&&E&&typeof m=="number"))return l&&h.children?E.children.splice(m,1,...h.children):E.children.splice(m,1),m})}return v1(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},J4=/\[\^[\w-]{1,200}\](?!:)/,e5=/\[\^[\w-]{1,200}\]:/,t5=/<(\w+)[\s>]/,n5=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Jm=new Map,e1=new Map,r5=e=>{let t=e.toLowerCase(),n=Jm.get(t);if(n)return n;let i=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Jm.set(t,i),i},i5=e=>{let t=e.toLowerCase(),n=e1.get(t);if(n)return n;let i=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return e1.set(t,i),i},t1=(e,t)=>{if(n5.has(t.toLowerCase()))return 0;let n=e.match(r5(t));if(!n)return 0;let i=0;for(let a of n)a.trimEnd().endsWith("/>")||(i+=1);return i},n1=(e,t)=>{let n=e.match(i5(t));return n?n.length:0},s5=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},Lb=e=>{let t=J4.test(e),n=e5.test(e);if(t||n)return[e];let i=yn.lex(e,{gfm:!0}),a=[],u=[],l=!1;for(let c of i){let f=c.raw,h=a.length;if(u.length>0){a[h-1]+=f;let m=u.at(-1),E=t1(f,m),y=n1(f,m);for(let x=0;x<E;x+=1)u.push(m);for(let x=0;x<y;x+=1)u.length>0&&u.at(-1)===m&&u.pop();continue}if(c.type==="html"&&c.block){let m=f.match(t5);if(m){let E=m[1],y=t1(f,E),x=n1(f,E);y>x&&u.push(E)}}if(h>0&&!l){let m=a[h-1];if(s5(m)%2===1){a[h-1]=m+f;continue}}a.push(f),c.type!=="space"&&(l=c.type==="code")}return a},a5=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let a=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(a,(u,l,c,f)=>{if(!c.includes(`
|
|
269
|
-
|
|
270
|
-
`))return l+c+f;let h=c.replace(/\n\n/g,`
|
|
271
|
-
<!---->
|
|
272
|
-
`),m=(h.startsWith(`
|
|
273
|
-
`)?"":`
|
|
274
|
-
`)+h+(h.endsWith(`
|
|
275
|
-
`)?"":`
|
|
276
|
-
`);return`${l}${m}${f}
|
|
277
|
-
|
|
278
|
-
`})}return n},u5=/([\\`*_~[\]|])/g,o5=e=>e.replace(u5,"\\$1"),l5=(e,t)=>{if(!t.length)return e;let n=e;for(let i of t){let a=new RegExp(`(<${i}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${i}\\s*>)`,"gi");n=n.replace(a,(u,l,c,f)=>{let h=o5(c).replace(/\n\n/g," ");return l+h+f})}return n},Rb=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Rb).join(""):"",c5=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(i=>i.toLowerCase()));Rn(t,"element",i=>{if(n.has(i.tagName.toLowerCase())){let a=Rb(i);i.children=a?[{type:"text",value:a}]:[]}})},d5=()=>e=>{Rn(e,"code",t=>{var n,i;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(i=t.data.hProperties)!=null?i:{},metastring:t.meta})})},f5=/^[ \t]*<[\w!/?-]/,h5=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Ob=e=>typeof e!="string"||e.length===0||!f5.test(e)?e:e.replace(h5,"$1"),r1,i1,s1,a1,Ju={...ii,protocols:{...ii.protocols,href:[...(i1=(r1=ii.protocols)==null?void 0:r1.href)!=null?i1:[],"tel"]},attributes:{...ii.attributes,code:[...(a1=(s1=ii.attributes)==null?void 0:s1.code)!=null?a1:[],"metastring"]}},po={raw:ld,sanitize:[dE,Ju],harden:[R_,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},Pb={gfm:[_g,{}],codeMeta:d5},u1=Object.values(po),p5=Object.values(Pb),m5={block:" ▋",circle:" ●"},Db=["github-light","github-dark"],Mb={enabled:!0},g5={shikiTheme:Db,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Mb},Vt=R.createContext(g5),xf=R.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:i,isIncomplete:a,dir:u,animatePlugin:l,...c})=>{if(l){let m=l.getLastRenderCharCount();l.setPrevContentLength(m)}let f=typeof e=="string"&&n?Ob(e):e,h=T.jsx(Nb,{...c,children:f});return T.jsx(GE.Provider,{value:a,children:u?T.jsx("div",{dir:u,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),i=Object.keys(t.components||{});if(n.length!==i.length||n.some(a=>{var u,l;return((u=e.components)==null?void 0:u[a])!==((l=t.components)==null?void 0:l[a])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});xf.displayName="Block";var Ro=R.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:i=!0,normalizeHtmlIndentation:a=!1,components:u,rehypePlugins:l=u1,remarkPlugins:c=p5,className:f,shikiTheme:h=Db,mermaid:m,controls:E=!0,isAnimating:y=!1,animated:x,BlockComponent:k=xf,parseMarkdownIntoBlocksFn:v=Lb,caret:_,plugins:A,remend:j,linkSafety:F=Mb,lineNumbers:K=!0,allowedTags:Y,literalTagContent:B,translations:ae,icons:q,prefix:de,onAnimationStart:H,onAnimationEnd:ue,...le})=>{let _e=R.useId(),[he,te]=R.useTransition(),X=R.useMemo(()=>s4(de),[de]),fe=R.useRef(null),Z=R.useRef(H),pe=R.useRef(ue);Z.current=H,pe.current=ue,R.useEffect(()=>{var Me,Qe,ht;if(t==="static")return;let _t=fe.current;if(fe.current=y,_t===null){y&&((Me=Z.current)==null||Me.call(Z));return}y&&!_t?(Qe=Z.current)==null||Qe.call(Z):!y&&_t&&((ht=pe.current)==null||ht.call(pe))},[y,t]);let w=R.useMemo(()=>Y?Object.keys(Y):[],[Y]),M=R.useMemo(()=>{if(typeof e!="string")return"";let Me=t==="streaming"&&i?m6(e,j):e;return B&&B.length>0&&(Me=l5(Me,B)),w.length>0&&(Me=a5(Me,w)),Me},[e,t,i,j,w,B]),Q=R.useMemo(()=>v(M),[M,v]),[L,Se]=R.useState(Q);R.useEffect(()=>{t==="streaming"&&!ve?te(()=>{Se(Q)}):Se(Q)},[Q,t]);let Ee=t==="streaming"?L:Q,ge=R.useMemo(()=>n==="auto"?Ee.map(yd):void 0,[Ee,n]),De=R.useMemo(()=>Ee.map((Me,Qe)=>`${_e}-${Qe}`),[Ee.length,_e]),Oe=R.useMemo(()=>x===!0?"true":x?JSON.stringify(x):"",[x]),ve=R.useMemo(()=>Oe?Oe==="true"?ho():ho(x):null,[Oe]),Je=R.useMemo(()=>{var Me,Qe;return{shikiTheme:(Qe=(Me=A==null?void 0:A.code)==null?void 0:Me.getThemes())!=null?Qe:h,controls:E,isAnimating:y,lineNumbers:K,mode:t,mermaid:m,linkSafety:F}},[h,E,y,K,t,m,F,A==null?void 0:A.code]),It=R.useMemo(()=>ae?JSON.stringify(ae):"",[ae]),cn=R.useMemo(()=>({...df,...ae}),[It]),en=R.useMemo(()=>{let{inlineCode:Me,...Qe}=u??{},ht={...F4,...Qe};if(Me){let _t=ht.code;ht.code=kn=>"data-block"in kn?_t?R.createElement(_t,kn):null:R.createElement(Me,kn)}return ht},[u]),tn=R.useMemo(()=>{let Me=[];return A!=null&&A.cjk&&(Me=[...Me,...A.cjk.remarkPluginsBefore]),Me=[...Me,...c],A!=null&&A.cjk&&(Me=[...Me,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(Me=[...Me,A.math.remarkPlugin]),Me},[c,A==null?void 0:A.math,A==null?void 0:A.cjk]),sr=R.useMemo(()=>{var Me;let Qe=l;if(Y&&Object.keys(Y).length>0&&l===u1){let ht={...Ju,tagNames:[...(Me=Ju.tagNames)!=null?Me:[],...Object.keys(Y)],attributes:{...Ju.attributes,...Y}};Qe=[po.raw,[dE,ht],po.harden]}return B&&B.length>0&&(Qe=[...Qe,[c5,B]]),A!=null&&A.math&&(Qe=[...Qe,A.math.rehypePlugin]),ve&&y&&(Qe=[...Qe,ve.rehypePlugin]),Qe},[l,A==null?void 0:A.math,ve,y,Y,B]),Yn=R.useMemo(()=>{if(!y||Ee.length===0)return!1;let Me=Ee.at(-1);return Gm(Me)||$4(Me)},[y,Ee]),ar=R.useMemo(()=>_&&y&&!Yn?{"--streamdown-caret":`"${m5[_]}"`}:void 0,[_,y,Yn]);return t==="static"?T.jsx(md.Provider,{value:cn,children:T.jsx(bd.Provider,{value:A??null,children:T.jsx(Vt.Provider,{value:Je,children:T.jsx(Ym,{icons:q,children:T.jsx(pd.Provider,{value:X,children:T.jsx("div",{className:X("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",f),dir:n==="auto"?yd(M):n,children:T.jsx(Nb,{components:en,rehypePlugins:sr,remarkPlugins:tn,...le,children:M})})})})})})}):T.jsx(md.Provider,{value:cn,children:T.jsx(bd.Provider,{value:A??null,children:T.jsx(Vt.Provider,{value:Je,children:T.jsx(Ym,{icons:q,children:T.jsx(pd.Provider,{value:X,children:T.jsxs("div",{className:X("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",_&&!Yn?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,f),style:ar,children:[Ee.length===0&&_&&y&&T.jsx("span",{}),Ee.map((Me,Qe)=>{var ht;let _t=Qe===Ee.length-1,kn=y&&_t&&Gm(Me);return T.jsx(k,{animatePlugin:ve,components:en,content:Me,dir:(ht=ge==null?void 0:ge[Qe])!=null?ht:n!=="auto"?n:void 0,index:Qe,isIncomplete:kn,rehypePlugins:sr,remarkPlugins:tn,shouldNormalizeHtmlIndentation:a,shouldParseIncompleteMarkdown:i,...le},De[Qe])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Ro.displayName="Streamdown";var E5=({children:e,className:t,minZoom:n=.5,maxZoom:i=3,zoomStep:a=.1,showControls:u=!0,initialZoom:l=1,fullscreen:c=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:h,ZoomOutIcon:m}=Tn(),E=Fe(),y=R.useRef(null),x=R.useRef(null),[k,v]=R.useState(l),[_,A]=R.useState({x:0,y:0}),[j,F]=R.useState(!1),[K,Y]=R.useState({x:0,y:0}),[B,ae]=R.useState({x:0,y:0}),q=R.useCallback(X=>{v(fe=>Math.max(n,Math.min(i,fe+X)))},[n,i]),de=R.useCallback(()=>{q(a)},[q,a]),H=R.useCallback(()=>{q(-a)},[q,a]),ue=R.useCallback(()=>{v(l),A({x:0,y:0})},[l]),le=R.useCallback(X=>{X.preventDefault();let fe=X.deltaY>0?-a:a;q(fe)},[q,a]),_e=R.useCallback(X=>{if(X.button!==0||X.isPrimary===!1)return;F(!0),Y({x:X.clientX,y:X.clientY}),ae(_);let fe=X.currentTarget;fe instanceof HTMLElement&&fe.setPointerCapture(X.pointerId)},[_]),he=R.useCallback(X=>{if(!j)return;X.preventDefault();let fe=X.clientX-K.x,Z=X.clientY-K.y;A({x:B.x+fe,y:B.y+Z})},[j,K,B]),te=R.useCallback(X=>{F(!1);let fe=X.currentTarget;fe instanceof HTMLElement&&fe.releasePointerCapture(X.pointerId)},[]);return R.useEffect(()=>{let X=y.current;if(X)return X.addEventListener("wheel",le,{passive:!1}),()=>{X.removeEventListener("wheel",le)}},[le]),R.useEffect(()=>{let X=x.current;if(X&&j)return document.body.style.userSelect="none",X.addEventListener("pointermove",he,{passive:!1}),X.addEventListener("pointerup",te),X.addEventListener("pointercancel",te),()=>{document.body.style.userSelect="",X.removeEventListener("pointermove",he),X.removeEventListener("pointerup",te),X.removeEventListener("pointercancel",te)}},[j,he,te]),T.jsxs("div",{className:E("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:y,style:{cursor:j?"grabbing":"grab"},children:[u?T.jsxs("div",{className:E("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[T.jsx("button",{className:E("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:k>=i,onClick:de,title:"Zoom in",type:"button",children:T.jsx(h,{size:16})}),T.jsx("button",{className:E("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:k<=n,onClick:H,title:"Zoom out",type:"button",children:T.jsx(m,{size:16})}),T.jsx("button",{className:E("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:ue,title:"Reset zoom and pan",type:"button",children:T.jsx(f,{size:16})})]}):null,T.jsx("div",{className:E("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:_e,ref:x,role:"application",style:{transform:`translate(${_.x}px, ${_.y}px) scale(${k})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Bb=({chart:e,className:t,config:n,fullscreen:i=!1,showControls:a=!0})=>{let u=Fe(),[l,c]=R.useState(null),[f,h]=R.useState(!1),[m,E]=R.useState(""),[y,x]=R.useState(""),[k,v]=R.useState(0),{mermaid:_}=R.useContext(Vt),A=mf(),j=_==null?void 0:_.errorComponent,{shouldRender:F,containerRef:K}=QI({immediate:i});if(R.useEffect(()=>{if(F){if(!A){c("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{c(null),h(!0);let B=A.getMermaid(n),ae=e.split("").reduce((H,ue)=>(H<<5)-H+ue.charCodeAt(0)|0,0),q=`mermaid-${Math.abs(ae)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:de}=await B.render(q,e);E(de),x(de)}catch(B){if(!(y||m)){let ae=B instanceof Error?B.message:"Failed to render Mermaid chart";c(ae)}}finally{h(!1)}})()}},[e,n,k,F,A]),!(F||m||y))return T.jsx("div",{className:u("my-4 min-h-[200px]",t),ref:K});if(f&&!m&&!y)return T.jsx("div",{className:u("my-4 flex justify-center p-4",t),ref:K,children:T.jsxs("div",{className:u("flex items-center space-x-2 text-muted-foreground"),children:[T.jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),T.jsx("span",{className:u("text-sm"),children:"Loading diagram..."})]})});if(l&&!m&&!y){let B=()=>v(ae=>ae+1);return j?T.jsx("div",{ref:K,children:T.jsx(j,{chart:e,error:l,retry:B})}):T.jsxs("div",{className:u("rounded-md bg-red-50 p-4",t),ref:K,children:[T.jsxs("p",{className:u("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",l]}),T.jsxs("details",{className:u("mt-2"),children:[T.jsx("summary",{className:u("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),T.jsx("pre",{className:u("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let Y=m||y;return T.jsx("div",{className:u("size-full",t),"data-streamdown":"mermaid",ref:K,children:T.jsx(E5,{className:u(i?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:i,maxZoom:3,minZoom:.5,showControls:a,zoomStep:.1,children:T.jsx("div",{"aria-label":"Mermaid chart",className:u("flex justify-center",i?"size-full items-center":null),dangerouslySetInnerHTML:{__html:Y},role:"img"})})})};const dL=Object.freeze(Object.defineProperty({__proto__:null,Block:xf,CodeBlock:tb,CodeBlockContainer:XE,CodeBlockCopyButton:gd,CodeBlockDownloadButton:rb,CodeBlockHeader:eb,CodeBlockSkeleton:Ed,Streamdown:Ro,StreamdownContext:Vt,TableCopyDropdown:gf,TableDownloadButton:N4,TableDownloadDropdown:Ef,createAnimatePlugin:ho,defaultRehypePlugins:po,defaultRemarkPlugins:Pb,defaultTranslations:df,defaultUrlTransform:Ib,detectTextDirection:yd,escapeMarkdownTableCell:Zu,extractTableDataFromElement:Io,normalizeHtmlIndentation:Ob,parseMarkdownIntoBlocks:Lb,tableDataToCSV:pa,tableDataToMarkdown:ma,tableDataToTSV:ib,useIsCodeFenceIncomplete:KE},Symbol.toStringTag,{value:"Module"})),Fb="one-light",fL=({content:e,streaming:t})=>{const n=t?"streaming":"static",i=R.useMemo(()=>e?T.jsx(Ro,{children:e,mode:n,parseIncompleteMarkdown:t,shikiTheme:Fb}):null,[e,n,t]);return e?T.jsx("div",{className:"text-[14px] leading-[1.7]",children:i}):null},jb=({code:e,language:t,filename:n})=>{const i=R.useMemo(()=>{const a=t||"text";return`\`\`\`${n?`${a} ${n}`:a}
|
|
279
|
-
${e}
|
|
280
|
-
\`\`\``},[e,t,n]);return T.jsx(Ro,{children:i,mode:"static",shikiTheme:Fb})};function Td(e){return typeof e=="string"?e:typeof e=="number"?String(e):e?Array.isArray(e)?e.map(Td).join(""):typeof e=="object"&&"props"in e?Td(e.props.children):"":""}const b5=({children:e,rawCode:t,language:n})=>{const i=t??Td(e),a=n||"text";return T.jsx(jb,{code:i.replace(/\n$/,""),language:a})},x5={NOTE:{icon:"ℹ️",className:"callout-note"},TIP:{icon:"💡",className:"callout-tip"},WARNING:{icon:"⚠️",className:"callout-warning"},CAUTION:{icon:"🚫",className:"callout-caution"},IMPORTANT:{icon:"❗",className:"callout-important"}},y5=({calloutType:e,title:t,bodyText:n,bodyChildren:i,rawBodyMd:a,onEdit:u,onDelete:l})=>{const[c,f]=R.useState(!1),[h,m]=R.useState(e),[E,y]=R.useState(t),[x,k]=R.useState(a||n||kd(i)),v=x5[e],_=()=>{u==null||u(h,E,x),f(!1)},A=()=>{m(e),y(t),k(a||n||kd(i)),f(!1)};return c?T.jsxs("div",{className:"callout-edit-form",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[T.jsx("label",{className:"text-[12px] text-content-tertiary",children:"类型"}),T.jsxs("select",{value:h,onChange:j=>m(j.target.value),className:"text-[13px] px-2 py-1 rounded border border-edge-light bg-surface text-content",children:[T.jsx("option",{value:"NOTE",children:"NOTE"}),T.jsx("option",{value:"TIP",children:"TIP"}),T.jsx("option",{value:"WARNING",children:"WARNING"}),T.jsx("option",{value:"CAUTION",children:"CAUTION"}),T.jsx("option",{value:"IMPORTANT",children:"IMPORTANT"})]}),T.jsx("input",{value:E,onChange:j=>y(j.target.value),placeholder:"标题(可选)",className:"flex-1 text-[13px] px-2 py-1 rounded border border-edge-light bg-surface text-content outline-none focus:border-accent"})]}),T.jsx("textarea",{value:x,onChange:j=>k(j.target.value),placeholder:"内容...",rows:3,className:"w-full text-[13px] px-2 py-1.5 rounded border border-edge-light bg-surface text-content outline-none focus:border-accent resize-y font-mono"}),T.jsxs("div",{className:"flex justify-end gap-2 mt-2",children:[T.jsx("button",{onClick:A,className:"px-3 py-1 text-[12px] rounded-md text-content-secondary hover:bg-surface-hover transition-colors",children:"取消"}),T.jsx("button",{onClick:_,className:"px-3 py-1 text-[12px] rounded-md bg-accent text-white hover:bg-accent-hover transition-colors",children:"确认"})]})]}):T.jsxs("div",{className:`callout ${v.className}`,children:[T.jsxs("div",{className:"flex items-start gap-2",children:[T.jsx("span",{className:"text-[14px] mt-0.5 shrink-0",children:v.icon}),T.jsxs("div",{className:"flex-1 min-w-0",children:[t&&T.jsx("p",{className:"font-semibold text-[14px] mb-1",children:t}),T.jsxs("div",{className:"text-[14px] text-content-secondary callout-body",children:[n&&T.jsx("p",{className:"whitespace-pre-wrap",children:n}),i]})]})]}),T.jsxs("div",{className:"callout-actions",children:[T.jsx("button",{onClick:()=>f(!0),title:"编辑 callout",className:"p-1 rounded hover:bg-surface-hover text-content-muted hover:text-content transition-colors",children:T.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:T.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"})})}),T.jsx("button",{onClick:()=>l==null?void 0:l(),title:"删除 callout",className:"p-1 rounded hover:bg-surface-hover text-content-muted hover:text-danger transition-colors",children:T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M3 6h18"}),T.jsx("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}),T.jsx("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"})]})})]})]})};function kd(e){return typeof e=="string"?e:e?gt.Children.toArray(e).map(t=>{if(typeof t=="string")return t;if(typeof t=="number")return String(t);if(gt.isValidElement(t)){const n=t.props;return kd(n.children)}return""}).join(`
|
|
281
|
-
`):""}const T5=[{type:"NOTE",label:"NOTE",icon:"ℹ️"},{type:"TIP",label:"TIP",icon:"💡"},{type:"WARNING",label:"WARNING",icon:"⚠️"},{type:"CAUTION",label:"CAUTION",icon:"🚫"},{type:"IMPORTANT",label:"IMPORTANT",icon:"❗"}],k5=({position:e,onSelectType:t,onClose:n})=>{const i=R.useRef(null);return R.useEffect(()=>{const a=l=>{i.current&&!i.current.contains(l.target)&&n()},u=setTimeout(()=>{document.addEventListener("mousedown",a)},100);return()=>{clearTimeout(u),document.removeEventListener("mousedown",a)}},[n]),T.jsx("div",{ref:i,className:"floating-toolbar",style:{position:"absolute",top:e.top-48,left:e.left,transform:"translateX(-50%)",zIndex:50},children:T5.map(({type:a,label:u,icon:l})=>T.jsxs("button",{onClick:()=>t(a),title:`插入 ${u} callout`,children:[l," ",u]},a))})},C5=/^\[!(NOTE|TIP|WARNING|CAUTION|IMPORTANT)\]\s*(.*)/;function w5(e){const t=gt.Children.toArray(e);if(t.length===0)return null;const n=t.find(y=>gt.isValidElement(y));if(!n)return null;const i=Cd(n),a=i.match(C5);if(!a)return null;const u=a[1],l=a[2].trim();let c="";const f=a[0].trimEnd(),h=i.trimStart();if(h.startsWith(f)){const y=h.slice(f.length);c=y.startsWith(`
|
|
282
|
-
`)?y.slice(1):y.trim()}const m=t.indexOf(n),E=t.slice(m+1);return{calloutType:u,title:l,bodyText:c,bodyChildren:E}}function Cd(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(!e)return"";if(gt.isValidElement(e)){const t=e.props;if(t.children)return gt.Children.toArray(t.children).map(Cd).join("")}return Array.isArray(e)?e.map(Cd).join(""):""}function Wc(e,t){const n=e.split(`
|
|
283
|
-
`);switch(t.type){case"insert":{const i=["",`> [!${t.calloutType}] ${t.title}`,...t.content.split(`
|
|
284
|
-
`).map(a=>`> ${a}`),""];n.splice(t.afterLine,0,...i);break}case"edit":{const i=[`> [!${t.calloutType}] ${t.title}`,...t.content.split(`
|
|
285
|
-
`).map(a=>`> ${a}`)];n.splice(t.startLine-1,t.endLine-t.startLine+1,...i);break}case"delete":{const i=t.startLine-1;let a=t.endLine-t.startLine+1;i>0&&n[i-1]===""&&(a+=1),n.splice(i,a);break}}return n.join(`
|
|
286
|
-
`)}const o1=gt.lazy(()=>Mr(()=>import("./MermaidBlock-CwSB1vTi.js"),__vite__mapDeps([2,1,3])));function _5(e){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||"heading"}function wd(e){return typeof e=="string"?e:typeof e=="number"?String(e):Array.isArray(e)?e.map(wd).join(""):gt.isValidElement(e)&&e.props.children?wd(e.props.children):""}function is(e){const t=({node:n,children:i})=>{var c,f;const a=wd(i),u=_5(a),l=(f=(c=n==null?void 0:n.position)==null?void 0:c.start)==null?void 0:f.line;return gt.createElement(e,{id:u,"data-source-line":l},i)};return t.displayName=`Heading_${e}`,t}const S5=is("h1"),v5=is("h2"),A5=is("h3"),N5=is("h4"),I5=is("h5"),L5=is("h6");async function R5(e,t){t.preventDefault();const{currentView:n,projects:i,setCurrentView:a,setLoadingPage:u,openReference:l}=ke.getState(),c=e.match(/^(.+?)(?:#L(\d+)(?:-L(\d+))?)?$/);if(!c){window.open(e,"_blank");return}const[,f,h,m]=c;if(/^https?:\/\//.test(f)){window.open(f,"_blank");return}let E=f;for(;E.startsWith("./");)E=E.slice(2);if(E.includes("../")&&(E=E.split("/").pop()||E),/^[A-Za-z]:\\/.test(E)){l(E,h?parseInt(h,10):void 0,m?parseInt(m,10):void 0);return}const y=/\.[^/.\\]+$/.test(E),x=E.endsWith(".md");if(y&&!x){if(!n)return;const v=i.find(A=>A.id===n.projectId);if(!v)return;const _=E.startsWith("/")?E:`${v.path}/${f}`;l(_,h?parseInt(h,10):void 0,m?parseInt(m,10):void 0);return}if(!n){console.warn("No current view");return}let k=E;k.startsWith("/")&&(k=k.slice(1)),x&&(k=k.slice(0,-3)),u(!0);try{const v=await li(n.projectId,n.version,k);a({...n,slug:k,content:v.content,fileMtime:v.mtime});return}catch{if(x){const v=i.find(_=>_.id===n.projectId);if(v){const _=E.startsWith("/")?E:`${v.path}/${f}`;l(_,h?parseInt(h,10):void 0,m?parseInt(m,10):void 0)}}}finally{u(!1)}}const O5=({content:e})=>{const t=R.useRef(null),[n,i]=R.useState(null),a=ke(m=>m.saveCalloutAction),u=R.useCallback(()=>{const m=window.getSelection();if(!m||m.isCollapsed||!m.toString().trim()){i(null);return}const E=m.getRangeAt(0),y=t.current;if(!y||!y.contains(E.commonAncestorContainer)){i(null);return}const x=E.getBoundingClientRect();i({top:x.top+window.scrollY,left:x.left+x.width/2,selectedText:m.toString()})},[]),l=R.useCallback(async m=>{const E=window.getSelection();if(!E||E.isCollapsed)return;let x=E.getRangeAt(0).startContainer.parentElement;for(;x&&!x.dataset.sourceLine;)x=x.parentElement;if(!x)return;const k=parseInt(x.dataset.sourceLine,10);let v=k,_=x.nextElementSibling;for(;_&&!_.dataset.sourceLine;)_=_.nextElementSibling;if(_)v=parseInt(_.dataset.sourceLine,10)-1;else{const F=ke.getState().currentView;v=(F==null?void 0:F.content.split(`
|
|
287
|
-
`).length)??k}const A=ke.getState().currentView;if(!A)return;const j=Wc(A.content,{type:"insert",afterLine:v,calloutType:m,title:"",content:""});i(null),E.removeAllRanges();try{await a(j)}catch(F){console.error("Failed to insert callout:",F)}},[a]),c=R.useCallback(async(m,E,y,x,k)=>{const v=ke.getState().currentView;if(!v)return;const _=Wc(v.content,{type:"edit",startLine:m,endLine:E,calloutType:y,title:x,content:k});try{await a(_)}catch(A){console.error("Failed to edit callout:",A)}},[a]),f=R.useCallback(async(m,E)=>{const y=ke.getState().currentView;if(!y)return;const x=Wc(y.content,{type:"delete",startLine:m,endLine:E});try{await a(x)}catch(k){console.error("Failed to delete callout:",k)}},[a]),h=R.useMemo(()=>({h1:S5,h2:v5,h3:A5,h4:N5,h5:I5,h6:L5,p({node:m,children:E}){var x,k;const y=(k=(x=m==null?void 0:m.position)==null?void 0:x.start)==null?void 0:k.line;return T.jsx("p",{"data-source-line":y,children:E})},blockquote({node:m,children:E}){var v,_,A,j;const y=(_=(v=m==null?void 0:m.position)==null?void 0:v.start)==null?void 0:_.line,x=(j=(A=m==null?void 0:m.position)==null?void 0:A.end)==null?void 0:j.line,k=w5(E);if(k){let F;if(y!=null&&x!=null){const K=e.split(`
|
|
288
|
-
`),Y=[];let B=!1;for(let ae=y-1;ae<x&&ae<K.length;ae++){const de=K[ae].replace(/^>\s?/,"");if(!B){B=!0;continue}Y.push(de)}F=Y.join(`
|
|
289
|
-
`).trim()}return T.jsx(y5,{calloutType:k.calloutType,title:k.title,bodyText:k.bodyText,bodyChildren:k.bodyChildren,rawBodyMd:F,startLine:y,endLine:x,onEdit:(K,Y,B)=>c(y,x,K,Y,B),onDelete:()=>f(y,x)})}return T.jsx("blockquote",{"data-source-line":y,children:E})},ul({node:m,children:E}){var x,k;const y=(k=(x=m==null?void 0:m.position)==null?void 0:x.start)==null?void 0:k.line;return T.jsx("ul",{"data-source-line":y,children:E})},ol({node:m,children:E}){var x,k;const y=(k=(x=m==null?void 0:m.position)==null?void 0:x.start)==null?void 0:k.line;return T.jsx("ol",{"data-source-line":y,children:E})},table({node:m,children:E}){var x,k;const y=(k=(x=m==null?void 0:m.position)==null?void 0:x.start)==null?void 0:k.line;return T.jsx("table",{"data-source-line":y,children:E})},pre({node:m,children:E}){var _,A,j;const y=(_=m==null?void 0:m.children)==null?void 0:_[0];if((((A=y==null?void 0:y.properties)==null?void 0:A.className)||[]).includes("language-mermaid")||gt.isValidElement(E)&&E.type===o1)return E;const v=gt.isValidElement(E)&&typeof((j=E.props)==null?void 0:j.children)=="string"?E.props.children:void 0;return T.jsx(b5,{rawCode:v,children:E})},code({className:m,children:E,...y}){const x=/language-(\w+)/.exec(m||""),k=x?x[1]:"",v=String(E).replace(/\n$/,"");return k==="mermaid"?T.jsx(R.Suspense,{fallback:T.jsx("div",{className:"mermaid-loading",children:"加载图表..."}),children:T.jsx(o1,{chart:v})}):k||v.includes(`
|
|
290
|
-
`)?T.jsx(jb,{code:v,language:k||"text"}):T.jsx("code",{className:m,...y,children:E})},a({href:m,children:E}){return T.jsx("a",{href:m,onClick:y=>{m&&R5(m,y)},className:"text-accent no-underline cursor-pointer",children:E})}}),[c,f,e]);return e?T.jsxs("div",{className:"markdown-body",ref:t,onMouseUp:u,children:[T.jsx(xC,{remarkPlugins:[_g],components:h,children:e}),n&&T.jsx(k5,{position:n,onSelectType:l,onClose:()=>i(null)})]}):null},P5=()=>{const e=ke(u=>{var l;return(l=u.currentView)==null?void 0:l.conflictData}),t=ke(u=>u.resolveConflict),[n,i]=R.useState(!0);if(!e)return null;const a=e.serverContent.split(`
|
|
291
|
-
`).slice(0,30);return T.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:T.jsxs("div",{className:"w-full max-w-lg mx-4 bg-surface-secondary rounded-xl shadow-2xl border border-edge overflow-hidden",children:[T.jsxs("div",{className:"px-6 py-4 border-b border-edge-light",children:[T.jsxs("div",{className:"flex items-center gap-2 text-warning text-base font-semibold",children:[T.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"}),T.jsx("path",{d:"M12 9v4"}),T.jsx("path",{d:"M12 17h.01"})]}),"此页面已被外部修改"]}),T.jsx("p",{className:"text-[13px] text-content-secondary mt-1.5",children:"你可以选择加载最新版本,或保留你当前的修改继续编辑。"})]}),n&&T.jsxs("div",{className:"px-6 py-3 max-h-48 overflow-y-auto bg-surface-tertiary border-b border-edge-light",children:[T.jsx("p",{className:"text-[11px] text-content-muted mb-2 font-medium",children:"服务器最新版本(预览)"}),T.jsxs("pre",{className:"text-[12px] font-mono text-content-secondary whitespace-pre-wrap leading-relaxed",children:[a.join(`
|
|
292
|
-
`),e.serverContent.split(`
|
|
293
|
-
`).length>30&&`
|
|
294
|
-
...`]})]}),T.jsx("div",{className:"px-6 py-1",children:T.jsx("button",{onClick:()=>i(!n),className:"text-[12px] text-accent hover:underline",children:n?"收起预览":"展开预览"})}),T.jsxs("div",{className:"px-6 py-4 flex justify-end gap-3",children:[T.jsx("button",{onClick:()=>t("server"),className:`px-4 py-2 rounded-lg text-[13px] font-medium
|
|
295
|
-
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
296
|
-
border border-edge-light transition-colors duration-150`,children:"加载最新版本"}),T.jsx("button",{onClick:()=>t("mine"),className:`px-4 py-2 rounded-lg text-[13px] font-medium
|
|
297
|
-
bg-accent text-white hover:bg-accent-hover
|
|
298
|
-
transition-colors duration-150`,children:"保留我的修改"})]})]})})},D5=()=>{const e=ke(E=>{var y;return((y=E.currentView)==null?void 0:y.editContent)??""}),t=ke(E=>{var y;return((y=E.currentView)==null?void 0:y.isDirty)??!1}),n=ke(E=>{var y;return(y=E.currentView)==null?void 0:y.conflictData}),i=ke(E=>E.updateEditContent),a=ke(E=>E.setReadMode),u=ke(E=>E.savePage),[l,c]=R.useState(!1),f=R.useRef(null),h=R.useCallback(async()=>{if(!l){c(!0);try{await u()}catch(E){console.error("Save failed:",E),alert("保存失败: "+(E instanceof Error?E.message:"未知错误"))}finally{c(!1)}}},[u,l]),m=R.useCallback(()=>{t&&!window.confirm("未保存的修改将丢失,是否继续?")||a()},[t,a]);return R.useEffect(()=>{const E=y=>{(y.metaKey||y.ctrlKey)&&y.key==="s"&&(y.preventDefault(),h())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[h]),T.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[T.jsxs("div",{className:"editor-toolbar",children:[T.jsxs("button",{onClick:m,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[13px] font-medium
|
|
299
|
-
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
300
|
-
transition-colors duration-150`,children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"m12 19-7-7 7-7"}),T.jsx("path",{d:"M19 12H5"})]}),"返回阅读"]}),T.jsxs("div",{className:"flex items-center gap-2",children:[t&&T.jsx("span",{className:"text-[12px] text-content-tertiary",children:"未保存"}),T.jsxs("button",{onClick:h,disabled:l||!t,className:`flex items-center gap-1.5 px-4 py-1.5 rounded-lg text-[13px] font-medium
|
|
301
|
-
bg-accent text-white hover:bg-accent-hover
|
|
302
|
-
disabled:opacity-50 disabled:cursor-not-allowed
|
|
303
|
-
transition-colors duration-150`,children:[T.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),T.jsx("polyline",{points:"17,21 17,13 7,13 7,21"}),T.jsx("polyline",{points:"7,3 7,8 15,8"})]}),l?"保存中...":"保存",T.jsx("kbd",{className:"text-[10px] px-1 py-0.5 rounded bg-white/20 ml-1 font-mono",children:"⌘S"})]})]})]}),T.jsx("textarea",{ref:f,value:e,onChange:E=>i(E.target.value),className:"markdown-editor",spellCheck:!1}),n&&T.jsx(P5,{})]})},M5=()=>{const e=ke(u=>{var l;return(l=u.currentView)==null?void 0:l.mode}),t=ke(u=>{var l;return(l=u.currentView)==null?void 0:l.isDirty}),n=ke(u=>u.setEditMode),i=ke(u=>u.setReadMode),a=()=>{if(e==="edit"){if(t&&!window.confirm("未保存的修改将丢失,是否继续?"))return;i()}else n()};return T.jsx("button",{onClick:a,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[13px] font-medium
|
|
304
|
-
text-content-secondary hover:text-content hover:bg-surface-hover
|
|
305
|
-
border border-edge-light transition-colors duration-150`,title:e==="edit"?"切换到阅读模式":"切换到编辑模式",children:e==="edit"?T.jsxs(T.Fragment,{children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"}),T.jsx("path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"})]}),"阅读"]}):T.jsxs(T.Fragment,{children:[T.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"}),T.jsx("path",{d:"m15 5 4 4"})]}),"编辑"]})})};function B5(e,t){return e.toLowerCase().replace(/[^\w\u4e00-\u9fff]+/g,"-").replace(/^-|-$/g,"")||`heading-${t}`}function F5(e){var i;const t=e.split(`
|
|
306
|
-
`),n=[];for(let a=0;a<t.length;a++){const u=t[a].match(/^(#{1,6})\s+(.+?)\r?$/);if(u){const l=u[1].length,c=u[2].trim(),f=B5(c,n.length);n.push({id:f,text:c,level:l,position:a,contentLength:0})}}for(let a=0;a<n.length;a++){const u=((i=n[a+1])==null?void 0:i.position)??t.length;n[a].contentLength=u-n[a].position}return n}function j5(e){const[t,n]=R.useState(null);return R.useEffect(()=>{if(e.length===0)return;const i=new IntersectionObserver(a=>{const u=a.filter(l=>l.isIntersecting);if(u.length>0){const l=u.sort((c,f)=>c.boundingClientRect.top-f.boundingClientRect.top)[0];n(l.target.id)}},{rootMargin:"-20% 0px -70% 0px"});return e.forEach(a=>{const u=document.getElementById(a);u&&i.observe(u)}),()=>i.disconnect()},[e]),t}function H5(e){const t=R.useMemo(()=>F5(e),[e]),n=R.useMemo(()=>t.map(u=>u.id),[t]),i=j5(n),a=R.useCallback(u=>{const l=document.getElementById(u);l&&l.scrollIntoView({behavior:"smooth",block:"start"})},[]);return{items:t,activeId:i,scrollToHeading:a}}const U5=({content:e})=>{const{items:t,activeId:n,scrollToHeading:i}=H5(e);return t.length===0?null:T.jsxs("aside",{className:"w-[220px] h-full shrink-0 border-l border-edge bg-surface-tertiary overflow-y-auto py-5 px-3 shadow-[inset_4px_0_12px_rgba(0,0,0,0.05)]",children:[T.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider text-content-muted mb-3 select-none",children:"目录"}),T.jsx("nav",{className:"flex flex-col gap-0.5",children:t.map(a=>T.jsx("a",{href:`#${a.id}`,title:a.text,className:`
|
|
307
|
-
block py-1 text-[12px] leading-snug truncate
|
|
308
|
-
transition-colors duration-150
|
|
309
|
-
hover:text-content
|
|
310
|
-
${a.id===n?"text-accent font-medium":"text-content-tertiary"}
|
|
311
|
-
`,style:{paddingLeft:`${(a.level-1)*12}px`},onClick:u=>{u.preventDefault(),i(a.id)},children:a.text},a.id))})]})},z5=({size:e=32})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"}),T.jsx("path",{d:"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"})]}),$5=()=>{const e=ke(l=>l.currentView),t=ke(l=>l.currentWiki),n=to(l=>l.aiPanelOpen),i=t==null?void 0:t.pages.find(l=>l.slug===(e==null?void 0:e.slug)),a=(i==null?void 0:i.level)==="Beginner"?"bg-accent-light text-accent-text border-accent/15":(i==null?void 0:i.level)==="Intermediate"?"bg-warning-light text-[#92400e] border-warning/15":"bg-danger-light text-[#991b1b] border-danger/15";if(!e)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-5 text-content-tertiary",children:[T.jsx("div",{className:"w-16 h-16 rounded-2xl bg-surface-tertiary flex items-center justify-center text-content-muted",children:T.jsx(z5,{size:32})}),T.jsxs("div",{className:"text-center",children:[T.jsx("p",{className:"text-base font-semibold text-content mb-1",children:"开始阅读"}),T.jsxs("p",{className:"text-[13px] text-content-tertiary",children:["从左侧导航选择一个页面,或按",T.jsx("kbd",{className:"text-[11px] px-1.5 py-0.5 mx-1 rounded bg-surface-tertiary border border-edge-light font-mono",children:"⌘K"}),"搜索"]})]})]});if(e.loading)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 text-content-tertiary",children:[T.jsx("div",{className:"w-8 h-8 rounded-full border-2 border-edge border-t-accent animate-spin"}),T.jsx("p",{className:"text-[13px]",children:"加载中..."})]});if(e.error)return T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-4 p-10",children:[T.jsx("div",{className:"w-14 h-14 rounded-[14px] bg-danger-light text-danger flex items-center justify-center text-2xl font-bold",children:"!"}),T.jsx("p",{className:"text-base font-semibold text-content",children:"加载失败"}),T.jsx("p",{className:"text-[13px] text-content-secondary max-w-md text-center leading-relaxed",children:e.error})]});const u=e.mode==="edit";return T.jsxs("div",{className:"flex-1 min-w-0 flex overflow-hidden",children:[T.jsxs("div",{className:"flex-1 overflow-y-auto flex flex-col",children:[i&&!u&&T.jsxs("div",{className:"px-12 pt-7 pb-0 border-b border-edge-light bg-surface",children:[T.jsx("h1",{className:"text-[26px] font-bold text-content leading-snug tracking-tight mb-2",children:i.title}),T.jsxs("div",{className:"flex items-center gap-3 pb-4 text-xs text-content-tertiary flex-wrap",children:[T.jsx("span",{children:i.section}),i.group&&T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-edge",children:"·"}),T.jsx("span",{children:i.group})]}),T.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded-full text-[11px] font-medium leading-snug border ${a}`,children:i.level}),T.jsx("div",{className:"flex-1"}),T.jsx(M5,{})]})]}),u?T.jsx(D5,{}):T.jsx(T.Fragment,{children:T.jsx("div",{className:"flex-1 px-12 pt-8 pb-20 max-w-[860px] mx-auto overflow-x-hidden",children:T.jsx(O5,{content:e.content})})})]}),e.content&&!n&&!u&&T.jsx(U5,{content:e.content})]})};function V5(e,t,n,i){var a=this,u=R.useRef(null),l=R.useRef(0),c=R.useRef(0),f=R.useRef(null),h=R.useRef([]),m=R.useRef(),E=R.useRef(),y=R.useRef(e),x=R.useRef(!0),k=R.useRef(),v=R.useRef();y.current=e;var _=typeof window<"u",A=!t&&t!==0&&_;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var j=!!(n=n||{}).leading,F=!("trailing"in n)||!!n.trailing,K=!!n.flushOnExit&&F,Y="maxWait"in n,B="debounceOnServer"in n&&!!n.debounceOnServer,ae=Y?Math.max(+n.maxWait||0,t):null,q=R.useMemo(function(){var de=function(X){var fe=h.current,Z=m.current;return h.current=m.current=null,l.current=X,c.current=c.current||X,E.current=y.current.apply(Z,fe)},H=function(X,fe){A&&cancelAnimationFrame(f.current),f.current=A?requestAnimationFrame(X):setTimeout(X,fe)},ue=function(X){if(!x.current)return!1;var fe=X-u.current;return!u.current||fe>=t||fe<0||Y&&X-l.current>=ae},le=function(X){return f.current=null,F&&h.current?de(X):(h.current=m.current=null,E.current)},_e=function X(){var fe=Date.now();if(j&&c.current===l.current&&he(),ue(fe))return le(fe);if(x.current){var Z=t-(fe-u.current),pe=Y?Math.min(Z,ae-(fe-l.current)):Z;H(X,pe)}},he=function(){},te=function(){if(_||B){var X,fe=Date.now(),Z=ue(fe);if(h.current=[].slice.call(arguments),m.current=a,u.current=fe,K&&!k.current&&(k.current=function(){var pe;((pe=globalThis.document)==null?void 0:pe.visibilityState)==="hidden"&&v.current.flush()},(X=globalThis.document)==null||X.addEventListener==null||X.addEventListener("visibilitychange",k.current)),Z){if(!f.current&&x.current)return l.current=u.current,H(_e,t),j?de(u.current):E.current;if(Y)return H(_e,t),de(u.current)}return f.current||H(_e,t),E.current}};return te.cancel=function(){var X=f.current;X&&(A?cancelAnimationFrame(f.current):clearTimeout(f.current)),l.current=0,h.current=u.current=m.current=f.current=null},te.isPending=function(){return!!f.current},te.flush=function(){return f.current?le(Date.now()):E.current},te},[j,Y,t,ae,F,K,A,_,B,i]);return v.current=q,R.useEffect(function(){return x.current=!0,function(){var de;K&&v.current.flush(),k.current&&((de=globalThis.document)==null||de.removeEventListener==null||de.removeEventListener("visibilitychange",k.current),k.current=null),x.current=!1}},[K]),q}const W5=({size:e=16})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("circle",{cx:"11",cy:"11",r:"8"}),T.jsx("path",{d:"M21 21l-4.35-4.35"})]}),Y5=({size:e=18})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M18 6L6 18"}),T.jsx("path",{d:"M6 6l12 12"})]}),q5=({size:e=14})=>T.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[T.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),T.jsx("polyline",{points:"14 2 14 8 20 8"})]}),Q5=gt.memo(({result:e,onClick:t})=>{const n=e.page.level==="Beginner"?"badge-beginner":e.page.level==="Intermediate"?"badge-intermediate":"badge-advanced";return T.jsxs("button",{onClick:t,className:`
|
|
312
|
-
flex items-start gap-2.5 w-full px-3.5 py-2.5
|
|
313
|
-
border-none bg-transparent text-content
|
|
314
|
-
cursor-pointer text-left rounded-md
|
|
315
|
-
transition-colors duration-150
|
|
316
|
-
hover:bg-surface-hover
|
|
317
|
-
`,children:[T.jsx(q5,{size:16}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[T.jsx("span",{className:"font-medium text-[13px] truncate",children:e.page.title}),T.jsx("span",{className:`badge ${n}`,children:e.page.level})]}),T.jsxs("div",{className:"text-[12px] text-content-tertiary truncate",children:[e.page.section,e.page.group?` / ${e.page.group}`:""]}),e.content&&T.jsx("div",{className:"text-[12px] text-content-secondary mt-1 truncate max-w-full",children:e.content})]})]})}),G5=()=>{const e=ke(k=>k.searchOpen),t=ke(k=>k.searchQuery),n=ke(k=>k.searchResults),i=ke(k=>k.config),a=ke(k=>k.setSearchOpen),u=ke(k=>k.setSearchQuery),l=ke(k=>k.setSearchResults),c=ke(k=>k.setCurrentProject),f=ke(k=>k.setCurrentView),h=R.useRef(null);R.useEffect(()=>{e&&setTimeout(()=>{var k;(k=h.current)==null||k.focus()},50)},[e]);const m=V5(async k=>{if(!k.trim()){l([]);return}const v=i==null?void 0:i.lastOpenedProject;if(!v){l([]);return}try{const _=await d1(v,k);l(_)}catch(_){console.error("Search failed:",_),l([])}},200),E=R.useCallback(k=>{const v=k.target.value;u(v),m(v)},[u,m]),y=R.useCallback(k=>{k.projectId!==(i==null?void 0:i.lastOpenedProject)&&c(k.projectId);const v=ke.getState().projects.find(A=>A.id===k.projectId),_=(v==null?void 0:v.currentVersion)||"latest";f({projectId:k.projectId,version:_,slug:k.page.slug,content:"",loading:!0,mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null}),li(k.projectId,_,k.page.slug).then(A=>{f({projectId:k.projectId,version:_,slug:k.page.slug,content:A.content,loading:!1,mode:"read",editContent:null,isDirty:!1,fileMtime:A.mtime,conflictData:null})}).catch(A=>{f({projectId:k.projectId,version:_,slug:k.page.slug,content:"",loading:!1,error:A instanceof Error?A.message:"Failed to load page",mode:"read",editContent:null,isDirty:!1,fileMtime:null,conflictData:null})}),a(!1)},[i==null?void 0:i.lastOpenedProject,c,f,a,li]),x=R.useCallback(k=>{k.target===k.currentTarget&&a(!1)},[a]);return e?T.jsx("div",{className:"overlay overlay-centered",onClick:x,children:T.jsxs("div",{className:`
|
|
318
|
-
modal w-[560px] max-h-[70vh]
|
|
319
|
-
bg-surface-secondary border border-edge
|
|
320
|
-
rounded-xl shadow-lg
|
|
321
|
-
flex flex-col overflow-hidden
|
|
322
|
-
`,children:[T.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3.5 border-b border-edge",children:[T.jsx(W5,{size:18}),T.jsx("input",{ref:h,type:"text",value:t,onChange:E,placeholder:"搜索文档...",className:`
|
|
323
|
-
flex-1 border-none outline-none bg-transparent
|
|
324
|
-
text-content text-[15px]
|
|
325
|
-
`}),T.jsx("button",{onClick:()=>a(!1),className:`
|
|
326
|
-
flex items-center justify-center
|
|
327
|
-
w-7 h-7 border border-edge rounded-md
|
|
328
|
-
bg-surface-tertiary text-content-tertiary
|
|
329
|
-
cursor-pointer text-[11px]
|
|
330
|
-
hover:bg-surface-hover hover:text-content
|
|
331
|
-
transition-colors duration-150
|
|
332
|
-
`,title:"关闭 (Esc)",children:T.jsx(Y5,{size:14})})]}),T.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:t&&n.length===0?T.jsx("div",{className:"py-6 px-4 text-center text-content-tertiary text-[13px]",children:"没有找到相关结果"}):t?n.map((k,v)=>T.jsx(Q5,{result:k,onClick:()=>y(k)},`${k.projectId}-${k.page.slug}-${v}`)):T.jsx("div",{className:"py-6 px-4 text-center text-content-tertiary text-[13px]",children:"输入关键词开始搜索"})}),n.length>0&&T.jsxs("div",{className:"px-4 py-2 border-t border-edge text-[11px] text-content-tertiary text-center",children:["找到 ",n.length," 个结果"]})]})}):null};function K5(){const e=ke(t=>t.config);R.useEffect(()=>{const t=(e==null?void 0:e.theme)||"light";document.documentElement.setAttribute("data-theme",t)},[e==null?void 0:e.theme])}function X5(){const e=ke(l=>l.toggleSearch),t=ke(l=>l.setSearchOpen),n=ke(l=>l.setSettingsOpen),i=ke(l=>l.toggleSidebar),a=ke(l=>l.searchOpen),u=ke(l=>l.settingsOpen);R.useEffect(()=>{function l(c){const f=c.ctrlKey||c.metaKey;if(f&&c.key==="k"){c.preventDefault(),e();return}if(f&&c.key==="b"){c.preventDefault(),i();return}c.key==="Escape"&&(a?t(!1):u&&n(!1))}return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,t,n,i,a,u])}const Z5=R.lazy(()=>Mr(()=>import("./SettingsModal--k8PL66i.js"),__vite__mapDeps([4,1]))),J5=R.lazy(()=>Mr(()=>import("./ReferenceModal-DSe6-vS0.js"),__vite__mapDeps([5,1,3]))),eL=R.lazy(()=>Mr(()=>import("./MermaidViewerModal-C6aHO871.js"),__vite__mapDeps([6,1]))),tL=R.lazy(()=>Mr(()=>import("./AIPanel-CScovBuP.js"),__vite__mapDeps([7,3,1])).then(e=>({default:e.AIPanel}))),nL=()=>{const e=ke(a=>a.setConfig),t=ke(a=>a.setProjects),n=ke(a=>a.setCurrentWiki);ke(a=>a.setCurrentView),ke(a=>a.setCurrentProject);const i=to(a=>a.aiPanelOpen);return K5(),X5(),R.useEffect(()=>{let a=!1;async function u(){try{const l=await f1();if(a)return;if(e(l),t(l.projects),l.lastOpenedProject)try{const c=await Sd(l.lastOpenedProject);if(a)return;n(c)}catch(c){console.error("Failed to load last opened project wiki:",c)}}catch(l){console.error("Failed to initialize app:",l)}}return u(),()=>{a=!0}},[e,t,n]),T.jsxs(q2,{children:[T.jsxs("div",{className:"flex flex-col h-screen bg-surface text-content overflow-hidden",children:[T.jsx(fy,{}),T.jsxs("div",{className:"flex flex-1 min-h-0",children:[T.jsx(xy,{}),T.jsx("main",{className:"flex-1 flex flex-col min-w-0",children:T.jsx($5,{})}),i&&T.jsx(R.Suspense,{fallback:T.jsx("div",{className:"ai-panel-loading",children:"加载 AI..."}),children:T.jsx(tL,{})})]})]}),T.jsx(G5,{}),T.jsxs(R.Suspense,{fallback:null,children:[T.jsx(Z5,{}),T.jsx(J5,{}),T.jsx(eL,{})]})]})},Hb=document.getElementById("root");if(!Hb)throw new Error("Root element not found");Y2.createRoot(Hb).render(T.jsx(gt.StrictMode,{children:T.jsx(nL,{})}));const rL=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Bb},Symbol.toStringTag,{value:"Module"}));export{o4 as A,gt as E,cL as L,Vt as R,fL as S,ey as a,ty as b,f1 as c,ny as d,sy as e,to as f,iy as g,uL as h,aL as i,T as j,go as k,m1 as l,C1 as m,em as n,xa as o,oS as p,dL as q,R as r,Fr as s,ry as t,ke as u,wy as w,sg as z};
|