@joeyshi12/casper 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/agents/prompt.txt +1 -1
- package/dist/mcp.js +1 -1
- package/dist/server.js +462 -473
- package/dist/web/assets/{abnfDiagram-N423BO3Z-B88fK1c8.js → abnfDiagram-N423BO3Z-4Ko3ozfJ.js} +1 -1
- package/dist/web/assets/{arc-DMIevERD.js → arc-Ch7Ehjbn.js} +1 -1
- package/dist/web/assets/{architectureDiagram-T3A2C74G-CJ5mXlmv.js → architectureDiagram-T3A2C74G-DcWU5yRD.js} +1 -1
- package/dist/web/assets/{blockDiagram-VBNYF7ZC-BssSdi9Q.js → blockDiagram-VBNYF7ZC-BUzWG1_k.js} +1 -1
- package/dist/web/assets/{c4Diagram-5PPSVZJV-BJHrRcC9.js → c4Diagram-5PPSVZJV-Cbk3RgdU.js} +1 -1
- package/dist/web/assets/channel-DSuKNwf1.js +1 -0
- package/dist/web/assets/{chunk-2GRJ4B5K-Bmq_IVc0.js → chunk-2GRJ4B5K-B0WXdW3m.js} +1 -1
- package/dist/web/assets/{chunk-2Q5K7J3B-B2erbhym.js → chunk-2Q5K7J3B-Dr5AcgBH.js} +1 -1
- package/dist/web/assets/{chunk-5RXB4S5H-B_DuY9SH.js → chunk-5RXB4S5H-NRZvLElM.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-BgiHQCU1.js → chunk-5VM5RSS4-B2ezMICZ.js} +1 -1
- package/dist/web/assets/{chunk-6Q2QTUOP-pmOmsjWC.js → chunk-6Q2QTUOP-0_kTL1pm.js} +1 -1
- package/dist/web/assets/{chunk-GF5L2VYU-B-PjTMWL.js → chunk-GF5L2VYU-ChJJ-3FT.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-Be9UnGmk.js → chunk-JWPE2WC7-B15-wRYl.js} +1 -1
- package/dist/web/assets/{chunk-KBJHAD2P-DPxdXs9r.js → chunk-KBJHAD2P-DsR7v9qB.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-BKc5gOjQ.js → chunk-RYQCIY6F-BkT8T354.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-CoOnbv-S.js → chunk-XXDRQBXY-CRB4wwou.js} +1 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-DY_Arw9F.js +1 -0
- package/dist/web/assets/classDiagram-v2-OCEON4UE-DY_Arw9F.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BZ5Oon1z.js → cose-bilkent-JH36ORCC-BESlNRq3.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-DlXmf5Bs.js → cynefin-VYW2F7L2-BPfoy8I9.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-MW4NZA55-ClZQ1oTx.js → cynefinDiagram-MW4NZA55-Byn6JJg0.js} +1 -1
- package/dist/web/assets/{dagre-VZM6K2ZE-CX3pDtYQ.js → dagre-VZM6K2ZE-CF6UO64P.js} +1 -1
- package/dist/web/assets/{diagram-7IWD3JNH-DBelWFkJ.js → diagram-7IWD3JNH-DgIzI-sU.js} +1 -1
- package/dist/web/assets/{diagram-B4RE2ZJO-CDqvztqK.js → diagram-B4RE2ZJO-DTXfP5om.js} +1 -1
- package/dist/web/assets/{diagram-LBJQPF4R-DWL1uAJS.js → diagram-LBJQPF4R-CTLNzser.js} +1 -1
- package/dist/web/assets/{diagram-Q27KOJAE-BRsHqM1Z.js → diagram-Q27KOJAE-M38db-G2.js} +1 -1
- package/dist/web/assets/{diagram-UB23O5K3-Ci1U9Hdl.js → diagram-UB23O5K3-CG-vZyFB.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-BXEA7PRR-CBPphElN.js → ebnfDiagram-BXEA7PRR-CsJ9VNb2.js} +1 -1
- package/dist/web/assets/{erDiagram-JOGREHBK-FI4byJC2.js → erDiagram-JOGREHBK-3dK0h9cf.js} +1 -1
- package/dist/web/assets/{flowDiagram-UKHOOZJN-BCKR_o2t.js → flowDiagram-UKHOOZJN-DHTGEHfr.js} +1 -1
- package/dist/web/assets/{ganttDiagram-PKOTCBZU-BYp35VGe.js → ganttDiagram-PKOTCBZU-DiLysF1Q.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-DS77QQ5N--AySchaL.js → gitGraphDiagram-DS77QQ5N-2uthJlH6.js} +1 -1
- package/dist/web/assets/index-D3zBm-7r.js +249 -0
- package/dist/web/assets/index-D_ANHT9G.css +1 -0
- package/dist/web/assets/{index-D9ooBx1d.js → index-DbaSy_a8.js} +1 -1
- package/dist/web/assets/{infoDiagram-6WML65LV-CbKYvHyN.js → infoDiagram-6WML65LV-B35ot4_O.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-dLs0tgi6.js → ishikawaDiagram-WSZJBQD7-C6nTJ8A6.js} +1 -1
- package/dist/web/assets/{journeyDiagram-NVQOT4AX-CXUsDb3x.js → journeyDiagram-NVQOT4AX-Bmt5Dt3Z.js} +1 -1
- package/dist/web/assets/{kanban-definition-27J2QSJJ-r33P8KpU.js → kanban-definition-27J2QSJJ-DkGk9WrO.js} +1 -1
- package/dist/web/assets/{linear-s7N3jDHb.js → linear-D9RsKviS.js} +1 -1
- package/dist/web/assets/{mermaid.core-Cw282Xmk.js → mermaid.core-BkEkrWDL.js} +4 -4
- package/dist/web/assets/{mindmap-definition-FAOFIHXS-BXPAvM6U.js → mindmap-definition-FAOFIHXS-7XkMFJ0C.js} +1 -1
- package/dist/web/assets/{pegDiagram-VL7TDLO6-D-H5hjvM.js → pegDiagram-VL7TDLO6-KpO4Zp9v.js} +1 -1
- package/dist/web/assets/{pieDiagram-7S7Q4E2Y-D3W5_BlG.js → pieDiagram-7S7Q4E2Y-CnZkxeeK.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-BNSHhxkB.js → quadrantDiagram-CIZ2JOQS-Jej_KG8V.js} +1 -1
- package/dist/web/assets/{railroadDiagram-AXF67PYL-BvLjuIqc.js → railroadDiagram-AXF67PYL-BfteVM0C.js} +1 -1
- package/dist/web/assets/{requirementDiagram-LRYGKXZP-CZTpqoEk.js → requirementDiagram-LRYGKXZP-BTSeDpTM.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-W5VNT64P-xvU-3Mf_.js → sankeyDiagram-W5VNT64P-CeB7UW0v.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-SI44F4Z6-Bpugvm4V.js → sequenceDiagram-SI44F4Z6-BeOLM9UY.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-B87TxLF7.js → sizeCapture-X5ZJPWSS-7aezJBJp.js} +1 -1
- package/dist/web/assets/{stateDiagram-OKZ733FA-BEQB_m5r.js → stateDiagram-OKZ733FA-DmJkX_vQ.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CkEEUkE9.js +1 -0
- package/dist/web/assets/{swimlanes-SLNWSIFB-CVMCMeYR.js → swimlanes-SLNWSIFB-CmnhwW2u.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-DaOmpb-r.js +8 -0
- package/dist/web/assets/{timeline-definition-Z64GVDOM-Dylz4pg-.js → timeline-definition-Z64GVDOM-DtxMhUPD.js} +1 -1
- package/dist/web/assets/{vennDiagram-T6HMQDX7-BmS_JQjJ.js → vennDiagram-T6HMQDX7-DO34MvMM.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-T6FBY63Y-C0qCz7i-.js → wardleyDiagram-T6FBY63Y-s2zhjdd1.js} +1 -1
- package/dist/web/assets/{xychartDiagram-ELKLHX3M-aOG1xxkv.js → xychartDiagram-ELKLHX3M-CnCQs0NK.js} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -2
- package/dist/web/assets/channel-CFhLIKKC.js +0 -1
- package/dist/web/assets/classDiagram-JCYQIIEL-CyTqHDI_.js +0 -1
- package/dist/web/assets/classDiagram-v2-OCEON4UE-CyTqHDI_.js +0 -1
- package/dist/web/assets/index-Dd6MG4c6.css +0 -1
- package/dist/web/assets/index-DigNQUdR.js +0 -253
- package/dist/web/assets/stateDiagram-v2-UEYNNEHI-OtsvcH8I.js +0 -1
- package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-TYfbhlBN.js +0 -8
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DbaSy_a8.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var $T=Object.defineProperty;var WT=(e,t,n)=>t in e?$T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>WT(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();function Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $l={exports:{}},Cs={},Wl={exports:{}},De={};/**
|
|
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 pp;function YT(){if(pp)return De;pp=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),g=Symbol.iterator;function x(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,v={};function O(D,G,I){this.props=D,this.context=G,this.refs=v,this.updater=I||b}O.prototype.isReactComponent={},O.prototype.setState=function(D,G){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,G,"setState")},O.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function R(){}R.prototype=O.prototype;function B(D,G,I){this.props=D,this.context=G,this.refs=v,this.updater=I||b}var M=B.prototype=new R;M.constructor=B,C(M,O.prototype),M.isPureReactComponent=!0;var se=Array.isArray,$=Object.prototype.hasOwnProperty,H={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function ue(D,G,I){var Ne,Ie={},Ce=null,je=null;if(G!=null)for(Ne in G.ref!==void 0&&(je=G.ref),G.key!==void 0&&(Ce=""+G.key),G)$.call(G,Ne)&&!ee.hasOwnProperty(Ne)&&(Ie[Ne]=G[Ne]);var Re=arguments.length-2;if(Re===1)Ie.children=I;else if(1<Re){for(var ze=Array(Re),at=0;at<Re;at++)ze[at]=arguments[at+2];Ie.children=ze}if(D&&D.defaultProps)for(Ne in Re=D.defaultProps,Re)Ie[Ne]===void 0&&(Ie[Ne]=Re[Ne]);return{$$typeof:e,type:D,key:Ce,ref:je,props:Ie,_owner:H.current}}function fe(D,G){return{$$typeof:e,type:D.type,key:G,ref:D.ref,props:D.props,_owner:D._owner}}function U(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function re(D){var G={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(I){return G[I]})}var ce=/\/+/g;function ke(D,G){return typeof D=="object"&&D!==null&&D.key!=null?re(""+D.key):G.toString(36)}function de(D,G,I,Ne,Ie){var Ce=typeof D;(Ce==="undefined"||Ce==="boolean")&&(D=null);var je=!1;if(D===null)je=!0;else switch(Ce){case"string":case"number":je=!0;break;case"object":switch(D.$$typeof){case e:case t:je=!0}}if(je)return je=D,Ie=Ie(je),D=Ne===""?"."+ke(je,0):Ne,se(Ie)?(I="",D!=null&&(I=D.replace(ce,"$&/")+"/"),de(Ie,G,I,"",function(at){return at})):Ie!=null&&(U(Ie)&&(Ie=fe(Ie,I+(!Ie.key||je&&je.key===Ie.key?"":(""+Ie.key).replace(ce,"$&/")+"/")+D)),G.push(Ie)),1;if(je=0,Ne=Ne===""?".":Ne+":",se(D))for(var Re=0;Re<D.length;Re++){Ce=D[Re];var ze=Ne+ke(Ce,Re);je+=de(Ce,G,I,ze,Ie)}else if(ze=x(D),typeof ze=="function")for(D=ze.call(D),Re=0;!(Ce=D.next()).done;)Ce=Ce.value,ze=Ne+ke(Ce,Re++),je+=de(Ce,G,I,ze,Ie);else if(Ce==="object")throw G=String(D),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return je}function Y(D,G,I){if(D==null)return D;var Ne=[],Ie=0;return de(D,Ne,"","",function(Ce){return G.call(I,Ce,Ie++)}),Ne}function ge(D){if(D._status===-1){var G=D._result;G=G(),G.then(function(I){(D._status===0||D._status===-1)&&(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&&(D._status=2,D._result=I)}),D._status===-1&&(D._status=0,D._result=G)}if(D._status===1)return D._result.default;throw D._result}var pe={current:null},K={transition:null},oe={ReactCurrentDispatcher:pe,ReactCurrentBatchConfig:K,ReactCurrentOwner:H};function S(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:Y,forEach:function(D,G,I){Y(D,function(){G.apply(this,arguments)},I)},count:function(D){var G=0;return Y(D,function(){G++}),G},toArray:function(D){return Y(D,function(G){return G})||[]},only:function(D){if(!U(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},De.Component=O,De.Fragment=n,De.Profiler=a,De.PureComponent=B,De.StrictMode=s,De.Suspense=f,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=oe,De.act=S,De.cloneElement=function(D,G,I){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var Ne=C({},D.props),Ie=D.key,Ce=D.ref,je=D._owner;if(G!=null){if(G.ref!==void 0&&(Ce=G.ref,je=H.current),G.key!==void 0&&(Ie=""+G.key),D.type&&D.type.defaultProps)var Re=D.type.defaultProps;for(ze in G)$.call(G,ze)&&!ee.hasOwnProperty(ze)&&(Ne[ze]=G[ze]===void 0&&Re!==void 0?Re[ze]:G[ze])}var ze=arguments.length-2;if(ze===1)Ne.children=I;else if(1<ze){Re=Array(ze);for(var at=0;at<ze;at++)Re[at]=arguments[at+2];Ne.children=Re}return{$$typeof:e,type:D.type,key:Ie,ref:Ce,props:Ne,_owner:je}},De.createContext=function(D){return D={$$typeof:l,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:o,_context:D},D.Consumer=D},De.createElement=ue,De.createFactory=function(D){var G=ue.bind(null,D);return G.type=D,G},De.createRef=function(){return{current:null}},De.forwardRef=function(D){return{$$typeof:d,render:D}},De.isValidElement=U,De.lazy=function(D){return{$$typeof:E,_payload:{_status:-1,_result:D},_init:ge}},De.memo=function(D,G){return{$$typeof:h,type:D,compare:G===void 0?null:G}},De.startTransition=function(D){var G=K.transition;K.transition={};try{D()}finally{K.transition=G}},De.unstable_act=S,De.useCallback=function(D,G){return pe.current.useCallback(D,G)},De.useContext=function(D){return pe.current.useContext(D)},De.useDebugValue=function(){},De.useDeferredValue=function(D){return pe.current.useDeferredValue(D)},De.useEffect=function(D,G){return pe.current.useEffect(D,G)},De.useId=function(){return pe.current.useId()},De.useImperativeHandle=function(D,G,I){return pe.current.useImperativeHandle(D,G,I)},De.useInsertionEffect=function(D,G){return pe.current.useInsertionEffect(D,G)},De.useLayoutEffect=function(D,G){return pe.current.useLayoutEffect(D,G)},De.useMemo=function(D,G){return pe.current.useMemo(D,G)},De.useReducer=function(D,G,I){return pe.current.useReducer(D,G,I)},De.useRef=function(D){return pe.current.useRef(D)},De.useState=function(D){return pe.current.useState(D)},De.useSyncExternalStore=function(D,G,I){return pe.current.useSyncExternalStore(D,G,I)},De.useTransition=function(){return pe.current.useTransition()},De.version="18.3.1",De}var mp;function qc(){return mp||(mp=1,Wl.exports=YT()),Wl.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 gp;function VT(){if(gp)return Cs;gp=1;var e=qc(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(d,f,h){var E,g={},x=null,b=null;h!==void 0&&(x=""+h),f.key!==void 0&&(x=""+f.key),f.ref!==void 0&&(b=f.ref);for(E in f)s.call(f,E)&&!o.hasOwnProperty(E)&&(g[E]=f[E]);if(d&&d.defaultProps)for(E in f=d.defaultProps,f)g[E]===void 0&&(g[E]=f[E]);return{$$typeof:t,type:d,key:x,ref:b,props:g,_owner:a.current}}return Cs.Fragment=n,Cs.jsx=l,Cs.jsxs=l,Cs}var Ep;function qT(){return Ep||(Ep=1,$l.exports=VT()),$l.exports}var T=qT(),A=qc();const Ds=Vc(A);var xu={},Yl={exports:{}},Bt={},Vl={exports:{}},ql={};/**
|
|
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 Tp;function QT(){return Tp||(Tp=1,(function(e){function t(K,oe){var S=K.length;K.push(oe);e:for(;0<S;){var D=S-1>>>1,G=K[D];if(0<a(G,oe))K[D]=oe,K[S]=G,S=D;else break e}}function n(K){return K.length===0?null:K[0]}function s(K){if(K.length===0)return null;var oe=K[0],S=K.pop();if(S!==oe){K[0]=S;e:for(var D=0,G=K.length,I=G>>>1;D<I;){var Ne=2*(D+1)-1,Ie=K[Ne],Ce=Ne+1,je=K[Ce];if(0>a(Ie,S))Ce<G&&0>a(je,Ie)?(K[D]=je,K[Ce]=S,D=Ce):(K[D]=Ie,K[Ne]=S,D=Ne);else if(Ce<G&&0>a(je,S))K[D]=je,K[Ce]=S,D=Ce;else break e}}return oe}function a(K,oe){var S=K.sortIndex-oe.sortIndex;return S!==0?S:K.id-oe.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,d=l.now();e.unstable_now=function(){return l.now()-d}}var f=[],h=[],E=1,g=null,x=3,b=!1,C=!1,v=!1,O=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(K){for(var oe=n(h);oe!==null;){if(oe.callback===null)s(h);else if(oe.startTime<=K)s(h),oe.sortIndex=oe.expirationTime,t(f,oe);else break;oe=n(h)}}function se(K){if(v=!1,M(K),!C)if(n(f)!==null)C=!0,ge($);else{var oe=n(h);oe!==null&&pe(se,oe.startTime-K)}}function $(K,oe){C=!1,v&&(v=!1,R(ue),ue=-1),b=!0;var S=x;try{for(M(oe),g=n(f);g!==null&&(!(g.expirationTime>oe)||K&&!re());){var D=g.callback;if(typeof D=="function"){g.callback=null,x=g.priorityLevel;var G=D(g.expirationTime<=oe);oe=e.unstable_now(),typeof G=="function"?g.callback=G:g===n(f)&&s(f),M(oe)}else s(f);g=n(f)}if(g!==null)var I=!0;else{var Ne=n(h);Ne!==null&&pe(se,Ne.startTime-oe),I=!1}return I}finally{g=null,x=S,b=!1}}var H=!1,ee=null,ue=-1,fe=5,U=-1;function re(){return!(e.unstable_now()-U<fe)}function ce(){if(ee!==null){var K=e.unstable_now();U=K;var oe=!0;try{oe=ee(!0,K)}finally{oe?ke():(H=!1,ee=null)}}else H=!1}var ke;if(typeof B=="function")ke=function(){B(ce)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,Y=de.port2;de.port1.onmessage=ce,ke=function(){Y.postMessage(null)}}else ke=function(){O(ce,0)};function ge(K){ee=K,H||(H=!0,ke())}function pe(K,oe){ue=O(function(){K(e.unstable_now())},oe)}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(K){K.callback=null},e.unstable_continueExecution=function(){C||b||(C=!0,ge($))},e.unstable_forceFrameRate=function(K){0>K||125<K?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<K?Math.floor(1e3/K):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(K){switch(x){case 1:case 2:case 3:var oe=3;break;default:oe=x}var S=x;x=oe;try{return K()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(K,oe){switch(K){case 1:case 2:case 3:case 4:case 5:break;default:K=3}var S=x;x=K;try{return oe()}finally{x=S}},e.unstable_scheduleCallback=function(K,oe,S){var D=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?D+S:D):S=D,K){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=S+G,K={id:E++,callback:oe,priorityLevel:K,startTime:S,expirationTime:G,sortIndex:-1},S>D?(K.sortIndex=S,t(h,K),n(f)===null&&K===n(h)&&(v?(R(ue),ue=-1):v=!0,pe(se,S-D))):(K.sortIndex=G,t(f,K),C||b||(C=!0,ge($))),K},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(K){var oe=x;return function(){var S=x;x=oe;try{return K.apply(this,arguments)}finally{x=S}}}})(ql)),ql}var yp;function GT(){return yp||(yp=1,Vl.exports=QT()),Vl.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 xp;function KT(){if(xp)return Bt;xp=1;var e=qc(),t=GT();function n(r){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+r,u=1;u<arguments.length;u++)i+="&args[]="+encodeURIComponent(arguments[u]);return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function o(r,i){l(r,i),l(r+"Capture",i)}function l(r,i){for(a[r]=i,r=0;r<i.length;r++)s.add(i[r])}var d=!(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]*$/,E={},g={};function x(r){return f.call(g,r)?!0:f.call(E,r)?!1:h.test(r)?g[r]=!0:(E[r]=!0,!1)}function b(r,i,u,c){if(u!==null&&u.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return c?!1:u!==null?!u.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function C(r,i,u,c){if(i===null||typeof i>"u"||b(r,i,u,c))return!0;if(c)return!1;if(u!==null)switch(u.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function v(r,i,u,c,m,y,k){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=c,this.attributeNamespace=m,this.mustUseProperty=u,this.propertyName=r,this.type=i,this.sanitizeURL=y,this.removeEmptyString=k}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){O[r]=new v(r,0,!1,r,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var i=r[0];O[i]=new v(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){O[r]=new v(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){O[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){O[r]=new v(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){O[r]=new v(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){O[r]=new v(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){O[r]=new v(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){O[r]=new v(r,5,!1,r.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function B(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 i=r.replace(R,B);O[i]=new v(i,1,!1,r,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var i=r.replace(R,B);O[i]=new v(i,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(r){var i=r.replace(R,B);O[i]=new v(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){O[r]=new v(r,1,!1,r.toLowerCase(),null,!1,!1)}),O.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){O[r]=new v(r,1,!1,r.toLowerCase(),null,!0,!0)});function M(r,i,u,c){var m=O.hasOwnProperty(i)?O[i]:null;(m!==null?m.type!==0:c||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(C(i,u,m,c)&&(u=null),c||m===null?x(i)&&(u===null?r.removeAttribute(i):r.setAttribute(i,""+u)):m.mustUseProperty?r[m.propertyName]=u===null?m.type===3?!1:"":u:(i=m.attributeName,c=m.attributeNamespace,u===null?r.removeAttribute(i):(m=m.type,u=m===3||m===4&&u===!0?"":""+u,c?r.setAttributeNS(c,i,u):r.setAttribute(i,u))))}var se=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$=Symbol.for("react.element"),H=Symbol.for("react.portal"),ee=Symbol.for("react.fragment"),ue=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),re=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),ke=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),ge=Symbol.for("react.lazy"),pe=Symbol.for("react.offscreen"),K=Symbol.iterator;function oe(r){return r===null||typeof r!="object"?null:(r=K&&r[K]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,D;function G(r){if(D===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);D=i&&i[1]||""}return`
|
|
35
|
+
`+D+r}var I=!1;function Ne(r,i){if(!r||I)return"";I=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(V){var c=V}Reflect.construct(r,[],i)}else{try{i.call()}catch(V){c=V}r.call(i.prototype)}else{try{throw Error()}catch(V){c=V}r()}}catch(V){if(V&&c&&typeof V.stack=="string"){for(var m=V.stack.split(`
|
|
36
|
+
`),y=c.stack.split(`
|
|
37
|
+
`),k=m.length-1,w=y.length-1;1<=k&&0<=w&&m[k]!==y[w];)w--;for(;1<=k&&0<=w;k--,w--)if(m[k]!==y[w]){if(k!==1||w!==1)do if(k--,w--,0>w||m[k]!==y[w]){var P=`
|
|
38
|
+
`+m[k].replace(" at new "," at ");return r.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",r.displayName)),P}while(1<=k&&0<=w);break}}}finally{I=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?G(r):""}function Ie(r){switch(r.tag){case 5:return G(r.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return r=Ne(r.type,!1),r;case 11:return r=Ne(r.type.render,!1),r;case 1:return r=Ne(r.type,!0),r;default:return""}}function Ce(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 ee:return"Fragment";case H:return"Portal";case fe:return"Profiler";case ue:return"StrictMode";case ke:return"Suspense";case de:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case re:return(r.displayName||"Context")+".Consumer";case U:return(r._context.displayName||"Context")+".Provider";case ce:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case Y:return i=r.displayName||null,i!==null?i:Ce(r.type)||"Memo";case ge:i=r._payload,r=r._init;try{return Ce(r(i))}catch{}}return null}function je(r){var i=r.type;switch(r.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=i.render,r=r.displayName||r.name||"",i.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ce(i);case 8:return i===ue?"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 i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function Re(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function ze(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function at(r){var i=ze(r)?"checked":"value",u=Object.getOwnPropertyDescriptor(r.constructor.prototype,i),c=""+r[i];if(!r.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,y=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(k){c=""+k,y.call(this,k)}}),Object.defineProperty(r,i,{enumerable:u.enumerable}),{getValue:function(){return c},setValue:function(k){c=""+k},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function On(r){r._valueTracker||(r._valueTracker=at(r))}function oa(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var u=i.getValue(),c="";return r&&(c=ze(r)?r.checked?"true":"false":r.value),r=c,r!==u?(i.setValue(r),!0):!1}function Zr(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 Ui(r,i){var u=i.checked;return S({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function ji(r,i){var u=i.defaultValue==null?"":i.defaultValue,c=i.checked!=null?i.checked:i.defaultChecked;u=Re(i.value!=null?i.value:u),r._wrapperState={initialChecked:c,initialValue:u,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Hi(r,i){i=i.checked,i!=null&&M(r,"checked",i,!1)}function ei(r,i){Hi(r,i);var u=Re(i.value),c=i.type;if(u!=null)c==="number"?(u===0&&r.value===""||r.value!=u)&&(r.value=""+u):r.value!==""+u&&(r.value=""+u);else if(c==="submit"||c==="reset"){r.removeAttribute("value");return}i.hasOwnProperty("value")?ti(r,i.type,u):i.hasOwnProperty("defaultValue")&&ti(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function la(r,i,u){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var c=i.type;if(!(c!=="submit"&&c!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+r._wrapperState.initialValue,u||i===r.value||(r.value=i),r.defaultValue=i}u=r.name,u!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,u!==""&&(r.name=u)}function ti(r,i,u){(i!=="number"||Zr(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Vn=Array.isArray;function qn(r,i,u,c){if(r=r.options,i){i={};for(var m=0;m<u.length;m++)i["$"+u[m]]=!0;for(u=0;u<r.length;u++)m=i.hasOwnProperty("$"+r[u].value),r[u].selected!==m&&(r[u].selected=m),m&&c&&(r[u].defaultSelected=!0)}else{for(u=""+Re(u),i=null,m=0;m<r.length;m++){if(r[m].value===u){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function zi(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ca(r,i){var u=i.value;if(u==null){if(u=i.children,i=i.defaultValue,u!=null){if(i!=null)throw Error(n(92));if(Vn(u)){if(1<u.length)throw Error(n(93));u=u[0]}i=u}i==null&&(i=""),u=i}r._wrapperState={initialValue:Re(u)}}function da(r,i){var u=Re(i.value),c=Re(i.defaultValue);u!=null&&(u=""+u,u!==r.value&&(r.value=u),i.defaultValue==null&&r.defaultValue!==u&&(r.defaultValue=u)),c!=null&&(r.defaultValue=""+c)}function fa(r){var i=r.textContent;i===r._wrapperState.initialValue&&i!==""&&i!==null&&(r.value=i)}function Q(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 le(r,i){return r==null||r==="http://www.w3.org/1999/xhtml"?Q(i):r==="http://www.w3.org/2000/svg"&&i==="foreignObject"?"http://www.w3.org/1999/xhtml":r}var Ae,Oe=(function(r){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(i,u,c,m){MSApp.execUnsafeLocalFunction(function(){return r(i,u,c,m)})}:r})(function(r,i){if(r.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in r)r.innerHTML=i;else{for(Ae=Ae||document.createElement("div"),Ae.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ae.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Be(r,i){if(i){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=i;return}}r.textContent=i}var Et={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},Dn=["Webkit","ms","Moz","O"];Object.keys(Et).forEach(function(r){Dn.forEach(function(i){i=i+r.charAt(0).toUpperCase()+r.substring(1),Et[i]=Et[r]})});function Kt(r,i,u){return i==null||typeof i=="boolean"||i===""?"":u||typeof i!="number"||i===0||Et.hasOwnProperty(r)&&Et[r]?(""+i).trim():i+"px"}function Qn(r,i){r=r.style;for(var u in i)if(i.hasOwnProperty(u)){var c=u.indexOf("--")===0,m=Kt(u,i[u],c);u==="float"&&(u="cssFloat"),c?r.setProperty(u,m):r[u]=m}}var _r=S({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 Tt(r,i){if(i){if(_r[r]&&(i.children!=null||i.dangerouslySetInnerHTML!=null))throw Error(n(137,r));if(i.dangerouslySetInnerHTML!=null){if(i.children!=null)throw Error(n(60));if(typeof i.dangerouslySetInnerHTML!="object"||!("__html"in i.dangerouslySetInnerHTML))throw Error(n(61))}if(i.style!=null&&typeof i.style!="object")throw Error(n(62))}}function kn(r,i){if(r.indexOf("-")===-1)return typeof i.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 zt=null;function ro(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var io=null,ni=null,ri=null;function Id(r){if(r=cs(r)){if(typeof io!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Pa(i),io(r.stateNode,r.type,i))}}function Ld(r){ni?ri?ri.push(r):ri=[r]:ni=r}function Rd(){if(ni){var r=ni,i=ri;if(ri=ni=null,Id(r),i)for(r=0;r<i.length;r++)Id(i[r])}}function Od(r,i){return r(i)}function Dd(){}var so=!1;function Pd(r,i,u){if(so)return r(i,u);so=!0;try{return Od(r,i,u)}finally{so=!1,(ni!==null||ri!==null)&&(Dd(),Rd())}}function $i(r,i){var u=r.stateNode;if(u===null)return null;var c=Pa(u);if(c===null)return null;u=c[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(r=r.type,c=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!c;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(n(231,i,typeof u));return u}var ao=!1;if(d)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){ao=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{ao=!1}function Gg(r,i,u,c,m,y,k,w,P){var V=Array.prototype.slice.call(arguments,3);try{i.apply(u,V)}catch(Z){this.onError(Z)}}var Yi=!1,ha=null,pa=!1,uo=null,Kg={onError:function(r){Yi=!0,ha=r}};function Xg(r,i,u,c,m,y,k,w,P){Yi=!1,ha=null,Gg.apply(Kg,arguments)}function Jg(r,i,u,c,m,y,k,w,P){if(Xg.apply(this,arguments),Yi){if(Yi){var V=ha;Yi=!1,ha=null}else throw Error(n(198));pa||(pa=!0,uo=V)}}function Cr(r){var i=r,u=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(u=i.return),r=i.return;while(r)}return i.tag===3?u:null}function Md(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function Fd(r){if(Cr(r)!==r)throw Error(n(188))}function Zg(r){var i=r.alternate;if(!i){if(i=Cr(r),i===null)throw Error(n(188));return i!==r?null:r}for(var u=r,c=i;;){var m=u.return;if(m===null)break;var y=m.alternate;if(y===null){if(c=m.return,c!==null){u=c;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===u)return Fd(m),r;if(y===c)return Fd(m),i;y=y.sibling}throw Error(n(188))}if(u.return!==c.return)u=m,c=y;else{for(var k=!1,w=m.child;w;){if(w===u){k=!0,u=m,c=y;break}if(w===c){k=!0,c=m,u=y;break}w=w.sibling}if(!k){for(w=y.child;w;){if(w===u){k=!0,u=y,c=m;break}if(w===c){k=!0,c=y,u=m;break}w=w.sibling}if(!k)throw Error(n(189))}}if(u.alternate!==c)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?r:i}function Bd(r){return r=Zg(r),r!==null?Ud(r):null}function Ud(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Ud(r);if(i!==null)return i;r=r.sibling}return null}var jd=t.unstable_scheduleCallback,Hd=t.unstable_cancelCallback,eE=t.unstable_shouldYield,tE=t.unstable_requestPaint,rt=t.unstable_now,nE=t.unstable_getCurrentPriorityLevel,oo=t.unstable_ImmediatePriority,zd=t.unstable_UserBlockingPriority,ma=t.unstable_NormalPriority,rE=t.unstable_LowPriority,$d=t.unstable_IdlePriority,ga=null,Sn=null;function iE(r){if(Sn&&typeof Sn.onCommitFiberRoot=="function")try{Sn.onCommitFiberRoot(ga,r,void 0,(r.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:uE,sE=Math.log,aE=Math.LN2;function uE(r){return r>>>=0,r===0?32:31-(sE(r)/aE|0)|0}var Ea=64,Ta=4194304;function Vi(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 ya(r,i){var u=r.pendingLanes;if(u===0)return 0;var c=0,m=r.suspendedLanes,y=r.pingedLanes,k=u&268435455;if(k!==0){var w=k&~m;w!==0?c=Vi(w):(y&=k,y!==0&&(c=Vi(y)))}else k=u&~m,k!==0?c=Vi(k):y!==0&&(c=Vi(y));if(c===0)return 0;if(i!==0&&i!==c&&(i&m)===0&&(m=c&-c,y=i&-i,m>=y||m===16&&(y&4194240)!==0))return i;if((c&4)!==0&&(c|=u&16),i=r.entangledLanes,i!==0)for(r=r.entanglements,i&=c;0<i;)u=31-un(i),m=1<<u,c|=r[u],i&=~m;return c}function oE(r,i){switch(r){case 1:case 2:case 4:return i+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 i+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 lE(r,i){for(var u=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,y=r.pendingLanes;0<y;){var k=31-un(y),w=1<<k,P=m[k];P===-1?((w&u)===0||(w&c)!==0)&&(m[k]=oE(w,i)):P<=i&&(r.expiredLanes|=w),y&=~w}}function lo(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function Wd(){var r=Ea;return Ea<<=1,(Ea&4194240)===0&&(Ea=64),r}function co(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function qi(r,i,u){r.pendingLanes|=i,i!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,i=31-un(i),r[i]=u}function cE(r,i){var u=r.pendingLanes&~i;r.pendingLanes=i,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=i,r.mutableReadLanes&=i,r.entangledLanes&=i,i=r.entanglements;var c=r.eventTimes;for(r=r.expirationTimes;0<u;){var m=31-un(u),y=1<<m;i[m]=0,c[m]=-1,r[m]=-1,u&=~y}}function fo(r,i){var u=r.entangledLanes|=i;for(r=r.entanglements;u;){var c=31-un(u),m=1<<c;m&i|r[c]&i&&(r[c]|=i),u&=~m}}var We=0;function Yd(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var Vd,ho,qd,Qd,Gd,po=!1,xa=[],Gn=null,Kn=null,Xn=null,Qi=new Map,Gi=new Map,Jn=[],dE="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 Kd(r,i){switch(r){case"focusin":case"focusout":Gn=null;break;case"dragenter":case"dragleave":Kn=null;break;case"mouseover":case"mouseout":Xn=null;break;case"pointerover":case"pointerout":Qi.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gi.delete(i.pointerId)}}function Ki(r,i,u,c,m,y){return r===null||r.nativeEvent!==y?(r={blockedOn:i,domEventName:u,eventSystemFlags:c,nativeEvent:y,targetContainers:[m]},i!==null&&(i=cs(i),i!==null&&ho(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function fE(r,i,u,c,m){switch(i){case"focusin":return Gn=Ki(Gn,r,i,u,c,m),!0;case"dragenter":return Kn=Ki(Kn,r,i,u,c,m),!0;case"mouseover":return Xn=Ki(Xn,r,i,u,c,m),!0;case"pointerover":var y=m.pointerId;return Qi.set(y,Ki(Qi.get(y)||null,r,i,u,c,m)),!0;case"gotpointercapture":return y=m.pointerId,Gi.set(y,Ki(Gi.get(y)||null,r,i,u,c,m)),!0}return!1}function Xd(r){var i=Nr(r.target);if(i!==null){var u=Cr(i);if(u!==null){if(i=u.tag,i===13){if(i=Md(u),i!==null){r.blockedOn=i,Gd(r.priority,function(){qd(u)});return}}else if(i===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function ba(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=go(r.domEventName,r.eventSystemFlags,i[0],r.nativeEvent);if(u===null){u=r.nativeEvent;var c=new u.constructor(u.type,u);zt=c,u.target.dispatchEvent(c),zt=null}else return i=cs(u),i!==null&&ho(i),r.blockedOn=u,!1;i.shift()}return!0}function Jd(r,i,u){ba(r)&&u.delete(i)}function hE(){po=!1,Gn!==null&&ba(Gn)&&(Gn=null),Kn!==null&&ba(Kn)&&(Kn=null),Xn!==null&&ba(Xn)&&(Xn=null),Qi.forEach(Jd),Gi.forEach(Jd)}function Xi(r,i){r.blockedOn===i&&(r.blockedOn=null,po||(po=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,hE)))}function Ji(r){function i(m){return Xi(m,r)}if(0<xa.length){Xi(xa[0],r);for(var u=1;u<xa.length;u++){var c=xa[u];c.blockedOn===r&&(c.blockedOn=null)}}for(Gn!==null&&Xi(Gn,r),Kn!==null&&Xi(Kn,r),Xn!==null&&Xi(Xn,r),Qi.forEach(i),Gi.forEach(i),u=0;u<Jn.length;u++)c=Jn[u],c.blockedOn===r&&(c.blockedOn=null);for(;0<Jn.length&&(u=Jn[0],u.blockedOn===null);)Xd(u),u.blockedOn===null&&Jn.shift()}var ii=se.ReactCurrentBatchConfig,ka=!0;function pE(r,i,u,c){var m=We,y=ii.transition;ii.transition=null;try{We=1,mo(r,i,u,c)}finally{We=m,ii.transition=y}}function mE(r,i,u,c){var m=We,y=ii.transition;ii.transition=null;try{We=4,mo(r,i,u,c)}finally{We=m,ii.transition=y}}function mo(r,i,u,c){if(ka){var m=go(r,i,u,c);if(m===null)Oo(r,i,c,Sa,u),Kd(r,c);else if(fE(m,r,i,u,c))c.stopPropagation();else if(Kd(r,c),i&4&&-1<dE.indexOf(r)){for(;m!==null;){var y=cs(m);if(y!==null&&Vd(y),y=go(r,i,u,c),y===null&&Oo(r,i,c,Sa,u),y===m)break;m=y}m!==null&&c.stopPropagation()}else Oo(r,i,c,null,u)}}var Sa=null;function go(r,i,u,c){if(Sa=null,r=ro(c),r=Nr(r),r!==null)if(i=Cr(r),i===null)r=null;else if(u=i.tag,u===13){if(r=Md(i),r!==null)return r;r=null}else if(u===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null);return Sa=r,null}function Zd(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(nE()){case oo:return 1;case zd:return 4;case ma:case rE:return 16;case $d:return 536870912;default:return 16}default:return 16}}var Zn=null,Eo=null,_a=null;function ef(){if(_a)return _a;var r,i=Eo,u=i.length,c,m="value"in Zn?Zn.value:Zn.textContent,y=m.length;for(r=0;r<u&&i[r]===m[r];r++);var k=u-r;for(c=1;c<=k&&i[u-c]===m[y-c];c++);return _a=m.slice(r,1<c?1-c:void 0)}function Ca(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Na(){return!0}function tf(){return!1}function $t(r){function i(u,c,m,y,k){this._reactName=u,this._targetInst=m,this.type=c,this.nativeEvent=y,this.target=k,this.currentTarget=null;for(var w in r)r.hasOwnProperty(w)&&(u=r[w],this[w]=u?u(y):y[w]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Na:tf,this.isPropagationStopped=tf,this}return S(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Na)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Na)},persist:function(){},isPersistent:Na}),i}var si={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},To=$t(si),Zi=S({},si,{view:0,detail:0}),gE=$t(Zi),yo,xo,es,Aa=S({},Zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ko,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!==es&&(es&&r.type==="mousemove"?(yo=r.screenX-es.screenX,xo=r.screenY-es.screenY):xo=yo=0,es=r),yo)},movementY:function(r){return"movementY"in r?r.movementY:xo}}),nf=$t(Aa),EE=S({},Aa,{dataTransfer:0}),TE=$t(EE),yE=S({},Zi,{relatedTarget:0}),bo=$t(yE),xE=S({},si,{animationName:0,elapsedTime:0,pseudoElement:0}),bE=$t(xE),kE=S({},si,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),SE=$t(kE),_E=S({},si,{data:0}),rf=$t(_E),CE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},NE={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"},AE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vE(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=AE[r])?!!i[r]:!1}function ko(){return vE}var wE=S({},Zi,{key:function(r){if(r.key){var i=CE[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Ca(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?NE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ko,charCode:function(r){return r.type==="keypress"?Ca(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Ca(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),IE=$t(wE),LE=S({},Aa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sf=$t(LE),RE=S({},Zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ko}),OE=$t(RE),DE=S({},si,{propertyName:0,elapsedTime:0,pseudoElement:0}),PE=$t(DE),ME=S({},Aa,{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}),FE=$t(ME),BE=[9,13,27,32],So=d&&"CompositionEvent"in window,ts=null;d&&"documentMode"in document&&(ts=document.documentMode);var UE=d&&"TextEvent"in window&&!ts,af=d&&(!So||ts&&8<ts&&11>=ts),uf=" ",of=!1;function lf(r,i){switch(r){case"keyup":return BE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function cf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ai=!1;function jE(r,i){switch(r){case"compositionend":return cf(i);case"keypress":return i.which!==32?null:(of=!0,uf);case"textInput":return r=i.data,r===uf&&of?null:r;default:return null}}function HE(r,i){if(ai)return r==="compositionend"||!So&&lf(r,i)?(r=ef(),_a=Eo=Zn=null,ai=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return af&&i.locale!=="ko"?null:i.data;default:return null}}var zE={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 df(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!zE[r.type]:i==="textarea"}function ff(r,i,u,c){Ld(c),i=Ra(i,"onChange"),0<i.length&&(u=new To("onChange","change",null,u,c),r.push({event:u,listeners:i}))}var ns=null,rs=null;function $E(r){If(r,0)}function va(r){var i=di(r);if(oa(i))return r}function WE(r,i){if(r==="change")return i}var hf=!1;if(d){var _o;if(d){var Co="oninput"in document;if(!Co){var pf=document.createElement("div");pf.setAttribute("oninput","return;"),Co=typeof pf.oninput=="function"}_o=Co}else _o=!1;hf=_o&&(!document.documentMode||9<document.documentMode)}function mf(){ns&&(ns.detachEvent("onpropertychange",gf),rs=ns=null)}function gf(r){if(r.propertyName==="value"&&va(rs)){var i=[];ff(i,rs,r,ro(r)),Pd($E,i)}}function YE(r,i,u){r==="focusin"?(mf(),ns=i,rs=u,ns.attachEvent("onpropertychange",gf)):r==="focusout"&&mf()}function VE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return va(rs)}function qE(r,i){if(r==="click")return va(i)}function QE(r,i){if(r==="input"||r==="change")return va(i)}function GE(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var on=typeof Object.is=="function"?Object.is:GE;function is(r,i){if(on(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var u=Object.keys(r),c=Object.keys(i);if(u.length!==c.length)return!1;for(c=0;c<u.length;c++){var m=u[c];if(!f.call(i,m)||!on(r[m],i[m]))return!1}return!0}function Ef(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Tf(r,i){var u=Ef(r);r=0;for(var c;u;){if(u.nodeType===3){if(c=r+u.textContent.length,r<=i&&c>=i)return{node:u,offset:i-r};r=c}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Ef(u)}}function yf(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?yf(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function xf(){for(var r=window,i=Zr();i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=Zr(r.document)}return i}function No(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}function KE(r){var i=xf(),u=r.focusedElem,c=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&yf(u.ownerDocument.documentElement,u)){if(c!==null&&No(u)){if(i=c.start,r=c.end,r===void 0&&(r=i),"selectionStart"in u)u.selectionStart=i,u.selectionEnd=Math.min(r,u.value.length);else if(r=(i=u.ownerDocument||document)&&i.defaultView||window,r.getSelection){r=r.getSelection();var m=u.textContent.length,y=Math.min(c.start,m);c=c.end===void 0?y:Math.min(c.end,m),!r.extend&&y>c&&(m=c,c=y,y=m),m=Tf(u,y);var k=Tf(u,c);m&&k&&(r.rangeCount!==1||r.anchorNode!==m.node||r.anchorOffset!==m.offset||r.focusNode!==k.node||r.focusOffset!==k.offset)&&(i=i.createRange(),i.setStart(m.node,m.offset),r.removeAllRanges(),y>c?(r.addRange(i),r.extend(k.node,k.offset)):(i.setEnd(k.node,k.offset),r.addRange(i)))}}for(i=[],r=u;r=r.parentNode;)r.nodeType===1&&i.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof u.focus=="function"&&u.focus(),u=0;u<i.length;u++)r=i[u],r.element.scrollLeft=r.left,r.element.scrollTop=r.top}}var XE=d&&"documentMode"in document&&11>=document.documentMode,ui=null,Ao=null,ss=null,vo=!1;function bf(r,i,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;vo||ui==null||ui!==Zr(c)||(c=ui,"selectionStart"in c&&No(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ss&&is(ss,c)||(ss=c,c=Ra(Ao,"onSelect"),0<c.length&&(i=new To("onSelect","select",null,i,u),r.push({event:i,listeners:c}),i.target=ui)))}function wa(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var oi={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionend:wa("Transition","TransitionEnd")},wo={},kf={};d&&(kf=document.createElement("div").style,"AnimationEvent"in window||(delete oi.animationend.animation,delete oi.animationiteration.animation,delete oi.animationstart.animation),"TransitionEvent"in window||delete oi.transitionend.transition);function Ia(r){if(wo[r])return wo[r];if(!oi[r])return r;var i=oi[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in kf)return wo[r]=i[u];return r}var Sf=Ia("animationend"),_f=Ia("animationiteration"),Cf=Ia("animationstart"),Nf=Ia("transitionend"),Af=new Map,vf="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 er(r,i){Af.set(r,i),o(i,[r])}for(var Io=0;Io<vf.length;Io++){var Lo=vf[Io],JE=Lo.toLowerCase(),ZE=Lo[0].toUpperCase()+Lo.slice(1);er(JE,"on"+ZE)}er(Sf,"onAnimationEnd"),er(_f,"onAnimationIteration"),er(Cf,"onAnimationStart"),er("dblclick","onDoubleClick"),er("focusin","onFocus"),er("focusout","onBlur"),er(Nf,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="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(" "),eT=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function wf(r,i,u){var c=r.type||"unknown-event";r.currentTarget=u,Jg(c,i,void 0,r),r.currentTarget=null}function If(r,i){i=(i&4)!==0;for(var u=0;u<r.length;u++){var c=r[u],m=c.event;c=c.listeners;e:{var y=void 0;if(i)for(var k=c.length-1;0<=k;k--){var w=c[k],P=w.instance,V=w.currentTarget;if(w=w.listener,P!==y&&m.isPropagationStopped())break e;wf(m,w,V),y=P}else for(k=0;k<c.length;k++){if(w=c[k],P=w.instance,V=w.currentTarget,w=w.listener,P!==y&&m.isPropagationStopped())break e;wf(m,w,V),y=P}}}if(pa)throw r=uo,pa=!1,uo=null,r}function Qe(r,i){var u=i[Uo];u===void 0&&(u=i[Uo]=new Set);var c=r+"__bubble";u.has(c)||(Lf(i,r,2,!1),u.add(c))}function Ro(r,i,u){var c=0;i&&(c|=4),Lf(u,r,c,i)}var La="_reactListening"+Math.random().toString(36).slice(2);function us(r){if(!r[La]){r[La]=!0,s.forEach(function(u){u!=="selectionchange"&&(eT.has(u)||Ro(u,!1,r),Ro(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[La]||(i[La]=!0,Ro("selectionchange",!1,i))}}function Lf(r,i,u,c){switch(Zd(i)){case 1:var m=pE;break;case 4:m=mE;break;default:m=mo}u=m.bind(null,i,u,r),m=void 0,!ao||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,u,{capture:!0,passive:m}):r.addEventListener(i,u,!0):m!==void 0?r.addEventListener(i,u,{passive:m}):r.addEventListener(i,u,!1)}function Oo(r,i,u,c,m){var y=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var k=c.tag;if(k===3||k===4){var w=c.stateNode.containerInfo;if(w===m||w.nodeType===8&&w.parentNode===m)break;if(k===4)for(k=c.return;k!==null;){var P=k.tag;if((P===3||P===4)&&(P=k.stateNode.containerInfo,P===m||P.nodeType===8&&P.parentNode===m))return;k=k.return}for(;w!==null;){if(k=Nr(w),k===null)return;if(P=k.tag,P===5||P===6){c=y=k;continue e}w=w.parentNode}}c=c.return}Pd(function(){var V=y,Z=ro(u),te=[];e:{var X=Af.get(r);if(X!==void 0){var he=To,Ee=r;switch(r){case"keypress":if(Ca(u)===0)break e;case"keydown":case"keyup":he=IE;break;case"focusin":Ee="focus",he=bo;break;case"focusout":Ee="blur",he=bo;break;case"beforeblur":case"afterblur":he=bo;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=TE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=OE;break;case Sf:case _f:case Cf:he=bE;break;case Nf:he=PE;break;case"scroll":he=gE;break;case"wheel":he=FE;break;case"copy":case"cut":case"paste":he=SE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=sf}var Te=(i&4)!==0,it=!Te&&r==="scroll",j=Te?X!==null?X+"Capture":null:X;Te=[];for(var F=V,W;F!==null;){W=F;var ae=W.stateNode;if(W.tag===5&&ae!==null&&(W=ae,j!==null&&(ae=$i(F,j),ae!=null&&Te.push(os(F,ae,W)))),it)break;F=F.return}0<Te.length&&(X=new he(X,Ee,null,u,Z),te.push({event:X,listeners:Te}))}}if((i&7)===0){e:{if(X=r==="mouseover"||r==="pointerover",he=r==="mouseout"||r==="pointerout",X&&u!==zt&&(Ee=u.relatedTarget||u.fromElement)&&(Nr(Ee)||Ee[Pn]))break e;if((he||X)&&(X=Z.window===Z?Z:(X=Z.ownerDocument)?X.defaultView||X.parentWindow:window,he?(Ee=u.relatedTarget||u.toElement,he=V,Ee=Ee?Nr(Ee):null,Ee!==null&&(it=Cr(Ee),Ee!==it||Ee.tag!==5&&Ee.tag!==6)&&(Ee=null)):(he=null,Ee=V),he!==Ee)){if(Te=nf,ae="onMouseLeave",j="onMouseEnter",F="mouse",(r==="pointerout"||r==="pointerover")&&(Te=sf,ae="onPointerLeave",j="onPointerEnter",F="pointer"),it=he==null?X:di(he),W=Ee==null?X:di(Ee),X=new Te(ae,F+"leave",he,u,Z),X.target=it,X.relatedTarget=W,ae=null,Nr(Z)===V&&(Te=new Te(j,F+"enter",Ee,u,Z),Te.target=W,Te.relatedTarget=it,ae=Te),it=ae,he&&Ee)t:{for(Te=he,j=Ee,F=0,W=Te;W;W=li(W))F++;for(W=0,ae=j;ae;ae=li(ae))W++;for(;0<F-W;)Te=li(Te),F--;for(;0<W-F;)j=li(j),W--;for(;F--;){if(Te===j||j!==null&&Te===j.alternate)break t;Te=li(Te),j=li(j)}Te=null}else Te=null;he!==null&&Rf(te,X,he,Te,!1),Ee!==null&&it!==null&&Rf(te,it,Ee,Te,!0)}}e:{if(X=V?di(V):window,he=X.nodeName&&X.nodeName.toLowerCase(),he==="select"||he==="input"&&X.type==="file")var ye=WE;else if(df(X))if(hf)ye=QE;else{ye=VE;var Se=YE}else(he=X.nodeName)&&he.toLowerCase()==="input"&&(X.type==="checkbox"||X.type==="radio")&&(ye=qE);if(ye&&(ye=ye(r,V))){ff(te,ye,u,Z);break e}Se&&Se(r,X,V),r==="focusout"&&(Se=X._wrapperState)&&Se.controlled&&X.type==="number"&&ti(X,"number",X.value)}switch(Se=V?di(V):window,r){case"focusin":(df(Se)||Se.contentEditable==="true")&&(ui=Se,Ao=V,ss=null);break;case"focusout":ss=Ao=ui=null;break;case"mousedown":vo=!0;break;case"contextmenu":case"mouseup":case"dragend":vo=!1,bf(te,u,Z);break;case"selectionchange":if(XE)break;case"keydown":case"keyup":bf(te,u,Z)}var _e;if(So)e:{switch(r){case"compositionstart":var ve="onCompositionStart";break e;case"compositionend":ve="onCompositionEnd";break e;case"compositionupdate":ve="onCompositionUpdate";break e}ve=void 0}else ai?lf(r,u)&&(ve="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(ve="onCompositionStart");ve&&(af&&u.locale!=="ko"&&(ai||ve!=="onCompositionStart"?ve==="onCompositionEnd"&&ai&&(_e=ef()):(Zn=Z,Eo="value"in Zn?Zn.value:Zn.textContent,ai=!0)),Se=Ra(V,ve),0<Se.length&&(ve=new rf(ve,r,null,u,Z),te.push({event:ve,listeners:Se}),_e?ve.data=_e:(_e=cf(u),_e!==null&&(ve.data=_e)))),(_e=UE?jE(r,u):HE(r,u))&&(V=Ra(V,"onBeforeInput"),0<V.length&&(Z=new rf("onBeforeInput","beforeinput",null,u,Z),te.push({event:Z,listeners:V}),Z.data=_e))}If(te,i)})}function os(r,i,u){return{instance:r,listener:i,currentTarget:u}}function Ra(r,i){for(var u=i+"Capture",c=[];r!==null;){var m=r,y=m.stateNode;m.tag===5&&y!==null&&(m=y,y=$i(r,u),y!=null&&c.unshift(os(r,y,m)),y=$i(r,i),y!=null&&c.push(os(r,y,m))),r=r.return}return c}function li(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function Rf(r,i,u,c,m){for(var y=i._reactName,k=[];u!==null&&u!==c;){var w=u,P=w.alternate,V=w.stateNode;if(P!==null&&P===c)break;w.tag===5&&V!==null&&(w=V,m?(P=$i(u,y),P!=null&&k.unshift(os(u,P,w))):m||(P=$i(u,y),P!=null&&k.push(os(u,P,w)))),u=u.return}k.length!==0&&r.push({event:i,listeners:k})}var tT=/\r\n?/g,nT=/\u0000|\uFFFD/g;function Of(r){return(typeof r=="string"?r:""+r).replace(tT,`
|
|
39
|
+
`).replace(nT,"")}function Oa(r,i,u){if(i=Of(i),Of(r)!==i&&u)throw Error(n(425))}function Da(){}var Do=null,Po=null;function Mo(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Fo=typeof setTimeout=="function"?setTimeout:void 0,rT=typeof clearTimeout=="function"?clearTimeout:void 0,Df=typeof Promise=="function"?Promise:void 0,iT=typeof queueMicrotask=="function"?queueMicrotask:typeof Df<"u"?function(r){return Df.resolve(null).then(r).catch(sT)}:Fo;function sT(r){setTimeout(function(){throw r})}function Bo(r,i){var u=i,c=0;do{var m=u.nextSibling;if(r.removeChild(u),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(c===0){r.removeChild(m),Ji(i);return}c--}else u!=="$"&&u!=="$?"&&u!=="$!"||c++;u=m}while(u);Ji(i)}function tr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return r}function Pf(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"){if(i===0)return r;i--}else u==="/$"&&i++}r=r.previousSibling}return null}var ci=Math.random().toString(36).slice(2),_n="__reactFiber$"+ci,ls="__reactProps$"+ci,Pn="__reactContainer$"+ci,Uo="__reactEvents$"+ci,aT="__reactListeners$"+ci,uT="__reactHandles$"+ci;function Nr(r){var i=r[_n];if(i)return i;for(var u=r.parentNode;u;){if(i=u[Pn]||u[_n]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=Pf(r);r!==null;){if(u=r[_n])return u;r=Pf(r)}return i}r=u,u=r.parentNode}return null}function cs(r){return r=r[_n]||r[Pn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function di(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Pa(r){return r[ls]||null}var jo=[],fi=-1;function nr(r){return{current:r}}function Ge(r){0>fi||(r.current=jo[fi],jo[fi]=null,fi--)}function qe(r,i){fi++,jo[fi]=r.current,r.current=i}var rr={},St=nr(rr),Ot=nr(!1),Ar=rr;function hi(r,i){var u=r.type.contextTypes;if(!u)return rr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var m={},y;for(y in u)m[y]=i[y];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=m),m}function Dt(r){return r=r.childContextTypes,r!=null}function Ma(){Ge(Ot),Ge(St)}function Mf(r,i,u){if(St.current!==rr)throw Error(n(168));qe(St,i),qe(Ot,u)}function Ff(r,i,u){var c=r.stateNode;if(i=i.childContextTypes,typeof c.getChildContext!="function")return u;c=c.getChildContext();for(var m in c)if(!(m in i))throw Error(n(108,je(r)||"Unknown",m));return S({},u,c)}function Fa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||rr,Ar=St.current,qe(St,r),qe(Ot,Ot.current),!0}function Bf(r,i,u){var c=r.stateNode;if(!c)throw Error(n(169));u?(r=Ff(r,i,Ar),c.__reactInternalMemoizedMergedChildContext=r,Ge(Ot),Ge(St),qe(St,r)):Ge(Ot),qe(Ot,u)}var Mn=null,Ba=!1,Ho=!1;function Uf(r){Mn===null?Mn=[r]:Mn.push(r)}function oT(r){Ba=!0,Uf(r)}function ir(){if(!Ho&&Mn!==null){Ho=!0;var r=0,i=We;try{var u=Mn;for(We=1;r<u.length;r++){var c=u[r];do c=c(!0);while(c!==null)}Mn=null,Ba=!1}catch(m){throw Mn!==null&&(Mn=Mn.slice(r+1)),jd(oo,ir),m}finally{We=i,Ho=!1}}return null}var pi=[],mi=0,Ua=null,ja=0,Xt=[],Jt=0,vr=null,Fn=1,Bn="";function wr(r,i){pi[mi++]=ja,pi[mi++]=Ua,Ua=r,ja=i}function jf(r,i,u){Xt[Jt++]=Fn,Xt[Jt++]=Bn,Xt[Jt++]=vr,vr=r;var c=Fn;r=Bn;var m=32-un(c)-1;c&=~(1<<m),u+=1;var y=32-un(i)+m;if(30<y){var k=m-m%5;y=(c&(1<<k)-1).toString(32),c>>=k,m-=k,Fn=1<<32-un(i)+m|u<<m|c,Bn=y+r}else Fn=1<<y|u<<m|c,Bn=r}function zo(r){r.return!==null&&(wr(r,1),jf(r,1,0))}function $o(r){for(;r===Ua;)Ua=pi[--mi],pi[mi]=null,ja=pi[--mi],pi[mi]=null;for(;r===vr;)vr=Xt[--Jt],Xt[Jt]=null,Bn=Xt[--Jt],Xt[Jt]=null,Fn=Xt[--Jt],Xt[Jt]=null}var Wt=null,Yt=null,Xe=!1,ln=null;function Hf(r,i){var u=nn(5,null,null,0);u.elementType="DELETED",u.stateNode=i,u.return=r,i=r.deletions,i===null?(r.deletions=[u],r.flags|=16):i.push(u)}function zf(r,i){switch(r.tag){case 5:var u=r.type;return i=i.nodeType!==1||u.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(r.stateNode=i,Wt=r,Yt=tr(i.firstChild),!0):!1;case 6:return i=r.pendingProps===""||i.nodeType!==3?null:i,i!==null?(r.stateNode=i,Wt=r,Yt=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(u=vr!==null?{id:Fn,overflow:Bn}:null,r.memoizedState={dehydrated:i,treeContext:u,retryLane:1073741824},u=nn(18,null,null,0),u.stateNode=i,u.return=r,r.child=u,Wt=r,Yt=null,!0):!1;default:return!1}}function Wo(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Yo(r){if(Xe){var i=Yt;if(i){var u=i;if(!zf(r,i)){if(Wo(r))throw Error(n(418));i=tr(u.nextSibling);var c=Wt;i&&zf(r,i)?Hf(c,u):(r.flags=r.flags&-4097|2,Xe=!1,Wt=r)}}else{if(Wo(r))throw Error(n(418));r.flags=r.flags&-4097|2,Xe=!1,Wt=r}}}function $f(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Wt=r}function Ha(r){if(r!==Wt)return!1;if(!Xe)return $f(r),Xe=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Mo(r.type,r.memoizedProps)),i&&(i=Yt)){if(Wo(r))throw Wf(),Error(n(418));for(;i;)Hf(r,i),i=tr(i.nextSibling)}if($f(r),r.tag===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(n(317));e:{for(r=r.nextSibling,i=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"){if(i===0){Yt=tr(r.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}r=r.nextSibling}Yt=null}}else Yt=Wt?tr(r.stateNode.nextSibling):null;return!0}function Wf(){for(var r=Yt;r;)r=tr(r.nextSibling)}function gi(){Yt=Wt=null,Xe=!1}function Vo(r){ln===null?ln=[r]:ln.push(r)}var lT=se.ReactCurrentBatchConfig;function ds(r,i,u){if(r=u.ref,r!==null&&typeof r!="function"&&typeof r!="object"){if(u._owner){if(u=u._owner,u){if(u.tag!==1)throw Error(n(309));var c=u.stateNode}if(!c)throw Error(n(147,r));var m=c,y=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===y?i.ref:(i=function(k){var w=m.refs;k===null?delete w[y]:w[y]=k},i._stringRef=y,i)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function za(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function Yf(r){var i=r._init;return i(r._payload)}function Vf(r){function i(j,F){if(r){var W=j.deletions;W===null?(j.deletions=[F],j.flags|=16):W.push(F)}}function u(j,F){if(!r)return null;for(;F!==null;)i(j,F),F=F.sibling;return null}function c(j,F){for(j=new Map;F!==null;)F.key!==null?j.set(F.key,F):j.set(F.index,F),F=F.sibling;return j}function m(j,F){return j=fr(j,F),j.index=0,j.sibling=null,j}function y(j,F,W){return j.index=W,r?(W=j.alternate,W!==null?(W=W.index,W<F?(j.flags|=2,F):W):(j.flags|=2,F)):(j.flags|=1048576,F)}function k(j){return r&&j.alternate===null&&(j.flags|=2),j}function w(j,F,W,ae){return F===null||F.tag!==6?(F=Fl(W,j.mode,ae),F.return=j,F):(F=m(F,W),F.return=j,F)}function P(j,F,W,ae){var ye=W.type;return ye===ee?Z(j,F,W.props.children,ae,W.key):F!==null&&(F.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ge&&Yf(ye)===F.type)?(ae=m(F,W.props),ae.ref=ds(j,F,W),ae.return=j,ae):(ae=fu(W.type,W.key,W.props,null,j.mode,ae),ae.ref=ds(j,F,W),ae.return=j,ae)}function V(j,F,W,ae){return F===null||F.tag!==4||F.stateNode.containerInfo!==W.containerInfo||F.stateNode.implementation!==W.implementation?(F=Bl(W,j.mode,ae),F.return=j,F):(F=m(F,W.children||[]),F.return=j,F)}function Z(j,F,W,ae,ye){return F===null||F.tag!==7?(F=Fr(W,j.mode,ae,ye),F.return=j,F):(F=m(F,W),F.return=j,F)}function te(j,F,W){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Fl(""+F,j.mode,W),F.return=j,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case $:return W=fu(F.type,F.key,F.props,null,j.mode,W),W.ref=ds(j,null,F),W.return=j,W;case H:return F=Bl(F,j.mode,W),F.return=j,F;case ge:var ae=F._init;return te(j,ae(F._payload),W)}if(Vn(F)||oe(F))return F=Fr(F,j.mode,W,null),F.return=j,F;za(j,F)}return null}function X(j,F,W,ae){var ye=F!==null?F.key:null;if(typeof W=="string"&&W!==""||typeof W=="number")return ye!==null?null:w(j,F,""+W,ae);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case $:return W.key===ye?P(j,F,W,ae):null;case H:return W.key===ye?V(j,F,W,ae):null;case ge:return ye=W._init,X(j,F,ye(W._payload),ae)}if(Vn(W)||oe(W))return ye!==null?null:Z(j,F,W,ae,null);za(j,W)}return null}function he(j,F,W,ae,ye){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return j=j.get(W)||null,w(F,j,""+ae,ye);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case $:return j=j.get(ae.key===null?W:ae.key)||null,P(F,j,ae,ye);case H:return j=j.get(ae.key===null?W:ae.key)||null,V(F,j,ae,ye);case ge:var Se=ae._init;return he(j,F,W,Se(ae._payload),ye)}if(Vn(ae)||oe(ae))return j=j.get(W)||null,Z(F,j,ae,ye,null);za(F,ae)}return null}function Ee(j,F,W,ae){for(var ye=null,Se=null,_e=F,ve=F=0,pt=null;_e!==null&&ve<W.length;ve++){_e.index>ve?(pt=_e,_e=null):pt=_e.sibling;var He=X(j,_e,W[ve],ae);if(He===null){_e===null&&(_e=pt);break}r&&_e&&He.alternate===null&&i(j,_e),F=y(He,F,ve),Se===null?ye=He:Se.sibling=He,Se=He,_e=pt}if(ve===W.length)return u(j,_e),Xe&&wr(j,ve),ye;if(_e===null){for(;ve<W.length;ve++)_e=te(j,W[ve],ae),_e!==null&&(F=y(_e,F,ve),Se===null?ye=_e:Se.sibling=_e,Se=_e);return Xe&&wr(j,ve),ye}for(_e=c(j,_e);ve<W.length;ve++)pt=he(_e,j,ve,W[ve],ae),pt!==null&&(r&&pt.alternate!==null&&_e.delete(pt.key===null?ve:pt.key),F=y(pt,F,ve),Se===null?ye=pt:Se.sibling=pt,Se=pt);return r&&_e.forEach(function(hr){return i(j,hr)}),Xe&&wr(j,ve),ye}function Te(j,F,W,ae){var ye=oe(W);if(typeof ye!="function")throw Error(n(150));if(W=ye.call(W),W==null)throw Error(n(151));for(var Se=ye=null,_e=F,ve=F=0,pt=null,He=W.next();_e!==null&&!He.done;ve++,He=W.next()){_e.index>ve?(pt=_e,_e=null):pt=_e.sibling;var hr=X(j,_e,He.value,ae);if(hr===null){_e===null&&(_e=pt);break}r&&_e&&hr.alternate===null&&i(j,_e),F=y(hr,F,ve),Se===null?ye=hr:Se.sibling=hr,Se=hr,_e=pt}if(He.done)return u(j,_e),Xe&&wr(j,ve),ye;if(_e===null){for(;!He.done;ve++,He=W.next())He=te(j,He.value,ae),He!==null&&(F=y(He,F,ve),Se===null?ye=He:Se.sibling=He,Se=He);return Xe&&wr(j,ve),ye}for(_e=c(j,_e);!He.done;ve++,He=W.next())He=he(_e,j,ve,He.value,ae),He!==null&&(r&&He.alternate!==null&&_e.delete(He.key===null?ve:He.key),F=y(He,F,ve),Se===null?ye=He:Se.sibling=He,Se=He);return r&&_e.forEach(function(zT){return i(j,zT)}),Xe&&wr(j,ve),ye}function it(j,F,W,ae){if(typeof W=="object"&&W!==null&&W.type===ee&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case $:e:{for(var ye=W.key,Se=F;Se!==null;){if(Se.key===ye){if(ye=W.type,ye===ee){if(Se.tag===7){u(j,Se.sibling),F=m(Se,W.props.children),F.return=j,j=F;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ge&&Yf(ye)===Se.type){u(j,Se.sibling),F=m(Se,W.props),F.ref=ds(j,Se,W),F.return=j,j=F;break e}u(j,Se);break}else i(j,Se);Se=Se.sibling}W.type===ee?(F=Fr(W.props.children,j.mode,ae,W.key),F.return=j,j=F):(ae=fu(W.type,W.key,W.props,null,j.mode,ae),ae.ref=ds(j,F,W),ae.return=j,j=ae)}return k(j);case H:e:{for(Se=W.key;F!==null;){if(F.key===Se)if(F.tag===4&&F.stateNode.containerInfo===W.containerInfo&&F.stateNode.implementation===W.implementation){u(j,F.sibling),F=m(F,W.children||[]),F.return=j,j=F;break e}else{u(j,F);break}else i(j,F);F=F.sibling}F=Bl(W,j.mode,ae),F.return=j,j=F}return k(j);case ge:return Se=W._init,it(j,F,Se(W._payload),ae)}if(Vn(W))return Ee(j,F,W,ae);if(oe(W))return Te(j,F,W,ae);za(j,W)}return typeof W=="string"&&W!==""||typeof W=="number"?(W=""+W,F!==null&&F.tag===6?(u(j,F.sibling),F=m(F,W),F.return=j,j=F):(u(j,F),F=Fl(W,j.mode,ae),F.return=j,j=F),k(j)):u(j,F)}return it}var Ei=Vf(!0),qf=Vf(!1),$a=nr(null),Wa=null,Ti=null,qo=null;function Qo(){qo=Ti=Wa=null}function Go(r){var i=$a.current;Ge($a),r._currentValue=i}function Ko(r,i,u){for(;r!==null;){var c=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,c!==null&&(c.childLanes|=i)):c!==null&&(c.childLanes&i)!==i&&(c.childLanes|=i),r===u)break;r=r.return}}function yi(r,i){Wa=r,qo=Ti=null,r=r.dependencies,r!==null&&r.firstContext!==null&&((r.lanes&i)!==0&&(Pt=!0),r.firstContext=null)}function Zt(r){var i=r._currentValue;if(qo!==r)if(r={context:r,memoizedValue:i,next:null},Ti===null){if(Wa===null)throw Error(n(308));Ti=r,Wa.dependencies={lanes:0,firstContext:r}}else Ti=Ti.next=r;return i}var Ir=null;function Xo(r){Ir===null?Ir=[r]:Ir.push(r)}function Qf(r,i,u,c){var m=i.interleaved;return m===null?(u.next=u,Xo(i)):(u.next=m.next,m.next=u),i.interleaved=u,Un(r,c)}function Un(r,i){r.lanes|=i;var u=r.alternate;for(u!==null&&(u.lanes|=i),u=r,r=r.return;r!==null;)r.childLanes|=i,u=r.alternate,u!==null&&(u.childLanes|=i),u=r,r=r.return;return u.tag===3?u.stateNode:null}var sr=!1;function Jo(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gf(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,effects:r.effects})}function jn(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function ar(r,i,u){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(Ue&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,Un(r,u)}return m=c.interleaved,m===null?(i.next=i,Xo(c)):(i.next=m.next,m.next=i),c.interleaved=i,Un(r,u)}function Ya(r,i,u){if(i=i.updateQueue,i!==null&&(i=i.shared,(u&4194240)!==0)){var c=i.lanes;c&=r.pendingLanes,u|=c,i.lanes=u,fo(r,u)}}function Kf(r,i){var u=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,u===c)){var m=null,y=null;if(u=u.firstBaseUpdate,u!==null){do{var k={eventTime:u.eventTime,lane:u.lane,tag:u.tag,payload:u.payload,callback:u.callback,next:null};y===null?m=y=k:y=y.next=k,u=u.next}while(u!==null);y===null?m=y=i:y=y.next=i}else m=y=i;u={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:c.shared,effects:c.effects},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=i:r.next=i,u.lastBaseUpdate=i}function Va(r,i,u,c){var m=r.updateQueue;sr=!1;var y=m.firstBaseUpdate,k=m.lastBaseUpdate,w=m.shared.pending;if(w!==null){m.shared.pending=null;var P=w,V=P.next;P.next=null,k===null?y=V:k.next=V,k=P;var Z=r.alternate;Z!==null&&(Z=Z.updateQueue,w=Z.lastBaseUpdate,w!==k&&(w===null?Z.firstBaseUpdate=V:w.next=V,Z.lastBaseUpdate=P))}if(y!==null){var te=m.baseState;k=0,Z=V=P=null,w=y;do{var X=w.lane,he=w.eventTime;if((c&X)===X){Z!==null&&(Z=Z.next={eventTime:he,lane:0,tag:w.tag,payload:w.payload,callback:w.callback,next:null});e:{var Ee=r,Te=w;switch(X=i,he=u,Te.tag){case 1:if(Ee=Te.payload,typeof Ee=="function"){te=Ee.call(he,te,X);break e}te=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Te.payload,X=typeof Ee=="function"?Ee.call(he,te,X):Ee,X==null)break e;te=S({},te,X);break e;case 2:sr=!0}}w.callback!==null&&w.lane!==0&&(r.flags|=64,X=m.effects,X===null?m.effects=[w]:X.push(w))}else he={eventTime:he,lane:X,tag:w.tag,payload:w.payload,callback:w.callback,next:null},Z===null?(V=Z=he,P=te):Z=Z.next=he,k|=X;if(w=w.next,w===null){if(w=m.shared.pending,w===null)break;X=w,w=X.next,X.next=null,m.lastBaseUpdate=X,m.shared.pending=null}}while(!0);if(Z===null&&(P=te),m.baseState=P,m.firstBaseUpdate=V,m.lastBaseUpdate=Z,i=m.shared.interleaved,i!==null){m=i;do k|=m.lane,m=m.next;while(m!==i)}else y===null&&(m.shared.lanes=0);Or|=k,r.lanes=k,r.memoizedState=te}}function Xf(r,i,u){if(r=i.effects,i.effects=null,r!==null)for(i=0;i<r.length;i++){var c=r[i],m=c.callback;if(m!==null){if(c.callback=null,c=u,typeof m!="function")throw Error(n(191,m));m.call(c)}}}var fs={},Cn=nr(fs),hs=nr(fs),ps=nr(fs);function Lr(r){if(r===fs)throw Error(n(174));return r}function Zo(r,i){switch(qe(ps,i),qe(hs,r),qe(Cn,fs),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:le(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=le(i,r)}Ge(Cn),qe(Cn,i)}function xi(){Ge(Cn),Ge(hs),Ge(ps)}function Jf(r){Lr(ps.current);var i=Lr(Cn.current),u=le(i,r.type);i!==u&&(qe(hs,r),qe(Cn,u))}function el(r){hs.current===r&&(Ge(Cn),Ge(hs))}var Ze=nr(0);function qa(r){for(var i=r;i!==null;){if(i.tag===13){var u=i.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||u.data==="$?"||u.data==="$!"))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!==void 0){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var tl=[];function nl(){for(var r=0;r<tl.length;r++)tl[r]._workInProgressVersionPrimary=null;tl.length=0}var Qa=se.ReactCurrentDispatcher,rl=se.ReactCurrentBatchConfig,Rr=0,et=null,lt=null,ft=null,Ga=!1,ms=!1,gs=0,cT=0;function _t(){throw Error(n(321))}function il(r,i){if(i===null)return!1;for(var u=0;u<i.length&&u<r.length;u++)if(!on(r[u],i[u]))return!1;return!0}function sl(r,i,u,c,m,y){if(Rr=y,et=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Qa.current=r===null||r.memoizedState===null?pT:mT,r=u(c,m),ms){y=0;do{if(ms=!1,gs=0,25<=y)throw Error(n(301));y+=1,ft=lt=null,i.updateQueue=null,Qa.current=gT,r=u(c,m)}while(ms)}if(Qa.current=Ja,i=lt!==null&<.next!==null,Rr=0,ft=lt=et=null,Ga=!1,i)throw Error(n(300));return r}function al(){var r=gs!==0;return gs=0,r}function Nn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?et.memoizedState=ft=r:ft=ft.next=r,ft}function en(){if(lt===null){var r=et.alternate;r=r!==null?r.memoizedState:null}else r=lt.next;var i=ft===null?et.memoizedState:ft.next;if(i!==null)ft=i,lt=r;else{if(r===null)throw Error(n(310));lt=r,r={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},ft===null?et.memoizedState=ft=r:ft=ft.next=r}return ft}function Es(r,i){return typeof i=="function"?i(r):i}function ul(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=lt,m=c.baseQueue,y=u.pending;if(y!==null){if(m!==null){var k=m.next;m.next=y.next,y.next=k}c.baseQueue=m=y,u.pending=null}if(m!==null){y=m.next,c=c.baseState;var w=k=null,P=null,V=y;do{var Z=V.lane;if((Rr&Z)===Z)P!==null&&(P=P.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),c=V.hasEagerState?V.eagerState:r(c,V.action);else{var te={lane:Z,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};P===null?(w=P=te,k=c):P=P.next=te,et.lanes|=Z,Or|=Z}V=V.next}while(V!==null&&V!==y);P===null?k=c:P.next=w,on(c,i.memoizedState)||(Pt=!0),i.memoizedState=c,i.baseState=k,i.baseQueue=P,u.lastRenderedState=c}if(r=u.interleaved,r!==null){m=r;do y=m.lane,et.lanes|=y,Or|=y,m=m.next;while(m!==r)}else m===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function ol(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=u.dispatch,m=u.pending,y=i.memoizedState;if(m!==null){u.pending=null;var k=m=m.next;do y=r(y,k.action),k=k.next;while(k!==m);on(y,i.memoizedState)||(Pt=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),u.lastRenderedState=y}return[y,c]}function Zf(){}function eh(r,i){var u=et,c=en(),m=i(),y=!on(c.memoizedState,m);if(y&&(c.memoizedState=m,Pt=!0),c=c.queue,ll(rh.bind(null,u,c,r),[r]),c.getSnapshot!==i||y||ft!==null&&ft.memoizedState.tag&1){if(u.flags|=2048,Ts(9,nh.bind(null,u,c,m,i),void 0,null),ht===null)throw Error(n(349));(Rr&30)!==0||th(u,i,m)}return m}function th(r,i,u){r.flags|=16384,r={getSnapshot:i,value:u},i=et.updateQueue,i===null?(i={lastEffect:null,stores:null},et.updateQueue=i,i.stores=[r]):(u=i.stores,u===null?i.stores=[r]:u.push(r))}function nh(r,i,u,c){i.value=u,i.getSnapshot=c,ih(i)&&sh(r)}function rh(r,i,u){return u(function(){ih(i)&&sh(r)})}function ih(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!on(r,u)}catch{return!0}}function sh(r){var i=Un(r,1);i!==null&&hn(i,r,1,-1)}function ah(r){var i=Nn();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:r},i.queue=r,r=r.dispatch=hT.bind(null,et,r),[i.memoizedState,r]}function Ts(r,i,u,c){return r={tag:r,create:i,destroy:u,deps:c,next:null},i=et.updateQueue,i===null?(i={lastEffect:null,stores:null},et.updateQueue=i,i.lastEffect=r.next=r):(u=i.lastEffect,u===null?i.lastEffect=r.next=r:(c=u.next,u.next=r,r.next=c,i.lastEffect=r)),r}function uh(){return en().memoizedState}function Ka(r,i,u,c){var m=Nn();et.flags|=r,m.memoizedState=Ts(1|i,u,void 0,c===void 0?null:c)}function Xa(r,i,u,c){var m=en();c=c===void 0?null:c;var y=void 0;if(lt!==null){var k=lt.memoizedState;if(y=k.destroy,c!==null&&il(c,k.deps)){m.memoizedState=Ts(i,u,y,c);return}}et.flags|=r,m.memoizedState=Ts(1|i,u,y,c)}function oh(r,i){return Ka(8390656,8,r,i)}function ll(r,i){return Xa(2048,8,r,i)}function lh(r,i){return Xa(4,2,r,i)}function ch(r,i){return Xa(4,4,r,i)}function dh(r,i){if(typeof i=="function")return r=r(),i(r),function(){i(null)};if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function fh(r,i,u){return u=u!=null?u.concat([r]):null,Xa(4,4,dh.bind(null,i,r),u)}function cl(){}function hh(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&il(i,c[1])?c[0]:(u.memoizedState=[r,i],r)}function ph(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&il(i,c[1])?c[0]:(r=r(),u.memoizedState=[r,i],r)}function mh(r,i,u){return(Rr&21)===0?(r.baseState&&(r.baseState=!1,Pt=!0),r.memoizedState=u):(on(u,i)||(u=Wd(),et.lanes|=u,Or|=u,r.baseState=!0),i)}function dT(r,i){var u=We;We=u!==0&&4>u?u:4,r(!0);var c=rl.transition;rl.transition={};try{r(!1),i()}finally{We=u,rl.transition=c}}function gh(){return en().memoizedState}function fT(r,i,u){var c=cr(r);if(u={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null},Eh(r))Th(i,u);else if(u=Qf(r,i,u,c),u!==null){var m=Lt();hn(u,r,c,m),yh(u,i,c)}}function hT(r,i,u){var c=cr(r),m={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null};if(Eh(r))Th(i,m);else{var y=r.alternate;if(r.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var k=i.lastRenderedState,w=y(k,u);if(m.hasEagerState=!0,m.eagerState=w,on(w,k)){var P=i.interleaved;P===null?(m.next=m,Xo(i)):(m.next=P.next,P.next=m),i.interleaved=m;return}}catch{}finally{}u=Qf(r,i,m,c),u!==null&&(m=Lt(),hn(u,r,c,m),yh(u,i,c))}}function Eh(r){var i=r.alternate;return r===et||i!==null&&i===et}function Th(r,i){ms=Ga=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function yh(r,i,u){if((u&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,u|=c,i.lanes=u,fo(r,u)}}var Ja={readContext:Zt,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useInsertionEffect:_t,useLayoutEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useMutableSource:_t,useSyncExternalStore:_t,useId:_t,unstable_isNewReconciler:!1},pT={readContext:Zt,useCallback:function(r,i){return Nn().memoizedState=[r,i===void 0?null:i],r},useContext:Zt,useEffect:oh,useImperativeHandle:function(r,i,u){return u=u!=null?u.concat([r]):null,Ka(4194308,4,dh.bind(null,i,r),u)},useLayoutEffect:function(r,i){return Ka(4194308,4,r,i)},useInsertionEffect:function(r,i){return Ka(4,2,r,i)},useMemo:function(r,i){var u=Nn();return i=i===void 0?null:i,r=r(),u.memoizedState=[r,i],r},useReducer:function(r,i,u){var c=Nn();return i=u!==void 0?u(i):i,c.memoizedState=c.baseState=i,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:i},c.queue=r,r=r.dispatch=fT.bind(null,et,r),[c.memoizedState,r]},useRef:function(r){var i=Nn();return r={current:r},i.memoizedState=r},useState:ah,useDebugValue:cl,useDeferredValue:function(r){return Nn().memoizedState=r},useTransition:function(){var r=ah(!1),i=r[0];return r=dT.bind(null,r[1]),Nn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,u){var c=et,m=Nn();if(Xe){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),ht===null)throw Error(n(349));(Rr&30)!==0||th(c,i,u)}m.memoizedState=u;var y={value:u,getSnapshot:i};return m.queue=y,oh(rh.bind(null,c,y,r),[r]),c.flags|=2048,Ts(9,nh.bind(null,c,y,u,i),void 0,null),u},useId:function(){var r=Nn(),i=ht.identifierPrefix;if(Xe){var u=Bn,c=Fn;u=(c&~(1<<32-un(c)-1)).toString(32)+u,i=":"+i+"R"+u,u=gs++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=cT++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},mT={readContext:Zt,useCallback:hh,useContext:Zt,useEffect:ll,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:ch,useMemo:ph,useReducer:ul,useRef:uh,useState:function(){return ul(Es)},useDebugValue:cl,useDeferredValue:function(r){var i=en();return mh(i,lt.memoizedState,r)},useTransition:function(){var r=ul(Es)[0],i=en().memoizedState;return[r,i]},useMutableSource:Zf,useSyncExternalStore:eh,useId:gh,unstable_isNewReconciler:!1},gT={readContext:Zt,useCallback:hh,useContext:Zt,useEffect:ll,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:ch,useMemo:ph,useReducer:ol,useRef:uh,useState:function(){return ol(Es)},useDebugValue:cl,useDeferredValue:function(r){var i=en();return lt===null?i.memoizedState=r:mh(i,lt.memoizedState,r)},useTransition:function(){var r=ol(Es)[0],i=en().memoizedState;return[r,i]},useMutableSource:Zf,useSyncExternalStore:eh,useId:gh,unstable_isNewReconciler:!1};function cn(r,i){if(r&&r.defaultProps){i=S({},i),r=r.defaultProps;for(var u in r)i[u]===void 0&&(i[u]=r[u]);return i}return i}function dl(r,i,u,c){i=r.memoizedState,u=u(c,i),u=u==null?i:S({},i,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var Za={isMounted:function(r){return(r=r._reactInternals)?Cr(r)===r:!1},enqueueSetState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=cr(r),y=jn(c,m);y.payload=i,u!=null&&(y.callback=u),i=ar(r,y,m),i!==null&&(hn(i,r,m,c),Ya(i,r,m))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=cr(r),y=jn(c,m);y.tag=1,y.payload=i,u!=null&&(y.callback=u),i=ar(r,y,m),i!==null&&(hn(i,r,m,c),Ya(i,r,m))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=Lt(),c=cr(r),m=jn(u,c);m.tag=2,i!=null&&(m.callback=i),i=ar(r,m,c),i!==null&&(hn(i,r,c,u),Ya(i,r,c))}};function xh(r,i,u,c,m,y,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,y,k):i.prototype&&i.prototype.isPureReactComponent?!is(u,c)||!is(m,y):!0}function bh(r,i,u){var c=!1,m=rr,y=i.contextType;return typeof y=="object"&&y!==null?y=Zt(y):(m=Dt(i)?Ar:St.current,c=i.contextTypes,y=(c=c!=null)?hi(r,m):rr),i=new i(u,y),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Za,r.stateNode=i,i._reactInternals=r,c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=m,r.__reactInternalMemoizedMaskedChildContext=y),i}function kh(r,i,u,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(u,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(u,c),i.state!==r&&Za.enqueueReplaceState(i,i.state,null)}function fl(r,i,u,c){var m=r.stateNode;m.props=u,m.state=r.memoizedState,m.refs={},Jo(r);var y=i.contextType;typeof y=="object"&&y!==null?m.context=Zt(y):(y=Dt(i)?Ar:St.current,m.context=hi(r,y)),m.state=r.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(dl(r,i,y,u),m.state=r.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(i=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),i!==m.state&&Za.enqueueReplaceState(m,m.state,null),Va(r,u,m,c),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308)}function bi(r,i){try{var u="",c=i;do u+=Ie(c),c=c.return;while(c);var m=u}catch(y){m=`
|
|
40
|
+
Error generating stack: `+y.message+`
|
|
41
|
+
`+y.stack}return{value:r,source:i,stack:m,digest:null}}function hl(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function pl(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var ET=typeof WeakMap=="function"?WeakMap:Map;function Sh(r,i,u){u=jn(-1,u),u.tag=3,u.payload={element:null};var c=i.value;return u.callback=function(){au||(au=!0,wl=c),pl(r,i)},u}function _h(r,i,u){u=jn(-1,u),u.tag=3;var c=r.type.getDerivedStateFromError;if(typeof c=="function"){var m=i.value;u.payload=function(){return c(m)},u.callback=function(){pl(r,i)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){pl(r,i),typeof c!="function"&&(or===null?or=new Set([this]):or.add(this));var k=i.stack;this.componentDidCatch(i.value,{componentStack:k!==null?k:""})}),u}function Ch(r,i,u){var c=r.pingCache;if(c===null){c=r.pingCache=new ET;var m=new Set;c.set(i,m)}else m=c.get(i),m===void 0&&(m=new Set,c.set(i,m));m.has(u)||(m.add(u),r=LT.bind(null,r,i,u),i.then(r,r))}function Nh(r){do{var i;if((i=r.tag===13)&&(i=r.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return r;r=r.return}while(r!==null);return null}function Ah(r,i,u,c,m){return(r.mode&1)===0?(r===i?r.flags|=65536:(r.flags|=128,u.flags|=131072,u.flags&=-52805,u.tag===1&&(u.alternate===null?u.tag=17:(i=jn(-1,1),i.tag=2,ar(u,i,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=m,r)}var TT=se.ReactCurrentOwner,Pt=!1;function It(r,i,u,c){i.child=r===null?qf(i,null,u,c):Ei(i,r.child,u,c)}function vh(r,i,u,c,m){u=u.render;var y=i.ref;return yi(i,m),c=sl(r,i,u,c,y,m),u=al(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&u&&zo(i),i.flags|=1,It(r,i,c,m),i.child)}function wh(r,i,u,c,m){if(r===null){var y=u.type;return typeof y=="function"&&!Ml(y)&&y.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=y,Ih(r,i,y,c,m)):(r=fu(u.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(y=r.child,(r.lanes&m)===0){var k=y.memoizedProps;if(u=u.compare,u=u!==null?u:is,u(k,c)&&r.ref===i.ref)return Hn(r,i,m)}return i.flags|=1,r=fr(y,c),r.ref=i.ref,r.return=i,i.child=r}function Ih(r,i,u,c,m){if(r!==null){var y=r.memoizedProps;if(is(y,c)&&r.ref===i.ref)if(Pt=!1,i.pendingProps=c=y,(r.lanes&m)!==0)(r.flags&131072)!==0&&(Pt=!0);else return i.lanes=r.lanes,Hn(r,i,m)}return ml(r,i,u,c,m)}function Lh(r,i,u){var c=i.pendingProps,m=c.children,y=r!==null?r.memoizedState:null;if(c.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(Si,Vt),Vt|=u;else{if((u&1073741824)===0)return r=y!==null?y.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,qe(Si,Vt),Vt|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=y!==null?y.baseLanes:u,qe(Si,Vt),Vt|=c}else y!==null?(c=y.baseLanes|u,i.memoizedState=null):c=u,qe(Si,Vt),Vt|=c;return It(r,i,m,u),i.child}function Rh(r,i){var u=i.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function ml(r,i,u,c,m){var y=Dt(u)?Ar:St.current;return y=hi(i,y),yi(i,m),u=sl(r,i,u,c,y,m),c=al(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&c&&zo(i),i.flags|=1,It(r,i,u,m),i.child)}function Oh(r,i,u,c,m){if(Dt(u)){var y=!0;Fa(i)}else y=!1;if(yi(i,m),i.stateNode===null)tu(r,i),bh(i,u,c),fl(i,u,c,m),c=!0;else if(r===null){var k=i.stateNode,w=i.memoizedProps;k.props=w;var P=k.context,V=u.contextType;typeof V=="object"&&V!==null?V=Zt(V):(V=Dt(u)?Ar:St.current,V=hi(i,V));var Z=u.getDerivedStateFromProps,te=typeof Z=="function"||typeof k.getSnapshotBeforeUpdate=="function";te||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(w!==c||P!==V)&&kh(i,k,c,V),sr=!1;var X=i.memoizedState;k.state=X,Va(i,c,k,m),P=i.memoizedState,w!==c||X!==P||Ot.current||sr?(typeof Z=="function"&&(dl(i,u,Z,c),P=i.memoizedState),(w=sr||xh(i,u,w,c,X,P,V))?(te||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(i.flags|=4194308)):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=P),k.props=c,k.state=P,k.context=V,c=w):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{k=i.stateNode,Gf(r,i),w=i.memoizedProps,V=i.type===i.elementType?w:cn(i.type,w),k.props=V,te=i.pendingProps,X=k.context,P=u.contextType,typeof P=="object"&&P!==null?P=Zt(P):(P=Dt(u)?Ar:St.current,P=hi(i,P));var he=u.getDerivedStateFromProps;(Z=typeof he=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(w!==te||X!==P)&&kh(i,k,c,P),sr=!1,X=i.memoizedState,k.state=X,Va(i,c,k,m);var Ee=i.memoizedState;w!==te||X!==Ee||Ot.current||sr?(typeof he=="function"&&(dl(i,u,he,c),Ee=i.memoizedState),(V=sr||xh(i,u,V,c,X,Ee,P)||!1)?(Z||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(c,Ee,P),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(c,Ee,P)),typeof k.componentDidUpdate=="function"&&(i.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof k.componentDidUpdate!="function"||w===r.memoizedProps&&X===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&X===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=Ee),k.props=c,k.state=Ee,k.context=P,c=V):(typeof k.componentDidUpdate!="function"||w===r.memoizedProps&&X===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||w===r.memoizedProps&&X===r.memoizedState||(i.flags|=1024),c=!1)}return gl(r,i,u,c,y,m)}function gl(r,i,u,c,m,y){Rh(r,i);var k=(i.flags&128)!==0;if(!c&&!k)return m&&Bf(i,u,!1),Hn(r,i,y);c=i.stateNode,TT.current=i;var w=k&&typeof u.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,r!==null&&k?(i.child=Ei(i,r.child,null,y),i.child=Ei(i,null,w,y)):It(r,i,w,y),i.memoizedState=c.state,m&&Bf(i,u,!0),i.child}function Dh(r){var i=r.stateNode;i.pendingContext?Mf(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Mf(r,i.context,!1),Zo(r,i.containerInfo)}function Ph(r,i,u,c,m){return gi(),Vo(m),i.flags|=256,It(r,i,u,c),i.child}var El={dehydrated:null,treeContext:null,retryLane:0};function Tl(r){return{baseLanes:r,cachePool:null,transitions:null}}function Mh(r,i,u){var c=i.pendingProps,m=Ze.current,y=!1,k=(i.flags&128)!==0,w;if((w=k)||(w=r!==null&&r.memoizedState===null?!1:(m&2)!==0),w?(y=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(m|=1),qe(Ze,m&1),r===null)return Yo(i),r=i.memoizedState,r!==null&&(r=r.dehydrated,r!==null)?((i.mode&1)===0?i.lanes=1:r.data==="$!"?i.lanes=8:i.lanes=1073741824,null):(k=c.children,r=c.fallback,y?(c=i.mode,y=i.child,k={mode:"hidden",children:k},(c&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=k):y=hu(k,c,0,null),r=Fr(r,c,u,null),y.return=i,r.return=i,y.sibling=r,i.child=y,i.child.memoizedState=Tl(u),i.memoizedState=El,r):yl(i,k));if(m=r.memoizedState,m!==null&&(w=m.dehydrated,w!==null))return yT(r,i,k,c,w,m,u);if(y){y=c.fallback,k=i.mode,m=r.child,w=m.sibling;var P={mode:"hidden",children:c.children};return(k&1)===0&&i.child!==m?(c=i.child,c.childLanes=0,c.pendingProps=P,i.deletions=null):(c=fr(m,P),c.subtreeFlags=m.subtreeFlags&14680064),w!==null?y=fr(w,y):(y=Fr(y,k,u,null),y.flags|=2),y.return=i,c.return=i,c.sibling=y,i.child=c,c=y,y=i.child,k=r.child.memoizedState,k=k===null?Tl(u):{baseLanes:k.baseLanes|u,cachePool:null,transitions:k.transitions},y.memoizedState=k,y.childLanes=r.childLanes&~u,i.memoizedState=El,c}return y=r.child,r=y.sibling,c=fr(y,{mode:"visible",children:c.children}),(i.mode&1)===0&&(c.lanes=u),c.return=i,c.sibling=null,r!==null&&(u=i.deletions,u===null?(i.deletions=[r],i.flags|=16):u.push(r)),i.child=c,i.memoizedState=null,c}function yl(r,i){return i=hu({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function eu(r,i,u,c){return c!==null&&Vo(c),Ei(i,r.child,null,u),r=yl(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function yT(r,i,u,c,m,y,k){if(u)return i.flags&256?(i.flags&=-257,c=hl(Error(n(422))),eu(r,i,k,c)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(y=c.fallback,m=i.mode,c=hu({mode:"visible",children:c.children},m,0,null),y=Fr(y,m,k,null),y.flags|=2,c.return=i,y.return=i,c.sibling=y,i.child=c,(i.mode&1)!==0&&Ei(i,r.child,null,k),i.child.memoizedState=Tl(k),i.memoizedState=El,y);if((i.mode&1)===0)return eu(r,i,k,null);if(m.data==="$!"){if(c=m.nextSibling&&m.nextSibling.dataset,c)var w=c.dgst;return c=w,y=Error(n(419)),c=hl(y,c,void 0),eu(r,i,k,c)}if(w=(k&r.childLanes)!==0,Pt||w){if(c=ht,c!==null){switch(k&-k){case 4:m=2;break;case 16:m=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:m=32;break;case 536870912:m=268435456;break;default:m=0}m=(m&(c.suspendedLanes|k))!==0?0:m,m!==0&&m!==y.retryLane&&(y.retryLane=m,Un(r,m),hn(c,r,m,-1))}return Pl(),c=hl(Error(n(421))),eu(r,i,k,c)}return m.data==="$?"?(i.flags|=128,i.child=r.child,i=RT.bind(null,r),m._reactRetry=i,null):(r=y.treeContext,Yt=tr(m.nextSibling),Wt=i,Xe=!0,ln=null,r!==null&&(Xt[Jt++]=Fn,Xt[Jt++]=Bn,Xt[Jt++]=vr,Fn=r.id,Bn=r.overflow,vr=i),i=yl(i,c.children),i.flags|=4096,i)}function Fh(r,i,u){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Ko(r.return,i,u)}function xl(r,i,u,c,m){var y=r.memoizedState;y===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:u,tailMode:m}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=c,y.tail=u,y.tailMode=m)}function Bh(r,i,u){var c=i.pendingProps,m=c.revealOrder,y=c.tail;if(It(r,i,c.children,u),c=Ze.current,(c&2)!==0)c=c&1|2,i.flags|=128;else{if(r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Fh(r,u,i);else if(r.tag===19)Fh(r,u,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}c&=1}if(qe(Ze,c),(i.mode&1)===0)i.memoizedState=null;else switch(m){case"forwards":for(u=i.child,m=null;u!==null;)r=u.alternate,r!==null&&qa(r)===null&&(m=u),u=u.sibling;u=m,u===null?(m=i.child,i.child=null):(m=u.sibling,u.sibling=null),xl(i,!1,m,u,y);break;case"backwards":for(u=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&qa(r)===null){i.child=m;break}r=m.sibling,m.sibling=u,u=m,m=r}xl(i,!0,u,null,y);break;case"together":xl(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function tu(r,i){(i.mode&1)===0&&r!==null&&(r.alternate=null,i.alternate=null,i.flags|=2)}function Hn(r,i,u){if(r!==null&&(i.dependencies=r.dependencies),Or|=i.lanes,(u&i.childLanes)===0)return null;if(r!==null&&i.child!==r.child)throw Error(n(153));if(i.child!==null){for(r=i.child,u=fr(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=fr(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function xT(r,i,u){switch(i.tag){case 3:Dh(i),gi();break;case 5:Jf(i);break;case 1:Dt(i.type)&&Fa(i);break;case 4:Zo(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,m=i.memoizedProps.value;qe($a,c._currentValue),c._currentValue=m;break;case 13:if(c=i.memoizedState,c!==null)return c.dehydrated!==null?(qe(Ze,Ze.current&1),i.flags|=128,null):(u&i.child.childLanes)!==0?Mh(r,i,u):(qe(Ze,Ze.current&1),r=Hn(r,i,u),r!==null?r.sibling:null);qe(Ze,Ze.current&1);break;case 19:if(c=(u&i.childLanes)!==0,(r.flags&128)!==0){if(c)return Bh(r,i,u);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),qe(Ze,Ze.current),c)break;return null;case 22:case 23:return i.lanes=0,Lh(r,i,u)}return Hn(r,i,u)}var Uh,bl,jh,Hh;Uh=function(r,i){for(var u=i.child;u!==null;){if(u.tag===5||u.tag===6)r.appendChild(u.stateNode);else if(u.tag!==4&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===i)break;for(;u.sibling===null;){if(u.return===null||u.return===i)return;u=u.return}u.sibling.return=u.return,u=u.sibling}},bl=function(){},jh=function(r,i,u,c){var m=r.memoizedProps;if(m!==c){r=i.stateNode,Lr(Cn.current);var y=null;switch(u){case"input":m=Ui(r,m),c=Ui(r,c),y=[];break;case"select":m=S({},m,{value:void 0}),c=S({},c,{value:void 0}),y=[];break;case"textarea":m=zi(r,m),c=zi(r,c),y=[];break;default:typeof m.onClick!="function"&&typeof c.onClick=="function"&&(r.onclick=Da)}Tt(u,c);var k;u=null;for(V in m)if(!c.hasOwnProperty(V)&&m.hasOwnProperty(V)&&m[V]!=null)if(V==="style"){var w=m[V];for(k in w)w.hasOwnProperty(k)&&(u||(u={}),u[k]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(a.hasOwnProperty(V)?y||(y=[]):(y=y||[]).push(V,null));for(V in c){var P=c[V];if(w=m!=null?m[V]:void 0,c.hasOwnProperty(V)&&P!==w&&(P!=null||w!=null))if(V==="style")if(w){for(k in w)!w.hasOwnProperty(k)||P&&P.hasOwnProperty(k)||(u||(u={}),u[k]="");for(k in P)P.hasOwnProperty(k)&&w[k]!==P[k]&&(u||(u={}),u[k]=P[k])}else u||(y||(y=[]),y.push(V,u)),u=P;else V==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,w=w?w.__html:void 0,P!=null&&w!==P&&(y=y||[]).push(V,P)):V==="children"?typeof P!="string"&&typeof P!="number"||(y=y||[]).push(V,""+P):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(a.hasOwnProperty(V)?(P!=null&&V==="onScroll"&&Qe("scroll",r),y||w===P||(y=[])):(y=y||[]).push(V,P))}u&&(y=y||[]).push("style",u);var V=y;(i.updateQueue=V)&&(i.flags|=4)}},Hh=function(r,i,u,c){u!==c&&(i.flags|=4)};function ys(r,i){if(!Xe)switch(r.tailMode){case"hidden":i=r.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var c=null;u!==null;)u.alternate!==null&&(c=u),u=u.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Ct(r){var i=r.alternate!==null&&r.alternate.child===r.child,u=0,c=0;if(i)for(var m=r.child;m!==null;)u|=m.lanes|m.childLanes,c|=m.subtreeFlags&14680064,c|=m.flags&14680064,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)u|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=u,i}function bT(r,i,u){var c=i.pendingProps;switch($o(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(i),null;case 1:return Dt(i.type)&&Ma(),Ct(i),null;case 3:return c=i.stateNode,xi(),Ge(Ot),Ge(St),nl(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(Ha(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ln!==null&&(Rl(ln),ln=null))),bl(r,i),Ct(i),null;case 5:el(i);var m=Lr(ps.current);if(u=i.type,r!==null&&i.stateNode!=null)jh(r,i,u,c,m),r.ref!==i.ref&&(i.flags|=512,i.flags|=2097152);else{if(!c){if(i.stateNode===null)throw Error(n(166));return Ct(i),null}if(r=Lr(Cn.current),Ha(i)){c=i.stateNode,u=i.type;var y=i.memoizedProps;switch(c[_n]=i,c[ls]=y,r=(i.mode&1)!==0,u){case"dialog":Qe("cancel",c),Qe("close",c);break;case"iframe":case"object":case"embed":Qe("load",c);break;case"video":case"audio":for(m=0;m<as.length;m++)Qe(as[m],c);break;case"source":Qe("error",c);break;case"img":case"image":case"link":Qe("error",c),Qe("load",c);break;case"details":Qe("toggle",c);break;case"input":ji(c,y),Qe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!y.multiple},Qe("invalid",c);break;case"textarea":ca(c,y),Qe("invalid",c)}Tt(u,y),m=null;for(var k in y)if(y.hasOwnProperty(k)){var w=y[k];k==="children"?typeof w=="string"?c.textContent!==w&&(y.suppressHydrationWarning!==!0&&Oa(c.textContent,w,r),m=["children",w]):typeof w=="number"&&c.textContent!==""+w&&(y.suppressHydrationWarning!==!0&&Oa(c.textContent,w,r),m=["children",""+w]):a.hasOwnProperty(k)&&w!=null&&k==="onScroll"&&Qe("scroll",c)}switch(u){case"input":On(c),la(c,y,!0);break;case"textarea":On(c),fa(c);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(c.onclick=Da)}c=m,i.updateQueue=c,c!==null&&(i.flags|=4)}else{k=m.nodeType===9?m:m.ownerDocument,r==="http://www.w3.org/1999/xhtml"&&(r=Q(u)),r==="http://www.w3.org/1999/xhtml"?u==="script"?(r=k.createElement("div"),r.innerHTML="<script><\/script>",r=r.removeChild(r.firstChild)):typeof c.is=="string"?r=k.createElement(u,{is:c.is}):(r=k.createElement(u),u==="select"&&(k=r,c.multiple?k.multiple=!0:c.size&&(k.size=c.size))):r=k.createElementNS(r,u),r[_n]=i,r[ls]=c,Uh(r,i,!1,!1),i.stateNode=r;e:{switch(k=kn(u,c),u){case"dialog":Qe("cancel",r),Qe("close",r),m=c;break;case"iframe":case"object":case"embed":Qe("load",r),m=c;break;case"video":case"audio":for(m=0;m<as.length;m++)Qe(as[m],r);m=c;break;case"source":Qe("error",r),m=c;break;case"img":case"image":case"link":Qe("error",r),Qe("load",r),m=c;break;case"details":Qe("toggle",r),m=c;break;case"input":ji(r,c),m=Ui(r,c),Qe("invalid",r);break;case"option":m=c;break;case"select":r._wrapperState={wasMultiple:!!c.multiple},m=S({},c,{value:void 0}),Qe("invalid",r);break;case"textarea":ca(r,c),m=zi(r,c),Qe("invalid",r);break;default:m=c}Tt(u,m),w=m;for(y in w)if(w.hasOwnProperty(y)){var P=w[y];y==="style"?Qn(r,P):y==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&Oe(r,P)):y==="children"?typeof P=="string"?(u!=="textarea"||P!=="")&&Be(r,P):typeof P=="number"&&Be(r,""+P):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?P!=null&&y==="onScroll"&&Qe("scroll",r):P!=null&&M(r,y,P,k))}switch(u){case"input":On(r),la(r,c,!1);break;case"textarea":On(r),fa(r);break;case"option":c.value!=null&&r.setAttribute("value",""+Re(c.value));break;case"select":r.multiple=!!c.multiple,y=c.value,y!=null?qn(r,!!c.multiple,y,!1):c.defaultValue!=null&&qn(r,!!c.multiple,c.defaultValue,!0);break;default:typeof m.onClick=="function"&&(r.onclick=Da)}switch(u){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(i.flags|=4)}i.ref!==null&&(i.flags|=512,i.flags|=2097152)}return Ct(i),null;case 6:if(r&&i.stateNode!=null)Hh(r,i,r.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(n(166));if(u=Lr(ps.current),Lr(Cn.current),Ha(i)){if(c=i.stateNode,u=i.memoizedProps,c[_n]=i,(y=c.nodeValue!==u)&&(r=Wt,r!==null))switch(r.tag){case 3:Oa(c.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Oa(c.nodeValue,u,(r.mode&1)!==0)}y&&(i.flags|=4)}else c=(u.nodeType===9?u:u.ownerDocument).createTextNode(c),c[_n]=i,i.stateNode=c}return Ct(i),null;case 13:if(Ge(Ze),c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(Xe&&Yt!==null&&(i.mode&1)!==0&&(i.flags&128)===0)Wf(),gi(),i.flags|=98560,y=!1;else if(y=Ha(i),c!==null&&c.dehydrated!==null){if(r===null){if(!y)throw Error(n(318));if(y=i.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[_n]=i}else gi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ct(i),y=!1}else ln!==null&&(Rl(ln),ln=null),y=!0;if(!y)return i.flags&65536?i:null}return(i.flags&128)!==0?(i.lanes=u,i):(c=c!==null,c!==(r!==null&&r.memoizedState!==null)&&c&&(i.child.flags|=8192,(i.mode&1)!==0&&(r===null||(Ze.current&1)!==0?ct===0&&(ct=3):Pl())),i.updateQueue!==null&&(i.flags|=4),Ct(i),null);case 4:return xi(),bl(r,i),r===null&&us(i.stateNode.containerInfo),Ct(i),null;case 10:return Go(i.type._context),Ct(i),null;case 17:return Dt(i.type)&&Ma(),Ct(i),null;case 19:if(Ge(Ze),y=i.memoizedState,y===null)return Ct(i),null;if(c=(i.flags&128)!==0,k=y.rendering,k===null)if(c)ys(y,!1);else{if(ct!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(k=qa(r),k!==null){for(i.flags|=128,ys(y,!1),c=k.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=u,u=i.child;u!==null;)y=u,r=c,y.flags&=14680066,k=y.alternate,k===null?(y.childLanes=0,y.lanes=r,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=k.childLanes,y.lanes=k.lanes,y.child=k.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=k.memoizedProps,y.memoizedState=k.memoizedState,y.updateQueue=k.updateQueue,y.type=k.type,r=k.dependencies,y.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),u=u.sibling;return qe(Ze,Ze.current&1|2),i.child}r=r.sibling}y.tail!==null&&rt()>_i&&(i.flags|=128,c=!0,ys(y,!1),i.lanes=4194304)}else{if(!c)if(r=qa(k),r!==null){if(i.flags|=128,c=!0,u=r.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),ys(y,!0),y.tail===null&&y.tailMode==="hidden"&&!k.alternate&&!Xe)return Ct(i),null}else 2*rt()-y.renderingStartTime>_i&&u!==1073741824&&(i.flags|=128,c=!0,ys(y,!1),i.lanes=4194304);y.isBackwards?(k.sibling=i.child,i.child=k):(u=y.last,u!==null?u.sibling=k:i.child=k,y.last=k)}return y.tail!==null?(i=y.tail,y.rendering=i,y.tail=i.sibling,y.renderingStartTime=rt(),i.sibling=null,u=Ze.current,qe(Ze,c?u&1|2:u&1),i):(Ct(i),null);case 22:case 23:return Dl(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Vt&1073741824)!==0&&(Ct(i),i.subtreeFlags&6&&(i.flags|=8192)):Ct(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function kT(r,i){switch($o(i),i.tag){case 1:return Dt(i.type)&&Ma(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return xi(),Ge(Ot),Ge(St),nl(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return el(i),null;case 13:if(Ge(Ze),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));gi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ge(Ze),null;case 4:return xi(),null;case 10:return Go(i.type._context),null;case 22:case 23:return Dl(),null;case 24:return null;default:return null}}var nu=!1,Nt=!1,ST=typeof WeakSet=="function"?WeakSet:Set,me=null;function ki(r,i){var u=r.ref;if(u!==null)if(typeof u=="function")try{u(null)}catch(c){tt(r,i,c)}else u.current=null}function kl(r,i,u){try{u()}catch(c){tt(r,i,c)}}var zh=!1;function _T(r,i){if(Do=ka,r=xf(),No(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var c=u.getSelection&&u.getSelection();if(c&&c.rangeCount!==0){u=c.anchorNode;var m=c.anchorOffset,y=c.focusNode;c=c.focusOffset;try{u.nodeType,y.nodeType}catch{u=null;break e}var k=0,w=-1,P=-1,V=0,Z=0,te=r,X=null;t:for(;;){for(var he;te!==u||m!==0&&te.nodeType!==3||(w=k+m),te!==y||c!==0&&te.nodeType!==3||(P=k+c),te.nodeType===3&&(k+=te.nodeValue.length),(he=te.firstChild)!==null;)X=te,te=he;for(;;){if(te===r)break t;if(X===u&&++V===m&&(w=k),X===y&&++Z===c&&(P=k),(he=te.nextSibling)!==null)break;te=X,X=te.parentNode}te=he}u=w===-1||P===-1?null:{start:w,end:P}}else u=null}u=u||{start:0,end:0}}else u=null;for(Po={focusedElem:r,selectionRange:u},ka=!1,me=i;me!==null;)if(i=me,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,me=r;else for(;me!==null;){i=me;try{var Ee=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(Ee!==null){var Te=Ee.memoizedProps,it=Ee.memoizedState,j=i.stateNode,F=j.getSnapshotBeforeUpdate(i.elementType===i.type?Te:cn(i.type,Te),it);j.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var W=i.stateNode.containerInfo;W.nodeType===1?W.textContent="":W.nodeType===9&&W.documentElement&&W.removeChild(W.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ae){tt(i,i.return,ae)}if(r=i.sibling,r!==null){r.return=i.return,me=r;break}me=i.return}return Ee=zh,zh=!1,Ee}function xs(r,i,u){var c=i.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&r)===r){var y=m.destroy;m.destroy=void 0,y!==void 0&&kl(i,u,y)}m=m.next}while(m!==c)}}function ru(r,i){if(i=i.updateQueue,i=i!==null?i.lastEffect:null,i!==null){var u=i=i.next;do{if((u.tag&r)===r){var c=u.create;u.destroy=c()}u=u.next}while(u!==i)}}function Sl(r){var i=r.ref;if(i!==null){var u=r.stateNode;switch(r.tag){case 5:r=u;break;default:r=u}typeof i=="function"?i(r):i.current=r}}function $h(r){var i=r.alternate;i!==null&&(r.alternate=null,$h(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[_n],delete i[ls],delete i[Uo],delete i[aT],delete i[uT])),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 Wh(r){return r.tag===5||r.tag===3||r.tag===4}function Yh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Wh(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 _l(r,i,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?u.nodeType===8?u.parentNode.insertBefore(r,i):u.insertBefore(r,i):(u.nodeType===8?(i=u.parentNode,i.insertBefore(r,u)):(i=u,i.appendChild(r)),u=u._reactRootContainer,u!=null||i.onclick!==null||(i.onclick=Da));else if(c!==4&&(r=r.child,r!==null))for(_l(r,i,u),r=r.sibling;r!==null;)_l(r,i,u),r=r.sibling}function Cl(r,i,u){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?u.insertBefore(r,i):u.appendChild(r);else if(c!==4&&(r=r.child,r!==null))for(Cl(r,i,u),r=r.sibling;r!==null;)Cl(r,i,u),r=r.sibling}var yt=null,dn=!1;function ur(r,i,u){for(u=u.child;u!==null;)Vh(r,i,u),u=u.sibling}function Vh(r,i,u){if(Sn&&typeof Sn.onCommitFiberUnmount=="function")try{Sn.onCommitFiberUnmount(ga,u)}catch{}switch(u.tag){case 5:Nt||ki(u,i);case 6:var c=yt,m=dn;yt=null,ur(r,i,u),yt=c,dn=m,yt!==null&&(dn?(r=yt,u=u.stateNode,r.nodeType===8?r.parentNode.removeChild(u):r.removeChild(u)):yt.removeChild(u.stateNode));break;case 18:yt!==null&&(dn?(r=yt,u=u.stateNode,r.nodeType===8?Bo(r.parentNode,u):r.nodeType===1&&Bo(r,u),Ji(r)):Bo(yt,u.stateNode));break;case 4:c=yt,m=dn,yt=u.stateNode.containerInfo,dn=!0,ur(r,i,u),yt=c,dn=m;break;case 0:case 11:case 14:case 15:if(!Nt&&(c=u.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){m=c=c.next;do{var y=m,k=y.destroy;y=y.tag,k!==void 0&&((y&2)!==0||(y&4)!==0)&&kl(u,i,k),m=m.next}while(m!==c)}ur(r,i,u);break;case 1:if(!Nt&&(ki(u,i),c=u.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=u.memoizedProps,c.state=u.memoizedState,c.componentWillUnmount()}catch(w){tt(u,i,w)}ur(r,i,u);break;case 21:ur(r,i,u);break;case 22:u.mode&1?(Nt=(c=Nt)||u.memoizedState!==null,ur(r,i,u),Nt=c):ur(r,i,u);break;default:ur(r,i,u)}}function qh(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new ST),i.forEach(function(c){var m=OT.bind(null,r,c);u.has(c)||(u.add(c),c.then(m,m))})}}function fn(r,i){var u=i.deletions;if(u!==null)for(var c=0;c<u.length;c++){var m=u[c];try{var y=r,k=i,w=k;e:for(;w!==null;){switch(w.tag){case 5:yt=w.stateNode,dn=!1;break e;case 3:yt=w.stateNode.containerInfo,dn=!0;break e;case 4:yt=w.stateNode.containerInfo,dn=!0;break e}w=w.return}if(yt===null)throw Error(n(160));Vh(y,k,m),yt=null,dn=!1;var P=m.alternate;P!==null&&(P.return=null),m.return=null}catch(V){tt(m,i,V)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Qh(i,r),i=i.sibling}function Qh(r,i){var u=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(fn(i,r),An(r),c&4){try{xs(3,r,r.return),ru(3,r)}catch(Te){tt(r,r.return,Te)}try{xs(5,r,r.return)}catch(Te){tt(r,r.return,Te)}}break;case 1:fn(i,r),An(r),c&512&&u!==null&&ki(u,u.return);break;case 5:if(fn(i,r),An(r),c&512&&u!==null&&ki(u,u.return),r.flags&32){var m=r.stateNode;try{Be(m,"")}catch(Te){tt(r,r.return,Te)}}if(c&4&&(m=r.stateNode,m!=null)){var y=r.memoizedProps,k=u!==null?u.memoizedProps:y,w=r.type,P=r.updateQueue;if(r.updateQueue=null,P!==null)try{w==="input"&&y.type==="radio"&&y.name!=null&&Hi(m,y),kn(w,k);var V=kn(w,y);for(k=0;k<P.length;k+=2){var Z=P[k],te=P[k+1];Z==="style"?Qn(m,te):Z==="dangerouslySetInnerHTML"?Oe(m,te):Z==="children"?Be(m,te):M(m,Z,te,V)}switch(w){case"input":ei(m,y);break;case"textarea":da(m,y);break;case"select":var X=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!y.multiple;var he=y.value;he!=null?qn(m,!!y.multiple,he,!1):X!==!!y.multiple&&(y.defaultValue!=null?qn(m,!!y.multiple,y.defaultValue,!0):qn(m,!!y.multiple,y.multiple?[]:"",!1))}m[ls]=y}catch(Te){tt(r,r.return,Te)}}break;case 6:if(fn(i,r),An(r),c&4){if(r.stateNode===null)throw Error(n(162));m=r.stateNode,y=r.memoizedProps;try{m.nodeValue=y}catch(Te){tt(r,r.return,Te)}}break;case 3:if(fn(i,r),An(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{Ji(i.containerInfo)}catch(Te){tt(r,r.return,Te)}break;case 4:fn(i,r),An(r);break;case 13:fn(i,r),An(r),m=r.child,m.flags&8192&&(y=m.memoizedState!==null,m.stateNode.isHidden=y,!y||m.alternate!==null&&m.alternate.memoizedState!==null||(vl=rt())),c&4&&qh(r);break;case 22:if(Z=u!==null&&u.memoizedState!==null,r.mode&1?(Nt=(V=Nt)||Z,fn(i,r),Nt=V):fn(i,r),An(r),c&8192){if(V=r.memoizedState!==null,(r.stateNode.isHidden=V)&&!Z&&(r.mode&1)!==0)for(me=r,Z=r.child;Z!==null;){for(te=me=Z;me!==null;){switch(X=me,he=X.child,X.tag){case 0:case 11:case 14:case 15:xs(4,X,X.return);break;case 1:ki(X,X.return);var Ee=X.stateNode;if(typeof Ee.componentWillUnmount=="function"){c=X,u=X.return;try{i=c,Ee.props=i.memoizedProps,Ee.state=i.memoizedState,Ee.componentWillUnmount()}catch(Te){tt(c,u,Te)}}break;case 5:ki(X,X.return);break;case 22:if(X.memoizedState!==null){Xh(te);continue}}he!==null?(he.return=X,me=he):Xh(te)}Z=Z.sibling}e:for(Z=null,te=r;;){if(te.tag===5){if(Z===null){Z=te;try{m=te.stateNode,V?(y=m.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(w=te.stateNode,P=te.memoizedProps.style,k=P!=null&&P.hasOwnProperty("display")?P.display:null,w.style.display=Kt("display",k))}catch(Te){tt(r,r.return,Te)}}}else if(te.tag===6){if(Z===null)try{te.stateNode.nodeValue=V?"":te.memoizedProps}catch(Te){tt(r,r.return,Te)}}else if((te.tag!==22&&te.tag!==23||te.memoizedState===null||te===r)&&te.child!==null){te.child.return=te,te=te.child;continue}if(te===r)break e;for(;te.sibling===null;){if(te.return===null||te.return===r)break e;Z===te&&(Z=null),te=te.return}Z===te&&(Z=null),te.sibling.return=te.return,te=te.sibling}}break;case 19:fn(i,r),An(r),c&4&&qh(r);break;case 21:break;default:fn(i,r),An(r)}}function An(r){var i=r.flags;if(i&2){try{e:{for(var u=r.return;u!==null;){if(Wh(u)){var c=u;break e}u=u.return}throw Error(n(160))}switch(c.tag){case 5:var m=c.stateNode;c.flags&32&&(Be(m,""),c.flags&=-33);var y=Yh(r);Cl(r,y,m);break;case 3:case 4:var k=c.stateNode.containerInfo,w=Yh(r);_l(r,w,k);break;default:throw Error(n(161))}}catch(P){tt(r,r.return,P)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function CT(r,i,u){me=r,Gh(r)}function Gh(r,i,u){for(var c=(r.mode&1)!==0;me!==null;){var m=me,y=m.child;if(m.tag===22&&c){var k=m.memoizedState!==null||nu;if(!k){var w=m.alternate,P=w!==null&&w.memoizedState!==null||Nt;w=nu;var V=Nt;if(nu=k,(Nt=P)&&!V)for(me=m;me!==null;)k=me,P=k.child,k.tag===22&&k.memoizedState!==null?Jh(m):P!==null?(P.return=k,me=P):Jh(m);for(;y!==null;)me=y,Gh(y),y=y.sibling;me=m,nu=w,Nt=V}Kh(r)}else(m.subtreeFlags&8772)!==0&&y!==null?(y.return=m,me=y):Kh(r)}}function Kh(r){for(;me!==null;){var i=me;if((i.flags&8772)!==0){var u=i.alternate;try{if((i.flags&8772)!==0)switch(i.tag){case 0:case 11:case 15:Nt||ru(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!Nt)if(u===null)c.componentDidMount();else{var m=i.elementType===i.type?u.memoizedProps:cn(i.type,u.memoizedProps);c.componentDidUpdate(m,u.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var y=i.updateQueue;y!==null&&Xf(i,y,c);break;case 3:var k=i.updateQueue;if(k!==null){if(u=null,i.child!==null)switch(i.child.tag){case 5:u=i.child.stateNode;break;case 1:u=i.child.stateNode}Xf(i,k,u)}break;case 5:var w=i.stateNode;if(u===null&&i.flags&4){u=w;var P=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&u.focus();break;case"img":P.src&&(u.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var V=i.alternate;if(V!==null){var Z=V.memoizedState;if(Z!==null){var te=Z.dehydrated;te!==null&&Ji(te)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Nt||i.flags&512&&Sl(i)}catch(X){tt(i,i.return,X)}}if(i===r){me=null;break}if(u=i.sibling,u!==null){u.return=i.return,me=u;break}me=i.return}}function Xh(r){for(;me!==null;){var i=me;if(i===r){me=null;break}var u=i.sibling;if(u!==null){u.return=i.return,me=u;break}me=i.return}}function Jh(r){for(;me!==null;){var i=me;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{ru(4,i)}catch(P){tt(i,u,P)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var m=i.return;try{c.componentDidMount()}catch(P){tt(i,m,P)}}var y=i.return;try{Sl(i)}catch(P){tt(i,y,P)}break;case 5:var k=i.return;try{Sl(i)}catch(P){tt(i,k,P)}}}catch(P){tt(i,i.return,P)}if(i===r){me=null;break}var w=i.sibling;if(w!==null){w.return=i.return,me=w;break}me=i.return}}var NT=Math.ceil,iu=se.ReactCurrentDispatcher,Nl=se.ReactCurrentOwner,tn=se.ReactCurrentBatchConfig,Ue=0,ht=null,ut=null,xt=0,Vt=0,Si=nr(0),ct=0,bs=null,Or=0,su=0,Al=0,ks=null,Mt=null,vl=0,_i=1/0,zn=null,au=!1,wl=null,or=null,uu=!1,lr=null,ou=0,Ss=0,Il=null,lu=-1,cu=0;function Lt(){return(Ue&6)!==0?rt():lu!==-1?lu:lu=rt()}function cr(r){return(r.mode&1)===0?1:(Ue&2)!==0&&xt!==0?xt&-xt:lT.transition!==null?(cu===0&&(cu=Wd()),cu):(r=We,r!==0||(r=window.event,r=r===void 0?16:Zd(r.type)),r)}function hn(r,i,u,c){if(50<Ss)throw Ss=0,Il=null,Error(n(185));qi(r,u,c),((Ue&2)===0||r!==ht)&&(r===ht&&((Ue&2)===0&&(su|=u),ct===4&&dr(r,xt)),Ft(r,c),u===1&&Ue===0&&(i.mode&1)===0&&(_i=rt()+500,Ba&&ir()))}function Ft(r,i){var u=r.callbackNode;lE(r,i);var c=ya(r,r===ht?xt:0);if(c===0)u!==null&&Hd(u),r.callbackNode=null,r.callbackPriority=0;else if(i=c&-c,r.callbackPriority!==i){if(u!=null&&Hd(u),i===1)r.tag===0?oT(ep.bind(null,r)):Uf(ep.bind(null,r)),iT(function(){(Ue&6)===0&&ir()}),u=null;else{switch(Yd(c)){case 1:u=oo;break;case 4:u=zd;break;case 16:u=ma;break;case 536870912:u=$d;break;default:u=ma}u=op(u,Zh.bind(null,r))}r.callbackPriority=i,r.callbackNode=u}}function Zh(r,i){if(lu=-1,cu=0,(Ue&6)!==0)throw Error(n(327));var u=r.callbackNode;if(Ci()&&r.callbackNode!==u)return null;var c=ya(r,r===ht?xt:0);if(c===0)return null;if((c&30)!==0||(c&r.expiredLanes)!==0||i)i=du(r,c);else{i=c;var m=Ue;Ue|=2;var y=np();(ht!==r||xt!==i)&&(zn=null,_i=rt()+500,Pr(r,i));do try{wT();break}catch(w){tp(r,w)}while(!0);Qo(),iu.current=y,Ue=m,ut!==null?i=0:(ht=null,xt=0,i=ct)}if(i!==0){if(i===2&&(m=lo(r),m!==0&&(c=m,i=Ll(r,m))),i===1)throw u=bs,Pr(r,0),dr(r,c),Ft(r,rt()),u;if(i===6)dr(r,c);else{if(m=r.current.alternate,(c&30)===0&&!AT(m)&&(i=du(r,c),i===2&&(y=lo(r),y!==0&&(c=y,i=Ll(r,y))),i===1))throw u=bs,Pr(r,0),dr(r,c),Ft(r,rt()),u;switch(r.finishedWork=m,r.finishedLanes=c,i){case 0:case 1:throw Error(n(345));case 2:Mr(r,Mt,zn);break;case 3:if(dr(r,c),(c&130023424)===c&&(i=vl+500-rt(),10<i)){if(ya(r,0)!==0)break;if(m=r.suspendedLanes,(m&c)!==c){Lt(),r.pingedLanes|=r.suspendedLanes&m;break}r.timeoutHandle=Fo(Mr.bind(null,r,Mt,zn),i);break}Mr(r,Mt,zn);break;case 4:if(dr(r,c),(c&4194240)===c)break;for(i=r.eventTimes,m=-1;0<c;){var k=31-un(c);y=1<<k,k=i[k],k>m&&(m=k),c&=~y}if(c=m,c=rt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*NT(c/1960))-c,10<c){r.timeoutHandle=Fo(Mr.bind(null,r,Mt,zn),c);break}Mr(r,Mt,zn);break;case 5:Mr(r,Mt,zn);break;default:throw Error(n(329))}}}return Ft(r,rt()),r.callbackNode===u?Zh.bind(null,r):null}function Ll(r,i){var u=ks;return r.current.memoizedState.isDehydrated&&(Pr(r,i).flags|=256),r=du(r,i),r!==2&&(i=Mt,Mt=u,i!==null&&Rl(i)),r}function Rl(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function AT(r){for(var i=r;;){if(i.flags&16384){var u=i.updateQueue;if(u!==null&&(u=u.stores,u!==null))for(var c=0;c<u.length;c++){var m=u[c],y=m.getSnapshot;m=m.value;try{if(!on(y(),m))return!1}catch{return!1}}}if(u=i.child,i.subtreeFlags&16384&&u!==null)u.return=i,i=u;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function dr(r,i){for(i&=~Al,i&=~su,r.suspendedLanes|=i,r.pingedLanes&=~i,r=r.expirationTimes;0<i;){var u=31-un(i),c=1<<u;r[u]=-1,i&=~c}}function ep(r){if((Ue&6)!==0)throw Error(n(327));Ci();var i=ya(r,0);if((i&1)===0)return Ft(r,rt()),null;var u=du(r,i);if(r.tag!==0&&u===2){var c=lo(r);c!==0&&(i=c,u=Ll(r,c))}if(u===1)throw u=bs,Pr(r,0),dr(r,i),Ft(r,rt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Mr(r,Mt,zn),Ft(r,rt()),null}function Ol(r,i){var u=Ue;Ue|=1;try{return r(i)}finally{Ue=u,Ue===0&&(_i=rt()+500,Ba&&ir())}}function Dr(r){lr!==null&&lr.tag===0&&(Ue&6)===0&&Ci();var i=Ue;Ue|=1;var u=tn.transition,c=We;try{if(tn.transition=null,We=1,r)return r()}finally{We=c,tn.transition=u,Ue=i,(Ue&6)===0&&ir()}}function Dl(){Vt=Si.current,Ge(Si)}function Pr(r,i){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,rT(u)),ut!==null)for(u=ut.return;u!==null;){var c=u;switch($o(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Ma();break;case 3:xi(),Ge(Ot),Ge(St),nl();break;case 5:el(c);break;case 4:xi();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:Go(c.type._context);break;case 22:case 23:Dl()}u=u.return}if(ht=r,ut=r=fr(r.current,null),xt=Vt=i,ct=0,bs=null,Al=su=Or=0,Mt=ks=null,Ir!==null){for(i=0;i<Ir.length;i++)if(u=Ir[i],c=u.interleaved,c!==null){u.interleaved=null;var m=c.next,y=u.pending;if(y!==null){var k=y.next;y.next=m,c.next=k}u.pending=c}Ir=null}return r}function tp(r,i){do{var u=ut;try{if(Qo(),Qa.current=Ja,Ga){for(var c=et.memoizedState;c!==null;){var m=c.queue;m!==null&&(m.pending=null),c=c.next}Ga=!1}if(Rr=0,ft=lt=et=null,ms=!1,gs=0,Nl.current=null,u===null||u.return===null){ct=1,bs=i,ut=null;break}e:{var y=r,k=u.return,w=u,P=i;if(i=xt,w.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var V=P,Z=w,te=Z.tag;if((Z.mode&1)===0&&(te===0||te===11||te===15)){var X=Z.alternate;X?(Z.updateQueue=X.updateQueue,Z.memoizedState=X.memoizedState,Z.lanes=X.lanes):(Z.updateQueue=null,Z.memoizedState=null)}var he=Nh(k);if(he!==null){he.flags&=-257,Ah(he,k,w,y,i),he.mode&1&&Ch(y,V,i),i=he,P=V;var Ee=i.updateQueue;if(Ee===null){var Te=new Set;Te.add(P),i.updateQueue=Te}else Ee.add(P);break e}else{if((i&1)===0){Ch(y,V,i),Pl();break e}P=Error(n(426))}}else if(Xe&&w.mode&1){var it=Nh(k);if(it!==null){(it.flags&65536)===0&&(it.flags|=256),Ah(it,k,w,y,i),Vo(bi(P,w));break e}}y=P=bi(P,w),ct!==4&&(ct=2),ks===null?ks=[y]:ks.push(y),y=k;do{switch(y.tag){case 3:y.flags|=65536,i&=-i,y.lanes|=i;var j=Sh(y,P,i);Kf(y,j);break e;case 1:w=P;var F=y.type,W=y.stateNode;if((y.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||W!==null&&typeof W.componentDidCatch=="function"&&(or===null||!or.has(W)))){y.flags|=65536,i&=-i,y.lanes|=i;var ae=_h(y,w,i);Kf(y,ae);break e}}y=y.return}while(y!==null)}ip(u)}catch(ye){i=ye,ut===u&&u!==null&&(ut=u=u.return);continue}break}while(!0)}function np(){var r=iu.current;return iu.current=Ja,r===null?Ja:r}function Pl(){(ct===0||ct===3||ct===2)&&(ct=4),ht===null||(Or&268435455)===0&&(su&268435455)===0||dr(ht,xt)}function du(r,i){var u=Ue;Ue|=2;var c=np();(ht!==r||xt!==i)&&(zn=null,Pr(r,i));do try{vT();break}catch(m){tp(r,m)}while(!0);if(Qo(),Ue=u,iu.current=c,ut!==null)throw Error(n(261));return ht=null,xt=0,ct}function vT(){for(;ut!==null;)rp(ut)}function wT(){for(;ut!==null&&!eE();)rp(ut)}function rp(r){var i=up(r.alternate,r,Vt);r.memoizedProps=r.pendingProps,i===null?ip(r):ut=i,Nl.current=null}function ip(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=bT(u,i,Vt),u!==null){ut=u;return}}else{if(u=kT(u,i),u!==null){u.flags&=32767,ut=u;return}if(r!==null)r.flags|=32768,r.subtreeFlags=0,r.deletions=null;else{ct=6,ut=null;return}}if(i=i.sibling,i!==null){ut=i;return}ut=i=r}while(i!==null);ct===0&&(ct=5)}function Mr(r,i,u){var c=We,m=tn.transition;try{tn.transition=null,We=1,IT(r,i,u,c)}finally{tn.transition=m,We=c}return null}function IT(r,i,u,c){do Ci();while(lr!==null);if((Ue&6)!==0)throw Error(n(327));u=r.finishedWork;var m=r.finishedLanes;if(u===null)return null;if(r.finishedWork=null,r.finishedLanes=0,u===r.current)throw Error(n(177));r.callbackNode=null,r.callbackPriority=0;var y=u.lanes|u.childLanes;if(cE(r,y),r===ht&&(ut=ht=null,xt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||uu||(uu=!0,op(ma,function(){return Ci(),null})),y=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||y){y=tn.transition,tn.transition=null;var k=We;We=1;var w=Ue;Ue|=4,Nl.current=null,_T(r,u),Qh(u,r),KE(Po),ka=!!Do,Po=Do=null,r.current=u,CT(u),tE(),Ue=w,We=k,tn.transition=y}else r.current=u;if(uu&&(uu=!1,lr=r,ou=m),y=r.pendingLanes,y===0&&(or=null),iE(u.stateNode),Ft(r,rt()),i!==null)for(c=r.onRecoverableError,u=0;u<i.length;u++)m=i[u],c(m.value,{componentStack:m.stack,digest:m.digest});if(au)throw au=!1,r=wl,wl=null,r;return(ou&1)!==0&&r.tag!==0&&Ci(),y=r.pendingLanes,(y&1)!==0?r===Il?Ss++:(Ss=0,Il=r):Ss=0,ir(),null}function Ci(){if(lr!==null){var r=Yd(ou),i=tn.transition,u=We;try{if(tn.transition=null,We=16>r?16:r,lr===null)var c=!1;else{if(r=lr,lr=null,ou=0,(Ue&6)!==0)throw Error(n(331));var m=Ue;for(Ue|=4,me=r.current;me!==null;){var y=me,k=y.child;if((me.flags&16)!==0){var w=y.deletions;if(w!==null){for(var P=0;P<w.length;P++){var V=w[P];for(me=V;me!==null;){var Z=me;switch(Z.tag){case 0:case 11:case 15:xs(8,Z,y)}var te=Z.child;if(te!==null)te.return=Z,me=te;else for(;me!==null;){Z=me;var X=Z.sibling,he=Z.return;if($h(Z),Z===V){me=null;break}if(X!==null){X.return=he,me=X;break}me=he}}}var Ee=y.alternate;if(Ee!==null){var Te=Ee.child;if(Te!==null){Ee.child=null;do{var it=Te.sibling;Te.sibling=null,Te=it}while(Te!==null)}}me=y}}if((y.subtreeFlags&2064)!==0&&k!==null)k.return=y,me=k;else e:for(;me!==null;){if(y=me,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:xs(9,y,y.return)}var j=y.sibling;if(j!==null){j.return=y.return,me=j;break e}me=y.return}}var F=r.current;for(me=F;me!==null;){k=me;var W=k.child;if((k.subtreeFlags&2064)!==0&&W!==null)W.return=k,me=W;else e:for(k=F;me!==null;){if(w=me,(w.flags&2048)!==0)try{switch(w.tag){case 0:case 11:case 15:ru(9,w)}}catch(ye){tt(w,w.return,ye)}if(w===k){me=null;break e}var ae=w.sibling;if(ae!==null){ae.return=w.return,me=ae;break e}me=w.return}}if(Ue=m,ir(),Sn&&typeof Sn.onPostCommitFiberRoot=="function")try{Sn.onPostCommitFiberRoot(ga,r)}catch{}c=!0}return c}finally{We=u,tn.transition=i}}return!1}function sp(r,i,u){i=bi(u,i),i=Sh(r,i,1),r=ar(r,i,1),i=Lt(),r!==null&&(qi(r,1,i),Ft(r,i))}function tt(r,i,u){if(r.tag===3)sp(r,r,u);else for(;i!==null;){if(i.tag===3){sp(i,r,u);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(or===null||!or.has(c))){r=bi(u,r),r=_h(i,r,1),i=ar(i,r,1),r=Lt(),i!==null&&(qi(i,1,r),Ft(i,r));break}}i=i.return}}function LT(r,i,u){var c=r.pingCache;c!==null&&c.delete(i),i=Lt(),r.pingedLanes|=r.suspendedLanes&u,ht===r&&(xt&u)===u&&(ct===4||ct===3&&(xt&130023424)===xt&&500>rt()-vl?Pr(r,0):Al|=u),Ft(r,i)}function ap(r,i){i===0&&((r.mode&1)===0?i=1:(i=Ta,Ta<<=1,(Ta&130023424)===0&&(Ta=4194304)));var u=Lt();r=Un(r,i),r!==null&&(qi(r,i,u),Ft(r,u))}function RT(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),ap(r,u)}function OT(r,i){var u=0;switch(r.tag){case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(u=m.retryLane);break;case 19:c=r.stateNode;break;default:throw Error(n(314))}c!==null&&c.delete(i),ap(r,u)}var up;up=function(r,i,u){if(r!==null)if(r.memoizedProps!==i.pendingProps||Ot.current)Pt=!0;else{if((r.lanes&u)===0&&(i.flags&128)===0)return Pt=!1,xT(r,i,u);Pt=(r.flags&131072)!==0}else Pt=!1,Xe&&(i.flags&1048576)!==0&&jf(i,ja,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;tu(r,i),r=i.pendingProps;var m=hi(i,St.current);yi(i,u),m=sl(null,i,c,r,m,u);var y=al();return i.flags|=1,typeof m=="object"&&m!==null&&typeof m.render=="function"&&m.$$typeof===void 0?(i.tag=1,i.memoizedState=null,i.updateQueue=null,Dt(c)?(y=!0,Fa(i)):y=!1,i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Jo(i),m.updater=Za,i.stateNode=m,m._reactInternals=i,fl(i,c,r,u),i=gl(null,i,c,!0,y,u)):(i.tag=0,Xe&&y&&zo(i),It(null,i,m,u),i=i.child),i;case 16:c=i.elementType;e:{switch(tu(r,i),r=i.pendingProps,m=c._init,c=m(c._payload),i.type=c,m=i.tag=PT(c),r=cn(c,r),m){case 0:i=ml(null,i,c,r,u);break e;case 1:i=Oh(null,i,c,r,u);break e;case 11:i=vh(null,i,c,r,u);break e;case 14:i=wh(null,i,c,cn(c.type,r),u);break e}throw Error(n(306,c,""))}return i;case 0:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),ml(r,i,c,m,u);case 1:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),Oh(r,i,c,m,u);case 3:e:{if(Dh(i),r===null)throw Error(n(387));c=i.pendingProps,y=i.memoizedState,m=y.element,Gf(r,i),Va(i,c,null,u);var k=i.memoizedState;if(c=k.element,y.isDehydrated)if(y={element:c,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){m=bi(Error(n(423)),i),i=Ph(r,i,c,u,m);break e}else if(c!==m){m=bi(Error(n(424)),i),i=Ph(r,i,c,u,m);break e}else for(Yt=tr(i.stateNode.containerInfo.firstChild),Wt=i,Xe=!0,ln=null,u=qf(i,null,c,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(gi(),c===m){i=Hn(r,i,u);break e}It(r,i,c,u)}i=i.child}return i;case 5:return Jf(i),r===null&&Yo(i),c=i.type,m=i.pendingProps,y=r!==null?r.memoizedProps:null,k=m.children,Mo(c,m)?k=null:y!==null&&Mo(c,y)&&(i.flags|=32),Rh(r,i),It(r,i,k,u),i.child;case 6:return r===null&&Yo(i),null;case 13:return Mh(r,i,u);case 4:return Zo(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=Ei(i,null,c,u):It(r,i,c,u),i.child;case 11:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),vh(r,i,c,m,u);case 7:return It(r,i,i.pendingProps,u),i.child;case 8:return It(r,i,i.pendingProps.children,u),i.child;case 12:return It(r,i,i.pendingProps.children,u),i.child;case 10:e:{if(c=i.type._context,m=i.pendingProps,y=i.memoizedProps,k=m.value,qe($a,c._currentValue),c._currentValue=k,y!==null)if(on(y.value,k)){if(y.children===m.children&&!Ot.current){i=Hn(r,i,u);break e}}else for(y=i.child,y!==null&&(y.return=i);y!==null;){var w=y.dependencies;if(w!==null){k=y.child;for(var P=w.firstContext;P!==null;){if(P.context===c){if(y.tag===1){P=jn(-1,u&-u),P.tag=2;var V=y.updateQueue;if(V!==null){V=V.shared;var Z=V.pending;Z===null?P.next=P:(P.next=Z.next,Z.next=P),V.pending=P}}y.lanes|=u,P=y.alternate,P!==null&&(P.lanes|=u),Ko(y.return,u,i),w.lanes|=u;break}P=P.next}}else if(y.tag===10)k=y.type===i.type?null:y.child;else if(y.tag===18){if(k=y.return,k===null)throw Error(n(341));k.lanes|=u,w=k.alternate,w!==null&&(w.lanes|=u),Ko(k,u,i),k=y.sibling}else k=y.child;if(k!==null)k.return=y;else for(k=y;k!==null;){if(k===i){k=null;break}if(y=k.sibling,y!==null){y.return=k.return,k=y;break}k=k.return}y=k}It(r,i,m.children,u),i=i.child}return i;case 9:return m=i.type,c=i.pendingProps.children,yi(i,u),m=Zt(m),c=c(m),i.flags|=1,It(r,i,c,u),i.child;case 14:return c=i.type,m=cn(c,i.pendingProps),m=cn(c.type,m),wh(r,i,c,m,u);case 15:return Ih(r,i,i.type,i.pendingProps,u);case 17:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),tu(r,i),i.tag=1,Dt(c)?(r=!0,Fa(i)):r=!1,yi(i,u),bh(i,c,m),fl(i,c,m,u),gl(null,i,c,!0,r,u);case 19:return Bh(r,i,u);case 22:return Lh(r,i,u)}throw Error(n(156,i.tag))};function op(r,i){return jd(r,i)}function DT(r,i,u,c){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(r,i,u,c){return new DT(r,i,u,c)}function Ml(r){return r=r.prototype,!(!r||!r.isReactComponent)}function PT(r){if(typeof r=="function")return Ml(r)?1:0;if(r!=null){if(r=r.$$typeof,r===ce)return 11;if(r===Y)return 14}return 2}function fr(r,i){var u=r.alternate;return u===null?(u=nn(r.tag,i,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=i,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&14680064,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,i=r.dependencies,u.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u}function fu(r,i,u,c,m,y){var k=2;if(c=r,typeof r=="function")Ml(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case ee:return Fr(u.children,m,y,i);case ue:k=8,m|=8;break;case fe:return r=nn(12,u,i,m|2),r.elementType=fe,r.lanes=y,r;case ke:return r=nn(13,u,i,m),r.elementType=ke,r.lanes=y,r;case de:return r=nn(19,u,i,m),r.elementType=de,r.lanes=y,r;case pe:return hu(u,m,y,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case U:k=10;break e;case re:k=9;break e;case ce:k=11;break e;case Y:k=14;break e;case ge:k=16,c=null;break e}throw Error(n(130,r==null?r:typeof r,""))}return i=nn(k,u,i,m),i.elementType=r,i.type=c,i.lanes=y,i}function Fr(r,i,u,c){return r=nn(7,r,c,i),r.lanes=u,r}function hu(r,i,u,c){return r=nn(22,r,c,i),r.elementType=pe,r.lanes=u,r.stateNode={isHidden:!1},r}function Fl(r,i,u){return r=nn(6,r,null,i),r.lanes=u,r}function Bl(r,i,u){return i=nn(4,r.children!==null?r.children:[],r.key,i),i.lanes=u,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}function MT(r,i,u,c,m){this.tag=i,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=co(0),this.expirationTimes=co(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=co(0),this.identifierPrefix=c,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function Ul(r,i,u,c,m,y,k,w,P){return r=new MT(r,i,u,w,P),i===1?(i=1,y===!0&&(i|=8)):i=0,y=nn(3,null,null,i),r.current=y,y.stateNode=r,y.memoizedState={element:c,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(y),r}function FT(r,i,u){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:H,key:c==null?null:""+c,children:r,containerInfo:i,implementation:u}}function lp(r){if(!r)return rr;r=r._reactInternals;e:{if(Cr(r)!==r||r.tag!==1)throw Error(n(170));var i=r;do{switch(i.tag){case 3:i=i.stateNode.context;break e;case 1:if(Dt(i.type)){i=i.stateNode.__reactInternalMemoizedMergedChildContext;break e}}i=i.return}while(i!==null);throw Error(n(171))}if(r.tag===1){var u=r.type;if(Dt(u))return Ff(r,u,i)}return i}function cp(r,i,u,c,m,y,k,w,P){return r=Ul(u,c,!0,r,m,y,k,w,P),r.context=lp(null),u=r.current,c=Lt(),m=cr(u),y=jn(c,m),y.callback=i??null,ar(u,y,m),r.current.lanes=m,qi(r,m,c),Ft(r,c),r}function pu(r,i,u,c){var m=i.current,y=Lt(),k=cr(m);return u=lp(u),i.context===null?i.context=u:i.pendingContext=u,i=jn(y,k),i.payload={element:r},c=c===void 0?null:c,c!==null&&(i.callback=c),r=ar(m,i,k),r!==null&&(hn(r,m,k,y),Ya(r,m,k)),k}function mu(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 dp(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function jl(r,i){dp(r,i),(r=r.alternate)&&dp(r,i)}function BT(){return null}var fp=typeof reportError=="function"?reportError:function(r){console.error(r)};function Hl(r){this._internalRoot=r}gu.prototype.render=Hl.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));pu(r,i,null,null)},gu.prototype.unmount=Hl.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Dr(function(){pu(null,r,null,null)}),i[Pn]=null}};function gu(r){this._internalRoot=r}gu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Qd();r={blockedOn:null,target:r,priority:i};for(var u=0;u<Jn.length&&i!==0&&i<Jn[u].priority;u++);Jn.splice(u,0,r),u===0&&Xd(r)}};function zl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function Eu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function hp(){}function UT(r,i,u,c,m){if(m){if(typeof c=="function"){var y=c;c=function(){var V=mu(k);y.call(V)}}var k=cp(i,c,r,0,null,!1,!1,"",hp);return r._reactRootContainer=k,r[Pn]=k.current,us(r.nodeType===8?r.parentNode:r),Dr(),k}for(;m=r.lastChild;)r.removeChild(m);if(typeof c=="function"){var w=c;c=function(){var V=mu(P);w.call(V)}}var P=Ul(r,0,!1,null,null,!1,!1,"",hp);return r._reactRootContainer=P,r[Pn]=P.current,us(r.nodeType===8?r.parentNode:r),Dr(function(){pu(i,P,u,c)}),P}function Tu(r,i,u,c,m){var y=u._reactRootContainer;if(y){var k=y;if(typeof m=="function"){var w=m;m=function(){var P=mu(k);w.call(P)}}pu(i,k,r,m)}else k=UT(u,i,r,m,c);return mu(k)}Vd=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var u=Vi(i.pendingLanes);u!==0&&(fo(i,u|1),Ft(i,rt()),(Ue&6)===0&&(_i=rt()+500,ir()))}break;case 13:Dr(function(){var c=Un(r,1);if(c!==null){var m=Lt();hn(c,r,1,m)}}),jl(r,1)}},ho=function(r){if(r.tag===13){var i=Un(r,134217728);if(i!==null){var u=Lt();hn(i,r,134217728,u)}jl(r,134217728)}},qd=function(r){if(r.tag===13){var i=cr(r),u=Un(r,i);if(u!==null){var c=Lt();hn(u,r,i,c)}jl(r,i)}},Qd=function(){return We},Gd=function(r,i){var u=We;try{return We=r,i()}finally{We=u}},io=function(r,i,u){switch(i){case"input":if(ei(r,u),i=u.name,u.type==="radio"&&i!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll("input[name="+JSON.stringify(""+i)+'][type="radio"]'),i=0;i<u.length;i++){var c=u[i];if(c!==r&&c.form===r.form){var m=Pa(c);if(!m)throw Error(n(90));oa(c),ei(c,m)}}}break;case"textarea":da(r,u);break;case"select":i=u.value,i!=null&&qn(r,!!u.multiple,i,!1)}},Od=Ol,Dd=Dr;var jT={usingClientEntryPoint:!1,Events:[cs,di,Pa,Ld,Rd,Ol]},_s={findFiberByHostInstance:Nr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HT={bundleType:_s.bundleType,version:_s.version,rendererPackageName:_s.rendererPackageName,rendererConfig:_s.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:se.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Bd(r),r===null?null:r.stateNode},findFiberByHostInstance:_s.findFiberByHostInstance||BT,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 yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yu.isDisabled&&yu.supportsFiber)try{ga=yu.inject(HT),Sn=yu}catch{}}return Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jT,Bt.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zl(i))throw Error(n(200));return FT(r,i,null,u)},Bt.createRoot=function(r,i){if(!zl(r))throw Error(n(299));var u=!1,c="",m=fp;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(m=i.onRecoverableError)),i=Ul(r,1,!1,null,null,u,!1,c,m),r[Pn]=i.current,us(r.nodeType===8?r.parentNode:r),new Hl(i)},Bt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Bd(i),r=r===null?null:r.stateNode,r},Bt.flushSync=function(r){return Dr(r)},Bt.hydrate=function(r,i,u){if(!Eu(i))throw Error(n(200));return Tu(null,r,i,!0,u)},Bt.hydrateRoot=function(r,i,u){if(!zl(r))throw Error(n(405));var c=u!=null&&u.hydratedSources||null,m=!1,y="",k=fp;if(u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(k=u.onRecoverableError)),i=cp(i,null,r,1,u??null,m,!1,y,k),r[Pn]=i.current,us(r),c)for(r=0;r<c.length;r++)u=c[r],m=u._getVersion,m=m(u._source),i.mutableSourceEagerHydrationData==null?i.mutableSourceEagerHydrationData=[u,m]:i.mutableSourceEagerHydrationData.push(u,m);return new gu(i)},Bt.render=function(r,i,u){if(!Eu(i))throw Error(n(200));return Tu(null,r,i,!1,u)},Bt.unmountComponentAtNode=function(r){if(!Eu(r))throw Error(n(40));return r._reactRootContainer?(Dr(function(){Tu(null,null,r,!1,function(){r._reactRootContainer=null,r[Pn]=null})}),!0):!1},Bt.unstable_batchedUpdates=Ol,Bt.unstable_renderSubtreeIntoContainer=function(r,i,u,c){if(!Eu(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return Tu(r,i,u,!1,c)},Bt.version="18.3.1-next-f1338f8080-20240426",Bt}var bp;function d0(){if(bp)return Yl.exports;bp=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(),Yl.exports=KT(),Yl.exports}var kp;function XT(){if(kp)return xu;kp=1;var e=d0();return xu.createRoot=e.createRoot,xu.hydrateRoot=e.hydrateRoot,xu}var JT=XT();/**
|
|
42
|
+
* react-router v7.18.2
|
|
43
|
+
*
|
|
44
|
+
* Copyright (c) Remix Software Inc.
|
|
45
|
+
*
|
|
46
|
+
* This source code is licensed under the MIT license found in the
|
|
47
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
48
|
+
*
|
|
49
|
+
* @license MIT
|
|
50
|
+
*/var Qc=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,f0=/^[\\/]{2}/;function ZT(e,t){return t+e.replace(/\\/g,"/")}var Sp="popstate";function _p(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function ey(e={}){function t(s,a){var h;let o=(h=a.state)==null?void 0:h.masked,{pathname:l,search:d,hash:f}=o||s.location;return _c("",{pathname:l,search:d,hash:f},a.state&&a.state.usr||null,a.state&&a.state.key||"default",o?{pathname:s.location.pathname,search:s.location.search,hash:s.location.hash}:void 0)}function n(s,a){return typeof a=="string"?a:Ys(a)}return ny(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ty(){return Math.random().toString(36).substring(2,10)}function Cp(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function _c(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ri(t):t,state:n,key:t&&t.key||s||ty(),mask:a}}function Ys({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ri(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substring(s),e=e.substring(0,s)),e&&(t.pathname=e)}return t}function ny(e,t,n,s={}){let{window:a=document.defaultView,v5Compat:o=!1}=s,l=a.history,d="POP",f=null,h=E();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function E(){return(l.state||{idx:null}).idx}function g(){d="POP";let O=E(),R=O==null?null:O-h;h=O,f&&f({action:d,location:v.location,delta:R})}function x(O,R){d="PUSH";let B=_p(O)?O:_c(v.location,O,R);h=E()+1;let M=Cp(B,h),se=v.createHref(B.mask||B);try{l.pushState(M,"",se)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;a.location.assign(se)}o&&f&&f({action:d,location:v.location,delta:1})}function b(O,R){d="REPLACE";let B=_p(O)?O:_c(v.location,O,R);h=E();let M=Cp(B,h),se=v.createHref(B.mask||B);l.replaceState(M,"",se),o&&f&&f({action:d,location:v.location,delta:0})}function C(O){return ry(a,O)}let v={get action(){return d},get location(){return e(a,l)},listen(O){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(Sp,g),f=O,()=>{a.removeEventListener(Sp,g),f=null}},createHref(O){return t(a,O)},createURL:C,encodeLocation(O){let R=C(O);return{pathname:R.pathname,search:R.search,hash:R.hash}},push:x,replace:b,go(O){return l.go(O)}};return v}function ry(e,t,n=!1){let s="http://localhost";e&&(s=e.location.origin!=="null"?e.location.origin:e.location.href),Ke(s,"No window.location.(origin|href) available to create URL");let a=typeof t=="string"?t:Ys(t);return a=a.replace(/ $/,"%20"),!n&&f0.test(a)&&(a=s+a),new URL(a,s)}function h0(e,t,n="/"){return iy(e,t,n,!1)}function iy(e,t,n,s,a){let o=typeof t=="string"?Ri(t):t,l=Wn(o.pathname||"/",n);if(l==null)return null;let d=sy(e),f=null,h=T0(l);for(let E=0;f==null&&E<d.length;++E)f=my(d[E],h,s);return f}function sy(e){let t=p0(e);return ay(t),t}function p0(e,t=[],n=[],s="",a=!1){let o=(l,d,f=a,h)=>{let E={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:d,route:l};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(s)&&f)return;Ke(E.relativePath.startsWith(s),`Absolute route path "${E.relativePath}" nested under path "${s}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(s.length)}let g=gn([s,E.relativePath]),x=n.concat(E);l.children&&l.children.length>0&&(Ke(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),p0(l.children,t,x,g,f)),!(l.path==null&&!l.index)&&t.push({path:g,score:hy(g,l.index),routesMeta:x.map((b,C)=>{let[v,O]=E0(b.relativePath,b.caseSensitive,C===x.length-1);return{...b,matcher:v,compiledParams:O}})})};return e.forEach((l,d)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))o(l,d);else for(let h of m0(l.path))o(l,d,!0,h)}),t}function m0(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(s.length===0)return a?[o,""]:[o];let l=m0(s.join("/")),d=[];return d.push(...l.map(f=>f===""?o:[o,f].join("/"))),a&&d.push(...l),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function ay(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:py(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var uy=/^:[\w-]+$/,oy=3,ly=2,cy=1,dy=10,fy=-2,Np=e=>e==="*";function hy(e,t){let n=e.split("/"),s=n.length;return n.some(Np)&&(s+=fy),t&&(s+=ly),n.filter(a=>!Np(a)).reduce((a,o)=>a+(uy.test(o)?oy:o===""?cy:dy),s)}function py(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function my(e,t,n=!1){let{routesMeta:s}=e,a={},o="/",l=[];for(let d=0;d<s.length;++d){let f=s[d],h=d===s.length-1,E=o==="/"?t:t.slice(o.length)||"/",g={path:f.relativePath,caseSensitive:f.caseSensitive,end:h},x=f.matcher&&f.compiledParams?g0(g,E,f.matcher,f.compiledParams):Vs(g,E),b=f.route;if(!x&&h&&n&&!s[s.length-1].route.index&&(x=Vs({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!x)return null;Object.assign(a,x.params),l.push({params:a,pathname:gn([o,x.pathname]),pathnameBase:Ty(gn([o,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(o=gn([o,x.pathnameBase]))}return l}function Vs(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=E0(e.path,e.caseSensitive,e.end);return g0(e,t,n,s)}function g0(e,t,n,s){let a=t.match(n);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),d=a.slice(1);return{params:s.reduce((h,{paramName:E,isOptional:g},x)=>{if(E==="*"){let C=d[x]||"";l=o.slice(0,o.length-C.length).replace(/(.)\/+$/,"$1")}const b=d[x];return g&&!b?h[E]=void 0:h[E]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:o,pathnameBase:l,pattern:e}}function E0(e,t=!1,n=!0){yn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,d,f,h,E)=>{if(s.push({paramName:d,isOptional:f!=null}),f){let g=E.charAt(h+l.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function T0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return yn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}function gy(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Ri(e):e,o;return n?(n=y0(n),n.startsWith("/")?o=Ap(n.substring(1),"/"):o=Ap(n,t)):o=t,{pathname:o,search:yy(s),hash:xy(a)}}function Ap(e,t){let n=Ou(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Ql(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ey(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Gc(e){let t=Ey(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Hu(e,t,n,s=!1){let a;typeof e=="string"?a=Ri(e):(a={...e},Ke(!a.pathname||!a.pathname.includes("?"),Ql("?","pathname","search",a)),Ke(!a.pathname||!a.pathname.includes("#"),Ql("#","pathname","hash",a)),Ke(!a.search||!a.search.includes("#"),Ql("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,d;if(l==null)d=n;else{let g=t.length-1;if(!s&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),g-=1;a.pathname=x.join("/")}d=g>=0?t[g]:"/"}let f=gy(a,d),h=l&&l!=="/"&&l.endsWith("/"),E=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||E)&&(f.pathname+="/"),f}var y0=e=>e.replace(/[\\/]{2,}/g,"/"),gn=e=>y0(e.join("/")),Ou=e=>e.replace(/\/+$/,""),Ty=e=>Ou(e).replace(/^\/*/,"/"),yy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,by=class{constructor(e,t,n,s=!1){this.status=e,this.statusText=t||"",this.internal=s,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ky(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Sy(e){let t=e.map(n=>n.route.path).filter(Boolean);return gn(t)||"/"}var x0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function b0(e,t){let n=e;if(typeof n!="string"||!Qc.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(x0)try{let o=new URL(window.location.href),l=f0.test(n)?new URL(ZT(n,o.protocol)):new URL(n),d=Wn(l.pathname,t);l.origin===o.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{yn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:s,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var k0=["POST","PUT","PATCH","DELETE"];new Set(k0);var _y=["GET",...k0];new Set(_y);var Cy=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ny(e){try{return Cy.includes(new URL(e).protocol)}catch{return!1}}var Oi=A.createContext(null);Oi.displayName="DataRouter";var zu=A.createContext(null);zu.displayName="DataRouterState";var S0=A.createContext(!1);function Ay(){return A.useContext(S0)}var _0=A.createContext({isTransitioning:!1});_0.displayName="ViewTransition";var vy=A.createContext(new Map);vy.displayName="Fetchers";var wy=A.createContext(null);wy.displayName="Await";var Gt=A.createContext(null);Gt.displayName="Navigation";var Js=A.createContext(null);Js.displayName="Location";var In=A.createContext({outlet:null,matches:[],isDataRoute:!1});In.displayName="Route";var Kc=A.createContext(null);Kc.displayName="RouteError";var C0="REACT_ROUTER_ERROR",Iy="REDIRECT",Ly="ROUTE_ERROR_RESPONSE";function Ry(e){if(e.startsWith(`${C0}:${Iy}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Oy(e){if(e.startsWith(`${C0}:${Ly}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new by(t.status,t.statusText,t.data)}catch{}}function Dy(e,{relative:t}={}){Ke(Qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=A.useContext(Gt),{hash:a,pathname:o,search:l}=Zs(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:gn([n,o])),s.createHref({pathname:d,search:l,hash:a})}function Qr(){return A.useContext(Js)!=null}function xn(){return Ke(Qr(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(Js).location}function Py(e){Ke(Qr(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=xn();return A.useMemo(()=>Vs(e,T0(t)),[t,e])}var N0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function A0(e){A.useContext(Gt).static||A.useLayoutEffect(e)}function Xc(){let{isDataRoute:e}=A.useContext(In);return e?Qy():My()}function My(){Ke(Qr(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(Oi),{basename:t,navigator:n}=A.useContext(Gt),{matches:s}=A.useContext(In),{pathname:a}=xn(),o=JSON.stringify(Gc(s)),l=A.useRef(!1);return A0(()=>{l.current=!0}),A.useCallback((f,h={})=>{if(yn(l.current,N0),!l.current)return;if(typeof f=="number"){n.go(f);return}let E=Hu(f,JSON.parse(o),a,h.relative==="path");e==null&&t!=="/"&&(E.pathname=E.pathname==="/"?t:gn([t,E.pathname])),(h.replace?n.replace:n.push)(E,h.state,h)},[t,n,o,a,e])}A.createContext(null);function Zs(e,{relative:t}={}){let{matches:n}=A.useContext(In),{pathname:s}=xn(),a=JSON.stringify(Gc(n));return A.useMemo(()=>Hu(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function Fy(e,t){return v0(e,t)}function v0(e,t,n){var O;Ke(Qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=A.useContext(Gt),{matches:a}=A.useContext(In),o=a[a.length-1],l=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let R=h&&h.path||"";I0(d,!h||R.endsWith("*")||R.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${R}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
51
|
+
|
|
52
|
+
Please change the parent <Route path="${R}"> to <Route path="${R==="/"?"*":`${R}/*`}">.`)}let E=xn(),g;if(t){let R=typeof t=="string"?Ri(t):t;Ke(f==="/"||((O=R.pathname)==null?void 0:O.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${R.pathname}" was given in the \`location\` prop.`),g=R}else g=E;let x=g.pathname||"/",b=x;if(f!=="/"){let R=f.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(R.length).join("/")}let C=n&&n.state.matches.length?n.state.matches.map(R=>Object.assign(R,{route:n.manifest[R.route.id]||R.route})):h0(e,{pathname:b});yn(h||C!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),yn(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let v=zy(C&&C.map(R=>Object.assign({},R,{params:Object.assign({},l,R.params),pathname:gn([f,s.encodeLocation?s.encodeLocation(R.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathname]),pathnameBase:R.pathnameBase==="/"?f:gn([f,s.encodeLocation?s.encodeLocation(R.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:R.pathnameBase])})),a,n);return t&&v?A.createElement(Js.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},v):v}function By(){let e=qy(),t=ky(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:s},o={padding:"2px 4px",backgroundColor:s},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:o},"ErrorBoundary")," or"," ",A.createElement("code",{style:o},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:a},n):null,l)}var Uy=A.createElement(By,null),w0=class extends A.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=Oy(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(In.Provider,{value:this.props.routeContext},A.createElement(Kc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(jy,{error:e},t):t}};w0.contextType=S0;var Gl=new WeakMap;function jy({children:e,error:t}){let{basename:n}=A.useContext(Gt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Ry(t.digest);if(s){let a=Gl.get(t);if(a)throw a;let o=b0(s.location,n),l=o.absoluteURL||o.to;if(Ny(l))throw new Error("Invalid redirect location");if(x0&&!Gl.get(t))if(o.isExternal||s.reloadDocument)window.location.href=l;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:s.replace}));throw Gl.set(t,d),d}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Hy({routeContext:e,match:t,children:n}){let s=A.useContext(Oi);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(In.Provider,{value:e},n)}function zy(e,t=[],n){let s=n==null?void 0:n.state;if(e==null){if(!s)return null;if(s.errors)e=s.matches;else if(t.length===0&&!s.initialized&&s.matches.length>0)e=s.matches;else return null}let a=e,o=s==null?void 0:s.errors;if(o!=null){let E=a.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ke(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,E+1))}let l=!1,d=-1;if(n&&s){l=s.renderFallback;for(let E=0;E<a.length;E++){let g=a[E];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=E),g.route.id){let{loaderData:x,errors:b}=s,C=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||C){n.isStatic&&(l=!0),d>=0?a=a.slice(0,d+1):a=[a[0]];break}}}}let f=n==null?void 0:n.onError,h=s&&f?(E,g)=>{var x,b;f(E,{location:s.location,params:((b=(x=s.matches)==null?void 0:x[0])==null?void 0:b.params)??{},pattern:Sy(s.matches),errorInfo:g})}:void 0;return a.reduceRight((E,g,x)=>{let b,C=!1,v=null,O=null;s&&(b=o&&g.route.id?o[g.route.id]:void 0,v=g.route.errorElement||Uy,l&&(d<0&&x===0?(I0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,O=null):d===x&&(C=!0,O=g.route.hydrateFallbackElement||null)));let R=t.concat(a.slice(0,x+1)),B=()=>{let M;return b?M=v:C?M=O:g.route.Component?M=A.createElement(g.route.Component,null):g.route.element?M=g.route.element:M=E,A.createElement(Hy,{match:g,routeContext:{outlet:E,matches:R,isDataRoute:s!=null},children:M})};return s&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?A.createElement(w0,{location:s.location,revalidation:s.revalidation,component:v,error:b,children:B(),routeContext:{outlet:null,matches:R,isDataRoute:!0},onError:h}):B()},null)}function Jc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $y(e){let t=A.useContext(Oi);return Ke(t,Jc(e)),t}function Wy(e){let t=A.useContext(zu);return Ke(t,Jc(e)),t}function Yy(e){let t=A.useContext(In);return Ke(t,Jc(e)),t}function Zc(e){let t=Yy(e),n=t.matches[t.matches.length-1];return Ke(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Vy(){return Zc("useRouteId")}function qy(){var s;let e=A.useContext(Kc),t=Wy("useRouteError"),n=Zc("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function Qy(){let{router:e}=$y("useNavigate"),t=Zc("useNavigate"),n=A.useRef(!1);return A0(()=>{n.current=!0}),A.useCallback(async(a,o={})=>{yn(n.current,N0),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var vp={};function I0(e,t,n){!t&&!vp[e]&&(vp[e]=!0,yn(!1,n))}A.memo(Gy);function Gy({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:o}){return v0(e,void 0,{manifest:t,state:s,isStatic:a,onError:o})}function Ky({to:e,replace:t,state:n,relative:s}){Ke(Qr(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=A.useContext(Gt);yn(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=A.useContext(In),{pathname:l}=xn(),d=Xc(),f=Hu(e,Gc(o),l,s==="path"),h=JSON.stringify(f);return A.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:s})},[d,h,s,t,n]),null}function Ps(e){Ke(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Xy({basename:e="/",children:t=null,location:n,navigationType:s="POP",navigator:a,static:o=!1,useTransitions:l}){Ke(!Qr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=A.useMemo(()=>({basename:d,navigator:a,static:o,useTransitions:l,future:{}}),[d,a,o,l]);typeof n=="string"&&(n=Ri(n));let{pathname:h="/",search:E="",hash:g="",state:x=null,key:b="default",mask:C}=n,v=A.useMemo(()=>{let O=Wn(h,d);return O==null?null:{location:{pathname:O,search:E,hash:g,state:x,key:b,mask:C},navigationType:s}},[d,h,E,g,x,b,s,C]);return yn(v!=null,`<Router basename="${d}"> is not able to match the URL "${h}${E}${g}" because it does not start with the basename, so the <Router> won't render anything.`),v==null?null:A.createElement(Gt.Provider,{value:f},A.createElement(Js.Provider,{children:t,value:v}))}function Jy({children:e,location:t}){return Fy(Cc(e),t)}function Cc(e,t=[]){let n=[];return A.Children.forEach(e,(s,a)=>{if(!A.isValidElement(s))return;let o=[...t,a];if(s.type===A.Fragment){n.push.apply(n,Cc(s.props.children,o));return}Ke(s.type===Ps,`[${typeof s.type=="string"?s.type:s.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ke(!s.props.index||!s.props.children,"An index route cannot have child routes.");let l={id:s.props.id||o.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,middleware:s.props.middleware,loader:s.props.loader,action:s.props.action,hydrateFallbackElement:s.props.hydrateFallbackElement,HydrateFallback:s.props.HydrateFallback,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.hasErrorBoundary===!0||s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(l.children=Cc(s.props.children,o)),n.push(l)}),n}var Au="get",vu="application/x-www-form-urlencoded";function $u(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Zy(e){return $u(e)&&e.tagName.toLowerCase()==="button"}function e2(e){return $u(e)&&e.tagName.toLowerCase()==="form"}function t2(e){return $u(e)&&e.tagName.toLowerCase()==="input"}function n2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function r2(e,t){return e.button===0&&(!t||t==="_self")&&!n2(e)}var bu=null;function i2(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var s2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kl(e){return e!=null&&!s2.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${vu}"`),null):e}function a2(e,t){let n,s,a,o,l;if(e2(e)){let d=e.getAttribute("action");s=d?Wn(d,t):null,n=e.getAttribute("method")||Au,a=Kl(e.getAttribute("enctype"))||vu,o=new FormData(e)}else if(Zy(e)||t2(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(s=f?Wn(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||Au,a=Kl(e.getAttribute("formenctype"))||Kl(d.getAttribute("enctype"))||vu,o=new FormData(d,e),!i2()){let{name:h,type:E,value:g}=e;if(E==="image"){let x=h?`${h}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else h&&o.append(h,g)}}else{if($u(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Au,s=null,a=vu,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:s,method:n.toLowerCase(),encType:a,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ed(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function L0(e,t,n,s){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${s}`:a.pathname=`${a.pathname}.${s}`:a.pathname==="/"?a.pathname=`_root.${s}`:t&&Wn(a.pathname,t)==="/"?a.pathname=`${Ou(t)}/_root.${s}`:a.pathname=`${Ou(a.pathname)}.${s}`,a}async function u2(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function o2(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function l2(e,t,n){let s=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await u2(o,n);return l.links?l.links():[]}return[]}));return h2(s.flat(1).filter(o2).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function wp(e,t,n,s,a,o){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,d=(f,h)=>{var E;return n[h].pathname!==f.pathname||((E=n[h].route.path)==null?void 0:E.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,h)=>l(f,h)||d(f,h)):o==="data"?t.filter((f,h)=>{var g;let E=s.routes[f.route.id];if(!E||!E.hasLoader)return!1;if(l(f,h)||d(f,h))return!0;if(f.route.shouldRevalidate){let x=f.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function c2(e,t,{includeHydrateFallback:n}={}){return d2(e.map(s=>{let a=t.routes[s.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),n&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function d2(e){return[...new Set(e)]}function f2(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function h2(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let o=JSON.stringify(f2(a));return n.has(o)||(n.add(o),s.push({key:o,link:a})),s},[])}function td(){let e=A.useContext(Oi);return ed(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function p2(){let e=A.useContext(zu);return ed(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var nd=A.createContext(void 0);nd.displayName="FrameworkContext";function Wu(){let e=A.useContext(nd);return ed(e,"You must render this element inside a <HydratedRouter> element"),e}function m2(e,t){let n=A.useContext(nd),[s,a]=A.useState(!1),[o,l]=A.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:E,onTouchStart:g}=t,x=A.useRef(null);A.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=R=>{R.forEach(B=>{l(B.isIntersecting)})},O=new IntersectionObserver(v,{threshold:.5});return x.current&&O.observe(x.current),()=>{O.disconnect()}}},[e]),A.useEffect(()=>{if(s){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[s]);let b=()=>{a(!0)},C=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ns(d,b),onBlur:Ns(f,C),onMouseEnter:Ns(h,b),onMouseLeave:Ns(E,C),onTouchStart:Ns(g,b)}]:[!1,x,{}]}function Ns(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function g2({page:e,...t}){let n=Ay(),{nonce:s}=Wu(),{router:a}=td(),o=A.useMemo(()=>h0(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&s&&(t={...t,nonce:s}),n?A.createElement(T2,{page:e,matches:o,...t}):A.createElement(y2,{page:e,matches:o,...t})):null}function E2(e){let{manifest:t,routeModules:n}=Wu(),[s,a]=A.useState([]);return A.useEffect(()=>{let o=!1;return l2(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),s}function T2({page:e,matches:t,...n}){let s=xn(),{future:a}=Wu(),{basename:o}=td(),l=A.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let d=L0(e,o,a.v8_trailingSlashAwareDataRequests,"rsc"),f=!1,h=[];for(let E of t)typeof E.route.shouldRevalidate=="function"?f=!0:h.push(E.route.id);return f&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[o,a.v8_trailingSlashAwareDataRequests,e,s,t]);return A.createElement(A.Fragment,null,l.map(d=>A.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function y2({page:e,matches:t,...n}){let s=xn(),{future:a,manifest:o,routeModules:l}=Wu(),{basename:d}=td(),{loaderData:f,matches:h}=p2(),E=A.useMemo(()=>wp(e,t,h,o,s,"data"),[e,t,h,o,s]),g=A.useMemo(()=>wp(e,t,h,o,s,"assets"),[e,t,h,o,s]),x=A.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let v=new Set,O=!1;if(t.forEach(B=>{var se;let M=o.routes[B.route.id];!M||!M.hasLoader||(!E.some($=>$.route.id===B.route.id)&&B.route.id in f&&((se=l[B.route.id])!=null&&se.shouldRevalidate)||M.hasClientLoader?O=!0:v.add(B.route.id))}),v.size===0)return[];let R=L0(e,d,a.v8_trailingSlashAwareDataRequests,"data");return O&&v.size>0&&R.searchParams.set("_routes",t.filter(B=>v.has(B.route.id)).map(B=>B.route.id).join(",")),[R.pathname+R.search]},[d,a.v8_trailingSlashAwareDataRequests,f,s,o,E,t,e,l]),b=A.useMemo(()=>c2(g,o),[g,o]),C=E2(g);return A.createElement(A.Fragment,null,x.map(v=>A.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),b.map(v=>A.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),C.map(({key:v,link:O})=>A.createElement("link",{key:v,nonce:n.nonce,...O,crossOrigin:O.crossOrigin??n.crossOrigin})))}function x2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var b2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{b2&&(window.__reactRouterVersion="7.18.2")}catch{}function k2({basename:e,children:t,useTransitions:n,window:s}){let a=A.useRef();a.current==null&&(a.current=ey({window:s,v5Compat:!0}));let o=a.current,[l,d]=A.useState({action:o.action,location:o.location}),f=A.useCallback(h=>{n===!1?d(h):A.startTransition(()=>d(h))},[n]);return A.useLayoutEffect(()=>o.listen(f),[o,f]),A.createElement(Xy,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var rd=A.forwardRef(function({onClick:t,discover:n="render",prefetch:s="none",relative:a,reloadDocument:o,replace:l,mask:d,state:f,target:h,to:E,preventScrollReset:g,viewTransition:x,defaultShouldRevalidate:b,...C},v){let{basename:O,navigator:R,useTransitions:B}=A.useContext(Gt),M=typeof E=="string"&&Qc.test(E),se=b0(E,O);E=se.to;let $=Dy(E,{relative:a}),H=xn(),ee=null;if(d){let Y=Hu(d,[],H.mask?H.mask.pathname:"/",!0);O!=="/"&&(Y.pathname=Y.pathname==="/"?O:gn([O,Y.pathname])),ee=R.createHref(Y)}let[ue,fe,U]=m2(s,C),re=N2(E,{replace:l,mask:d,state:f,target:h,preventScrollReset:g,relative:a,viewTransition:x,defaultShouldRevalidate:b,useTransitions:B});function ce(Y){t&&t(Y),Y.defaultPrevented||re(Y)}let ke=!(se.isExternal||o),de=A.createElement("a",{...C,...U,href:(ke?ee:void 0)||se.absoluteURL||$,onClick:ke?ce:t,ref:x2(v,fe),target:h,"data-discover":!M&&n==="render"?"true":void 0});return ue&&!M?A.createElement(A.Fragment,null,de,A.createElement(g2,{page:$})):de});rd.displayName="Link";var S2=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:s="",end:a=!1,style:o,to:l,viewTransition:d,children:f,...h},E){let g=Zs(l,{relative:h.relative}),x=xn(),b=A.useContext(zu),{navigator:C,basename:v}=A.useContext(Gt),O=b!=null&&L2(g)&&d===!0,R=C.encodeLocation?C.encodeLocation(g).pathname:g.pathname,B=x.pathname,M=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(B=B.toLowerCase(),M=M?M.toLowerCase():null,R=R.toLowerCase()),M&&v&&(M=Wn(M,v)||M);const se=R!=="/"&&R.endsWith("/")?R.length-1:R.length;let $=B===R||!a&&B.startsWith(R)&&B.charAt(se)==="/",H=M!=null&&(M===R||!a&&M.startsWith(R)&&M.charAt(R.length)==="/"),ee={isActive:$,isPending:H,isTransitioning:O},ue=$?t:void 0,fe;typeof s=="function"?fe=s(ee):fe=[s,$?"active":null,H?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(ee):o;return A.createElement(rd,{...h,"aria-current":ue,className:fe,ref:E,style:U,to:l,viewTransition:d},typeof f=="function"?f(ee):f)});S2.displayName="NavLink";var _2=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:o,method:l=Au,action:d,onSubmit:f,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x,...b},C)=>{let{useTransitions:v}=A.useContext(Gt),O=w2(),R=I2(d,{relative:h}),B=l.toLowerCase()==="get"?"get":"post",M=typeof d=="string"&&Qc.test(d),se=$=>{if(f&&f($),$.defaultPrevented)return;$.preventDefault();let H=$.nativeEvent.submitter,ee=(H==null?void 0:H.getAttribute("formmethod"))||l,ue=()=>O(H||$.currentTarget,{fetcherKey:t,method:ee,navigate:n,replace:a,state:o,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x});v&&n!==!1?A.startTransition(()=>ue()):ue()};return A.createElement("form",{ref:C,method:B,action:R,onSubmit:s?f:se,...b,"data-discover":!M&&e==="render"?"true":void 0})});_2.displayName="Form";function C2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R0(e){let t=A.useContext(Oi);return Ke(t,C2(e)),t}function N2(e,{target:t,replace:n,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let E=Xc(),g=xn(),x=Zs(e,{relative:l});return A.useCallback(b=>{if(r2(b,t)){b.preventDefault();let C=n!==void 0?n:Ys(g)===Ys(x),v=()=>E(e,{replace:C,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f});h?A.startTransition(()=>v()):v()}},[g,E,x,n,s,a,t,e,o,l,d,f,h])}var A2=0,v2=()=>`__${String(++A2)}__`;function w2(){let{router:e}=R0("useSubmit"),{basename:t}=A.useContext(Gt),n=Vy(),s=e.fetch,a=e.navigate;return A.useCallback(async(o,l={})=>{let{action:d,method:f,encType:h,formData:E,body:g}=a2(o,t);if(l.navigate===!1){let x=l.fetcherKey||v2();await s(x,n,l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:E,body:g,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await a(l.action||d,{defaultShouldRevalidate:l.defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:E,body:g,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[s,a,t,n])}function I2(e,{relative:t}={}){let{basename:n}=A.useContext(Gt),s=A.useContext(In);Ke(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),o={...Zs(e||".",{relative:t})},l=xn();if(e==null){o.search=l.search;let d=new URLSearchParams(o.search),f=d.getAll("index");if(f.some(E=>E==="")){d.delete("index"),f.filter(g=>g).forEach(g=>d.append("index",g));let E=d.toString();o.search=E?`?${E}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:gn([n,o.pathname])),Ys(o)}function L2(e,{relative:t}={}){let n=A.useContext(_0);Ke(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=R0("useViewTransitionState"),a=Zs(e,{relative:t});if(!n.isTransitioning)return!1;let o=Wn(n.currentLocation.pathname,s)||n.currentLocation.pathname,l=Wn(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Vs(a.pathname,l)!=null||Vs(a.pathname,o)!=null}const Ip=e=>{let t;const n=new Set,s=(h,E)=>{const g=typeof h=="function"?h(t):h;if(!Object.is(g,t)){const x=t;t=E??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(b=>b(t,x))}},a=()=>t,d={setState:s,getState:a,getInitialState:()=>f,subscribe:h=>(n.add(h),()=>n.delete(h))},f=t=e(s,a,d);return d},R2=(e=>e?Ip(e):Ip),O2=e=>e;function D2(e,t=O2){const n=Ds.useSyncExternalStore(e.subscribe,Ds.useCallback(()=>t(e.getState()),[e,t]),Ds.useCallback(()=>t(e.getInitialState()),[e,t]));return Ds.useDebugValue(n),n}const Lp=e=>{const t=R2(e),n=s=>D2(t,s);return Object.assign(n,t),n},P2=(e=>e?Lp(e):Lp),O0="Attached files: ";function id(e){return e.split(`
|
|
53
|
+
`).filter(t=>!t.startsWith(O0)).join(`
|
|
54
|
+
`).trim()}function Rp(){return{turnStatus:"idle",contextUsagePercentage:0,compacting:!1}}const Xl=60;function M2(e){const t=e.filter(o=>o.type==="text").map(o=>o.text).join(`
|
|
55
|
+
`),n=id(t).replace(/```[\s\S]*?```/g," ").replace(/\s+/g," ").trim();if(!n)return"";if(n.length<=Xl)return n.replace(/[.,;:!?]+$/,"");const s=n.slice(0,Xl),a=s.lastIndexOf(" ");return`${(a>Xl/2?s.slice(0,a):s).replace(/[.,;:!?]+$/,"")}…`}const F2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function D0(e,t){const n=e.find(a=>a.sessionId===t.sessionId),s=n&&n.updatedAt.localeCompare(t.updatedAt)>0?{...t,updatedAt:n.updatedAt}:t;return[...e.filter(a=>a.sessionId!==t.sessionId),s].sort(F2)}function B2(e,t,n){const s=e.find(a=>a.sessionId===t);return s?D0(e,{...s,updatedAt:n}):e}function P0(e){const t=e.toLowerCase();return t.includes("credential")||t.includes("expired")||t.includes("not authenticated")||t.includes("unauthorized")||t.includes("kiro-cli login")?{title:"Kiro isn't authenticated",fix:"Run `kiro-cli login` on the server, then retry.",sessionWide:!0}:t.includes("a turn is already running")?{title:"A turn is already running",fix:"Wait for the current turn to finish, or stop it first."}:t.includes("enoent")||t.includes("spawn")||t.includes("command not found")?{title:"Couldn't start kiro-cli",fix:"Check that KIRO_BIN points at an executable kiro-cli.",sessionWide:!0}:t.includes("timed out")?{title:"The request timed out"}:{title:"Turn failed"}}const xe=P2((e,t)=>({sessions:[],models:[],agents:[],defaultAgentId:"kiro_default",activeId:null,chatId:null,loadingSessionId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:Rp(),fsVersion:{},watchedPaths:[],streamingText:"",streamingThought:"",pending:[],sessionNotice:null,connStatus:"closed",createError:null,reloadingId:null,previewPath:null,setConnStatus:n=>e({connStatus:n}),setCreateError:n=>e({createError:n}),setReloadingId:n=>e({reloadingId:n}),openFilePreview:n=>e({previewPath:n}),closeFilePreview:()=>e({previewPath:null}),markCancelling:()=>e(n=>n.observability.turnStatus==="running"?{observability:{...n.observability,turnStatus:"cancelling"}}:{}),setCurrentModel:n=>e({currentModelId:n}),setCurrentAgent:n=>e(s=>({currentModeId:n,sessions:s.activeId?s.sessions.map(a=>a.sessionId===s.activeId?{...a,agentId:n}:a):s.sessions})),setCompacting:n=>e(s=>s.observability.compacting===n?{}:{observability:{...s.observability,compacting:n}}),markPendingSending:n=>e(s=>({pending:s.pending.map(a=>a.id===n?{...a,status:"sending",error:void 0}:a)})),renameSessionRow:(n,s)=>e(a=>({sessions:a.sessions.map(o=>o.sessionId===n?{...o,title:s}:o)})),bumpFsPath:n=>e(s=>({fsVersion:{...s.fsVersion,[n]:(s.fsVersion[n]??0)+1}})),setWatchedPaths:n=>e({watchedPaths:n}),setSessions:n=>e({sessions:n}),setModels:n=>e({models:n}),setAgents:(n,s)=>e({agents:n,defaultAgentId:s}),setLoadingSession:n=>e({loadingSessionId:n}),loadDetail:(n,s)=>e(a=>({activeId:n.summary.sessionId,chatId:n.summary.chatId,loadingSessionId:null,sessions:D0(a.sessions,n.summary),modes:n.modes,currentModeId:n.currentModeId,currentModelId:n.summary.modelId,observability:n.observability,items:n.transcript,appliedSeq:n.head,remainingOlder:Math.max(0,n.transcriptTotal-n.transcript.length),streamingText:"",streamingThought:"",pending:s!=null&&s.keepPending?a.pending:[],sessionNotice:null})),prependItems:n=>e(s=>({items:[...n,...s.items],remainingOlder:Math.max(0,s.remainingOlder-n.length)})),newChatId:()=>{const n=crypto.randomUUID();return e({chatId:n}),n},clearActive:()=>e({activeId:null,loadingSessionId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:Rp(),streamingText:"",streamingThought:"",pending:[],sessionNotice:null,currentModeId:void 0,currentModelId:void 0,previewPath:null}),dismissSessionNotice:()=>e({sessionNotice:null}),setSessionNotice:n=>e({sessionNotice:n}),addPending:n=>e(s=>({pending:[...s.pending,{...n,status:"sending"}]})),markPendingFailed:(n,s)=>e(a=>({pending:a.pending.map(o=>o.id===n?{...o,status:"failed",error:s}:o)})),applyEvent:n=>{var o,l,d,f;const s=t(),a=n.payload;if(!(n.seq<=s.appliedSeq))switch(e({appliedSeq:n.seq}),a.kind){case"turn_started":{const h=a.prompt.filter(C=>C.type==="text").map(C=>C.text).join(""),E=id(h),g=s.pending.findIndex(C=>C.status==="sending"),x=new Date(n.ts).toISOString(),b=B2(s.sessions,n.sessionId,x);e({items:[...s.items,{type:"message",message:{id:`u-${n.seq}`,role:"user",text:E,timestamp:n.ts,attachments:a.attachments}}],pending:g===-1?s.pending:s.pending.filter((C,v)=>v!==g),sessions:b,streamingText:"",observability:{...s.observability,turnStatus:"running"}});break}case"session_update":{const h=a.update;if(h.sessionUpdate==="agent_message_chunk"){const E=((o=h.content)==null?void 0:o.text)??"";e({streamingText:s.streamingText+E})}else if(h.sessionUpdate==="agent_thought_chunk"){const E=((l=h.content)==null?void 0:l.text)??"";e({streamingThought:s.streamingThought+E})}else if(h.sessionUpdate==="tool_call"){const E=h,g=(f=(d=E._meta)==null?void 0:d.kiro)==null?void 0:f.toolName;e({items:[...Jl(s,`s-${n.seq}`,n.ts),{type:"tool_call",tool:{id:E.toolCallId,name:g,title:E.title??E.toolCallId,kind:E.kind,status:E.status??"pending",input:E.rawInput,content:E.content??[]}}],streamingText:"",streamingThought:""})}else if(h.sessionUpdate==="tool_call_update"){const E=h;e({items:s.items.map(g=>g.type==="tool_call"&&g.tool.id===E.toolCallId?{type:"tool_call",tool:{...g.tool,status:E.status??g.tool.status,output:E.rawOutput??g.tool.output,content:E.content??g.tool.content}}:g)})}break}case"turn_ended":{e({items:Jl(s,`s-${n.seq}`,n.ts),sessionNotice:null,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"turn_error":{const h=P0(a.message);e({items:[...Jl(s,`s-${n.seq}`,n.ts),{type:"turn_error",id:`err-${n.seq}`,message:a.message,timestamp:n.ts}],sessionNotice:h.sessionWide?{title:h.title,fix:h.fix,detail:a.message}:s.sessionNotice,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"metadata":e({observability:{...s.observability,contextUsagePercentage:a.params.contextUsagePercentage??s.observability.contextUsagePercentage}});break;case"compaction":{const h=a.params.status.type!=="started",E=a.params.summary??"";e({observability:{...s.observability,compacting:!h},items:h&&E.trim()?[...s.items,{type:"compaction",id:`c-${n.seq}`,summary:E,timestamp:n.ts}]:s.items});break}case"process_exited":e({observability:{...s.observability,turnStatus:"idle",compacting:!1}});break}}}));function Jl(e,t,n=Date.now()){const s=[...e.items];return e.streamingThought.trim()&&s.push({type:"message",message:{id:`t-${t}`,role:"thinking",text:e.streamingThought,timestamp:n}}),e.streamingText.trim()&&s.push({type:"message",message:{id:`a-${t}`,role:"assistant",text:e.streamingText,timestamp:n}}),s}async function bt(e,t,n){const s={};n!==void 0&&(s["content-type"]="application/json");const a=await fetch(t,{method:e,headers:s,credentials:"same-origin",body:n!==void 0?JSON.stringify(n):void 0});if(a.status===401)throw new Error("Unauthorized");if(!a.ok){const l=await a.text();let d="";try{d=JSON.parse(l).error??""}catch{}throw new Error(d||`${e} ${t} failed (${a.status}): ${l}`)}const o=await a.text();return o?JSON.parse(o):{}}function U2(e){return bt("POST","/api/login",{token:e})}function j2(){return bt("POST","/api/logout")}const dt={devices:()=>bt("GET","/api/devices"),revokeDevice:e=>bt("DELETE",`/api/devices/${e}`),logoutAll:()=>bt("POST","/api/logout-all"),models:()=>bt("GET","/api/models"),agents:()=>bt("GET","/api/agents"),listDirs:e=>bt("GET",`/api/fs/dirs?path=${encodeURIComponent(e)}`),listSessions:()=>bt("GET","/api/sessions"),createSession:e=>bt("POST","/api/sessions",e),getSession:e=>bt("GET",`/api/sessions/${e}`),transcriptPage:(e,t,n)=>bt("GET",`/api/sessions/${e}/transcript?offset=${t}&limit=${n}`),deleteSession:e=>bt("DELETE",`/api/sessions/${e}`),renameSession:(e,t)=>bt("POST",`/api/sessions/${e}/rename`,{title:t}),setSessionCwd:(e,t)=>bt("POST",`/api/sessions/${e}/cwd`,{cwd:t}),reloadSession:e=>bt("POST",`/api/sessions/${e}/reload`),tree:(e,t="")=>bt("GET",`/api/sessions/${e}/tree?path=${encodeURIComponent(t)}`),downloadUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?download=1&path=${encodeURIComponent(t)}`:`/api/sessions/${e}/download?path=${encodeURIComponent(t)}`,previewUrl:(e,t)=>t.startsWith("/")?`/api/fs/file?path=${encodeURIComponent(t)}`:`/api/sessions/${e}/preview?path=${encodeURIComponent(t)}`,uploadFiles:async(e,t)=>{const n=new FormData;for(const a of t)n.append("files",a,a.name);const s=await fetch(`/api/chats/${encodeURIComponent(e)}/uploads`,{method:"POST",credentials:"same-origin",body:n});if(s.status===401)throw new Error("Unauthorized");if(!s.ok){const a=await s.text();throw new Error(`Upload failed (${s.status}): ${a}`)}return await s.json()}},wu={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},H2=8e3,M0=25e3,z2=1e4;function Op(e){return e.state===void 0||e.state===wu.CLOSED||e.state===wu.CLOSING?!0:e.state===wu.CONNECTING?e.now-e.connectingSince>H2:e.now-e.lastMessageAt>M0+z2}function $2(e){return e.state===wu.OPEN&&e.now-e.lastMessageAt>M0}const W2=1008;class Y2{constructor(t,n,s=0){Le(this,"ws",null);Le(this,"cursor",0);Le(this,"closedByUser",!1);Le(this,"backoff",500);Le(this,"reconnectTimer",null);Le(this,"connectingSince",0);Le(this,"lastMessageAt",0);Le(this,"watchdog",null);Le(this,"eager",()=>{this.closedByUser||Op(this.sample())&&this.connect()});Le(this,"onVisibility",()=>{document.visibilityState==="visible"&&this.eager()});this.sessionId=t,this.handlers=n,this.cursor=s,window.addEventListener("online",this.eager),document.addEventListener("visibilitychange",this.onVisibility)}sample(){var t;return{state:(t=this.ws)==null?void 0:t.readyState,connectingSince:this.connectingSince,lastMessageAt:this.lastMessageAt,now:Date.now()}}startWatchdog(){this.watchdog===null&&(this.watchdog=window.setInterval(()=>{if(this.closedByUser)return;const t=this.sample();Op(t)?this.connect():$2(t)&&this.send({type:"ping"})},5e3))}reset(t){this.cursor=t}connect(){this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null);const t=this.ws;t&&(this.ws=null,t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,(t.readyState===WebSocket.OPEN||t.readyState===WebSocket.CONNECTING)&&t.close()),this.connectingSince=Date.now(),this.lastMessageAt=Date.now(),this.startWatchdog(),this.handlers.onStatus(this.cursor>0?"reconnecting":"connecting");const s=`${location.protocol==="https:"?"wss":"ws"}://${location.host}/ws?sessionId=${encodeURIComponent(this.sessionId)}&cursor=${this.cursor}`,a=new WebSocket(s);this.ws=a,a.onopen=()=>{this.ws===a&&(this.backoff=500,this.handlers.onStatus("replaying"))},a.onmessage=o=>{var d,f,h,E,g,x;if(this.ws!==a)return;this.lastMessageAt=Date.now();const l=JSON.parse(o.data);switch(l.type){case"event":l.event.seq>this.cursor&&(this.cursor=l.event.seq,this.handlers.onEvent(l.event));break;case"replay_complete":this.handlers.onStatus("connected");break;case"resync":this.handlers.onStatus("resyncing"),this.handlers.onResync();break;case"ack":(f=(d=this.handlers).onAck)==null||f.call(d,l.action,l.ok,l.error);break;case"error":console.warn("ws error:",l.message),(E=(h=this.handlers).onServerError)==null||E.call(h,l.message);break;case"fs_changed":(x=(g=this.handlers).onFsChanged)==null||x.call(g,l.path);break}},a.onclose=o=>{var l,d;if(this.ws===a){if(this.closedByUser){this.handlers.onStatus("closed");return}if(o.code===W2){this.closedByUser=!0,this.handlers.onStatus("closed"),(d=(l=this.handlers).onUnauthorized)==null||d.call(l);return}this.handlers.onStatus("reconnecting"),this.reconnectTimer=window.setTimeout(()=>this.connect(),this.backoff),this.backoff=Math.min(this.backoff*1.7,1e4)}},a.onerror=()=>{this.ws===a&&a.close()}}send(t){var n;return((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?(this.ws.send(JSON.stringify(t)),!0):!1}prompt(t,n){return this.send({type:"prompt",content:t,attachments:n})}cancel(){this.send({type:"cancel"})}setMode(t){this.send({type:"set_mode",modeId:t})}setModel(t){this.send({type:"set_model",modelId:t})}watchPaths(t){this.send({type:"watch_paths",paths:t})}execCommand(t){this.send({type:"exec_command",command:t})}close(){this.closedByUser=!0,window.removeEventListener("online",this.eager),document.removeEventListener("visibilitychange",this.onVisibility),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.watchdog!==null&&(clearInterval(this.watchdog),this.watchdog=null);const t=this.ws;this.ws=null,t&&(t.onopen=null,t.onmessage=null,t.onclose=null,t.onerror=null,t.close())}}const sd="/sessions",V2=`${sd}/:sessionId`;function F0(e){return`${sd}/${encodeURIComponent(e)}`}const q2=`${sd}/new`,Q2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",exec_command:"Command"};class G2{constructor(t={}){Le(this,"api");Le(this,"createSocket");Le(this,"listCoalesceMs");Le(this,"turnEndedRefreshMs");Le(this,"compactTimeoutMs");Le(this,"host",null);Le(this,"socket",null);Le(this,"openTarget",null);Le(this,"handledRoute");Le(this,"isDraft",!1);Le(this,"lastSent",null);Le(this,"msgSeq",0);Le(this,"firstPrompt",null);Le(this,"lastCreateOpts",null);Le(this,"listSeq",0);Le(this,"listTimer",null);this.api=t.api??dt,this.createSocket=t.createSocket??((n,s,a)=>new Y2(n,s,a)),this.listCoalesceMs=t.listCoalesceMs??150,this.turnEndedRefreshMs=t.turnEndedRefreshMs??1200,this.compactTimeoutMs=t.compactTimeoutMs??12e4}attach(t){this.host=t}get state(){return xe.getState()}refreshSessions(){this.listTimer===null&&(this.listTimer=setTimeout(()=>{this.listTimer=null;const t=++this.listSeq;this.api.listSessions().then(n=>{t===this.listSeq&&this.state.setSessions(n.sessions)}).catch(()=>{})},this.listCoalesceMs))}loadPickers(){this.api.models().then(t=>this.state.setModels(t.models)).catch(()=>{}),this.api.agents().then(t=>this.state.setAgents(t.agents,t.defaultAgentId)).catch(()=>{})}syncRoute(t,n){if(this.isDraft=n,n&&!this.state.chatId&&this.state.newChatId(),this.handledRoute!==t)if(this.handledRoute=t,t)this.openSession(t);else{this.openTarget=null,this.closeSocket();const s=this.state.activeId===null&&this.state.chatId!==null;this.state.clearActive(),s||this.state.newChatId(),this.refreshSessions()}}closeSocket(){var t;(t=this.socket)==null||t.close(),this.socket=null}async openSession(t,n){var a;if(this.state.activeId===t)return;this.openTarget=t,this.closeSocket(),this.state.setConnStatus("connecting"),n||this.state.setLoadingSession(t);let s;if(n)s=n;else try{s=await this.api.getSession(t)}catch(o){if(this.openTarget!==t)return;this.state.setConnStatus("closed"),this.state.setLoadingSession(null),console.error("open session failed:",o),(a=this.host)==null||a.navigate("/",{replace:!0});return}this.openTarget===t&&(this.state.loadDetail(s,{keepPending:!!n}),this.socket=this.createSocket(t,this.socketHandlers(t),s.head),this.socket.connect())}socketHandlers(t){return{onEvent:n=>{this.state.applyEvent(n),n.payload.kind==="turn_started"&&this.refreshSessions(),n.payload.kind==="turn_ended"&&setTimeout(()=>this.refreshSessions(),this.turnEndedRefreshMs)},onStatus:n=>{if(this.state.setConnStatus(n),n==="connected"&&this.firstPrompt){const s=this.firstPrompt;this.firstPrompt=null,this.deliver(s.id,s.content,s.attachments)}},onResync:async()=>{var s;const n=await this.api.getSession(t);this.openTarget===t&&(this.state.loadDetail(n),(s=this.socket)==null||s.reset(n.head))},onAck:(n,s,a)=>{if(s)return;const o=a??"The server rejected the request.";if(n==="prompt"){this.lastSent&&this.state.markPendingFailed(this.lastSent,o);return}console.error(`${Q2[n]??n} rejected:`,o)},onFsChanged:n=>this.state.bumpFsPath(n),onUnauthorized:()=>{var n;this.closeSocket(),this.state.clearActive(),(n=this.host)==null||n.onLock()},onServerError:n=>{console.error("server error:",n)}}}async createSession(t){var n;this.closeSocket(),this.state.setConnStatus("connecting"),this.state.setCreateError(null),this.lastCreateOpts=t;try{const s=await this.api.createSession({chatId:this.state.chatId??void 0,cwd:t.cwd||void 0,agentId:t.agentId,modelId:t.modelId,freshWorkspace:!t.cwd});this.refreshSessions();const a=s.summary.sessionId;return this.handledRoute=a,this.isDraft=!1,(n=this.host)==null||n.navigate(F0(a)),this.openSession(a,s),!0}catch(s){return this.state.setConnStatus("closed"),this.state.setCreateError(s instanceof Error?s.message:"Failed to create session"),!1}}retryCreate(){this.lastCreateOpts&&this.createSession(this.lastCreateOpts)}dismissCreateError(){var t;this.state.setCreateError(null),(t=this.host)==null||t.navigate("/")}startDraft(){var t;this.openTarget=null,this.closeSocket(),this.state.clearActive(),this.state.newChatId(),this.state.setCreateError(null),(t=this.host)==null||t.navigate(q2)}send(t,n){const s=`pending-${this.msgSeq++}`,a=id(t.filter(o=>o.type==="text").map(o=>o.text).join(`
|
|
56
|
+
`));if(this.state.addPending({id:s,text:a,attachments:n,content:t}),this.isDraft){const{currentModeId:o,currentModelId:l}=this.state;this.createSession({agentId:o,modelId:l,title:M2(t)}).then(d=>{d?this.firstPrompt={id:s,content:t,attachments:n}:this.state.markPendingFailed(s,"Could not start the session.")});return}this.deliver(s,t,n)}deliver(t,n,s){var a;this.lastSent=t,!((a=this.socket)!=null&&a.prompt(n,s))&&this.state.markPendingFailed(t,this.socket?"Not connected to the server - reconnecting. Retry once the status dot is green.":"No active session socket.")}retrySend(t){const n=this.state.pending.find(s=>s.id===t);n&&(this.state.markPendingSending(t),this.deliver(t,n.content,n.attachments))}retryTurn(t){this.send([{type:"text",text:t}])}cancel(){var t;(t=this.socket)==null||t.cancel(),this.state.markCancelling()}changeModel(t){var n;(n=this.socket)==null||n.setModel(t),this.state.setCurrentModel(t)}changeAgent(t){var n;(n=this.socket)==null||n.setMode(t),this.state.setCurrentAgent(t)}compact(){var t;(t=this.socket)==null||t.execCommand("compact"),this.state.setCompacting(!0),setTimeout(()=>this.state.setCompacting(!1),this.compactTimeoutMs)}async reloadSession(){var n;const t=this.state.activeId;if(!(!t||this.state.reloadingId===t)){this.state.setReloadingId(t);try{const s=await this.api.reloadSession(t);if(this.state.activeId!==t)return;this.state.loadDetail(s),(n=this.socket)==null||n.reset(s.head),this.loadPickers()}catch(s){if(this.state.activeId!==t)return;const a=s instanceof Error?s.message:"The server rejected the reload.";this.state.setSessionNotice({title:"Couldn't reload the session",fix:a,detail:a})}finally{this.state.reloadingId===t&&this.state.setReloadingId(null)}}}watchPaths(t){var n;(n=this.socket)==null||n.watchPaths(t)}async deleteSession(t){var n;try{await this.api.deleteSession(t)}catch{console.error("delete session failed"),this.refreshSessions();return}this.state.activeId===t?(n=this.host)==null||n.navigate("/"):this.refreshSessions()}async renameSession(t,n){this.state.renameSessionRow(t,n),await this.api.renameSession(t,n).catch(()=>{console.error("rename session failed")}),this.refreshSessions()}markLoading(t){t!==this.state.activeId&&this.state.setLoadingSession(t)}lock(){var t,n;this.closeSocket(),this.state.clearActive(),(t=this.host)==null||t.navigate("/",{replace:!0}),(n=this.host)==null||n.onLock()}get canSend(){return this.isDraft||xe.getState().activeId!==null}}const nt=new G2;function B0(e){const t=e.trim().slice(0,4e3);return!t||!nt.canSend?!1:(nt.send([{type:"text",text:t}]),!0)}function U0({size:e=14,className:t}){return T.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:T.jsx("polyline",{points:"6 9 12 15 18 9"})})}function K2({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[T.jsx("circle",{cx:"4",cy:"12",r:"1.8"}),T.jsx("circle",{cx:"12",cy:"12",r:"1.8"}),T.jsx("circle",{cx:"20",cy:"12",r:"1.8"})]})}function X2({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":!0,children:[T.jsx("circle",{cx:"12",cy:"5",r:"1.9"}),T.jsx("circle",{cx:"12",cy:"12",r:"1.9"}),T.jsx("circle",{cx:"12",cy:"19",r:"1.9"})]})}function J2({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M20 11a8 8 0 0 0-13.6-4.5L3 9"}),T.jsx("polyline",{points:"3 4 3 9 8 9"}),T.jsx("path",{d:"M4 13a8 8 0 0 0 13.6 4.5L21 15"}),T.jsx("polyline",{points:"21 20 21 15 16 15"})]})}function j0({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),T.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Z2({size:e=16,className:t}){return T.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:T.jsx("polyline",{points:"20 6 9 17 4 12"})})}function ex({size:e=18,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),T.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}function yr({size:e=28,className:t}){return T.jsx("svg",{className:`spinner ${t??""}`,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round","aria-hidden":!0,children:T.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})})}function tx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M12 19V5"}),T.jsx("path",{d:"m5 12 7-7 7 7"})]})}function Dp({size:e=16,className:t}){return T.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":!0,children:T.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function H0({size:e=20,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),T.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function z0({size:e=20,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("circle",{cx:"11",cy:"11",r:"7"}),T.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function $0({size:e=16,className:t}){return T.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:T.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"})})}function nx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2v1"}),T.jsx("path",{d:"M2 10l2.5 9h15l2.5-9H7.5"})]})}function W0({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"})]})}function Pp({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("polyline",{points:"9 15 7 13 9 11"}),T.jsx("polyline",{points:"15 11 17 13 15 15"})]})}function rx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("circle",{cx:"12",cy:"15",r:"2"}),T.jsx("path",{d:"M12 11v2"}),T.jsx("path",{d:"M12 17v1"})]})}function ix({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),T.jsx("line",{x1:"8",y1:"17",x2:"14",y2:"17"})]})}function sx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("circle",{cx:"10",cy:"14",r:"2"}),T.jsx("path",{d:"M20 17l-3-3-5 5"})]})}function ax({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("path",{d:"M8 13h3v3H8z"}),T.jsx("line",{x1:"14",y1:"13",x2:"16",y2:"13"}),T.jsx("line",{x1:"14",y1:"16",x2:"16",y2:"16"})]})}function ux({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,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"}),T.jsx("polyline",{points:"8 15 10 13 8 11"}),T.jsx("line",{x1:"12",y1:"16",x2:"16",y2:"16"})]})}function ox({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),T.jsx("polyline",{points:"7 10 12 15 17 10"}),T.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function Zl({size:e=20,className:t}){return T.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:T.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})})}function lx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"}),T.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"}),T.jsx("line",{x1:"9",y1:"18",x2:"13",y2:"18"})]})}function cx({size:e=18,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("polyline",{points:"4 14 10 14 10 20"}),T.jsx("polyline",{points:"20 10 14 10 14 4"}),T.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),T.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function dx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),T.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function fx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("polyline",{points:"16 18 22 12 16 6"}),T.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function hx({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("polyline",{points:"15 3 21 3 21 9"}),T.jsx("polyline",{points:"9 21 3 21 3 15"}),T.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),T.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function px({size:e=16,className:t}){return T.jsxs("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[T.jsx("polyline",{points:"4 14 10 14 10 20"}),T.jsx("polyline",{points:"20 10 14 10 14 4"}),T.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),T.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}var ea=d0();const As=8,Mp=6;function Y0({anchor:e,onClose:t,children:n}){const s=A.useRef(null),[a,o]=A.useState(null);return A.useLayoutEffect(()=>{const l=s.current;if(!e||!l)return;const d=e.getBoundingClientRect(),f=l.getBoundingClientRect(),h=d.bottom+Mp,g=h+f.height+As<=window.innerHeight?h:Math.max(As,d.top-Mp-f.height),x=Math.min(Math.max(As,d.right-f.width),Math.max(As,window.innerWidth-f.width-As));o({top:g,left:x})},[e]),A.useEffect(()=>{const l=h=>{var g;const E=h.target;(g=s.current)!=null&&g.contains(E)||e!=null&&e.contains(E)||t()},d=h=>{h.key==="Escape"&&t()};document.addEventListener("mousedown",l),document.addEventListener("keydown",d);const f={capture:!0,passive:!0};return window.addEventListener("scroll",t,f),window.addEventListener("resize",t),()=>{document.removeEventListener("mousedown",l),document.removeEventListener("keydown",d),window.removeEventListener("scroll",t,f),window.removeEventListener("resize",t)}},[e,t]),ea.createPortal(T.jsx("div",{ref:s,className:"menu-list menu-list-floating",role:"menu",style:a?{top:a.top,left:a.left}:{visibility:"hidden"},children:n}),document.body)}function mx(e,t){const n=e.trim().toLowerCase();if(!n)return 0;const s=t.toLowerCase();let a=0,o=0,l=-2;for(let d=0;d<n.length;d++){const f=n[d],h=s.indexOf(f,o);if(h===-1)return-1;a+=1,h===l+1&&(a+=3),(h===0||/\s|[-_/.]/.test(s[h-1]??""))&&(a+=2),l=h,o=h+1}return a}function gx({sessions:e,onOpen:t,onClose:n}){const[s,a]=A.useState(""),[o,l]=A.useState(0),d=A.useRef(null);A.useEffect(()=>{var g;(g=d.current)==null||g.focus()},[]);const f=A.useMemo(()=>s.trim()?e.map(g=>({s:g,score:mx(s,g.title)})).filter(g=>g.score>=0).sort((g,x)=>x.score-g.score).map(g=>g.s):e.slice(0,50),[e,s]);A.useEffect(()=>{l(0)},[s]);const h=g=>{t(g),n()},E=g=>{if(g.key==="Escape")n();else if(g.key==="ArrowDown")g.preventDefault(),l(x=>Math.min(x+1,f.length-1));else if(g.key==="ArrowUp")g.preventDefault(),l(x=>Math.max(x-1,0));else if(g.key==="Enter"){g.preventDefault();const x=f[o];x&&h(x.sessionId)}};return ea.createPortal(T.jsx("div",{className:"search-backdrop",onClick:n,children:T.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Search sessions",onClick:g=>g.stopPropagation(),children:[T.jsxs("div",{className:"search-field",children:[T.jsx(z0,{size:20,className:"search-field-icon"}),T.jsx("input",{ref:d,className:"search-modal-input",value:s,placeholder:"Search sessions…",onChange:g=>a(g.target.value),onKeyDown:E}),T.jsx("kbd",{className:"search-esc",children:"esc"})]}),T.jsx("div",{className:"search-results",children:f.length===0?T.jsx("p",{className:"search-empty",children:s.trim()?`No sessions match "${s}".`:"No sessions yet."}):f.map((g,x)=>T.jsxs("button",{className:`search-result ${x===o?"is-active":""}`,onMouseEnter:()=>l(x),onClick:()=>h(g.sessionId),children:[T.jsx("span",{className:"search-result-title",children:g.title}),T.jsx("span",{className:"search-result-agent",children:g.agentId??"kiro_default"})]},g.sessionId))})]})}),document.body)}function V0(e,t=!1){const n=Date.parse(e);if(Number.isNaN(n))return"";const s=Math.round((Date.now()-n)/6e4),a=l=>t?`${l} ago`:l;if(s<1)return t?"just now":"now";if(s<60)return a(`${s}m`);const o=Math.round(s/60);return o<24?a(`${o}h`):a(`${Math.round(o/24)}d`)}function Ex(e){if(!e)return"Unknown device";const t=/iPhone|iPad/.test(e)?"iOS":/Android/.test(e)?"Android":/Macintosh|Mac OS/.test(e)?"macOS":/Windows/.test(e)?"Windows":/Linux/.test(e)?"Linux":"Device",n=/Firefox/.test(e)?"Firefox":/Edg\//.test(e)?"Edge":/Chrome/.test(e)?"Chrome":/Safari/.test(e)?"Safari":"";return n?`${t} · ${n}`:t}function Tx({onClose:e,onSelfRevoked:t}){const[n,s]=A.useState(null),[a,o]=A.useState(!1),l=()=>dt.devices().then(h=>s(h.devices)).catch(()=>s([]));A.useEffect(()=>{l()},[]);const d=async h=>{o(!0);try{if(await dt.revokeDevice(h.id),h.current){t();return}await l()}finally{o(!1)}},f=async()=>{o(!0);try{await dt.logoutAll(),t()}finally{o(!1)}};return ea.createPortal(T.jsx("div",{className:"search-backdrop",onClick:e,children:T.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Logged-in devices",onClick:h=>h.stopPropagation(),children:[T.jsxs("div",{className:"devices-head",children:[T.jsx("span",{className:"devices-title",children:"Logged-in devices"}),T.jsx("button",{className:"btn-ghost",onClick:e,children:"Close"})]}),T.jsx("div",{className:"devices-list",children:n===null?T.jsx("p",{className:"search-empty",children:"Loading…"}):n.length===0?T.jsx("p",{className:"search-empty",children:"No active devices."}):n.map(h=>T.jsxs("div",{className:"device-row",children:[T.jsxs("span",{className:"device-main",children:[T.jsxs("span",{className:"device-name",children:[Ex(h.userAgent),h.current&&T.jsx("span",{className:"device-badge",children:"This device"})]}),T.jsxs("span",{className:"device-sub",children:["Active ",V0(h.lastSeenAt,!0)]})]}),T.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:()=>d(h),children:h.current?"Log out":"Revoke"})]},h.id))}),n&&n.length>1&&T.jsx("div",{className:"devices-foot",children:T.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:f,children:"Log out all devices"})})]})}),document.body)}function yx({title:e,message:t,confirmLabel:n="Confirm",danger:s=!1,onConfirm:a,onCancel:o}){return A.useEffect(()=>{const l=d=>{d.key==="Escape"&&o()};return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[o]),ea.createPortal(T.jsx("div",{className:"confirm-backdrop",onClick:l=>{l.target===l.currentTarget&&o()},children:T.jsxs("div",{className:"confirm-modal",role:"dialog","aria-modal":"true","aria-label":e,children:[T.jsx("h3",{className:"confirm-title",children:e}),t&&T.jsx("p",{className:"confirm-message",children:t}),T.jsxs("div",{className:"confirm-actions",children:[T.jsx("button",{className:"btn-ghost",onClick:o,children:"Cancel"}),T.jsx("button",{className:s?"btn-danger":"btn-primary",onClick:a,autoFocus:!0,children:n})]})]})}),document.body)}function xx({sessions:e,activeId:t,loadingId:n,onOpen:s,onNew:a,onDelete:o,onRename:l,onLock:d}){const[f,h]=A.useState(!1),[E,g]=A.useState(!1),[x,b]=A.useState(!1),[C,v]=A.useState(null),[O,R]=A.useState(null),[B,M]=A.useState(null),[se,$]=A.useState(null),[H,ee]=A.useState(""),ue=A.useCallback(()=>{v(null),R(null)},[]);A.useEffect(()=>{if(!x)return;const U=()=>b(!1);return document.addEventListener("click",U),()=>document.removeEventListener("click",U)},[x]);const fe=U=>{const re=H.trim();re&&l(U,re),$(null)};return T.jsxs("aside",{className:"sidebar",children:[T.jsxs("header",{className:"sidebar-head",children:[T.jsxs("span",{className:"brand",children:[T.jsx("img",{className:"brand-logo",src:"/logo.svg",alt:""}),T.jsx("span",{className:"wordmark",children:"Casper"})]}),T.jsxs("div",{className:"sidebar-actions",children:[T.jsxs("div",{className:"account-menu",children:[T.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Account",title:"Account",onClick:U=>{U.stopPropagation(),b(re=>!re)},children:T.jsx(ex,{size:18})}),x&&T.jsxs("div",{className:"menu-list",onClick:U=>U.stopPropagation(),children:[T.jsx("button",{className:"menu-item",onClick:()=>{b(!1),g(!0)},children:"Devices"}),T.jsx("button",{className:"menu-item",onClick:()=>{b(!1),d()},children:"Lock app"})]})]}),T.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Search sessions",onClick:()=>h(!0),children:T.jsx(z0,{size:20})}),T.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"New session",title:"New session",onClick:a,children:T.jsx(H0,{size:20})})]})]}),T.jsx("div",{className:"sidebar-list",children:e.length===0?T.jsx("p",{className:"sidebar-empty",children:"No sessions yet. Start one and it keeps running while you're away."}):e.map(U=>T.jsxs("div",{className:`srow ${U.sessionId===t?"is-active":""} ${C===U.sessionId?"is-menu-open":""}`,children:[se===U.sessionId?T.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:re=>re.currentTarget.select(),value:H,onChange:re=>ee(re.target.value),onBlur:()=>fe(U.sessionId),onKeyDown:re=>{re.key==="Enter"&&fe(U.sessionId),re.key==="Escape"&&$(null)},onClick:re=>re.stopPropagation()}):T.jsx(rd,{className:"srow-open",to:F0(U.sessionId),onClick:re=>{re.metaKey||re.ctrlKey||re.shiftKey||re.altKey||s(U.sessionId)},children:T.jsxs("span",{className:"srow-main",children:[T.jsx("span",{className:"srow-title",title:U.title,children:U.title}),T.jsxs("span",{className:"srow-sub",children:[T.jsx("span",{className:"srow-agent",children:U.agentId??"kiro_default"}),T.jsx("span",{className:"srow-dot",children:"·"}),n===U.sessionId&&T.jsx(yr,{size:11,className:"srow-spinner"}),T.jsx("span",{className:"srow-when",children:V0(U.updatedAt)})]})]})}),T.jsxs("div",{className:"srow-menu",children:[T.jsx("button",{className:"iconbtn srow-menu-btn","aria-label":"Session actions","aria-haspopup":"menu","aria-expanded":C===U.sessionId,onClick:re=>{re.stopPropagation();const ce=C===U.sessionId;R(ce?null:re.currentTarget),v(ce?null:U.sessionId)},children:T.jsx(X2,{size:16})}),C===U.sessionId&&T.jsxs(Y0,{anchor:O,onClose:ue,children:[T.jsx("button",{className:"menu-item",onClick:()=>{ee(U.title),$(U.sessionId),ue()},children:"Rename"}),T.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{ue(),M(U.sessionId)},children:"Delete"})]})]})]},U.sessionId))}),f&&T.jsx(gx,{sessions:e,onOpen:s,onClose:()=>h(!1)}),E&&T.jsx(Tx,{onClose:()=>g(!1),onSelfRevoked:()=>{g(!1),d()}}),B&&T.jsx(yx,{title:"Delete session?",message:"This session and its history will be permanently deleted. This can't be undone.",confirmLabel:"Delete",danger:!0,onConfirm:()=>{const U=B;M(null),o(U)},onCancel:()=>M(null)})]})}function q0(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}const bx="modulepreload",kx=function(e){return"/"+e},Fp={},Nc=function(t,n,s){let a=Promise.resolve();if(n&&n.length>0){let l=function(h){return Promise.all(h.map(E=>Promise.resolve(E).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),f=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=l(n.map(h=>{if(h=kx(h),h in Fp)return;Fp[h]=!0;const E=h.endsWith(".css"),g=E?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const x=document.createElement("link");if(x.rel=E?"stylesheet":bx,E||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),E)return new Promise((b,C)=>{x.addEventListener("load",b),x.addEventListener("error",()=>C(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=l,window.dispatchEvent(d),!d.defaultPrevented)throw l}return a.then(l=>{for(const d of l||[])d.status==="rejected"&&o(d.reason);return t().catch(o)})};function Bp(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const l=n.slice(a,s).trim();(l||!o)&&t.push(l),a=s+1,s=n.indexOf(",",a)}return t}function Q0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Sx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_x=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cx={};function Up(e,t){return(Cx.jsx?_x:Sx).test(e)}const Nx=/[ \t\n\f\r]/g;function Ax(e){return typeof e=="object"?e.type==="text"?jp(e.value):!1:jp(e)}function jp(e){return e.replace(Nx,"")===""}class ta{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}ta.prototype.normal={};ta.prototype.property={};ta.prototype.space=void 0;function G0(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new ta(n,s,t)}function qs(e){return e.toLowerCase()}class Ht{constructor(t,n){this.attribute=n,this.property=t}}Ht.prototype.attribute="";Ht.prototype.booleanish=!1;Ht.prototype.boolean=!1;Ht.prototype.commaOrSpaceSeparated=!1;Ht.prototype.commaSeparated=!1;Ht.prototype.defined=!1;Ht.prototype.mustUseProperty=!1;Ht.prototype.number=!1;Ht.prototype.overloadedBoolean=!1;Ht.prototype.property="";Ht.prototype.spaceSeparated=!1;Ht.prototype.space=void 0;let vx=0;const we=Gr(),ot=Gr(),Ac=Gr(),ie=Gr(),Ye=Gr(),Wr=Gr(),qt=Gr();function Gr(){return 2**++vx}const vc=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:ot,commaOrSpaceSeparated:qt,commaSeparated:Wr,number:ie,overloadedBoolean:Ac,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),ec=Object.keys(vc);class ad extends Ht{constructor(t,n,s,a){let o=-1;if(super(t,n),Hp(this,"space",a),typeof s=="number")for(;++o<ec.length;){const l=ec[o];Hp(this,ec[o],(s&vc[l])===vc[l])}}}ad.prototype.defined=!0;function Hp(e,t,n){n&&(e[t]=n)}function Di(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new ad(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[qs(s)]=s,n[qs(o.attribute)]=s}return new ta(t,n,e.space)}const K0=Di({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Ye,ariaCurrent:null,ariaDescribedBy:Ye,ariaDetails:null,ariaDisabled:ot,ariaDropEffect:Ye,ariaErrorMessage:null,ariaExpanded:ot,ariaFlowTo:Ye,ariaGrabbed:ot,ariaHasPopup:null,ariaHidden:ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ye,ariaLevel:ie,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Ye,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ot,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function X0(e,t){return t in e?e[t]:t}function J0(e,t){return X0(e,t.toLowerCase())}const wx=Di({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wr,acceptCharset:Ye,accessKey:Ye,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Ye,autoFocus:we,autoPlay:we,blocking:Ye,capture:null,charSet:null,checked:we,cite:null,className:Ye,closedBy:null,colorSpace:null,cols:ie,colSpan:ie,command:null,commandFor:null,content:null,contentEditable:ot,controls:we,controlsList:Ye,coords:ie|Wr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:Ac,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Ye,height:ie,hidden:Ac,high:ie,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:we,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:ie,pattern:null,ping:Ye,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Ye,required:we,reversed:we,rows:ie,rowSpan:ie,sandbox:Ye,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ot,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:Wr,part:Ye,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:J0}),Ix=Di({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",maskType:"mask-type",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:qt,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:Ye,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:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,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:Wr,g2:Wr,glyphName:Wr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,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:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,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:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:X0}),Z0=Di({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()}}),e1=Di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:J0}),t1=Di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Lx={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"},Rx=/[A-Z]/g,zp=/-[a-z]/g,Ox=/^data[-\w.:]+$/i;function Yu(e,t){const n=qs(t);let s=t,a=Ht;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ox.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zp,Px);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zp.test(o)){let l=o.replace(Rx,Dx);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=ad}return new a(s,t)}function Dx(e){return"-"+e.toLowerCase()}function Px(e){return e.charAt(1).toUpperCase()}const na=G0([K0,wx,Z0,e1,t1],"html"),xr=G0([K0,Ix,Z0,e1,t1],"svg");function $p(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function n1(e){return e.join(" ").trim()}var Ni={},tc,Wp;function Mx(){if(Wp)return tc;Wp=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
|
|
57
|
+
`,h="/",E="*",g="",x="comment",b="declaration";function C(O,R){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];R=R||{};var B=1,M=1;function se(de){var Y=de.match(t);Y&&(B+=Y.length);var ge=de.lastIndexOf(f);M=~ge?de.length-ge:M+de.length}function $(){var de={line:B,column:M};return function(Y){return Y.position=new H(de),fe(),Y}}function H(de){this.start=de,this.end={line:B,column:M},this.source=R.source}H.prototype.content=O;function ee(de){var Y=new Error(R.source+":"+B+":"+M+": "+de);if(Y.reason=de,Y.filename=R.source,Y.line=B,Y.column=M,Y.source=O,!R.silent)throw Y}function ue(de){var Y=de.exec(O);if(Y){var ge=Y[0];return se(ge),O=O.slice(ge.length),Y}}function fe(){ue(n)}function U(de){var Y;for(de=de||[];Y=re();)Y!==!1&&de.push(Y);return de}function re(){var de=$();if(!(h!=O.charAt(0)||E!=O.charAt(1))){for(var Y=2;g!=O.charAt(Y)&&(E!=O.charAt(Y)||h!=O.charAt(Y+1));)++Y;if(Y+=2,g===O.charAt(Y-1))return ee("End of comment missing");var ge=O.slice(2,Y-2);return M+=2,se(ge),O=O.slice(Y),M+=2,de({type:x,comment:ge})}}function ce(){var de=$(),Y=ue(s);if(Y){if(re(),!ue(a))return ee("property missing ':'");var ge=ue(o),pe=de({type:b,property:v(Y[0].replace(e,g)),value:ge?v(ge[0].replace(e,g)):g});return ue(l),pe}}function ke(){var de=[];U(de);for(var Y;Y=ce();)Y!==!1&&(de.push(Y),U(de));return de}return fe(),ke()}function v(O){return O?O.replace(d,g):g}return tc=C,tc}var Yp;function Fx(){if(Yp)return Ni;Yp=1;var e=Ni&&Ni.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.default=n;const t=e(Mx());function n(s,a){let o=null;if(!s||typeof s!="string")return o;const l=(0,t.default)(s),d=typeof a=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:E}=f;d?a(h,E,f):E&&(o=o||{},o[h]=E)}),o}return Ni}var vs={},Vp;function Bx(){if(Vp)return vs;Vp=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,E){return E.toUpperCase()},d=function(h,E){return"".concat(E,"-")},f=function(h,E){return E===void 0&&(E={}),o(h)?h:(h=h.toLowerCase(),E.reactCompat?h=h.replace(a,d):h=h.replace(s,d),h.replace(t,l))};return vs.camelCase=f,vs}var ws,qp;function Ux(){if(qp)return ws;qp=1;var e=ws&&ws.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Fx()),n=Bx();function s(a,o){var l={};return!a||typeof a!="string"||(0,t.default)(a,function(d,f){d&&f&&(l[(0,n.camelCase)(d,o)]=f)}),l}return s.default=s,ws=s,ws}var jx=Ux();const Hx=Vc(jx),Vu=r1("end"),Ln=r1("start");function r1(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function i1(e){const t=Ln(e),n=Vu(e);if(t&&n)return{start:t,end:n}}function Fs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Qp(e.position):"start"in e||"end"in e?Qp(e):"line"in e||"column"in e?wc(e):""}function wc(e){return Gp(e&&e.line)+":"+Gp(e&&e.column)}function Qp(e){return wc(e&&e.start)+"-"+wc(e&&e.end)}function Gp(e){return e&&typeof e=="number"?e:1}class vt extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const f=s.indexOf(":");f===-1?o.ruleId=s:(o.source=s.slice(0,f),o.ruleId=s.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=Fs(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vt.prototype.file="";vt.prototype.name="";vt.prototype.reason="";vt.prototype.message="";vt.prototype.stack="";vt.prototype.column=void 0;vt.prototype.line=void 0;vt.prototype.ancestors=void 0;vt.prototype.cause=void 0;vt.prototype.fatal=void 0;vt.prototype.place=void 0;vt.prototype.ruleId=void 0;vt.prototype.source=void 0;const ud={}.hasOwnProperty,zx=new Map,$x=/[A-Z]/g,Wx=new Set(["table","tbody","thead","tfoot","tr"]),Yx=new Set(["td","th"]),s1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Vx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=eb(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");s=Zx(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,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"?xr:na,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=a1(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function a1(e,t,n){if(t.type==="element")return qx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Qx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Kx(e,t,n);if(t.type==="mdxjsEsm")return Gx(e,t);if(t.type==="root")return Xx(e,t,n);if(t.type==="text")return Jx(e,t)}function qx(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=xr,e.schema=a),e.ancestors.push(t);const o=o1(e,t.tagName,!1),l=tb(e,t);let d=ld(e,t);return Wx.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!Ax(f):!0})),u1(e,l,o,t),od(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Qx(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}Qs(e,t.position)}function Gx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qs(e,t.position)}function Kx(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=xr,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:o1(e,t.name,!0),l=nb(e,t),d=ld(e,t);return u1(e,l,o,t),od(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Xx(e,t,n){const s={};return od(s,ld(e,t)),e.create(t,e.Fragment,s,n)}function Jx(e,t){return t.value}function u1(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function od(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Zx(e,t,n){return s;function s(a,o,l,d){const h=Array.isArray(l.children)?n:t;return d?h(o,l,d):h(o,l)}}function eb(e,t){return n;function n(s,a,o,l){const d=Array.isArray(o.children),f=Ln(s);return t(a,o,l,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function tb(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&ud.call(t.properties,a)){const o=rb(e,a,t.properties[a]);if(o){const[l,d]=o;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&Yx.has(t.tagName)?s=d:n[l]=d}}if(s){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function nb(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const l=o.expression;l.type;const d=l.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else Qs(e,t.position);else{const a=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const d=s.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else Qs(e,t.position);else o=s.value===null?!0:s.value;n[a]=o}return n}function ld(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:zx;for(;++s<t.children.length;){const o=t.children[s];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=a.get(f)||0;l=f+"-"+h,a.set(f,h+1)}}const d=a1(e,o,l);d!==void 0&&n.push(d)}return n}function rb(e,t,n){const s=Yu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?Q0(n):n1(n)),s.property==="style"){let a=typeof n=="object"?n:ib(e,String(n));return e.stylePropertyNameCase==="css"&&(a=sb(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?Lx[s.property]||s.property:s.attribute,n]}}function ib(e,t){try{return Hx(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=s1+"#cannot-parse-style-attribute",a}}function o1(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,l;for(;++o<a.length;){const d=Up(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};l=l?{type:"MemberExpression",object:l,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}s=l}else s=Up(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return ud.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);Qs(e)}function Qs(e,t){const n=new vt("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 sb(e){const t={};let n;for(n in e)ud.call(e,n)&&(t[ab(n)]=e[n]);return t}function ab(e){let t=e.replace($x,ub);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ub(e){return"-"+e.toLowerCase()}const nc={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"]},ob={};function cd(e,t){const n=ob,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return l1(e,s,a)}function l1(e,t,n){if(lb(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 Kp(e.children,t,n)}return Array.isArray(e)?Kp(e,t,n):""}function Kp(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=l1(e[a],t,n);return s.join("")}function lb(e){return!!(e&&typeof e=="object")}const Xp=document.createElement("i");function dd(e){const t="&"+e+";";Xp.innerHTML=t;const n=Xp.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qt(e,t,n,s){const a=e.length;let o=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)l=Array.from(s),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<s.length;)l=s.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function rn(e,t){return e.length>0?(Qt(e,e.length,0,t),e):t}const Jp={}.hasOwnProperty;function c1(e){const t={};let n=-1;for(;++n<e.length;)cb(t,e[n]);return t}function cb(e,t){let n;for(n in t){const a=(Jp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Jp.call(a,l)||(a[l]=[]);const d=o[l];db(a[l],Array.isArray(d)?d:d?[d]:[])}}}function db(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);Qt(e,0,0,s)}function d1(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 En(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=br(/[A-Za-z]/),At=br(/[\dA-Za-z]/),fb=br(/[#-'*+\--9=?A-Z^-~]/);function Du(e){return e!==null&&(e<32||e===127)}const Ic=br(/\d/),hb=br(/[\dA-Fa-f]/),pb=br(/[!-/:-@[-`{-~]/);function be(e){return e!==null&&e<-2}function Ve(e){return e!==null&&(e<0||e===32)}function Fe(e){return e===-2||e===-1||e===32}const qu=br(new RegExp("\\p{P}|\\p{S}","u")),Vr=br(/\s/);function br(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Pi(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&At(e.charCodeAt(n+1))&&At(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(l=String.fromCharCode(o,d),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(s,n),encodeURIComponent(l)),s=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function Me(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return Fe(f)?(e.enter(n),d(f)):t(f)}function d(f){return Fe(f)&&o++<a?(e.consume(f),d):(e.exit(n),t(f))}}const mb={tokenize:gb};function gb(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Me(e,t,"linePrefix")}function a(d){return e.enter("paragraph"),o(d)}function o(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(d)}function l(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return be(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),l)}}const Eb={tokenize:Tb},Zp={tokenize:yb};function Tb(e){const t=this,n=[];let s=0,a,o,l;return d;function d(M){if(s<n.length){const se=n[s];return t.containerState=se[1],e.attempt(se[0].continuation,f,h)(M)}return h(M)}function f(M){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&B();const se=t.events.length;let $=se,H;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){H=t.events[$][1].end;break}R(s);let ee=se;for(;ee<t.events.length;)t.events[ee][1].end={...H},ee++;return Qt(t.events,$+1,0,t.events.slice(se)),t.events.length=ee,h(M)}return d(M)}function h(M){if(s===n.length){if(!a)return x(M);if(a.currentConstruct&&a.currentConstruct.concrete)return C(M);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zp,E,g)(M)}function E(M){return a&&B(),R(s),x(M)}function g(M){return t.parser.lazy[t.now().line]=s!==n.length,l=t.now().offset,C(M)}function x(M){return t.containerState={},e.attempt(Zp,b,C)(M)}function b(M){return s++,n.push([t.currentConstruct,t.containerState]),x(M)}function C(M){if(M===null){a&&B(),R(0),e.consume(M);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),v(M)}function v(M){if(M===null){O(e.exit("chunkFlow"),!0),R(0),e.consume(M);return}return be(M)?(e.consume(M),O(e.exit("chunkFlow")),s=0,t.interrupt=void 0,d):(e.consume(M),v)}function O(M,se){const $=t.sliceStream(M);if(se&&$.push(null),M.previous=o,o&&(o.next=M),o=M,a.defineSkip(M.start),a.write($),t.parser.lazy[M.start.line]){let H=a.events.length;for(;H--;)if(a.events[H][1].start.offset<l&&(!a.events[H][1].end||a.events[H][1].end.offset>l))return;const ee=t.events.length;let ue=ee,fe,U;for(;ue--;)if(t.events[ue][0]==="exit"&&t.events[ue][1].type==="chunkFlow"){if(fe){U=t.events[ue][1].end;break}fe=!0}for(R(s),H=ee;H<t.events.length;)t.events[H][1].end={...U},H++;Qt(t.events,ue+1,0,t.events.slice(ee)),t.events.length=H}}function R(M){let se=n.length;for(;se-- >M;){const $=n[se];t.containerState=$[1],$[0].exit.call(t,e)}n.length=M}function B(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function yb(e,t,n){return Me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ii(e){if(e===null||Ve(e)||Vr(e))return 1;if(qu(e))return 2}function Qu(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const Lc={name:"attention",resolveAll:xb,tokenize:bb};function xb(e,t){let n=-1,s,a,o,l,d,f,h,E;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[s][1].end},x={...e[n][1].start};em(g,-f),em(x,f),l={type:f>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:f>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[s][1].end={...l.start},e[n][1].start={...d.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=rn(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=rn(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rn(h,Qu(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=rn(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(E=2,h=rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):E=0,Qt(e,s-1,n-s+3,h),n=s+h.length-E-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function bb(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=Ii(s);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===o)return e.consume(f),d;const h=e.exit("attentionSequence"),E=Ii(f),g=!E||E===2&&a||n.includes(f),x=!a||a===2&&E||n.includes(s);return h._open=!!(o===42?g:g&&(a||!x)),h._close=!!(o===42?x:x&&(E||!g)),t(f)}}function em(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kb={name:"autolink",tokenize:Sb};function Sb(e,t,n){let s=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return Rt(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||At(b)?(s=1,d(b)):h(b)}function d(b){return b===58?(e.consume(b),s=0,f):(b===43||b===45||b===46||At(b))&&s++<32?(e.consume(b),d):(s=0,h(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Du(b)?n(b):(e.consume(b),f)}function h(b){return b===64?(e.consume(b),E):fb(b)?(e.consume(b),h):n(b)}function E(b){return At(b)?g(b):n(b)}function g(b){return b===46?(e.consume(b),s=0,E):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||At(b))&&s++<63){const C=b===45?x:g;return e.consume(b),C}return n(b)}}const ra={partial:!0,tokenize:_b};function _b(e,t,n){return s;function s(o){return Fe(o)?Me(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||be(o)?t(o):n(o)}}const f1={continuation:{tokenize:Nb},exit:Ab,name:"blockQuote",tokenize:Cb};function Cb(e,t,n){const s=this;return a;function a(l){if(l===62){const d=s.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Fe(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function Nb(e,t,n){const s=this;return a;function a(l){return Fe(l)?Me(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(f1,t,n)(l)}}function Ab(e){e.exit("blockQuote")}const h1={name:"characterEscape",tokenize:vb};function vb(e,t,n){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return pb(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const p1={name:"characterReference",tokenize:wb};function wb(e,t,n){const s=this;let a=0,o,l;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),f}function f(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=At,E(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=hb,E):(e.enter("characterReferenceValue"),o=7,l=Ic,E(g))}function E(g){if(g===59&&a){const x=e.exit("characterReferenceValue");return l===At&&!dd(s.sliceSerialize(x))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(g)&&a++<o?(e.consume(g),E):n(g)}}const tm={partial:!0,tokenize:Lb},nm={concrete:!0,name:"codeFenced",tokenize:Ib};function Ib(e,t,n){const s=this,a={partial:!0,tokenize:$};let o=0,l=0,d;return f;function f(H){return h(H)}function h(H){const ee=s.events[s.events.length-1];return o=ee&&ee[1].type==="linePrefix"?ee[2].sliceSerialize(ee[1],!0).length:0,d=H,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),E(H)}function E(H){return H===d?(l++,e.consume(H),E):l<3?n(H):(e.exit("codeFencedFenceSequence"),Fe(H)?Me(e,g,"whitespace")(H):g(H))}function g(H){return H===null||be(H)?(e.exit("codeFencedFence"),s.interrupt?t(H):e.check(tm,v,se)(H)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(H))}function x(H){return H===null||be(H)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(H)):Fe(H)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,b,"whitespace")(H)):H===96&&H===d?n(H):(e.consume(H),x)}function b(H){return H===null||be(H)?g(H):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(H))}function C(H){return H===null||be(H)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(H)):H===96&&H===d?n(H):(e.consume(H),C)}function v(H){return e.attempt(a,se,O)(H)}function O(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),R}function R(H){return o>0&&Fe(H)?Me(e,B,"linePrefix",o+1)(H):B(H)}function B(H){return H===null||be(H)?e.check(tm,v,se)(H):(e.enter("codeFlowValue"),M(H))}function M(H){return H===null||be(H)?(e.exit("codeFlowValue"),B(H)):(e.consume(H),M)}function se(H){return e.exit("codeFenced"),t(H)}function $(H,ee,ue){let fe=0;return U;function U(Y){return H.enter("lineEnding"),H.consume(Y),H.exit("lineEnding"),re}function re(Y){return H.enter("codeFencedFence"),Fe(Y)?Me(H,ce,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):ce(Y)}function ce(Y){return Y===d?(H.enter("codeFencedFenceSequence"),ke(Y)):ue(Y)}function ke(Y){return Y===d?(fe++,H.consume(Y),ke):fe>=l?(H.exit("codeFencedFenceSequence"),Fe(Y)?Me(H,de,"whitespace")(Y):de(Y)):ue(Y)}function de(Y){return Y===null||be(Y)?(H.exit("codeFencedFence"),ee(Y)):ue(Y)}}}function Lb(e,t,n){const s=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}const rc={name:"codeIndented",tokenize:Ob},Rb={partial:!0,tokenize:Db};function Ob(e,t,n){const s=this;return a;function a(h){return e.enter("codeIndented"),Me(e,o,"linePrefix",5)(h)}function o(h){const E=s.events[s.events.length-1];return E&&E[1].type==="linePrefix"&&E[2].sliceSerialize(E[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):be(h)?e.attempt(Rb,l,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||be(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function Db(e,t,n){const s=this;return a;function a(l){return s.parser.lazy[s.now().line]?n(l):be(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):Me(e,o,"linePrefix",5)(l)}function o(l){const d=s.events[s.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):be(l)?a(l):n(l)}}const Pb={name:"codeText",previous:Fb,resolve:Mb,tokenize:Bb};function Mb(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function Fb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Bb(e,t,n){let s=0,a,o;return l;function l(g){return e.enter("codeText"),e.enter("codeTextSequence"),d(g)}function d(g){return g===96?(e.consume(g),s++,d):(e.exit("codeTextSequence"),f(g))}function f(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),f):g===96?(o=e.enter("codeTextSequence"),a=0,E(g)):be(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||be(g)?(e.exit("codeTextData"),f(g)):(e.consume(g),h)}function E(g){return g===96?(e.consume(g),a++,E):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",h(g))}}class Ub{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 s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&Is(this.left,s),o.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),Is(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Is(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);Is(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Is(this.left,n.reverse())}}}function Is(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 m1(e){const t={};let n=-1,s,a,o,l,d,f,h;const E=new Ub(e);for(;++n<E.length;){for(;n in t;)n=t[n];if(s=E.get(n),n&&s[1].type==="chunkFlow"&&E.get(n-1)[1].type==="listItemPrefix"&&(f=s[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,jb(E,n)),n=t[n],h=!0);else if(s[1]._container){for(o=n,a=void 0;o--;)if(l=E.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(E.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(s[1].end={...E.get(a)[1].start},d=E.slice(a,n),d.unshift(s),E.splice(a,n-a+1,d))}}return Qt(e,0,Number.POSITIVE_INFINITY,E.slice(0)),!h}function jb(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const o=[];let l=n._tokenizer;l||(l=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const d=l.events,f=[],h={};let E,g,x=-1,b=n,C=0,v=0;const O=[v];for(;b;){for(;e.get(++a)[1]!==b;);o.push(a),b._tokenizer||(E=s.sliceStream(b),b.next||E.push(null),g&&l.defineSkip(b.start),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(E),b._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),g=b,b=b.next}for(b=n;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(v=x+1,O.push(v),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(l.events=[],b?(b._tokenizer=void 0,b.previous=void 0):O.pop(),x=O.length;x--;){const R=d.slice(O[x],O[x+1]),B=o.pop();f.push([B,B+R.length-1]),e.splice(B,2,R)}for(f.reverse(),x=-1;++x<f.length;)h[C+f[x][0]]=C+f[x][1],C+=f[x][1]-f[x][0]-1;return h}const Hb={resolve:$b,tokenize:Wb},zb={partial:!0,tokenize:Yb};function $b(e){return m1(e),e}function Wb(e,t){let n;return s;function s(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(d)}function a(d){return d===null?o(d):be(d)?e.check(zb,l,o)(d):(e.consume(d),a)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function l(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function Yb(e,t,n){const s=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Me(e,o,"linePrefix")}function o(l){if(l===null||be(l))return n(l);const d=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(l):e.interrupt(s.parser.constructs.flow,n,t)(l)}}function g1(e,t,n,s,a,o,l,d,f){const h=f||Number.POSITIVE_INFINITY;let E=0;return g;function g(R){return R===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(R),e.exit(o),x):R===null||R===32||R===41||Du(R)?n(R):(e.enter(s),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),v(R))}function x(R){return R===62?(e.enter(o),e.consume(R),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===62?(e.exit("chunkString"),e.exit(d),x(R)):R===null||R===60||be(R)?n(R):(e.consume(R),R===92?C:b)}function C(R){return R===60||R===62||R===92?(e.consume(R),b):b(R)}function v(R){return!E&&(R===null||R===41||Ve(R))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(s),t(R)):E<h&&R===40?(e.consume(R),E++,v):R===41?(e.consume(R),E--,v):R===null||R===32||R===40||Du(R)?n(R):(e.consume(R),R===92?O:v)}function O(R){return R===40||R===41||R===92?(e.consume(R),v):v(R)}}function E1(e,t,n,s,a,o){const l=this;let d=0,f;return h;function h(b){return e.enter(s),e.enter(a),e.consume(b),e.exit(a),e.enter(o),E}function E(b){return d>999||b===null||b===91||b===93&&!f||b===94&&!d&&"_hiddenFootnoteSupport"in l.parser.constructs?n(b):b===93?(e.exit(o),e.enter(a),e.consume(b),e.exit(a),e.exit(s),t):be(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),E):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===null||b===91||b===93||be(b)||d++>999?(e.exit("chunkString"),E(b)):(e.consume(b),f||(f=!Fe(b)),b===92?x:g)}function x(b){return b===91||b===92||b===93?(e.consume(b),d++,g):g(b)}}function T1(e,t,n,s,a,o){let l;return d;function d(x){return x===34||x===39||x===40?(e.enter(s),e.enter(a),e.consume(x),e.exit(a),l=x===40?41:x,f):n(x)}function f(x){return x===l?(e.enter(a),e.consume(x),e.exit(a),e.exit(s),t):(e.enter(o),h(x))}function h(x){return x===l?(e.exit(o),f(l)):x===null?n(x):be(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),Me(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),E(x))}function E(x){return x===l||x===null||be(x)?(e.exit("chunkString"),h(x)):(e.consume(x),x===92?g:E)}function g(x){return x===l||x===92?(e.consume(x),E):E(x)}}function Bs(e,t){let n;return s;function s(a){return be(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):Fe(a)?Me(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const Vb={name:"definition",tokenize:Qb},qb={partial:!0,tokenize:Gb};function Qb(e,t,n){const s=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return E1.call(s,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return a=En(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),f):n(b)}function f(b){return Ve(b)?Bs(e,h)(b):h(b)}function h(b){return g1(e,E,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function E(b){return e.attempt(qb,g,g)(b)}function g(b){return Fe(b)?Me(e,x,"whitespace")(b):x(b)}function x(b){return b===null||be(b)?(e.exit("definition"),s.parser.defined.push(a),t(b)):n(b)}}function Gb(e,t,n){return s;function s(d){return Ve(d)?Bs(e,a)(d):n(d)}function a(d){return T1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Fe(d)?Me(e,l,"whitespace")(d):l(d)}function l(d){return d===null||be(d)?t(d):n(d)}}const Kb={name:"hardBreakEscape",tokenize:Xb};function Xb(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return be(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Jb={name:"headingAtx",resolve:Zb,tokenize:ek};function Zb(e,t){let n=e.length-2,s=3,a,o;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},o={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},Qt(e,s,n-s+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function ek(e,t,n){let s=0;return a;function a(E){return e.enter("atxHeading"),o(E)}function o(E){return e.enter("atxHeadingSequence"),l(E)}function l(E){return E===35&&s++<6?(e.consume(E),l):E===null||Ve(E)?(e.exit("atxHeadingSequence"),d(E)):n(E)}function d(E){return E===35?(e.enter("atxHeadingSequence"),f(E)):E===null||be(E)?(e.exit("atxHeading"),t(E)):Fe(E)?Me(e,d,"whitespace")(E):(e.enter("atxHeadingText"),h(E))}function f(E){return E===35?(e.consume(E),f):(e.exit("atxHeadingSequence"),d(E))}function h(E){return E===null||E===35||Ve(E)?(e.exit("atxHeadingText"),d(E)):(e.consume(E),h)}}const tk=["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"],rm=["pre","script","style","textarea"],nk={concrete:!0,name:"htmlFlow",resolveTo:sk,tokenize:ak},rk={partial:!0,tokenize:ok},ik={partial:!0,tokenize:uk};function sk(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 ak(e,t,n){const s=this;let a,o,l,d,f;return h;function h(I){return E(I)}function E(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),g}function g(I){return I===33?(e.consume(I),x):I===47?(e.consume(I),o=!0,v):I===63?(e.consume(I),a=3,s.interrupt?t:S):Rt(I)?(e.consume(I),l=String.fromCharCode(I),O):n(I)}function x(I){return I===45?(e.consume(I),a=2,b):I===91?(e.consume(I),a=5,d=0,C):Rt(I)?(e.consume(I),a=4,s.interrupt?t:S):n(I)}function b(I){return I===45?(e.consume(I),s.interrupt?t:S):n(I)}function C(I){const Ne="CDATA[";return I===Ne.charCodeAt(d++)?(e.consume(I),d===Ne.length?s.interrupt?t:ce:C):n(I)}function v(I){return Rt(I)?(e.consume(I),l=String.fromCharCode(I),O):n(I)}function O(I){if(I===null||I===47||I===62||Ve(I)){const Ne=I===47,Ie=l.toLowerCase();return!Ne&&!o&&rm.includes(Ie)?(a=1,s.interrupt?t(I):ce(I)):tk.includes(l.toLowerCase())?(a=6,Ne?(e.consume(I),R):s.interrupt?t(I):ce(I)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(I):o?B(I):M(I))}return I===45||At(I)?(e.consume(I),l+=String.fromCharCode(I),O):n(I)}function R(I){return I===62?(e.consume(I),s.interrupt?t:ce):n(I)}function B(I){return Fe(I)?(e.consume(I),B):U(I)}function M(I){return I===47?(e.consume(I),U):I===58||I===95||Rt(I)?(e.consume(I),se):Fe(I)?(e.consume(I),M):U(I)}function se(I){return I===45||I===46||I===58||I===95||At(I)?(e.consume(I),se):$(I)}function $(I){return I===61?(e.consume(I),H):Fe(I)?(e.consume(I),$):M(I)}function H(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),f=I,ee):Fe(I)?(e.consume(I),H):ue(I)}function ee(I){return I===f?(e.consume(I),f=null,fe):I===null||be(I)?n(I):(e.consume(I),ee)}function ue(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Ve(I)?$(I):(e.consume(I),ue)}function fe(I){return I===47||I===62||Fe(I)?M(I):n(I)}function U(I){return I===62?(e.consume(I),re):n(I)}function re(I){return I===null||be(I)?ce(I):Fe(I)?(e.consume(I),re):n(I)}function ce(I){return I===45&&a===2?(e.consume(I),ge):I===60&&a===1?(e.consume(I),pe):I===62&&a===4?(e.consume(I),D):I===63&&a===3?(e.consume(I),S):I===93&&a===5?(e.consume(I),oe):be(I)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(rk,G,ke)(I)):I===null||be(I)?(e.exit("htmlFlowData"),ke(I)):(e.consume(I),ce)}function ke(I){return e.check(ik,de,G)(I)}function de(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),Y}function Y(I){return I===null||be(I)?ke(I):(e.enter("htmlFlowData"),ce(I))}function ge(I){return I===45?(e.consume(I),S):ce(I)}function pe(I){return I===47?(e.consume(I),l="",K):ce(I)}function K(I){if(I===62){const Ne=l.toLowerCase();return rm.includes(Ne)?(e.consume(I),D):ce(I)}return Rt(I)&&l.length<8?(e.consume(I),l+=String.fromCharCode(I),K):ce(I)}function oe(I){return I===93?(e.consume(I),S):ce(I)}function S(I){return I===62?(e.consume(I),D):I===45&&a===2?(e.consume(I),S):ce(I)}function D(I){return I===null||be(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),D)}function G(I){return e.exit("htmlFlow"),t(I)}}function uk(e,t,n){const s=this;return a;function a(l){return be(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}function ok(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ra,t,n)}}const lk={name:"htmlText",tokenize:ck};function ck(e,t,n){const s=this;let a,o,l;return d;function d(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),h):S===47?(e.consume(S),$):S===63?(e.consume(S),M):Rt(S)?(e.consume(S),ue):n(S)}function h(S){return S===45?(e.consume(S),E):S===91?(e.consume(S),o=0,C):Rt(S)?(e.consume(S),B):n(S)}function E(S){return S===45?(e.consume(S),b):n(S)}function g(S){return S===null?n(S):S===45?(e.consume(S),x):be(S)?(l=g,pe(S)):(e.consume(S),g)}function x(S){return S===45?(e.consume(S),b):g(S)}function b(S){return S===62?ge(S):S===45?x(S):g(S)}function C(S){const D="CDATA[";return S===D.charCodeAt(o++)?(e.consume(S),o===D.length?v:C):n(S)}function v(S){return S===null?n(S):S===93?(e.consume(S),O):be(S)?(l=v,pe(S)):(e.consume(S),v)}function O(S){return S===93?(e.consume(S),R):v(S)}function R(S){return S===62?ge(S):S===93?(e.consume(S),R):v(S)}function B(S){return S===null||S===62?ge(S):be(S)?(l=B,pe(S)):(e.consume(S),B)}function M(S){return S===null?n(S):S===63?(e.consume(S),se):be(S)?(l=M,pe(S)):(e.consume(S),M)}function se(S){return S===62?ge(S):M(S)}function $(S){return Rt(S)?(e.consume(S),H):n(S)}function H(S){return S===45||At(S)?(e.consume(S),H):ee(S)}function ee(S){return be(S)?(l=ee,pe(S)):Fe(S)?(e.consume(S),ee):ge(S)}function ue(S){return S===45||At(S)?(e.consume(S),ue):S===47||S===62||Ve(S)?fe(S):n(S)}function fe(S){return S===47?(e.consume(S),ge):S===58||S===95||Rt(S)?(e.consume(S),U):be(S)?(l=fe,pe(S)):Fe(S)?(e.consume(S),fe):ge(S)}function U(S){return S===45||S===46||S===58||S===95||At(S)?(e.consume(S),U):re(S)}function re(S){return S===61?(e.consume(S),ce):be(S)?(l=re,pe(S)):Fe(S)?(e.consume(S),re):fe(S)}function ce(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,ke):be(S)?(l=ce,pe(S)):Fe(S)?(e.consume(S),ce):(e.consume(S),de)}function ke(S){return S===a?(e.consume(S),a=void 0,Y):S===null?n(S):be(S)?(l=ke,pe(S)):(e.consume(S),ke)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ve(S)?fe(S):(e.consume(S),de)}function Y(S){return S===47||S===62||Ve(S)?fe(S):n(S)}function ge(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function pe(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),K}function K(S){return Fe(S)?Me(e,oe,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):oe(S)}function oe(S){return e.enter("htmlTextData"),l(S)}}const fd={name:"labelEnd",resolveAll:pk,resolveTo:mk,tokenize:gk},dk={tokenize:Ek},fk={tokenize:Tk},hk={tokenize:yk};function pk(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&Qt(e,0,e.length,n),e}function mk(e,t){let n=e.length,s=0,a,o,l,d;for(;n--;)if(a=e[n][1],o){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&&(o=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},E={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=rn(d,e.slice(o+1,o+s+3)),d=rn(d,[["enter",E,t]]),d=rn(d,Qu(t.parser.constructs.insideSpan.null,e.slice(o+s+4,l-3),t)),d=rn(d,[["exit",E,t],e[l-2],e[l-1],["exit",h,t]]),d=rn(d,e.slice(l+1)),d=rn(d,[["exit",f,t]]),Qt(e,o,e.length,d),e}function gk(e,t,n){const s=this;let a=s.events.length,o,l;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){o=s.events[a][1];break}return d;function d(x){return o?o._inactive?g(x):(l=s.parser.defined.includes(En(s.sliceSerialize({start:o.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),f):n(x)}function f(x){return x===40?e.attempt(dk,E,l?E:g)(x):x===91?e.attempt(fk,E,l?h:g)(x):l?E(x):g(x)}function h(x){return e.attempt(hk,E,g)(x)}function E(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function Ek(e,t,n){return s;function s(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),a}function a(g){return Ve(g)?Bs(e,o)(g):o(g)}function o(g){return g===41?E(g):g1(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function l(g){return Ve(g)?Bs(e,f)(g):E(g)}function d(g){return n(g)}function f(g){return g===34||g===39||g===40?T1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):E(g)}function h(g){return Ve(g)?Bs(e,E)(g):E(g)}function E(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Tk(e,t,n){const s=this;return a;function a(d){return E1.call(s,e,o,l,"reference","referenceMarker","referenceString")(d)}function o(d){return s.parser.defined.includes(En(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function yk(e,t,n){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const xk={name:"labelStartImage",resolveAll:fd.resolveAll,tokenize:bk};function bk(e,t,n){const s=this;return a;function a(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),l):n(d)}function l(d){return d===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):t(d)}}const kk={name:"labelStartLink",resolveAll:fd.resolveAll,tokenize:Sk};function Sk(e,t,n){const s=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(l):t(l)}}const ic={name:"lineEnding",tokenize:_k};function _k(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const Iu={name:"thematicBreak",tokenize:Ck};function Ck(e,t,n){let s=0,a;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return a=h,d(h)}function d(h){return h===a?(e.enter("thematicBreakSequence"),f(h)):s>=3&&(h===null||be(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===a?(e.consume(h),s++,f):(e.exit("thematicBreakSequence"),Fe(h)?Me(e,d,"whitespace")(h):d(h))}}const jt={continuation:{tokenize:wk},exit:Lk,name:"list",tokenize:vk},Nk={partial:!0,tokenize:Rk},Ak={partial:!0,tokenize:Ik};function vk(e,t,n){const s=this,a=s.events[s.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return d;function d(b){const C=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:Ic(b)){if(s.containerState.type||(s.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(Iu,n,h)(b):h(b);if(!s.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(b)}return n(b)}function f(b){return Ic(b)&&++l<10?(e.consume(b),f):(!s.interrupt||l<2)&&(s.containerState.marker?b===s.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),h(b)):n(b)}function h(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||b,e.check(ra,s.interrupt?n:E,e.attempt(Nk,x,g))}function E(b){return s.containerState.initialBlankLine=!0,o++,x(b)}function g(b){return Fe(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),x):n(b)}function x(b){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function wk(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(ra,a,o);function a(d){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Me(e,t,"listItemIndent",s.containerState.size+1)(d)}function o(d){return s.containerState.furtherBlankLines||!Fe(d)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,l(d)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(Ak,t,l)(d))}function l(d){return s.containerState._closeFlow=!0,s.interrupt=void 0,Me(e,e.attempt(jt,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function Ik(e,t,n){const s=this;return Me(e,a,"listItemIndent",s.containerState.size+1);function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===s.containerState.size?t(o):n(o)}}function Lk(e){e.exit(this.containerState.type)}function Rk(e,t,n){const s=this;return Me(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const l=s.events[s.events.length-1];return!Fe(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const im={name:"setextUnderline",resolveTo:Ok,tokenize:Dk};function Ok(e,t){let n=e.length,s,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",l,t]),e.splice(o+1,0,["exit",e[s][1],t]),e[s][1].end={...e[o][1].end}):e[s][1]=l,e.push(["exit",l,t]),e}function Dk(e,t,n){const s=this;let a;return o;function o(h){let E=s.events.length,g;for(;E--;)if(s.events[E][1].type!=="lineEnding"&&s.events[E][1].type!=="linePrefix"&&s.events[E][1].type!=="content"){g=s.events[E][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||g)?(e.enter("setextHeadingLine"),a=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===a?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Fe(h)?Me(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||be(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Pk={tokenize:Mk};function Mk(e){const t=this,n=e.attempt(ra,s,e.attempt(this.parser.constructs.flowInitial,a,Me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Hb,a)),"linePrefix")));return n;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Fk={resolveAll:x1()},Bk=y1("string"),Uk=y1("text");function y1(e){return{resolveAll:x1(e==="text"?jk:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],o=n.attempt(a,l,d);return l;function l(E){return h(E)?o(E):d(E)}function d(E){if(E===null){n.consume(E);return}return n.enter("data"),n.consume(E),f}function f(E){return h(E)?(n.exit("data"),o(E)):(n.consume(E),f)}function h(E){if(E===null)return!0;const g=a[E];let x=-1;if(g)for(;++x<g.length;){const b=g[x];if(!b.previous||b.previous.call(s,s.previous))return!0}return!1}}}function x1(e){return t;function t(n,s){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,s):n}}function jk(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 s=e[n-1][1],a=t.sliceStream(s);let o=a.length,l=-1,d=0,f;for(;o--;){const h=a[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)d++,l--;if(l)break;l=-1}else if(h===-2)f=!0,d++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:s.start._bufferIndex+l,_index:s.start._index+o,line:s.end.line,column:s.end.column-d,offset:s.end.offset-d},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Hk={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:f1},zk={91:Vb},$k={[-2]:rc,[-1]:rc,32:rc},Wk={35:Jb,42:Iu,45:[im,Iu],60:nk,61:im,95:Iu,96:nm,126:nm},Yk={38:p1,92:h1},Vk={[-5]:ic,[-4]:ic,[-3]:ic,33:xk,38:p1,42:Lc,60:[kb,lk],91:kk,92:[Kb,h1],93:fd,95:Lc,96:Pb},qk={null:[Lc,Fk]},Qk={null:[42,95]},Gk={null:[]},Kk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Qk,contentInitial:zk,disable:Gk,document:Hk,flow:Wk,flowInitial:$k,insideSpan:qk,string:Yk,text:Vk},Symbol.toStringTag,{value:"Module"}));function Xk(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let l=[],d=[];const f={attempt:ee($),check:ee(H),consume:B,enter:M,exit:se,interrupt:ee(H,{interrupt:!0})},h={code:null,containerState:{},defineSkip:v,events:[],now:C,parser:e,previous:null,sliceSerialize:x,sliceStream:b,write:g};let E=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function g(re){return l=rn(l,re),O(),l[l.length-1]!==null?[]:(ue(t,0),h.events=Qu(o,h.events,h),h.events)}function x(re,ce){return Zk(b(re),ce)}function b(re){return Jk(l,re)}function C(){const{_bufferIndex:re,_index:ce,line:ke,column:de,offset:Y}=s;return{_bufferIndex:re,_index:ce,line:ke,column:de,offset:Y}}function v(re){a[re.line]=re.column,U()}function O(){let re;for(;s._index<l.length;){const ce=l[s._index];if(typeof ce=="string")for(re=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===re&&s._bufferIndex<ce.length;)R(ce.charCodeAt(s._bufferIndex));else R(ce)}}function R(re){E=E(re)}function B(re){be(re)?(s.line++,s.column=1,s.offset+=re===-3?2:1,U()):re!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===l[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=re}function M(re,ce){const ke=ce||{};return ke.type=re,ke.start=C(),h.events.push(["enter",ke,h]),d.push(ke),ke}function se(re){const ce=d.pop();return ce.end=C(),h.events.push(["exit",ce,h]),ce}function $(re,ce){ue(re,ce.from)}function H(re,ce){ce.restore()}function ee(re,ce){return ke;function ke(de,Y,ge){let pe,K,oe,S;return Array.isArray(de)?G(de):"tokenize"in de?G([de]):D(de);function D(Ce){return je;function je(Re){const ze=Re!==null&&Ce[Re],at=Re!==null&&Ce.null,On=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(at)?at:at?[at]:[]];return G(On)(Re)}}function G(Ce){return pe=Ce,K=0,Ce.length===0?ge:I(Ce[K])}function I(Ce){return je;function je(Re){return S=fe(),oe=Ce,Ce.partial||(h.currentConstruct=Ce),Ce.name&&h.parser.constructs.disable.null.includes(Ce.name)?Ie():Ce.tokenize.call(ce?Object.assign(Object.create(h),ce):h,f,Ne,Ie)(Re)}}function Ne(Ce){return re(oe,S),Y}function Ie(Ce){return S.restore(),++K<pe.length?I(pe[K]):ge}}}function ue(re,ce){re.resolveAll&&!o.includes(re)&&o.push(re),re.resolve&&Qt(h.events,ce,h.events.length-ce,re.resolve(h.events.slice(ce),h)),re.resolveTo&&(h.events=re.resolveTo(h.events,h))}function fe(){const re=C(),ce=h.previous,ke=h.currentConstruct,de=h.events.length,Y=Array.from(d);return{from:de,restore:ge};function ge(){s=re,h.previous=ce,h.currentConstruct=ke,h.events.length=de,d=Y,U()}}function U(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function Jk(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(s,o)];else{if(l=e.slice(n,a),s>-1){const d=l[0];typeof d=="string"?l[0]=d.slice(s):l.shift()}o>0&&l.push(e[a].slice(0,o))}return l}function Zk(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
58
|
+
`;break}case-3:{l=`\r
|
|
59
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(o)}a=o===-2,s.push(l)}return s.join("")}function eS(e){const s={constructs:c1([Kk,...(e||{}).extensions||[]]),content:a(mb),defined:[],document:a(Eb),flow:a(Pk),lazy:{},string:a(Bk),text:a(Uk)};return s;function a(o){return l;function l(d){return Xk(s,o,d)}}}function tS(e){for(;!m1(e););return e}const sm=/[\0\t\n\r]/g;function nS(){let e=1,t="",n=!0,s;return a;function a(o,l,d){const f=[];let h,E,g,x,b;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(sm.lastIndex=g,h=sm.exec(o),x=h&&h.index!==void 0?h.index:o.length,b=o.charCodeAt(x),!h){t=o.slice(g);break}if(b===10&&g===x&&s)f.push(-3),s=void 0;else switch(s&&(f.push(-5),s=void 0),g<x&&(f.push(o.slice(g,x)),e+=x-g),b){case 0:{f.push(65533),e++;break}case 9:{for(E=Math.ceil(e/4)*4,f.push(-2);e++<E;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:s=!0,e=1}g=x+1}return d&&(s&&f.push(-5),t&&f.push(t),f.push(null)),f}}const rS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function iS(e){return e.replace(rS,sS)}function sS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return d1(n.slice(o?2:1),o?16:10)}return dd(n)||e}const b1={}.hasOwnProperty;function aS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uS(n)(tS(eS(n).document().write(nS()(e,t,!0))))}function uS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ti),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:o(ji),blockQuote:o(at),characterEscape:fe,characterReference:fe,codeFenced:o(On),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(On,l),codeText:o(oa,l),codeTextData:fe,data:fe,codeFlowValue:fe,definition:o(Zr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ui),hardBreakEscape:o(Hi),hardBreakTrailing:o(Hi),htmlFlow:o(ei,l),htmlFlowData:fe,htmlText:o(ei,l),htmlTextData:fe,image:o(la),label:l,link:o(ti),listItem:o(qn),listItemValue:x,listOrdered:o(Vn,g),listUnordered:o(Vn),paragraph:o(zi),reference:I,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ji),strong:o(ca),thematicBreak:o(fa)},exit:{atxHeading:f(),atxHeadingSequence:$,autolink:f(),autolinkEmail:ze,autolinkProtocol:Re,blockQuote:f(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Ie,characterReferenceMarkerNumeric:Ie,characterReferenceValue:Ce,characterReference:je,codeFenced:f(O),codeFencedFence:v,codeFencedFenceInfo:b,codeFencedFenceMeta:C,codeFlowValue:U,codeIndented:f(R),codeText:f(Y),codeTextData:U,data:U,definition:f(),definitionDestinationString:se,definitionLabelString:B,definitionTitleString:M,emphasis:f(),hardBreakEscape:f(ce),hardBreakTrailing:f(ce),htmlFlow:f(ke),htmlFlowData:U,htmlText:f(de),htmlTextData:U,image:f(pe),label:oe,labelText:K,lineEnding:re,link:f(ge),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Ne,resourceDestinationString:S,resourceTitleString:D,resource:G,setextHeading:f(ue),setextHeadingLineSequence:ee,setextHeadingText:H,strong:f(),thematicBreak:f()}};k1(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(Q){let le={type:"root",children:[]};const Ae={stack:[le],tokenStack:[],config:t,enter:d,exit:h,buffer:l,resume:E,data:n},Oe=[];let Be=-1;for(;++Be<Q.length;)if(Q[Be][1].type==="listOrdered"||Q[Be][1].type==="listUnordered")if(Q[Be][0]==="enter")Oe.push(Be);else{const Et=Oe.pop();Be=a(Q,Et,Be)}for(Be=-1;++Be<Q.length;){const Et=t[Q[Be][0]];b1.call(Et,Q[Be][1].type)&&Et[Q[Be][1].type].call(Object.assign({sliceSerialize:Q[Be][2].sliceSerialize},Ae),Q[Be][1])}if(Ae.tokenStack.length>0){const Et=Ae.tokenStack[Ae.tokenStack.length-1];(Et[1]||am).call(Ae,void 0,Et[0])}for(le.position={start:pr(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:pr(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Be=-1;++Be<t.transforms.length;)le=t.transforms[Be](le)||le;return le}function a(Q,le,Ae){let Oe=le-1,Be=-1,Et=!1,Dn,Kt,Qn,_r;for(;++Oe<=Ae;){const Tt=Q[Oe];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Be++:Be--,_r=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(Dn&&!_r&&!Be&&!Qn&&(Qn=Oe),_r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_r=void 0}if(!Be&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||Be===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(Dn){let kn=Oe;for(Kt=void 0;kn--;){const zt=Q[kn];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;Kt&&(Q[Kt][1].type="lineEndingBlank",Et=!0),zt[1].type="lineEnding",Kt=kn}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}Qn&&(!Kt||Qn<Kt)&&(Dn._spread=!0),Dn.end=Object.assign({},Kt?Q[Kt][1].start:Tt[1].end),Q.splice(Kt||Oe,0,["exit",Dn,Tt[2]]),Oe++,Ae++}if(Tt[1].type==="listItemPrefix"){const kn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};Dn=kn,Q.splice(Oe,0,["enter",kn,Tt[2]]),Oe++,Ae++,Qn=void 0,_r=!0}}}return Q[le][1]._spread=Et,Ae}function o(Q,le){return Ae;function Ae(Oe){d.call(this,Q(Oe),Oe),le&&le.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(Q,le,Ae){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([le,Ae||void 0]),Q.position={start:pr(le.start),end:void 0}}function f(Q){return le;function le(Ae){Q&&Q.call(this,Ae),h.call(this,Ae)}}function h(Q,le){const Ae=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==Q.type&&(le?le.call(this,Q,Oe[0]):(Oe[1]||am).call(this,Q,Oe[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Fs({start:Q.start,end:Q.end})+"): it’s not open");Ae.position.end=pr(Q.end)}function E(){return cd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(Q){if(this.data.expectingFirstListItemValue){const le=this.stack[this.stack.length-2];le.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.lang=Q}function C(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.meta=Q}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function R(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q.replace(/(\r?\n|\r)$/g,"")}function B(Q){const le=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=le,Ae.identifier=En(this.sliceSerialize(Q)).toLowerCase()}function M(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function se(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function $(Q){const le=this.stack[this.stack.length-1];if(!le.depth){const Ae=this.sliceSerialize(Q).length;le.depth=Ae}}function H(){this.data.setextHeadingSlurpLineEnding=!0}function ee(Q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function ue(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(Q){const Ae=this.stack[this.stack.length-1].children;let Oe=Ae[Ae.length-1];(!Oe||Oe.type!=="text")&&(Oe=da(),Oe.position={start:pr(Q.start),end:void 0},Ae.push(Oe)),this.stack.push(Oe)}function U(Q){const le=this.stack.pop();le.value+=this.sliceSerialize(Q),le.position.end=pr(Q.end)}function re(Q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=le.children[le.children.length-1];Ae.position.end=pr(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(fe.call(this,Q),U.call(this,Q))}function ce(){this.data.atHardBreak=!0}function ke(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function de(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function Y(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.value=Q}function ge(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function pe(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const le=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=le,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function K(Q){const le=this.sliceSerialize(Q),Ae=this.stack[this.stack.length-2];Ae.label=iS(le),Ae.identifier=En(le).toLowerCase()}function oe(){const Q=this.stack[this.stack.length-1],le=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Oe=Q.children;Ae.children=Oe}else Ae.alt=le}function S(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.url=Q}function D(){const Q=this.resume(),le=this.stack[this.stack.length-1];le.title=Q}function G(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Ne(Q){const le=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=le,Ae.identifier=En(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function Ie(Q){this.data.characterReferenceType=Q.type}function Ce(Q){const le=this.sliceSerialize(Q),Ae=this.data.characterReferenceType;let Oe;Ae?(Oe=d1(le,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=dd(le);const Be=this.stack[this.stack.length-1];Be.value+=Oe}function je(Q){const le=this.stack.pop();le.position.end=pr(Q.end)}function Re(Q){U.call(this,Q);const le=this.stack[this.stack.length-1];le.url=this.sliceSerialize(Q)}function ze(Q){U.call(this,Q);const le=this.stack[this.stack.length-1];le.url="mailto:"+this.sliceSerialize(Q)}function at(){return{type:"blockquote",children:[]}}function On(){return{type:"code",lang:null,meta:null,value:""}}function oa(){return{type:"inlineCode",value:""}}function Zr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ui(){return{type:"emphasis",children:[]}}function ji(){return{type:"heading",depth:0,children:[]}}function Hi(){return{type:"break"}}function ei(){return{type:"html",value:""}}function la(){return{type:"image",title:null,url:"",alt:null}}function ti(){return{type:"link",title:null,url:"",children:[]}}function Vn(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function qn(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function zi(){return{type:"paragraph",children:[]}}function ca(){return{type:"strong",children:[]}}function da(){return{type:"text",value:""}}function fa(){return{type:"thematicBreak"}}}function pr(e){return{line:e.line,column:e.column,offset:e.offset}}function k1(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?k1(e,s):oS(e,s)}}function oS(e,t){let n;for(n in t)if(b1.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function am(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fs({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fs({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fs({start:t.start,end:t.end})+") is still open")}function lS(e){const t=this;t.parser=n;function n(s){return aS(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function cS(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 dS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
60
|
+
`}]}function fS(e,t){const n=t.value?t.value+`
|
|
61
|
+
`:"",s={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(s.className=["language-"+a[0]]);let o={type:"element",tagName:"code",properties:s,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function hS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),a=Pi(s.toLowerCase()),o=e.footnoteOrder.indexOf(s);let l,d=e.footnoteCounts.get(s);d===void 0?(d=0,e.footnoteOrder.push(s),l=e.footnoteOrder.length):l=o+1,d+=1,e.footnoteCounts.set(s,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(d>1?"-"+d:""),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 gS(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 ES(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function S1(e,t){const n=t.referenceType;let s="]";if(n==="collapsed"?s+="[]":n==="full"&&(s+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+s}];const a=e.all(t),o=a[0];o&&o.type==="text"?o.value="["+o.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=s:a.push({type:"text",value:s}),a}function TS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return S1(e,t);const a={src:Pi(s.url||""),alt:t.alt};s.title!==null&&s.title!==void 0&&(a.title=s.title);const o={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,o),e.applyData(t,o)}function yS(e,t){const n={src:Pi(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 s={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,s),e.applyData(t,s)}function xS(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const s={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,s),e.applyData(t,s)}function bS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return S1(e,t);const a={href:Pi(s.url||"")};s.title!==null&&s.title!==void 0&&(a.title=s.title);const o={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function kS(e,t){const n={href:Pi(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const s={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function SS(e,t,n){const s=e.all(t),a=n?_S(n):_1(t),o={},l=[];if(typeof t.checked=="boolean"){const E=s[0];let g;E&&E.type==="element"&&E.tagName==="p"?g=E:(g={type:"element",tagName:"p",properties:{},children:[]},s.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let d=-1;for(;++d<s.length;){const E=s[d];(a||d!==0||E.type!=="element"||E.tagName!=="p")&&l.push({type:"text",value:`
|
|
62
|
+
`}),E.type==="element"&&E.tagName==="p"&&!a?l.push(...E.children):l.push(E)}const f=s[s.length-1];f&&(a||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
63
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function _S(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let s=-1;for(;!t&&++s<n.length;)t=_1(n[s])}return t}function _1(e){const t=e.spread;return t??e.children.length>1}function CS(e,t){const n={},s=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<s.length;){const l=s[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 o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function NS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function vS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wS(e,t){const n=e.all(t),s=n.shift(),a=[];if(s){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([s],!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)},d=Ln(t.children[1]),f=Vu(t.children[t.children.length-1]);d&&f&&(l.position={start:d,end:f}),a.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function IS(e,t,n){const s=n?n.children:void 0,o=(s?s.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,d=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<d;){const g=t.children[f],x={},b=l?l[f]:void 0;b&&(x.align=b);let C={type:"element",tagName:o,properties:x,children:[]};g&&(C.children=e.all(g),e.patch(g,C),C=e.applyData(g,C)),h.push(C)}const E={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,E),e.applyData(t,E)}function LS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const um=9,om=32;function RS(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),a=0;const o=[];for(;s;)o.push(lm(t.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=n.exec(t);return o.push(lm(t.slice(a),a>0,!1)),o.join("")}function lm(e,t,n){let s=0,a=e.length;if(t){let o=e.codePointAt(s);for(;o===um||o===om;)s++,o=e.codePointAt(s)}if(n){let o=e.codePointAt(a-1);for(;o===um||o===om;)a--,o=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function OS(e,t){const n={type:"text",value:RS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function DS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const PS={blockquote:cS,break:dS,code:fS,delete:hS,emphasis:pS,footnoteReference:mS,heading:gS,html:ES,imageReference:TS,image:yS,inlineCode:xS,linkReference:bS,link:kS,listItem:SS,list:CS,paragraph:NS,root:AS,strong:vS,table:wS,tableCell:LS,tableRow:IS,text:OS,thematicBreak:DS,toml:ku,yaml:ku,definition:ku,footnoteDefinition:ku};function ku(){}const C1=-1,Gu=0,Us=1,Pu=2,hd=3,pd=4,md=5,gd=6,N1=7,A1=8,MS=typeof self=="object"?self:globalThis,cm=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new MS[e](t)},FS=(e,t)=>{const n=(a,o)=>(e.set(o,a),a),s=a=>{if(e.has(a))return e.get(a);const[o,l]=t[a];switch(o){case Gu:case C1:return n(l,a);case Us:{const d=n([],a);for(const f of l)d.push(s(f));return d}case Pu:{const d=n({},a);for(const[f,h]of l)d[s(f)]=s(h);return d}case hd:return n(new Date(l),a);case pd:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case md:{const d=n(new Map,a);for(const[f,h]of l)d.set(s(f),s(h));return d}case gd:{const d=n(new Set,a);for(const f of l)d.add(s(f));return d}case N1:{const{name:d,message:f}=l;return n(cm(d,f),a)}case A1: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:d}=new Uint8Array(l);return n(new DataView(d),l)}}return n(cm(o,l),a)};return s},dm=e=>FS(new Map,e)(0),zr="",{toString:BS}={},{keys:US}=Object,Ls=e=>{const t=typeof e;if(t!=="object"||!e)return[Gu,t];const n=BS.call(e).slice(8,-1);switch(n){case"Array":return[Us,zr];case"Object":return[Pu,zr];case"Date":return[hd,zr];case"RegExp":return[pd,zr];case"Map":return[md,zr];case"Set":return[gd,zr];case"DataView":return[Us,n]}return n.includes("Array")?[Us,n]:n.includes("Error")?[N1,n]:[Pu,n]},Su=([e,t])=>e===Gu&&(t==="function"||t==="symbol"),jS=(e,t,n,s)=>{const a=(l,d)=>{const f=s.push(l)-1;return n.set(d,f),f},o=l=>{if(n.has(l))return n.get(l);let[d,f]=Ls(l);switch(d){case Gu:{let E=l;switch(f){case"bigint":d=A1,E=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);E=null;break;case"undefined":return a([C1],l)}return a([d,E],l)}case Us:{if(f){let x=l;return f==="DataView"?x=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(x=new Uint8Array(l)),a([f,[...x]],l)}const E=[],g=a([d,E],l);for(const x of l)E.push(o(x));return g}case Pu:{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 o(l.toJSON());const E=[],g=a([d,E],l);for(const x of US(l))(e||!Su(Ls(l[x])))&&E.push([o(x),o(l[x])]);return g}case hd:return a([d,isNaN(l.getTime())?zr:l.toISOString()],l);case pd:{const{source:E,flags:g}=l;return a([d,{source:E,flags:g}],l)}case md:{const E=[],g=a([d,E],l);for(const[x,b]of l)(e||!(Su(Ls(x))||Su(Ls(b))))&&E.push([o(x),o(b)]);return g}case gd:{const E=[],g=a([d,E],l);for(const x of l)(e||!Su(Ls(x)))&&E.push(o(x));return g}}const{message:h}=l;return a([d,{name:f,message:h}],l)};return o},fm=(e,{json:t,lossy:n}={})=>{const s=[];return jS(!(t||n),!!t,new Map,s)(e),s},qr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?dm(fm(e,t)):structuredClone(e):(e,t)=>dm(fm(e,t));function HS(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 zS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $S(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||HS,s=e.options.footnoteBackLabel||zS,a=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const E=e.all(h),g=String(h.identifier).toUpperCase(),x=Pi(g.toLowerCase());let b=0;const C=[],v=e.footnoteCounts.get(g);for(;v!==void 0&&++b<=v;){C.length>0&&C.push({type:"text",value:" "});let B=typeof n=="string"?n:n(f,b);typeof B=="string"&&(B={type:"text",value:B}),C.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof s=="string"?s:s(f,b),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const O=E[E.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const B=O.children[O.children.length-1];B&&B.type==="text"?B.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...C)}else E.push(...C);const R={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(E,!0)};e.patch(h,R),d.push(R)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...qr(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
64
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
65
|
+
`}]}}const Ku=(function(e){if(e==null)return qS;if(typeof e=="function")return Xu(e);if(typeof e=="object")return Array.isArray(e)?WS(e):YS(e);if(typeof e=="string")return VS(e);throw new Error("Expected function, string, or object as test")});function WS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ku(e[n]);return Xu(s);function s(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function YS(e){const t=e;return Xu(n);function n(s){const a=s;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function VS(e){return Xu(t);function t(n){return n&&n.type===e}}function Xu(e){return t;function t(n,s,a){return!!(QS(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function qS(){return!0}function QS(e){return e!==null&&typeof e=="object"&&"type"in e}const v1=[],GS=!0,Rc=!1,KS="skip";function w1(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const o=Ku(a),l=s?-1:1;d(e,void 0,[])();function d(f,h,E){const g=f&&typeof f=="object"?f:{};if(typeof g.type=="string"){const b=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(f.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=v1,C,v,O;if((!t||o(f,h,E[E.length-1]||void 0))&&(b=XS(n(f,E)),b[0]===Rc))return b;if("children"in f&&f.children){const R=f;if(R.children&&b[0]!==KS)for(v=(s?R.children.length:-1)+l,O=E.concat(R);v>-1&&v<R.children.length;){const B=R.children[v];if(C=d(B,v,O)(),C[0]===Rc)return C;v=typeof C[1]=="number"?C[1]:v+l}}return b}}}function XS(e){return Array.isArray(e)?e:typeof e=="number"?[GS,e]:e==null?v1:[e]}function Ju(e,t,n,s){let a,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,a=n):(o=t,l=n,a=s),w1(e,o,d,a);function d(f,h){const E=h[h.length-1],g=E?E.children.indexOf(f):void 0;return l(f,g,E)}}const Oc={}.hasOwnProperty,JS={};function ZS(e,t){const n=t||JS,s=new Map,a=new Map,o=new Map,l={...PS,...n.handlers},d={all:h,applyData:t_,definitionById:s,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:e_,wrap:r_};return Ju(e,function(E){if(E.type==="definition"||E.type==="footnoteDefinition"){const g=E.type==="definition"?s:a,x=String(E.identifier).toUpperCase();g.has(x)||g.set(x,E)}}),d;function f(E,g){const x=E.type,b=d.handlers[x];if(Oc.call(d.handlers,x)&&b)return b(d,E,g);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in E){const{children:v,...O}=E,R=qr(O);return R.children=d.all(E),R}return qr(E)}return(d.options.unknownHandler||n_)(d,E,g)}function h(E){const g=[];if("children"in E){const x=E.children;let b=-1;for(;++b<x.length;){const C=d.one(x[b],E);if(C){if(b&&x[b-1].type==="break"&&(!Array.isArray(C)&&C.type==="text"&&(C.value=hm(C.value)),!Array.isArray(C)&&C.type==="element")){const v=C.children[0];v&&v.type==="text"&&(v.value=hm(v.value))}Array.isArray(C)?g.push(...C):g.push(C)}}}return g}}function e_(e,t){e.position&&(t.position=i1(e))}function t_(e,t){let n=t;if(e&&e.data){const s=e.data.hName,a=e.data.hChildren,o=e.data.hProperties;if(typeof s=="string")if(n.type==="element")n.tagName=s;else{const l="children"in n?n.children:[n];n={type:"element",tagName:s,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,qr(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function n_(e,t){const n=t.data||{},s="value"in t&&!(Oc.call(n,"hProperties")||Oc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function r_(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
|
|
66
|
+
`});++s<e.length;)s&&n.push({type:"text",value:`
|
|
67
|
+
`}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
68
|
+
`}),n}function hm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function pm(e,t){const n=ZS(e,t),s=n.one(e,void 0),a=$S(n),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
|
|
69
|
+
`},a),o}function i_(e,t){return e&&"run"in e?async function(n,s){const a=pm(n,{file:s,...t});await e.run(a,s)}:function(n,s){return pm(n,{file:s,...e||t})}}function mm(e){if(e)throw e}var sc,gm;function s_(){if(gm)return sc;gm=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,s=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var E=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!E&&!g)return!1;var x;for(x in h);return typeof x>"u"||e.call(h,x)},l=function(h,E){n&&E.name==="__proto__"?n(h,E.name,{enumerable:!0,configurable:!0,value:E.newValue,writable:!0}):h[E.name]=E.newValue},d=function(h,E){if(E==="__proto__")if(e.call(h,E)){if(s)return s(h,E).value}else return;return h[E]};return sc=function f(){var h,E,g,x,b,C,v=arguments[0],O=1,R=arguments.length,B=!1;for(typeof v=="boolean"&&(B=v,v=arguments[1]||{},O=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});O<R;++O)if(h=arguments[O],h!=null)for(E in h)g=d(v,E),x=d(h,E),v!==x&&(B&&x&&(o(x)||(b=a(x)))?(b?(b=!1,C=g&&a(g)?g:[]):C=g&&o(g)?g:{},l(v,{name:E,newValue:f(B,C,x)})):typeof x<"u"&&l(v,{name:E,newValue:x}));return v},sc}var a_=s_();const ac=Vc(a_);function Dc(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 u_(){const e=[],t={run:n,use:s};return t;function n(...a){let o=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);d(null,...a);function d(f,...h){const E=e[++o];let g=-1;if(f){l(f);return}for(;++g<a.length;)(h[g]===null||h[g]===void 0)&&(h[g]=a[g]);a=h,E?o_(E,d)(...h):l(null,...h)}}function s(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function o_(e,t){let n;return s;function s(...l){const d=e.length>l.length;let f;d&&l.push(a);try{f=e.apply(this,l)}catch(h){const E=h;if(d&&n)throw E;return a(E)}d||(f&&f.then&&typeof f.then=="function"?f.then(o,a):f instanceof Error?a(f):o(f))}function a(l,...d){n||(n=!0,t(l,...d))}function o(l){a(null,l)}}const vn={basename:l_,dirname:c_,extname:d_,join:f_,sep:"/"};function l_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ia(e);let n=0,s=-1,a=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else s<0&&(o=!0,s=a+1);return s<0?"":e.slice(n,s)}if(t===e)return"";let l=-1,d=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(o){n=a+1;break}}else l<0&&(o=!0,l=a+1),d>-1&&(e.codePointAt(a)===t.codePointAt(d--)?d<0&&(s=a):(d=-1,s=l));return n===s?s=l:s<0&&(s=e.length),e.slice(n,s)}function c_(e){if(ia(e),e.length===0)return".";let t=-1,n=e.length,s;for(;--n;)if(e.codePointAt(n)===47){if(s){t=n;break}}else s||(s=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function d_(e){ia(e);let t=e.length,n=-1,s=0,a=-1,o=0,l;for(;t--;){const d=e.codePointAt(t);if(d===47){if(l){s=t+1;break}continue}n<0&&(l=!0,n=t+1),d===46?a<0?a=t:o!==1&&(o=1):a>-1&&(o=-1)}return a<0||n<0||o===0||o===1&&a===n-1&&a===s+1?"":e.slice(a,n)}function f_(...e){let t=-1,n;for(;++t<e.length;)ia(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":h_(n)}function h_(e){ia(e);const t=e.codePointAt(0)===47;let n=p_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function p_(e,t){let n="",s=0,a=-1,o=0,l=-1,d,f;for(;++l<=e.length;){if(l<e.length)d=e.codePointAt(l);else{if(d===47)break;d=47}if(d===47){if(!(a===l-1||o===1))if(a!==l-1&&o===2){if(n.length<2||s!==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="",s=0):(n=n.slice(0,f),s=n.length-1-n.lastIndexOf("/")),a=l,o=0;continue}}else if(n.length>0){n="",s=0,a=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),s=l-a-1;a=l,o=0}else d===46&&o>-1?o++:o=-1}return n}function ia(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const m_={cwd:g_};function g_(){return"/"}function Pc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function E_(e){if(typeof e=="string")e=new URL(e);else if(!Pc(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 T_(e)}function T_(e){if(e.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const s=t.codePointAt(n+2);if(s===70||s===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 uc=["history","path","basename","stem","extname","dirname"];class I1{constructor(t){let n;t?Pc(t)?n={path:t}:typeof t=="string"||y_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":m_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<uc.length;){const o=uc[s];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let a;for(a in n)uc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?vn.basename(this.path):void 0}set basename(t){lc(t,"basename"),oc(t,"basename"),this.path=vn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vn.dirname(this.path):void 0}set dirname(t){Em(this.basename,"dirname"),this.path=vn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vn.extname(this.path):void 0}set extname(t){if(oc(t,"extname"),Em(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=vn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pc(t)&&(t=E_(t)),lc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vn.basename(this.path,this.extname):void 0}set stem(t){lc(t,"stem"),oc(t,"stem"),this.path=vn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,s){const a=this.message(t,n,s);throw a.fatal=!0,a}info(t,n,s){const a=this.message(t,n,s);return a.fatal=void 0,a}message(t,n,s){const a=new vt(t,n,s);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 oc(e,t){if(e&&e.includes(vn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vn.sep+"`")}function lc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Em(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function y_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const x_=(function(e){const s=this.constructor.prototype,a=s[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),b_={}.hasOwnProperty;class Ed extends x_{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=u_()}copy(){const t=new Ed;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(ac(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fc("data",this.frozen),this.namespace[t]=n,this):b_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fc("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,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const a=n.call(t,...s);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=_u(t),s=this.parser||this.Parser;return cc("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),cc("process",this.parser||this.Parser),dc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const d=_u(t),f=s.parse(d);s.run(f,d,function(E,g,x){if(E||!g||!x)return h(E);const b=g,C=s.stringify(b,x);__(C)?x.value=C:x.result=C,h(E,x)});function h(E,g){E||!g?l(E):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,s;return this.freeze(),cc("processSync",this.parser||this.Parser),dc("processSync",this.compiler||this.Compiler),this.process(t,a),ym("processSync","process",n),s;function a(o,l){n=!0,mm(o),s=l}}run(t,n,s){Tm(t),this.freeze();const a=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?o(void 0,s):new Promise(o);function o(l,d){const f=_u(n);a.run(t,f,h);function h(E,g,x){const b=g||t;E?d(E):l?l(b):s(void 0,b,x)}}}runSync(t,n){let s=!1,a;return this.run(t,n,o),ym("runSync","run",s),a;function o(l,d){mm(l),a=d,s=!0}}stringify(t,n){this.freeze();const s=_u(n),a=this.compiler||this.Compiler;return dc("stringify",a),Tm(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(fc("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[E,...g]=h;f(E,g)}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");d(h.plugins),h.settings&&(a.settings=ac(!0,a.settings,h.settings))}function d(h){let E=-1;if(h!=null)if(Array.isArray(h))for(;++E<h.length;){const g=h[E];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,E){let g=-1,x=-1;for(;++g<s.length;)if(s[g][0]===h){x=g;break}if(x===-1)s.push([h,...E]);else if(E.length>0){let[b,...C]=E;const v=s[x][1];Dc(v)&&Dc(b)&&(b=ac(!0,v,b)),s[x]=[h,b,...C]}}}}const k_=new Ed().freeze();function cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fc(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 Tm(e){if(!Dc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ym(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function _u(e){return S_(e)?e:new I1(e)}function S_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function __(e){return typeof e=="string"||C_(e)}function C_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const N_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xm=[],bm={allowDangerousHtml:!0},A_=/^(https?|ircs?|mailto|xmpp)$/i,v_=[{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:"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 w_(e){const t=I_(e),n=L_(e);return R_(t.runSync(t.parse(n),n),e)}function I_(e){const t=e.rehypePlugins||xm,n=e.remarkPlugins||xm,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bm}:bm;return k_().use(lS).use(n).use(i_,s).use(t)}function L_(e){const t=e.children||"",n=new I1;return typeof t=="string"&&(n.value=t),n}function R_(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||O_;for(const E of v_)Object.hasOwn(t,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+N_+E.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Ju(e,h),Vx(e,{Fragment:T.Fragment,components:a,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function h(E,g,x){if(E.type==="raw"&&x&&typeof g=="number")return l?x.children.splice(g,1):x.children[g]={type:"text",value:E.value},g;if(E.type==="element"){let b;for(b in nc)if(Object.hasOwn(nc,b)&&Object.hasOwn(E.properties,b)){const C=E.properties[b],v=nc[b];(v===null||v.includes(E.tagName))&&(E.properties[b]=f(String(C||""),b,E))}}if(E.type==="element"){let b=n?!n.includes(E.tagName):o?o.includes(E.tagName):!1;if(!b&&s&&typeof g=="number"&&(b=!s(E,g,x)),b&&x&&typeof g=="number")return d&&E.children?x.children.splice(g,1,...E.children):x.children.splice(g,1),g}}}function O_(e){const t=e.indexOf(":"),n=e.indexOf("?"),s=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||s!==-1&&t>s||A_.test(e.slice(0,t))?e:""}function km(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,a=n.indexOf(t);for(;a!==-1;)s++,a=n.indexOf(t,a+t.length);return s}function D_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function P_(e,t,n){const a=Ku((n||{}).ignore||[]),o=M_(t);let l=-1;for(;++l<o.length;)w1(e,"text",d);function d(h,E){let g=-1,x;for(;++g<E.length;){const b=E[g],C=x?x.children:void 0;if(a(b,C?C.indexOf(b):void 0,x))return;x=b}if(x)return f(h,E)}function f(h,E){const g=E[E.length-1],x=o[l][0],b=o[l][1];let C=0;const O=g.children.indexOf(h);let R=!1,B=[];x.lastIndex=0;let M=x.exec(h.value);for(;M;){const se=M.index,$={index:M.index,input:M.input,stack:[...E,h]};let H=b(...M,$);if(typeof H=="string"&&(H=H.length>0?{type:"text",value:H}:void 0),H===!1?x.lastIndex=se+1:(C!==se&&B.push({type:"text",value:h.value.slice(C,se)}),Array.isArray(H)?B.push(...H):H&&B.push(H),C=se+M[0].length,R=!0),!x.global)break;M=x.exec(h.value)}return R?(C<h.value.length&&B.push({type:"text",value:h.value.slice(C)}),g.children.splice(O,1,...B)):B=[h],O+B.length}}function M_(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 s=-1;for(;++s<n.length;){const a=n[s];t.push([F_(a[0]),B_(a[1])])}return t}function F_(e){return typeof e=="string"?new RegExp(D_(e),"g"):e}function B_(e){return typeof e=="function"?e:function(){return e}}const hc="phrasing",pc=["autolink","link","image","label"];function U_(){return{transforms:[V_],enter:{literalAutolink:H_,literalAutolinkEmail:mc,literalAutolinkHttp:mc,literalAutolinkWww:mc},exit:{literalAutolink:Y_,literalAutolinkEmail:W_,literalAutolinkHttp:z_,literalAutolinkWww:$_}}}function j_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hc,notInConstruct:pc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hc,notInConstruct:pc},{character:":",before:"[ps]",after:"\\/",inConstruct:hc,notInConstruct:pc}]}}function H_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function mc(e){this.config.enter.autolinkProtocol.call(this,e)}function z_(e){this.config.exit.autolinkProtocol.call(this,e)}function $_(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 W_(e){this.config.exit.autolinkEmail.call(this,e)}function Y_(e){this.exit(e)}function V_(e){P_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,q_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Q_]],{ignore:["link","linkReference"]})}function q_(e,t,n,s,a){let o="";if(!L1(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!G_(n)))return!1;const l=K_(n+s);if(!l[0])return!1;const d={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[d,{type:"text",value:l[1]}]:d}function Q_(e,t,n,s){return!L1(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function G_(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 K_(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],s=n.indexOf(")");const a=km(e,"(");let o=km(e,")");for(;s!==-1&&a>o;)e+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),o++;return[e,n]}function L1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Vr(n)||qu(n))&&(!t||n!==47)}R1.peek=sC;function X_(){this.buffer()}function J_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Z_(){this.buffer()}function eC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function tC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nC(e){this.exit(e)}function rC(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function iC(e){this.exit(e)}function sC(){return"["}function R1(e,t,n,s){const a=n.createTracker(s);let o=a.move("[^");const l=n.enter("footnoteReference"),d=n.enter("reference");return o+=a.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),l(),o+=a.move("]"),o}function aC(){return{enter:{gfmFootnoteCallString:X_,gfmFootnoteCall:J_,gfmFootnoteDefinitionLabelString:Z_,gfmFootnoteDefinition:eC},exit:{gfmFootnoteCallString:tC,gfmFootnoteCall:nC,gfmFootnoteDefinitionLabelString:rC,gfmFootnoteDefinition:iC}}}function uC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:R1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(s,a,o,l){const d=o.createTracker(l);let f=d.move("[^");const h=o.enter("footnoteDefinition"),E=o.enter("label");return f+=d.move(o.safe(o.associationId(s),{before:f,after:"]"})),E(),f+=d.move("]:"),s.children&&s.children.length>0&&(d.shift(4),f+=d.move((t?`
|
|
70
|
+
`:" ")+o.indentLines(o.containerFlow(s,d.current()),t?O1:oC))),h(),f}}function oC(e,t,n){return t===0?e:O1(e,t,n)}function O1(e,t,n){return(n?"":" ")+e}const lC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];D1.peek=pC;function cC(){return{canContainEols:["delete"],enter:{strikethrough:fC},exit:{strikethrough:hC}}}function dC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lC}],handlers:{delete:D1}}}function fC(e){this.enter({type:"delete",children:[]},e)}function hC(e){this.exit(e)}function D1(e,t,n,s){const a=n.createTracker(s),o=n.enter("strikethrough");let l=a.move("~~");return l+=n.containerPhrasing(e,{...a.current(),before:l,after:"~"}),l+=a.move("~~"),o(),l}function pC(){return"~"}function mC(e){return e.length}function gC(e,t){const n=t||{},s=(n.align||[]).concat(),a=n.stringLength||mC,o=[],l=[],d=[],f=[];let h=0,E=-1;for(;++E<e.length;){const v=[],O=[];let R=-1;for(e[E].length>h&&(h=e[E].length);++R<e[E].length;){const B=EC(e[E][R]);if(n.alignDelimiters!==!1){const M=a(B);O[R]=M,(f[R]===void 0||M>f[R])&&(f[R]=M)}v.push(B)}l[E]=v,d[E]=O}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<h;)o[g]=Sm(s[g]);else{const v=Sm(s);for(;++g<h;)o[g]=v}g=-1;const x=[],b=[];for(;++g<h;){const v=o[g];let O="",R="";v===99?(O=":",R=":"):v===108?O=":":v===114&&(R=":");let B=n.alignDelimiters===!1?1:Math.max(1,f[g]-O.length-R.length);const M=O+"-".repeat(B)+R;n.alignDelimiters!==!1&&(B=O.length+B+R.length,B>f[g]&&(f[g]=B),b[g]=B),x[g]=M}l.splice(1,0,x),d.splice(1,0,b),E=-1;const C=[];for(;++E<l.length;){const v=l[E],O=d[E];g=-1;const R=[];for(;++g<h;){const B=v[g]||"";let M="",se="";if(n.alignDelimiters!==!1){const $=f[g]-(O[g]||0),H=o[g];H===114?M=" ".repeat($):H===99?$%2?(M=" ".repeat($/2+.5),se=" ".repeat($/2-.5)):(M=" ".repeat($/2),se=M):se=" ".repeat($)}n.delimiterStart!==!1&&!g&&R.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||g)&&R.push(" "),n.alignDelimiters!==!1&&R.push(M),R.push(B),n.alignDelimiters!==!1&&R.push(se),n.padding!==!1&&R.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&R.push("|")}C.push(n.delimiterEnd===!1?R.join("").replace(/ +$/,""):R.join(""))}return C.join(`
|
|
71
|
+
`)}function EC(e){return e==null?"":String(e)}function Sm(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 _m={}.hasOwnProperty;function P1(e,t){const n=t||{};function s(a,...o){let l=s.invalid;const d=s.handlers;if(a&&_m.call(a,e)){const f=String(a[e]);l=_m.call(d,f)?d[f]:s.unknown}if(l)return l.call(this,a,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}function TC(e,t,n,s){const a=n.enter("blockquote"),o=n.createTracker(s);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),yC);return a(),l}function yC(e,t,n){return">"+(n?"":" ")+e}function xC(e,t){return Cm(e,t.inConstruct,!0)&&!Cm(e,t.notInConstruct,!1)}function Cm(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let s=-1;for(;++s<t.length;)if(e.includes(t[s]))return!0;return!1}function Nm(e,t,n,s){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
|
|
72
|
+
`&&xC(n.stack,n.unsafe[a]))return/[ \t]/.test(s.before)?"":" ";return`\\
|
|
73
|
+
`}function M1(e,t){const n=String(e);let s=n.indexOf(t),a=s,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===a?++o>l&&(l=o):o=1,a=s+t.length,s=n.indexOf(t,a);return l}function bC(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 kC(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 SC(e,t,n,s){const a=kC(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(bC(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,_C);return g(),x}const d=n.createTracker(s),f=a.repeat(Math.max(M1(o,a)+1,3)),h=n.enter("codeFenced");let E=d.move(f);if(e.lang){const g=n.enter(`codeFencedLang${l}`);E+=d.move(n.safe(e.lang,{before:E,after:" ",encode:["`"],...d.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${l}`);E+=d.move(" "),E+=d.move(n.safe(e.meta,{before:E,after:`
|
|
74
|
+
`,encode:["`"],...d.current()})),g()}return E+=d.move(`
|
|
75
|
+
`),o&&(E+=d.move(o+`
|
|
76
|
+
`)),E+=d.move(f),h(),E}function _C(e,t,n){return(n?"":" ")+e}function Td(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 CC(e,t,n,s){const a=Td(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("definition");let d=n.enter("label");const f=n.createTracker(s);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
77
|
+
`,...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),d()),l(),h}function NC(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 Gs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Mu(e,t,n){const s=Ii(e),a=Ii(t);return s===void 0?a===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:a===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:s===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}}F1.peek=AC;function F1(e,t,n,s){const a=NC(n),o=n.enter("emphasis"),l=n.createTracker(s),d=l.move(a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const h=f.charCodeAt(0),E=Mu(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=Gs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Mu(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+Gs(g));const b=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function AC(e,t,n){return n.options.emphasis||"*"}function vC(e,t){let n=!1;return Ju(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,Rc}),!!((!e.depth||e.depth<3)&&cd(e)&&(t.options.setext||n))}function wC(e,t,n,s){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(s);if(vC(e,n)){const E=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
|
|
78
|
+
`,after:`
|
|
79
|
+
`});return g(),E(),x+`
|
|
80
|
+
`+(a===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
81
|
+
`))+1))}const l="#".repeat(a),d=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
82
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Gs(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),d(),h}B1.peek=IC;function B1(e){return e.value||""}function IC(){return"<"}U1.peek=LC;function U1(e,t,n,s){const a=Td(n),o=a==='"'?"Quote":"Apostrophe",l=n.enter("image");let d=n.enter("label");const f=n.createTracker(s);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(d=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=f.move(" "+a),h+=f.move(n.safe(e.title,{before:h,after:a,...f.current()})),h+=f.move(a),d()),h+=f.move(")"),l(),h}function LC(){return"!"}j1.peek=RC;function j1(e,t,n,s){const a=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const d=n.createTracker(s);let f=d.move("![");const h=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),l();const E=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=E,o(),a==="full"||!h||h!==g?f+=d.move(g+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function RC(){return"!"}H1.peek=OC;function H1(e,t,n){let s=e.value||"",a="`",o=-1;for(;new RegExp("(^|[^`])"+a+"([^`]|$)").test(s);)a+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<n.unsafe.length;){const l=n.unsafe[o],d=n.compilePattern(l);let f;if(l.atBreak)for(;f=d.exec(s);){let h=f.index;s.charCodeAt(h)===10&&s.charCodeAt(h-1)===13&&h--,s=s.slice(0,h)+" "+s.slice(f.index+1)}}return a+s+a}function OC(){return"`"}function z1(e,t){const n=cd(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))}$1.peek=DC;function $1(e,t,n,s){const a=Td(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(s);let d,f;if(z1(e,n)){const E=n.stack;n.stack=[],d=n.enter("autolink");let g=l.move("<");return g+=l.move(n.containerPhrasing(e,{before:g,after:">",...l.current()})),g+=l.move(">"),d(),n.stack=E,g}d=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${o}`),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(")"),d(),h}function DC(e,t,n){return z1(e,n)?"<":"["}W1.peek=PC;function W1(e,t,n,s){const a=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const d=n.createTracker(s);let f=d.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(h+"]["),l();const E=n.stack;n.stack=[],l=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return l(),n.stack=E,o(),a==="full"||!h||h!==g?f+=d.move(g+"]"):a==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function PC(){return"["}function yd(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 MC(e){const t=yd(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 FC(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 Y1(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 BC(e,t,n,s){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?FC(n):yd(n);const d=e.ordered?l==="."?")":".":MC(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const E=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&E&&(!E.children||!E.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),Y1(n)===l&&E){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=d),n.bulletCurrent=l;const h=n.containerFlow(e,s);return n.bulletLastUsed=l,n.bulletCurrent=o,a(),h}function UC(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 jC(e,t,n,s){const a=UC(n);let o=n.bulletCurrent||yd(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(a==="tab"||a==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const d=n.createTracker(s);d.move(o+" ".repeat(l-o.length)),d.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),E);return f(),h;function E(g,x,b){return x?(b?"":" ".repeat(l))+g:(b?o:o+" ".repeat(l-o.length))+g}}function HC(e,t,n,s){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,s);return o(),a(),l}const zC=Ku(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function $C(e,t,n,s){return(e.children.some(function(l){return zC(l)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function WC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}V1.peek=YC;function V1(e,t,n,s){const a=WC(n),o=n.enter("strong"),l=n.createTracker(s),d=l.move(a+a);let f=l.move(n.containerPhrasing(e,{after:a,before:d,...l.current()}));const h=f.charCodeAt(0),E=Mu(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=Gs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Mu(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+Gs(g));const b=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function YC(e,t,n){return n.options.strong||"*"}function VC(e,t,n,s){return n.safe(e.value,s)}function qC(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 QC(e,t,n){const s=(Y1(n)+(n.options.ruleSpaces?" ":"")).repeat(qC(n));return n.options.ruleSpaces?s.slice(0,-1):s}const q1={blockquote:TC,break:Nm,code:SC,definition:CC,emphasis:F1,hardBreak:Nm,heading:wC,html:B1,image:U1,imageReference:j1,inlineCode:H1,link:$1,linkReference:W1,list:BC,listItem:jC,paragraph:HC,root:$C,strong:V1,text:VC,thematicBreak:QC};function GC(){return{enter:{table:KC,tableData:Am,tableHeader:Am,tableRow:JC},exit:{codeText:ZC,table:XC,tableData:gc,tableHeader:gc,tableRow:gc}}}function KC(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 XC(e){this.exit(e),this.data.inTable=void 0}function JC(e){this.enter({type:"tableRow",children:[]},e)}function gc(e){this.exit(e)}function Am(e){this.enter({type:"tableCell",children:[]},e)}function ZC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,e3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function e3(e,t){return t==="|"?t:e}function t3(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
83
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:l,tableCell:f,tableRow:d}};function l(b,C,v,O){return h(E(b,v,O),b.align)}function d(b,C,v,O){const R=g(b,v,O),B=h([R]);return B.slice(0,B.indexOf(`
|
|
84
|
+
`))}function f(b,C,v,O){const R=v.enter("tableCell"),B=v.enter("phrasing"),M=v.containerPhrasing(b,{...O,before:o,after:o});return B(),R(),M}function h(b,C){return gC(b,{align:C,alignDelimiters:s,padding:n,stringLength:a})}function E(b,C,v){const O=b.children;let R=-1;const B=[],M=C.enter("table");for(;++R<O.length;)B[R]=g(O[R],C,v);return M(),B}function g(b,C,v){const O=b.children;let R=-1;const B=[],M=C.enter("tableRow");for(;++R<O.length;)B[R]=f(O[R],b,C,v);return M(),B}function x(b,C,v){let O=q1.inlineCode(b,C,v);return v.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function n3(){return{exit:{taskListCheckValueChecked:vm,taskListCheckValueUnchecked:vm,paragraph:i3}}}function r3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:s3}}}function vm(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function i3(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 s=n.children[0];if(s&&s.type==="text"){const a=t.children;let o=-1,l;for(;++o<a.length;){const d=a[o];if(d.type==="paragraph"){l=d;break}}l===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(e)}function s3(e,t,n,s){const a=e.children[0],o=typeof e.checked=="boolean"&&a&&a.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",d=n.createTracker(s);o&&d.move(l);let f=q1.listItem(e,t,n,{...s,...d.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(E){return E+l}}function a3(){return[U_(),aC(),cC(),GC(),n3()]}function u3(e){return{extensions:[j_(),uC(e),dC(),t3(e),r3()]}}const o3={tokenize:p3,partial:!0},Q1={tokenize:m3,partial:!0},G1={tokenize:g3,partial:!0},K1={tokenize:E3,partial:!0},l3={tokenize:T3,partial:!0},X1={name:"wwwAutolink",tokenize:f3,previous:Z1},J1={name:"protocolAutolink",tokenize:h3,previous:eg},Yn={name:"emailAutolink",tokenize:d3,previous:tg},Rn={};function c3(){return{text:Rn}}let Br=48;for(;Br<123;)Rn[Br]=Yn,Br++,Br===58?Br=65:Br===91&&(Br=97);Rn[43]=Yn;Rn[45]=Yn;Rn[46]=Yn;Rn[95]=Yn;Rn[72]=[Yn,J1];Rn[104]=[Yn,J1];Rn[87]=[Yn,X1];Rn[119]=[Yn,X1];function d3(e,t,n){const s=this;let a,o;return l;function l(g){return!Mc(g)||!tg.call(s,s.previous)||xd(s.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return Mc(g)?(e.consume(g),d):g===64?(e.consume(g),f):n(g)}function f(g){return g===46?e.check(l3,E,h)(g):g===45||g===95||At(g)?(o=!0,e.consume(g),f):E(g)}function h(g){return e.consume(g),a=!0,f}function E(g){return o&&a&&Rt(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function f3(e,t,n){const s=this;return a;function a(l){return l!==87&&l!==119||!Z1.call(s,s.previous)||xd(s.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(o3,e.attempt(Q1,e.attempt(G1,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function h3(e,t,n){const s=this;let a="",o=!1;return l;function l(g){return(g===72||g===104)&&eg.call(s,s.previous)&&!xd(s.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),a+=String.fromCodePoint(g),e.consume(g),d):n(g)}function d(g){if(Rt(g)&&a.length<5)return a+=String.fromCodePoint(g),e.consume(g),d;if(g===58){const x=a.toLowerCase();if(x==="http"||x==="https")return e.consume(g),f}return n(g)}function f(g){return g===47?(e.consume(g),o?h:(o=!0,f)):n(g)}function h(g){return g===null||Du(g)||Ve(g)||Vr(g)||qu(g)?n(g):e.attempt(Q1,e.attempt(G1,E),n)(g)}function E(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function p3(e,t,n){let s=0;return a;function a(l){return(l===87||l===119)&&s<3?(s++,e.consume(l),a):l===46&&s===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function m3(e,t,n){let s,a,o;return l;function l(h){return h===46||h===95?e.check(K1,f,d)(h):h===null||Ve(h)||Vr(h)||h!==45&&qu(h)?f(h):(o=!0,e.consume(h),l)}function d(h){return h===95?s=!0:(a=s,s=void 0),e.consume(h),l}function f(h){return a||s||!o?n(h):t(h)}}function g3(e,t){let n=0,s=0;return a;function a(l){return l===40?(n++,e.consume(l),a):l===41&&s<n?o(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(K1,t,o)(l):l===null||Ve(l)||Vr(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&s++,e.consume(l),a}}function E3(e,t,n){return s;function s(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),s):d===38?(e.consume(d),o):d===93?(e.consume(d),a):d===60||d===null||Ve(d)||Vr(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||Ve(d)||Vr(d)?t(d):s(d)}function o(d){return Rt(d)?l(d):n(d)}function l(d){return d===59?(e.consume(d),s):Rt(d)?(e.consume(d),l):n(d)}}function T3(e,t,n){return s;function s(o){return e.consume(o),a}function a(o){return At(o)?n(o):t(o)}}function Z1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ve(e)}function eg(e){return!Rt(e)}function tg(e){return!(e===47||Mc(e))}function Mc(e){return e===43||e===45||e===46||e===95||At(e)}function xd(e){let t=e.length,n=!1;for(;t--;){const s=e[t][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const y3={tokenize:A3,partial:!0};function x3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:_3,continuation:{tokenize:C3},exit:N3}},text:{91:{name:"gfmFootnoteCall",tokenize:S3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:b3,resolveTo:k3}}}}function b3(e,t,n){const s=this;let a=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let l;for(;a--;){const f=s.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 d;function d(f){if(!l||!l._balanced)return n(f);const h=En(s.sliceSerialize({start:l.end,end:s.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function k3(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 s={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 o={type:"gfmFootnoteCallString",start:Object.assign({},a.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},d=[e[n+1],e[n+2],["enter",s,t],e[n+3],e[n+4],["enter",a,t],["exit",a,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",s,t]];return e.splice(n,e.length-n+1,...d),e}function S3(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o=0,l;return d;function d(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),f}function f(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!l||g===null||g===91||Ve(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return a.includes(En(s.sliceSerialize(x)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Ve(g)||(l=!0),o++,e.consume(g),g===92?E:h}function E(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function _3(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,l=0,d;return f;function f(C){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(C){return C===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",E):n(C)}function E(C){if(l>999||C===93&&!d||C===null||C===91||Ve(C))return n(C);if(C===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=En(s.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(C),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ve(C)||(d=!0),l++,e.consume(C),C===92?g:E}function g(C){return C===91||C===92||C===93?(e.consume(C),l++,E):E(C)}function x(C){return C===58?(e.enter("definitionMarker"),e.consume(C),e.exit("definitionMarker"),a.includes(o)||a.push(o),Me(e,b,"gfmFootnoteDefinitionWhitespace")):n(C)}function b(C){return t(C)}}function C3(e,t,n){return e.check(ra,t,e.attempt(y3,t,n))}function N3(e){e.exit("gfmFootnoteDefinition")}function A3(e,t,n){const s=this;return Me(e,a,"gfmFootnoteDefinitionIndent",5);function a(o){const l=s.events[s.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function v3(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function a(l,d){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 E={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},g={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},x=[["enter",E,d],["enter",l[h][1],d],["exit",l[h][1],d],["enter",g,d]],b=d.parser.constructs.insideSpan.null;b&&Qt(x,x.length,0,Qu(b,l.slice(h+1,f),d)),Qt(x,x.length,0,[["exit",g,d],["enter",l[f][1],d],["exit",l[f][1],d],["exit",E,d]]),Qt(l,h-1,f-h+3,x),f=h+x.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,d,f){const h=this.previous,E=this.events;let g=0;return x;function x(C){return h===126&&E[E.length-1][1].type!=="characterEscape"?f(C):(l.enter("strikethroughSequenceTemporary"),b(C))}function b(C){const v=Ii(h);if(C===126)return g>1?f(C):(l.consume(C),g++,b);if(g<2&&!n)return f(C);const O=l.exit("strikethroughSequenceTemporary"),R=Ii(C);return O._open=!R||R===2&&!!v,O._close=!v||v===2&&!!R,d(C)}}}class w3{constructor(){this.map=[]}add(t,n,s){I3(this,t,n,s)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const s=[];for(;n>0;)n-=1,s.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];s.push(t.slice()),t.length=0;let a=s.pop();for(;a;){for(const o of a)t.push(o);a=s.pop()}this.map.length=0}}function I3(e,t,n,s){let a=0;if(!(n===0&&s.length===0)){for(;a<e.map.length;){if(e.map[a][0]===t){e.map[a][1]+=n,e.map[a][2].push(...s);return}a+=1}e.map.push([t,n,s])}}function L3(e,t){let n=!1;const s=[];for(;t<e.length;){const a=e[t];if(n){if(a[0]==="enter")a[1].type==="tableContent"&&s.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(a[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(a[1].type==="tableDelimiterRow")break}else a[0]==="enter"&&a[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return s}function R3(){return{flow:{null:{name:"table",tokenize:O3,resolveAll:D3}}}}function O3(e,t,n){const s=this;let a=0,o=0,l;return d;function d(U){let re=s.events.length-1;for(;re>-1;){const de=s.events[re][1].type;if(de==="lineEnding"||de==="linePrefix")re--;else break}const ce=re>-1?s.events[re][1].type:null,ke=ce==="tableHead"||ce==="tableRow"?H:f;return ke===H&&s.parser.lazy[s.now().line]?n(U):ke(U)}function f(U){return e.enter("tableHead"),e.enter("tableRow"),h(U)}function h(U){return U===124||(l=!0,o+=1),E(U)}function E(U){return U===null?n(U):be(U)?o>1?(o=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),b):n(U):Fe(U)?Me(e,E,"whitespace")(U):(o+=1,l&&(l=!1,a+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),l=!0,E):(e.enter("data"),g(U)))}function g(U){return U===null||U===124||Ve(U)?(e.exit("data"),E(U)):(e.consume(U),U===92?x:g)}function x(U){return U===92||U===124?(e.consume(U),g):g(U)}function b(U){return s.interrupt=!1,s.parser.lazy[s.now().line]?n(U):(e.enter("tableDelimiterRow"),l=!1,Fe(U)?Me(e,C,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):C(U))}function C(U){return U===45||U===58?O(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),v):$(U)}function v(U){return Fe(U)?Me(e,O,"whitespace")(U):O(U)}function O(U){return U===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),R):U===45?(o+=1,R(U)):U===null||be(U)?se(U):$(U)}function R(U){return U===45?(e.enter("tableDelimiterFiller"),B(U)):$(U)}function B(U){return U===45?(e.consume(U),B):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(U))}function M(U){return Fe(U)?Me(e,se,"whitespace")(U):se(U)}function se(U){return U===124?C(U):U===null||be(U)?!l||a!==o?$(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):$(U)}function $(U){return n(U)}function H(U){return e.enter("tableRow"),ee(U)}function ee(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),ee):U===null||be(U)?(e.exit("tableRow"),t(U)):Fe(U)?Me(e,ee,"whitespace")(U):(e.enter("data"),ue(U))}function ue(U){return U===null||U===124||Ve(U)?(e.exit("data"),ee(U)):(e.consume(U),U===92?fe:ue)}function fe(U){return U===92||U===124?(e.consume(U),ue):ue(U)}}function D3(e,t){let n=-1,s=!0,a=0,o=[0,0,0,0],l=[0,0,0,0],d=!1,f=0,h,E,g;const x=new w3;for(;++n<e.length;){const b=e[n],C=b[1];b[0]==="enter"?C.type==="tableHead"?(d=!1,f!==0&&(wm(x,t,f,h,E),E=void 0,f=0),h={type:"table",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",h,t]])):C.type==="tableRow"||C.type==="tableDelimiterRow"?(s=!0,g=void 0,o=[0,0,0,0],l=[0,n+1,0,0],d&&(d=!1,E={type:"tableBody",start:Object.assign({},C.start),end:Object.assign({},C.end)},x.add(n,0,[["enter",E,t]])),a=C.type==="tableDelimiterRow"?2:E?3:1):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")?(s=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],g=Cu(x,t,o,a,void 0,g),o=[0,0,0,0]),l[2]=n)):C.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(l[0]=l[1],g=Cu(x,t,o,a,void 0,g)),o=l,l=[o[1],n,0,0])):C.type==="tableHead"?(d=!0,f=n):C.type==="tableRow"||C.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],g=Cu(x,t,o,a,n,g)):l[1]!==0&&(g=Cu(x,t,l,a,n,g)),a=0):a&&(C.type==="data"||C.type==="tableDelimiterMarker"||C.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&wm(x,t,f,h,E),x.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=L3(t.events,n))}return e}function Cu(e,t,n,s,a,o){const l=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},Ai(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=Ai(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Ai(t.events,n[2]),E=Ai(t.events,n[3]),g={type:d,start:Object.assign({},h),end:Object.assign({},E)};if(e.add(n[2],0,[["enter",g,t]]),s!==2){const x=t.events[n[2]],b=t.events[n[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const C=n[2]+1,v=n[3]-n[2]-1;e.add(C,v,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return a!==void 0&&(o.end=Object.assign({},Ai(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function wm(e,t,n,s,a){const o=[],l=Ai(t.events,n);a&&(a.end=Object.assign({},l),o.push(["exit",a,t])),s.end=Object.assign({},l),o.push(["exit",s,t]),e.add(n+1,0,o)}function Ai(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const P3={name:"tasklistCheck",tokenize:F3};function M3(){return{text:{91:P3}}}function F3(e,t,n){const s=this;return a;function a(f){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Ve(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"),d):n(f)}function d(f){return be(f)?t(f):Fe(f)?e.check({tokenize:B3},t,n)(f):n(f)}}function B3(e,t,n){return Me(e,s,"whitespace");function s(a){return a===null?n(a):t(a)}}function U3(e){return c1([c3(),x3(),v3(e),R3(),M3()])}const j3={};function H3(e){const t=this,n=e||j3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(U3(n)),o.push(a3()),l.push(u3(n))}function z3(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:o},exit:{mathFlow:a,mathFlowFence:s,mathFlowFenceMeta:n,mathFlowValue:d,mathText:l,mathTextData:d}};function e(f){const h={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[h]}},f)}function t(){this.buffer()}function n(){const f=this.resume(),h=this.stack[this.stack.length-1];h.type,h.meta=f}function s(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function a(f){const h=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),E=this.stack[this.stack.length-1];E.type,this.exit(f),E.value=h;const g=E.data.hChildren[0];g.type,g.tagName,g.children.push({type:"text",value:h}),this.data.mathFlowInside=void 0}function o(f){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},f),this.buffer()}function l(f){const h=this.resume(),E=this.stack[this.stack.length-1];E.type,this.exit(f),E.value=h,E.data.hChildren.push({type:"text",value:h})}function d(f){this.config.enter.data.call(this,f),this.config.exit.data.call(this,f)}}function $3(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),s.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
85
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:n,inlineMath:s}};function n(o,l,d,f){const h=o.value||"",E=d.createTracker(f),g="$".repeat(Math.max(M1(h,"$")+1,2)),x=d.enter("mathFlow");let b=E.move(g);if(o.meta){const C=d.enter("mathFlowMeta");b+=E.move(d.safe(o.meta,{after:`
|
|
86
|
+
`,before:b,encode:["$"],...E.current()})),C()}return b+=E.move(`
|
|
87
|
+
`),h&&(b+=E.move(h+`
|
|
88
|
+
`)),b+=E.move(g),x(),b}function s(o,l,d){let f=o.value||"",h=1;for(t||h++;new RegExp("(^|[^$])"+"\\$".repeat(h)+"([^$]|$)").test(f);)h++;const E="$".repeat(h);/[^ \r\n]/.test(f)&&(/^[ \r\n]/.test(f)&&/[ \r\n]$/.test(f)||/^\$|\$$/.test(f))&&(f=" "+f+" ");let g=-1;for(;++g<d.unsafe.length;){const x=d.unsafe[g];if(!x.atBreak)continue;const b=d.compilePattern(x);let C;for(;C=b.exec(f);){let v=C.index;f.codePointAt(v)===10&&f.codePointAt(v-1)===13&&v--,f=f.slice(0,v)+" "+f.slice(C.index+1)}}return E+f+E}function a(){return"$"}}const W3={tokenize:Y3,concrete:!0,name:"mathFlow"},Im={tokenize:V3,partial:!0};function Y3(e,t,n){const s=this,a=s.events[s.events.length-1],o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0;let l=0;return d;function d(B){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(B)}function f(B){return B===36?(e.consume(B),l++,f):l<2?n(B):(e.exit("mathFlowFenceSequence"),Me(e,h,"whitespace")(B))}function h(B){return B===null||be(B)?g(B):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(B))}function E(B){return B===null||be(B)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),g(B)):B===36?n(B):(e.consume(B),E)}function g(B){return e.exit("mathFlowFence"),s.interrupt?t(B):e.attempt(Im,x,O)(B)}function x(B){return e.attempt({tokenize:R,partial:!0},O,b)(B)}function b(B){return(o?Me(e,C,"linePrefix",o+1):C)(B)}function C(B){return B===null?O(B):be(B)?e.attempt(Im,x,O)(B):(e.enter("mathFlowValue"),v(B))}function v(B){return B===null||be(B)?(e.exit("mathFlowValue"),C(B)):(e.consume(B),v)}function O(B){return e.exit("mathFlow"),t(B)}function R(B,M,se){let $=0;return Me(B,H,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function H(fe){return B.enter("mathFlowFence"),B.enter("mathFlowFenceSequence"),ee(fe)}function ee(fe){return fe===36?($++,B.consume(fe),ee):$<l?se(fe):(B.exit("mathFlowFenceSequence"),Me(B,ue,"whitespace")(fe))}function ue(fe){return fe===null||be(fe)?(B.exit("mathFlowFence"),M(fe)):se(fe)}}}function V3(e,t,n){const s=this;return a;function a(l){return l===null?t(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return s.parser.lazy[s.now().line]?n(l):t(l)}}function q3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:s,resolve:Q3,previous:G3,name:"mathText"};function s(a,o,l){let d=0,f,h;return E;function E(v){return a.enter("mathText"),a.enter("mathTextSequence"),g(v)}function g(v){return v===36?(a.consume(v),d++,g):d<2&&!n?l(v):(a.exit("mathTextSequence"),x(v))}function x(v){return v===null?l(v):v===36?(h=a.enter("mathTextSequence"),f=0,C(v)):v===32?(a.enter("space"),a.consume(v),a.exit("space"),x):be(v)?(a.enter("lineEnding"),a.consume(v),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(v))}function b(v){return v===null||v===32||v===36||be(v)?(a.exit("mathTextData"),x(v)):(a.consume(v),b)}function C(v){return v===36?(a.consume(v),f++,C):f===d?(a.exit("mathTextSequence"),a.exit("mathText"),o(v)):(h.type="mathTextData",b(v))}}}function Q3(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[n][1].type="mathTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="mathTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function G3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function K3(e){return{flow:{36:W3},text:{36:q3(e)}}}const X3={};function J3(e){const t=this,n=e||X3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(K3(n)),o.push(z3()),l.push($3(n))}const Z3=[H3,J3],eN=/\\[a-zA-Z]+|[\^_]/,tN=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,nN=/^[a-zA-Z]{3,}$/,Lm=/[=+\-*/<>≤≥±×÷]/,rN=/[.,;:!?]$/,iN=/\n/,sN=/\s+/,aN=/\d,\d{3}\b/;function uN(e){const t=e.trim();if(!t||iN.test(e))return!1;if(eN.test(t))return!0;if(tN.test(t))return!1;const n=t.split(sN),s=n.filter(o=>nN.test(o.replace(rN,"")));return s.length>=2||aN.test(t)?!1:!!(n.every(o=>o.length<=4)&&(n.length===1||Lm.test(t))||Lm.test(t)&&s.length===0)}function oN(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),s=e.indexOf(`
|
|
89
|
+
${n}`,t+3);return s===-1?e.length:s+4}if(e[t]==="`"){let n=0;for(;e[t+n]==="`";)n++;const s=e.indexOf("`".repeat(n),t+n);return s===-1?t+n:s+n}return t}function lN(e){let t="",n=0;for(;n<e.length;){const s=oN(e,n);if(s>n){t+=e.slice(n,s),n=s;continue}if(e[n]==="$"&&e[n+1]==="$"){const a=e.indexOf("$$",n+2),o=a===-1?e.length:a+2;t+=e.slice(n,o),n=o;continue}if(e[n]==="$"&&e[n-1]!=="\\"){const a=e.indexOf("$",n+1);if(a!==-1){const o=e.slice(n+1,a);if(!uN(o)){t+=`\\$${o}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const Rm=/[#.]/g;function cN(e,t){const n=e||"",s={};let a=0,o,l;for(;a<n.length;){Rm.lastIndex=a;const d=Rm.exec(n),f=n.slice(a,d?d.index:n.length);f&&(o?o==="#"?s.id=f:Array.isArray(s.className)?s.className.push(f):s.className=[f]:l=f,a+=f.length),d&&(o=d[0],a++)}return{type:"element",tagName:l||t||"div",properties:s,children:[]}}function ng(e,t,n){const s=n?pN(n):void 0;function a(o,l,...d){let f;if(o==null){f={type:"root",children:[]};const h=l;d.unshift(h)}else{f=cN(o,t);const h=f.tagName.toLowerCase(),E=s?s.get(h):void 0;if(f.tagName=E||h,dN(l))d.unshift(l);else for(const[g,x]of Object.entries(l))fN(e,f.properties,g,x)}for(const h of d)Fc(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function dN(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 s of n){const a=t[s];if(a&&typeof a=="object"){if(!Array.isArray(a))return!0;const o=a;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function fN(e,t,n,s){const a=Yu(e,n);let o;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;o=s}else typeof s=="boolean"?o=s:typeof s=="string"?a.spaceSeparated?o=$p(s):a.commaSeparated?o=Bp(s):a.commaOrSpaceSeparated?o=$p(Bp(s).join(" ")):o=Om(a,a.property,s):Array.isArray(s)?o=[...s]:o=a.property==="style"?hN(s):String(s);if(Array.isArray(o)){const l=[];for(const d of o)l.push(Om(a,a.property,d));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Fc(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)Fc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Fc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Om(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||qs(n)===qs(t)))return!0}return n}function hN(e){const t=[];for(const[n,s]of Object.entries(e))t.push([n,s].join(": "));return t.join("; ")}function pN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const mN=["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"],gN=ng(na,"div"),EN=ng(xr,"g",mN);function TN(e){const t=String(e),n=[];return{toOffset:a,toPoint:s};function s(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let d=n[l];if(d===void 0){const f=Dm(t,n[l-1]);d=f===-1?t.length+1:f+1,n[l]=d}if(d>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function a(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const d=n[n.length-1],f=Dm(t,d),h=f===-1?t.length+1:f+1;if(d===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function Dm(e,t){const n=e.indexOf("\r",t),s=e.indexOf(`
|
|
90
|
+
`,t);return s===-1?n:n===-1||n+1===s?s:n<s?n:s}const $r={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/"},rg={}.hasOwnProperty,yN=Object.prototype;function xN(e,t){const n=t||{};return bd({file:n.file||void 0,location:!1,schema:n.space==="svg"?xr:na,verbose:n.verbose||!1},e)}function bd(e,t){let n;switch(t.nodeName){case"#comment":{const s=t;return n={type:"comment",value:s.data},Lu(e,s,n),n}case"#document":case"#document-fragment":{const s=t,a="mode"in s?s.mode==="quirks"||s.mode==="limited-quirks":!1;if(n={type:"root",children:ig(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=TN(o),d=l.toPoint(0),f=l.toPoint(o.length);n.position={start:d,end:f}}return n}case"#documentType":{const s=t;return n={type:"doctype"},Lu(e,s,n),n}case"#text":{const s=t;return n={type:"text",value:s.value},Lu(e,s,n),n}default:return n=bN(e,t),n}}function ig(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=bd(e,t[n]);s.push(a)}return s}function bN(e,t){const n=e.schema;e.schema=t.namespaceURI===$r.svg?xr:na;let s=-1;const a={};for(;++s<t.attrs.length;){const d=t.attrs[s],f=(d.prefix?d.prefix+":":"")+d.name;rg.call(yN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?EN:gN)(t.tagName,a,ig(e,t.childNodes));if(Lu(e,t,l),l.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&vi(f.startTag),E=f&&f.endTag&&vi(f.endTag),g=bd(e,d.content);h&&E&&e.file&&(g.position={start:h.end,end:E.start}),l.content=g}return e.schema=n,l}function Lu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=kN(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function kN(e,t,n){const s=vi(n);if(t.type==="element"){const a=t.children[t.children.length-1];if(s&&!n.endTag&&a&&a.position&&a.position.end&&(s.end=Object.assign({},a.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)rg.call(n.attrs,l)&&(o[Yu(e.schema,l).property]=vi(n.attrs[l]));n.startTag;const d=vi(n.startTag),f=n.endTag?vi(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return s}function vi(e){const t=Pm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Pm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Pm(e){return e.line&&e.column?e:void 0}const SN={},_N={}.hasOwnProperty,sg=P1("type",{handlers:{root:NN,element:LN,text:wN,comment:IN,doctype:vN}});function CN(e,t){const s=(t||SN).space;return sg(e,s==="svg"?xr:na)}function NN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=kd(e.children,n,t),Mi(e,n),n}function AN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=kd(e.children,n,t),Mi(e,n),n}function vN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Mi(e,t),t}function wN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Mi(e,t),t}function IN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Mi(e,t),t}function LN(e,t){const n=t;let s=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=xr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&_N.call(e.properties,o)){const f=RN(s,o,e.properties[o]);f&&a.push(f)}}const l=s.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:$r[l],childNodes:[],parentNode:null};return d.childNodes=kd(e.children,d,s),Mi(e,d),e.tagName==="template"&&e.content&&(d.content=AN(e.content,s)),d}function RN(e,t,n){const s=Yu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&s.boolean)return;Array.isArray(n)&&(n=s.commaSeparated?Q0(n):n1(n));const a={name:s.attribute,value:n===!0?"":String(n)};if(s.space&&s.space!=="html"&&s.space!=="svg"){const o=a.name.indexOf(":");o<0?a.prefix="":(a.name=a.name.slice(o+1),a.prefix=s.attribute.slice(0,o)),a.namespace=$r[s.space]}return a}function kd(e,t,n){let s=-1;const a=[];if(e)for(;++s<e.length;){const o=sg(e[s],n);o.parentNode=t,a.push(o)}return a}function Mi(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 ON=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],DN=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]),Je="�";var _;(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"})(_||(_={}));const Ut={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ag(e){return e>=55296&&e<=57343}function PN(e){return e>=56320&&e<=57343}function MN(e,t){return(e-55296)*1024+9216+t}function ug(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||DN.has(e)}var q;(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"})(q||(q={}));const FN=65536;class BN{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=FN,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:s,col:a,offset:o}=this,l=a+n,d=o+n;return{code:t,startLine:s,endLine:s,startCol:l,endCol:l,startOffset:d,endOffset:d}}_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(PN(n))return this.pos++,this._addGap(),MN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(q.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 s=0;s<t.length;s++)if((this.html.charCodeAt(this.pos+s)|32)!==t.charCodeAt(s))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,_.EOF;const s=this.html.charCodeAt(n);return s===_.CARRIAGE_RETURN?_.LINE_FEED:s}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,_.EOF;let t=this.html.charCodeAt(this.pos);return t===_.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,_.LINE_FEED):t===_.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ag(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===_.LINE_FEED||t===_.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ug(t)?this._err(q.controlCharacterInInputStream):og(t)&&this._err(q.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Pe;(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"})(Pe||(Pe={}));function lg(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 UN=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))),jN=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 HN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=jN.get(e))!==null&&t!==void 0?t:e}var gt;(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"})(gt||(gt={}));const zN=32;var Tr;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Tr||(Tr={}));function Bc(e){return e>=gt.ZERO&&e<=gt.NINE}function $N(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function WN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Bc(e)}function YN(e){return e===gt.EQUALS||WN(e)}var mt;(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"})(mt||(mt={}));var $n;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})($n||($n={}));class VN{constructor(t,n,s){this.decodeTree=t,this.emitCodePoint=n,this.errors=s,this.state=mt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=$n.Strict}startEntity(t){this.decodeMode=t,this.state=mt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case mt.EntityStart:return t.charCodeAt(n)===gt.NUM?(this.state=mt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=mt.NamedEntity,this.stateNamedEntity(t,n));case mt.NumericStart:return this.stateNumericStart(t,n);case mt.NumericDecimal:return this.stateNumericDecimal(t,n);case mt.NumericHex:return this.stateNumericHex(t,n);case mt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|zN)===gt.LOWER_X?(this.state=mt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=mt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,s,a){if(n!==s){const o=s-n;this.result=this.result*Math.pow(a,o)+Number.parseInt(t.substr(n,o),a),this.consumed+=o}}stateNumericHex(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Bc(a)||$N(a))n+=1;else return this.addToNumericResult(t,s,n,16),this.emitNumericEntity(a,3)}return this.addToNumericResult(t,s,n,16),-1}stateNumericDecimal(t,n){const s=n;for(;n<t.length;){const a=t.charCodeAt(n);if(Bc(a))n+=1;else return this.addToNumericResult(t,s,n,10),this.emitNumericEntity(a,2)}return this.addToNumericResult(t,s,n,10),-1}emitNumericEntity(t,n){var s;if(this.consumed<=n)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===gt.SEMI)this.consumed+=1;else if(this.decodeMode===$n.Strict)return 0;return this.emitCodePoint(HN(this.result),this.consumed),this.errors&&(t!==gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:s}=this;let a=s[this.treeIndex],o=(a&Tr.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=qN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===$n.Attribute&&(o===0||YN(l))?0:this.emitNotTerminatedNamedEntity();if(a=s[this.treeIndex],o=(a&Tr.VALUE_LENGTH)>>14,o!==0){if(l===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==$n.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:s}=this,a=(s[n]&Tr.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,a,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,s){const{decodeTree:a}=this;return this.emitCodePoint(n===1?a[t]&~Tr.VALUE_LENGTH:a[t+1],s),n===3&&this.emitCodePoint(a[t+2],s),s}end(){var t;switch(this.state){case mt.NamedEntity:return this.result!==0&&(this.decodeMode!==$n.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case mt.NumericDecimal:return this.emitNumericEntity(0,2);case mt.NumericHex:return this.emitNumericEntity(0,3);case mt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case mt.EntityStart:return 0}}}function qN(e,t,n,s){const a=(t&Tr.BRANCH_LENGTH)>>7,o=t&Tr.JUMP_TABLE;if(a===0)return o!==0&&s===o?n:-1;if(o){const f=s-o;return f<0||f>=a?-1:e[n+f]-1}let l=n,d=l+a-1;for(;l<=d;){const f=l+d>>>1,h=e[f];if(h<s)l=f+1;else if(h>s)d=f-1;else return e[f+a]}return-1}var J;(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/"})(J||(J={}));var Yr;(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"})(Yr||(Yr={}));var sn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(sn||(sn={}));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 QN=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 Fi(e){var t;return(t=QN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const ne=p,GN={[J.HTML]:new Set([ne.ADDRESS,ne.APPLET,ne.AREA,ne.ARTICLE,ne.ASIDE,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BLOCKQUOTE,ne.BODY,ne.BR,ne.BUTTON,ne.CAPTION,ne.CENTER,ne.COL,ne.COLGROUP,ne.DD,ne.DETAILS,ne.DIR,ne.DIV,ne.DL,ne.DT,ne.EMBED,ne.FIELDSET,ne.FIGCAPTION,ne.FIGURE,ne.FOOTER,ne.FORM,ne.FRAME,ne.FRAMESET,ne.H1,ne.H2,ne.H3,ne.H4,ne.H5,ne.H6,ne.HEAD,ne.HEADER,ne.HGROUP,ne.HR,ne.HTML,ne.IFRAME,ne.IMG,ne.INPUT,ne.LI,ne.LINK,ne.LISTING,ne.MAIN,ne.MARQUEE,ne.MENU,ne.META,ne.NAV,ne.NOEMBED,ne.NOFRAMES,ne.NOSCRIPT,ne.OBJECT,ne.OL,ne.P,ne.PARAM,ne.PLAINTEXT,ne.PRE,ne.SCRIPT,ne.SECTION,ne.SELECT,ne.SOURCE,ne.STYLE,ne.SUMMARY,ne.TABLE,ne.TBODY,ne.TD,ne.TEMPLATE,ne.TEXTAREA,ne.TFOOT,ne.TH,ne.THEAD,ne.TITLE,ne.TR,ne.TRACK,ne.UL,ne.WBR,ne.XMP]),[J.MATHML]:new Set([ne.MI,ne.MO,ne.MN,ne.MS,ne.MTEXT,ne.ANNOTATION_XML]),[J.SVG]:new Set([ne.TITLE,ne.FOREIGN_OBJECT,ne.DESC]),[J.XLINK]:new Set,[J.XML]:new Set,[J.XMLNS]:new Set},Uc=new Set([ne.H1,ne.H2,ne.H3,ne.H4,ne.H5,ne.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 st={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function KN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ms(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function XN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function mr(e){return XN(e)||Ms(e)}function Mm(e){return mr(e)||KN(e)}function Nu(e){return e+32}function cg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Fm(e){return cg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function JN(e){return e===_.NULL?q.nullCharacterReference:e>1114111?q.characterReferenceOutsideUnicodeRange:ag(e)?q.surrogateCharacterReference:og(e)?q.noncharacterCharacterReference:ug(e)||e===_.CARRIAGE_RETURN?q.controlCharacterReference:null}class ZN{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 BN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new VN(UN,(s,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(s)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(q.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(q.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const a=JN(s);a&&this._err(a,1)}}:void 0)}_err(t,n=0){var s,a;(a=(s=this.handler).onParseError)===null||a===void 0||a.call(s,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,s){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||s==null||s()}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:Pe.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Pe.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Pe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Pe.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 s=this.currentToken;if(lg(s,this.currentAttr.name)===null){if(s.attrs.push(this.currentAttr),s.location&&this.currentLocation){const a=(t=(n=s.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);a[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(q.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=Fi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(q.endTagWithAttributes),t.selfClosing&&this._err(q.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 Pe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Pe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Pe.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:Pe.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=cg(t)?Pe.WHITESPACE_CHARACTER:t===_.NULL?Pe.NULL_CHARACTER:Pe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Pe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$n.Attribute:$n.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 _.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitCodePoint(t);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case _.AMPERSAND:{this._startCharacterReference();break}case _.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mr(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(q.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(q.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(q.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mr(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(q.missingEndTagName),this.state=N.DATA;break}case _.EOF:{this._err(q.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(q.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.tagName+=Je;break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ms(t)?Nu(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mr(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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case _.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===_.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mr(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 _.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case _.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){mr(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===_.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.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 _.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mr(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){mr(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(Ut.SCRIPT,!1)&&Fm(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.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 _.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(q.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(q.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.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(Ut.SCRIPT,!1)&&Fm(this.preprocessor.peek(Ut.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ut.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(q.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:case _.SOLIDUS:case _.GREATER_THAN_SIGN:case _.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(q.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.name+=Je;break}default:this.currentAttr.name+=String.fromCodePoint(Ms(t)?Nu(t):t)}}_stateAfterAttributeName(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(q.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(q.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(q.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(q.eofInTag),this._emitEOFToken();break}default:this._err(q.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.data+=Je;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ut.DASH_DASH,!0)?(this._createCommentToken(Ut.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(q.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(q.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(q.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 _.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(q.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(q.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 _.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.data+=Je;break}case _.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(q.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case _.EOF:{this._err(q.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 _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(q.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 _.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(q.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(q.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(q.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ms(t))this._createDoctypeToken(String.fromCharCode(Nu(t))),this.state=N.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(q.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=N.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(q.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.name+=Je;break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ms(t)?Nu(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(q.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(q.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(q.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.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 _.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(q.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(q.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(q.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(q.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.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 _.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(q.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(q.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.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 _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.EOF:{this._err(q.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(q.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case _.NULL:{this._err(q.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(q.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=N.DATA;break}case _.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(_.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Mm(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Mm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(q.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const dg=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Bm=new Set([...dg,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Fu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),eA=new Set([...Fu,p.OL,p.UL]),tA=new Set([...Fu,p.BUTTON]),Um=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),jm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),nA=new Set([p.TR,p.TEMPLATE,p.HTML]),rA=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),iA=new Set([p.TABLE,p.TEMPLATE,p.HTML]),sA=new Set([p.TD,p.TH]);class aA{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,s){this.treeAdapter=n,this.handler=s,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)===J.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 s=this._indexOf(t);this.items[s]=n,s===this.stackTop&&(this.current=n)}insertAfter(t,n,s){const a=this._indexOf(t)+1;this.items.splice(a,0,n),this.tagIDs.splice(a,0,s),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])!==J.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 s=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(s,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Uc,J.HTML)}popUntilTableCellPopped(){this.popUntilPopped(sA,J.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let s=this.stackTop;s>=0;s--)if(t.has(this.tagIDs[s])&&this.treeAdapter.getNamespaceURI(this.items[s])===n)return s;return-1}clearBackTo(t,n){const s=this._indexOfTagNames(t,n);this.shortenToLength(s+1)}clearBackToTableContext(){this.clearBackTo(iA,J.HTML)}clearBackToTableBodyContext(){this.clearBackTo(rA,J.HTML)}clearBackToTableRowContext(){this.clearBackTo(nA,J.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 s=this.stackTop;s>=0;s--){const a=this.tagIDs[s];switch(this.treeAdapter.getNamespaceURI(this.items[s])){case J.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case J.SVG:{if(jm.has(a))return!1;break}case J.MATHML:{if(Um.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fu)}hasInListItemScope(t){return this.hasInDynamicScope(t,eA)}hasInButtonScope(t){return this.hasInDynamicScope(t,tA)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case J.HTML:{if(Uc.has(n))return!0;if(Fu.has(n))return!1;break}case J.SVG:{if(jm.has(n))return!1;break}case J.MATHML:{if(Um.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===J.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])===J.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])===J.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&&dg.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Bm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Bm.has(this.currentTagId);)this.pop()}}const Ec=3;var wn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(wn||(wn={}));const Hm={type:wn.Marker};class uA{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const s=[],a=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let d=0;d<this.entries.length;d++){const f=this.entries[d];if(f.type===wn.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const E=this.treeAdapter.getAttrList(h);E.length===a&&s.push({idx:d,attrs:E})}}return s}_ensureNoahArkCondition(t){if(this.entries.length<Ec)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<Ec)return;const a=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<s.length;l++){const d=s[l];d.attrs.every(f=>a.get(f.name)===f.value)&&(o+=1,o>=Ec&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Hm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:wn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:wn.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(Hm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(s=>s.type===wn.Marker||this.treeAdapter.getTagName(s.element)===t);return n&&n.type===wn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===wn.Element&&n.element===t)}}const gr={createDocument(){return{nodeName:"#document",mode:sn.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 s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,s){const a=e.childNodes.find(o=>o.nodeName==="#documentType");if(a)a.name=t,a.publicId=n,a.systemId=s;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:s,parentNode:null};gr.appendChild(e,o)}},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(gr.isTextNode(n)){n.value+=t;return}}gr.appendChild(e,gr.createTextNode(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&gr.isTextNode(s)?s.value+=t:gr.insertBefore(e,gr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(s=>s.name));for(let s=0;s<t.length;s++)n.has(t[s].name)||e.attrs.push(t[s])},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}}},fg="html",oA="about:legacy-compat",lA="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hg=["+//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//"],cA=[...hg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],dA=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),pg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],fA=[...pg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function zm(e,t){return t.some(n=>e.startsWith(n))}function hA(e){return e.name===fg&&e.publicId===null&&(e.systemId===null||e.systemId===oA)}function pA(e){if(e.name!==fg)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===lA)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),dA.has(n))return sn.QUIRKS;let s=t===null?cA:hg;if(zm(n,s))return sn.QUIRKS;if(s=t===null?pg:fA,zm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const $m={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},mA="definitionurl",gA="definitionURL",EA=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])),TA=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:J.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:J.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:J.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:J.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:J.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:J.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:J.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:J.XML}],["xml:space",{prefix:"xml",name:"space",namespace:J.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:J.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:J.XMLNS}]]),yA=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])),xA=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 bA(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===Yr.COLOR||s===Yr.SIZE||s===Yr.FACE)||xA.has(t)}function mg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===mA){e.attrs[t].name=gA;break}}function gg(e){for(let t=0;t<e.attrs.length;t++){const n=EA.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Sd(e){for(let t=0;t<e.attrs.length;t++){const n=TA.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 kA(e){const t=yA.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Fi(e.tagName))}function SA(e,t){return t===J.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function _A(e,t,n){if(t===J.MATHML&&e===p.ANNOTATION_XML){for(let s=0;s<n.length;s++)if(n[s].name===Yr.ENCODING){const a=n[s].value.toLowerCase();return a===$m.TEXT_HTML||a===$m.APPLICATION_XML}}return t===J.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function CA(e,t,n,s){return(!s||s===J.HTML)&&_A(e,t,n)||(!s||s===J.MATHML)&&SA(e,t)}const NA="hidden",AA=8,vA=3;var L;(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"})(L||(L={}));const wA={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Eg=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),Wm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:gr,onParseError:null};class Ym{constructor(t,n,s=null,a=null){this.fragmentContext=s,this.scriptHandler=a,this.currentToken=null,this.stopped=!1,this.insertionMode=L.INITIAL,this.originalInsertionMode=L.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={...Wm,...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 ZN(this.options,this),this.activeFormattingElements=new uA(this.treeAdapter),this.fragmentContextID=s?Fi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new aA(this.document,this.treeAdapter,this)}static parse(t,n){const s=new this(n);return s.tokenizer.write(t,!0),s.document}static getFragmentParser(t,n){const s={...Wm,...n};t??(t=s.treeAdapter.createElement(z.TEMPLATE,J.HTML,[]));const a=s.treeAdapter.createElement("documentmock",J.HTML,[]),o=new this(s,a,t);return o.fragmentContextID===p.TEMPLATE&&o.tmplInsertionModeStack.unshift(L.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,s){var a;if(!this.onParseError)return;const o=(a=t.location)!==null&&a!==void 0?a:wA,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:s?o.startLine:o.endLine,endCol:s?o.startCol:o.endCol,endOffset:s?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,s){var a,o;(o=(a=this.treeAdapter).onItemPush)===null||o===void 0||o.call(a,t),s&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var s,a;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(a=(s=this.treeAdapter).onItemPop)===null||a===void 0||a.call(s,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const s=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===J.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,J.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=L.TEXT}switchToPlaintextParsing(){this.insertionMode=L.TEXT,this.originalInsertionMode=L.IN_BODY,this.tokenizer.state=st.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)!==J.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=st.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=st.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=st.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=st.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",s=t.publicId||"",a=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,s,a),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(d=>this.treeAdapter.isDocumentTypeNode(d));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const s=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,s)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const s=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(s??this.document,t)}}_appendElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location)}_insertElement(t,n){const s=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(s,t.location),this.openElements.push(s,t.tagID)}_insertFakeElement(t,n){const s=this.treeAdapter.createElement(t,J.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,J.HTML,t.attrs),s=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,s),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(z.HTML,J.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 s=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,s),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,t.location)}_insertCharacters(t){let n,s;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:s}=this._findFosterParentingLocation(),s?this.treeAdapter.insertTextBefore(n,t.chars,s):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),o=s?a.lastIndexOf(s):a.length,l=a[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:E}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:E})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let s=this.treeAdapter.getFirstChild(t);s;s=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(s),this.treeAdapter.appendChild(n,s)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const s=n.location,a=this.treeAdapter.getTagName(t),o=n.type===Pe.END_TAG&&a===n.tagName?{endTag:{...s},endLine:s.endLine,endCol:s.endCol,endOffset:s.endOffset}:{endLine:s.startLine,endCol:s.startCol,endOffset:s.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,s;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,s=this.fragmentContextID):{current:n,currentTagId:s}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===z.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===J.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,n,J.HTML)}_processToken(t){switch(t.type){case Pe.CHARACTER:{this.onCharacter(t);break}case Pe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Pe.COMMENT:{this.onComment(t);break}case Pe.DOCTYPE:{this.onDoctype(t);break}case Pe.START_TAG:{this._processStartTag(t);break}case Pe.END_TAG:{this.onEndTag(t);break}case Pe.EOF:{this.onEof(t);break}case Pe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,s){const a=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return CA(t,a,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===wn.Marker||this.openElements.contains(a.element)),s=n===-1?t-1:n-1;for(let a=s;a>=0;a--){const o=this.activeFormattingElements.entries[a];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=L.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=L.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=L.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=L.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=L.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=L.IN_TABLE;return}case p.BODY:{this.insertionMode=L.IN_BODY;return}case p.FRAMESET:{this.insertionMode=L.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?L.AFTER_HEAD:L.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=L.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=L.IN_HEAD;return}break}}this.insertionMode=L.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const s=this.openElements.tagIDs[n];if(s===p.TEMPLATE)break;if(s===p.TABLE){this.insertionMode=L.IN_SELECT_IN_TABLE;return}}this.insertionMode=L.IN_SELECT}_isElementCausesFosterParenting(t){return Eg.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)===J.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.TABLE:{const s=this.treeAdapter.getParentNode(n);return s?{parent:s,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 s=this.treeAdapter.getNamespaceURI(t);return GN[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){sw(this,t);return}switch(this.insertionMode){case L.INITIAL:{Rs(this,t);break}case L.BEFORE_HTML:{js(this,t);break}case L.BEFORE_HEAD:{Hs(this,t);break}case L.IN_HEAD:{zs(this,t);break}case L.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case L.AFTER_HEAD:{Ws(this,t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:{yg(this,t);break}case L.TEXT:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tc(this,t);break}case L.IN_TABLE_TEXT:{Cg(this,t);break}case L.IN_COLUMN_GROUP:{Bu(this,t);break}case L.AFTER_BODY:{Uu(this,t);break}case L.AFTER_AFTER_BODY:{Ru(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iw(this,t);return}switch(this.insertionMode){case L.INITIAL:{Rs(this,t);break}case L.BEFORE_HTML:{js(this,t);break}case L.BEFORE_HEAD:{Hs(this,t);break}case L.IN_HEAD:{zs(this,t);break}case L.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case L.AFTER_HEAD:{Ws(this,t);break}case L.TEXT:{this._insertCharacters(t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tc(this,t);break}case L.IN_COLUMN_GROUP:{Bu(this,t);break}case L.AFTER_BODY:{Uu(this,t);break}case L.AFTER_AFTER_BODY:{Ru(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){jc(this,t);return}switch(this.insertionMode){case L.INITIAL:case L.BEFORE_HTML:case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_TEMPLATE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{jc(this,t);break}case L.IN_TABLE_TEXT:{Os(this,t);break}case L.AFTER_BODY:{MA(this,t);break}case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{FA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case L.INITIAL:{BA(this,t);break}case L.BEFORE_HEAD:case L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:{this._err(t,q.misplacedDoctype);break}case L.IN_TABLE_TEXT:{Os(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,q.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?aw(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Rs(this,t);break}case L.BEFORE_HTML:{UA(this,t);break}case L.BEFORE_HEAD:{HA(this,t);break}case L.IN_HEAD:{bn(this,t);break}case L.IN_HEAD_NO_SCRIPT:{WA(this,t);break}case L.AFTER_HEAD:{VA(this,t);break}case L.IN_BODY:{wt(this,t);break}case L.IN_TABLE:{Li(this,t);break}case L.IN_TABLE_TEXT:{Os(this,t);break}case L.IN_CAPTION:{zv(this,t);break}case L.IN_COLUMN_GROUP:{Nd(this,t);break}case L.IN_TABLE_BODY:{to(this,t);break}case L.IN_ROW:{no(this,t);break}case L.IN_CELL:{Yv(this,t);break}case L.IN_SELECT:{vg(this,t);break}case L.IN_SELECT_IN_TABLE:{qv(this,t);break}case L.IN_TEMPLATE:{Gv(this,t);break}case L.AFTER_BODY:{Xv(this,t);break}case L.IN_FRAMESET:{Jv(this,t);break}case L.AFTER_FRAMESET:{ew(this,t);break}case L.AFTER_AFTER_BODY:{nw(this,t);break}case L.AFTER_AFTER_FRAMESET:{rw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?uw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case L.INITIAL:{Rs(this,t);break}case L.BEFORE_HTML:{jA(this,t);break}case L.BEFORE_HEAD:{zA(this,t);break}case L.IN_HEAD:{$A(this,t);break}case L.IN_HEAD_NO_SCRIPT:{YA(this,t);break}case L.AFTER_HEAD:{qA(this,t);break}case L.IN_BODY:{eo(this,t);break}case L.TEXT:{Rv(this,t);break}case L.IN_TABLE:{Ks(this,t);break}case L.IN_TABLE_TEXT:{Os(this,t);break}case L.IN_CAPTION:{$v(this,t);break}case L.IN_COLUMN_GROUP:{Wv(this,t);break}case L.IN_TABLE_BODY:{Hc(this,t);break}case L.IN_ROW:{Ag(this,t);break}case L.IN_CELL:{Vv(this,t);break}case L.IN_SELECT:{wg(this,t);break}case L.IN_SELECT_IN_TABLE:{Qv(this,t);break}case L.IN_TEMPLATE:{Kv(this,t);break}case L.AFTER_BODY:{Lg(this,t);break}case L.IN_FRAMESET:{Zv(this,t);break}case L.AFTER_FRAMESET:{tw(this,t);break}case L.AFTER_AFTER_BODY:{Ru(this,t);break}}}onEof(t){switch(this.insertionMode){case L.INITIAL:{Rs(this,t);break}case L.BEFORE_HTML:{js(this,t);break}case L.BEFORE_HEAD:{Hs(this,t);break}case L.IN_HEAD:{zs(this,t);break}case L.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case L.AFTER_HEAD:{Ws(this,t);break}case L.IN_BODY:case L.IN_TABLE:case L.IN_CAPTION:case L.IN_COLUMN_GROUP:case L.IN_TABLE_BODY:case L.IN_ROW:case L.IN_CELL:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:{Sg(this,t);break}case L.TEXT:{Ov(this,t);break}case L.IN_TABLE_TEXT:{Os(this,t);break}case L.IN_TEMPLATE:{Ig(this,t);break}case L.AFTER_BODY:case L.IN_FRAMESET:case L.AFTER_FRAMESET:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Cd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===_.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 L.IN_HEAD:case L.IN_HEAD_NO_SCRIPT:case L.AFTER_HEAD:case L.TEXT:case L.IN_COLUMN_GROUP:case L.IN_SELECT:case L.IN_SELECT_IN_TABLE:case L.IN_FRAMESET:case L.AFTER_FRAMESET:{this._insertCharacters(t);break}case L.IN_BODY:case L.IN_CAPTION:case L.IN_CELL:case L.IN_TEMPLATE:case L.AFTER_BODY:case L.AFTER_AFTER_BODY:case L.AFTER_AFTER_FRAMESET:{Tg(this,t);break}case L.IN_TABLE:case L.IN_TABLE_BODY:case L.IN_ROW:{Tc(this,t);break}case L.IN_TABLE_TEXT:{_g(this,t);break}}}}function IA(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):kg(e,t),n}function LA(e,t){let n=null,s=e.openElements.stackTop;for(;s>=0;s--){const a=e.openElements.items[s];if(a===t.element)break;e._isSpecialElement(a,e.openElements.tagIDs[s])&&(n=a)}return n||(e.openElements.shortenToLength(Math.max(s,0)),e.activeFormattingElements.removeEntry(t)),n}function RA(e,t,n){let s=t,a=e.openElements.getCommonAncestor(t);for(let o=0,l=a;l!==n;o++,l=a){a=e.openElements.getCommonAncestor(l);const d=e.activeFormattingElements.getElementEntry(l),f=d&&o>=vA;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=OA(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function OA(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function DA(e,t,n){const s=e.treeAdapter.getTagName(t),a=Fi(s);if(e._isElementCausesFosterParenting(a))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);a===p.TEMPLATE&&o===J.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function PA(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),{token:a}=n,o=e.treeAdapter.createElement(a.tagName,s,a.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,a),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,a.tagID)}function _d(e,t){for(let n=0;n<AA;n++){const s=IA(e,t);if(!s)break;const a=LA(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=RA(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&DA(e,l,o),PA(e,a,s)}}function jc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function MA(e,t){e._appendCommentNode(t,e.openElements.items[0])}function FA(e,t){e._appendCommentNode(t,e.document)}function Cd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let s=e.openElements.stackTop;s>=n;s--)e._setEndLocation(e.openElements.items[s],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const s=e.openElements.items[0],a=e.treeAdapter.getNodeSourceCodeLocation(s);if(a&&!a.endTag&&(e._setEndLocation(s,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function BA(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:pA(t);hA(t)||e._err(t,q.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=L.BEFORE_HTML}function Rs(e,t){e._err(t,q.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=L.BEFORE_HTML,e._processToken(t)}function UA(e,t){t.tagID===p.HTML?(e._insertElement(t,J.HTML),e.insertionMode=L.BEFORE_HEAD):js(e,t)}function jA(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&js(e,t)}function js(e,t){e._insertFakeRootElement(),e.insertionMode=L.BEFORE_HEAD,e._processToken(t)}function HA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.HEAD:{e._insertElement(t,J.HTML),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD;break}default:Hs(e,t)}}function zA(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Hs(e,t):e._err(t,q.endTagWithoutMatchingOpenElement)}function Hs(e,t){e._insertFakeElement(z.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=L.IN_HEAD,e._processToken(t)}function bn(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,st.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,st.RAWTEXT):(e._insertElement(t,J.HTML),e.insertionMode=L.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,st.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,st.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=L.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(L.IN_TEMPLATE);break}case p.HEAD:{e._err(t,q.misplacedStartTagForHeadElement);break}default:zs(e,t)}}function $A(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=L.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{zs(e,t);break}case p.TEMPLATE:{Kr(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Kr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,q.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,q.endTagWithoutMatchingOpenElement)}function zs(e,t){e.openElements.pop(),e.insertionMode=L.AFTER_HEAD,e._processToken(t)}function WA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{bn(e,t);break}case p.NOSCRIPT:{e._err(t,q.nestedNoscriptInHead);break}default:$s(e,t)}}function YA(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=L.IN_HEAD;break}case p.BR:{$s(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function $s(e,t){const n=t.type===Pe.EOF?q.openElementsLeftAfterEof:q.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=L.IN_HEAD,e._processToken(t)}function VA(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BODY:{e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=L.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,J.HTML),e.insertionMode=L.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,q.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),bn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,q.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function qA(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Ws(e,t);break}case p.TEMPLATE:{Kr(e,t);break}default:e._err(t,q.endTagWithoutMatchingOpenElement)}}function Ws(e,t){e._insertFakeElement(z.BODY,p.BODY),e.insertionMode=L.IN_BODY,Zu(e,t)}function Zu(e,t){switch(t.type){case Pe.CHARACTER:{yg(e,t);break}case Pe.WHITESPACE_CHARACTER:{Tg(e,t);break}case Pe.COMMENT:{jc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{eo(e,t);break}case Pe.EOF:{Sg(e,t);break}}}function Tg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function yg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function QA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function GA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function KA(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_FRAMESET)}function XA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function JA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Uc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,J.HTML)}function ZA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ev(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),n||(e.formElement=e.openElements.current))}function tv(e,t){e.framesetOk=!1;const n=t.tagID;for(let s=e.openElements.stackTop;s>=0;s--){const a=e.openElements.tagIDs[s];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[s],a))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML)}function nv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.tokenizer.state=st.PLAINTEXT}function rv(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1}function iv(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(z.A);n&&(_d(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function sv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function av(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(_d(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,J.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function ov(e,t){e.treeAdapter.getDocumentMode(e.document)!==sn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=L.IN_TABLE}function xg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function bg(e){const t=lg(e,Yr.TYPE);return t!=null&&t.toLowerCase()===NA}function lv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,J.HTML),bg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function cv(e,t){e._appendElement(t,J.HTML),t.ackSelfClosing=!0}function dv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,J.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fv(e,t){t.tagName=z.IMG,t.tagID=p.IMG,xg(e,t)}function hv(e,t){e._insertElement(t,J.HTML),e.skipNextNewLine=!0,e.tokenizer.state=st.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=L.TEXT}function pv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function mv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function Vm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function gv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===L.IN_TABLE||e.insertionMode===L.IN_CAPTION||e.insertionMode===L.IN_TABLE_BODY||e.insertionMode===L.IN_ROW||e.insertionMode===L.IN_CELL?L.IN_SELECT_IN_TABLE:L.IN_SELECT}function Ev(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function Tv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,J.HTML)}function yv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,J.HTML)}function xv(e,t){e._reconstructActiveFormattingElements(),mg(t),Sd(t),t.selfClosing?e._appendElement(t,J.MATHML):e._insertElement(t,J.MATHML),t.ackSelfClosing=!0}function bv(e,t){e._reconstructActiveFormattingElements(),gg(t),Sd(t),t.selfClosing?e._appendElement(t,J.SVG):e._insertElement(t,J.SVG),t.ackSelfClosing=!0}function qm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,J.HTML)}function wt(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:{sv(e,t);break}case p.A:{iv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{JA(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:{XA(e,t);break}case p.LI:case p.DD:case p.DT:{tv(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{xg(e,t);break}case p.HR:{dv(e,t);break}case p.RB:case p.RTC:{Tv(e,t);break}case p.RT:case p.RP:{yv(e,t);break}case p.PRE:case p.LISTING:{ZA(e,t);break}case p.XMP:{pv(e,t);break}case p.SVG:{bv(e,t);break}case p.HTML:{QA(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:{bn(e,t);break}case p.BODY:{GA(e,t);break}case p.FORM:{ev(e,t);break}case p.NOBR:{av(e,t);break}case p.MATH:{xv(e,t);break}case p.TABLE:{ov(e,t);break}case p.INPUT:{lv(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{cv(e,t);break}case p.IMAGE:{fv(e,t);break}case p.BUTTON:{rv(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{uv(e,t);break}case p.IFRAME:{mv(e,t);break}case p.SELECT:{gv(e,t);break}case p.OPTION:case p.OPTGROUP:{Ev(e,t);break}case p.NOEMBED:case p.NOFRAMES:{Vm(e,t);break}case p.FRAMESET:{KA(e,t);break}case p.TEXTAREA:{hv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?Vm(e,t):qm(e,t);break}case p.PLAINTEXT:{nv(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:qm(e,t)}}function kv(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Sv(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=L.AFTER_BODY,Lg(e,t))}function _v(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Cv(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 Nv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(z.P,p.P),e._closePElement()}function Av(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function vv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function wv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Iv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Lv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(z.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function kg(e,t){const n=t.tagName,s=t.tagID;for(let a=e.openElements.stackTop;a>0;a--){const o=e.openElements.items[a],l=e.openElements.tagIDs[a];if(s===l&&(s!==p.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.stackTop>=a&&e.openElements.shortenToLength(a);break}if(e._isSpecialElement(o,l))break}}function eo(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:{_d(e,t);break}case p.P:{Nv(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:{_v(e,t);break}case p.LI:{Av(e);break}case p.DD:case p.DT:{vv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{wv(e);break}case p.BR:{Lv(e);break}case p.BODY:{kv(e,t);break}case p.HTML:{Sv(e,t);break}case p.FORM:{Cv(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{Iv(e,t);break}case p.TEMPLATE:{Kr(e,t);break}default:kg(e,t)}}function Sg(e,t){e.tmplInsertionModeStack.length>0?Ig(e,t):Cd(e,t)}function Rv(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 Ov(e,t){e._err(t,q.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Tc(e,t){if(e.openElements.currentTagId!==void 0&&Eg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=L.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{Cg(e,t);break}case Pe.WHITESPACE_CHARACTER:{_g(e,t);break}}else sa(e,t)}function Dv(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_CAPTION}function Pv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_COLUMN_GROUP}function Mv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.COLGROUP,p.COLGROUP),e.insertionMode=L.IN_COLUMN_GROUP,Nd(e,t)}function Fv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_TABLE_BODY}function Bv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(z.TBODY,p.TBODY),e.insertionMode=L.IN_TABLE_BODY,to(e,t)}function Uv(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function jv(e,t){bg(t)?e._appendElement(t,J.HTML):sa(e,t),t.ackSelfClosing=!0}function Hv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,J.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Li(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{Bv(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{bn(e,t);break}case p.COL:{Mv(e,t);break}case p.FORM:{Hv(e,t);break}case p.TABLE:{Uv(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{Fv(e,t);break}case p.INPUT:{jv(e,t);break}case p.CAPTION:{Dv(e,t);break}case p.COLGROUP:{Pv(e,t);break}default:sa(e,t)}}function Ks(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Kr(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:sa(e,t)}}function sa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Zu(e,t),e.fosterParentingEnabled=n}function _g(e,t){e.pendingCharacterTokens.push(t)}function Cg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Os(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)sa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ng=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function zv(e,t){const n=t.tagID;Ng.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=L.IN_TABLE,Li(e,t)):wt(e,t)}function $v(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=L.IN_TABLE,n===p.TABLE&&Ks(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:eo(e,t)}}function Nd(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.COL:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{bn(e,t);break}default:Bu(e,t)}}function Wv(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE);break}case p.TEMPLATE:{Kr(e,t);break}case p.COL:break;default:Bu(e,t)}}function Bu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=L.IN_TABLE,e._processToken(t))}function to(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,J.HTML),e.insertionMode=L.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(z.TR,p.TR),e.insertionMode=L.IN_ROW,no(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=L.IN_TABLE,Li(e,t));break}default:Li(e,t)}}function Hc(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=L.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE,Ks(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:Ks(e,t)}}function no(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,J.HTML),e.insertionMode=L.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=L.IN_TABLE_BODY,to(e,t));break}default:Li(e,t)}}function Ag(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=L.IN_TABLE_BODY,Hc(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=L.IN_TABLE_BODY,Hc(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:Ks(e,t)}}function Yv(e,t){const n=t.tagID;Ng.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),no(e,t)):wt(e,t)}function Vv(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=L.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Ag(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:eo(e,t)}}function vg(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,J.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,J.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:{bn(e,t);break}}}function wg(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:{Kr(e,t);break}}}function qv(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)):vg(e,t)}function Qv(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)):wg(e,t)}function Gv(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:{bn(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=L.IN_TABLE,e.insertionMode=L.IN_TABLE,Li(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=L.IN_COLUMN_GROUP,e.insertionMode=L.IN_COLUMN_GROUP,Nd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=L.IN_TABLE_BODY,e.insertionMode=L.IN_TABLE_BODY,to(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=L.IN_ROW,e.insertionMode=L.IN_ROW,no(e,t);break}default:e.tmplInsertionModeStack[0]=L.IN_BODY,e.insertionMode=L.IN_BODY,wt(e,t)}}function Kv(e,t){t.tagID===p.TEMPLATE&&Kr(e,t)}function Ig(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Cd(e,t)}function Xv(e,t){t.tagID===p.HTML?wt(e,t):Uu(e,t)}function Lg(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=L.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.HTML){e._setEndLocation(e.openElements.items[0],t);const s=e.openElements.items[1];s&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(s))===null||n===void 0)&&n.endTag)&&e._setEndLocation(s,t)}}else Uu(e,t)}function Uu(e,t){e.insertionMode=L.IN_BODY,Zu(e,t)}function Jv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.FRAMESET:{e._insertElement(t,J.HTML);break}case p.FRAME:{e._appendElement(t,J.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{bn(e,t);break}}}function Zv(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=L.AFTER_FRAMESET))}function ew(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{bn(e,t);break}}}function tw(e,t){t.tagID===p.HTML&&(e.insertionMode=L.AFTER_AFTER_FRAMESET)}function nw(e,t){t.tagID===p.HTML?wt(e,t):Ru(e,t)}function Ru(e,t){e.insertionMode=L.IN_BODY,Zu(e,t)}function rw(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{bn(e,t);break}}}function iw(e,t){t.chars=Je,e._insertCharacters(t)}function sw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Rg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==J.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function aw(e,t){if(bA(t))Rg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===J.MATHML?mg(t):s===J.SVG&&(kA(t),gg(t)),Sd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function uw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Rg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===J.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(s);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 ow=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,lw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Qm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Og(e,t){const n=yw(e),s=P1("type",{handlers:{root:cw,element:dw,text:fw,comment:Pg,doctype:hw,raw:mw},unknown:gw}),a={parser:n?new Ym(Qm):Ym.getFragmentParser(void 0,Qm),handle(d){s(d,a)},stitches:!1,options:t||{}};s(e,a),Bi(a,Ln());const o=n?a.parser.document:a.parser.getFragment(),l=xN(o,{file:a.options.file});return a.stitches&&Ju(l,"comment",function(d,f,h){const E=d;if(E.value.stitch&&h&&f!==void 0){const g=h.children;return g[f]=E.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function Dg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function cw(e,t){Dg(e.children,t)}function dw(e,t){Ew(e,t),Dg(e.children,t),Tw(e,t)}function fw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:aa(e)};Bi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function hw(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:aa(e)};Bi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function pw(e,t){t.stitches=!0;const n=xw(e);if("children"in e&&"children"in n){const s=Og({type:"root",children:e.children},t.options);n.children=s.children}Pg({type:"comment",value:{stitch:n}},t)}function Pg(e,t){const n=e.value,s={type:Pe.COMMENT,data:n,location:aa(e)};Bi(t,Ln(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function mw(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,Mg(t,Ln(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ow,"<$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 gw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))pw(n,t);else{let s="";throw lw.has(n.type)&&(s=". 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"+s)}}function Bi(e,t){Mg(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=st.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 Mg(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 Ew(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===st.PLAINTEXT)return;Bi(t,Ln(e));const s=t.parser.openElements.current;let a="namespaceURI"in s?s.namespaceURI:$r.html;a===$r.html&&n==="svg"&&(a=$r.svg);const o=CN({...e,children:[]},{space:a===$r.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Fi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:aa(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Tw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ON.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Bi(t,Vu(e));const s={type:Pe.END_TAG,tagName:n,tagID:Fi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:aa(e)};t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===st.RCDATA||t.parser.tokenizer.state===st.RAWTEXT||t.parser.tokenizer.state===st.SCRIPT_DATA)&&(t.parser.tokenizer.state=st.DATA)}function yw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function aa(e){const t=Ln(e)||{line:void 0,column:void 0,offset:void 0},n=Vu(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 xw(e){return"children"in e?qr({...e,children:[]}):qr(e)}function bw(e){return function(t,n){return Og(t,{...e,file:n})}}const Ur=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],zc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ur,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ur],h2:[["className","sr-only"]],img:[...Ur,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ur,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ur],table:[...Ur],ul:[...Ur,["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"]},Er={}.hasOwnProperty;function kw(e,t){let n={type:"root",children:[]};const s={schema:t?{...zc,...t}:zc,stack:[]},a=Fg(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Fg(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Sw(e,n);case"doctype":return _w(e,n);case"element":return Cw(e,n);case"root":return Nw(e,n);case"text":return Aw(e,n)}}}function Sw(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",s=n.indexOf("-->"),o={type:"comment",value:s<0?n:n.slice(0,s)};return ua(o,t),o}}function _w(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ua(n,t),n}}function Cw(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=Bg(e,t.children),a=vw(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Er.call(e.schema.ancestors,n))){const d=e.schema.ancestors[n];let f=-1;for(o=!1;++f<d.length;)e.stack.includes(d[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?s:void 0;const l={type:"element",tagName:n,properties:a,children:s};return ua(l,t),l}function Nw(e,t){const s={type:"root",children:Bg(e,t.children)};return ua(s,t),s}function Aw(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return ua(s,t),s}function Bg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=Fg(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function vw(e,t){const n=e.stack[e.stack.length-1],s=e.schema.attributes,a=e.schema.required,o=s&&Er.call(s,n)?s[n]:void 0,l=s&&Er.call(s,"*")?s["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(Er.call(d,h)){const E=d[h];let g=Gm(e,Km(o,h),h,E);g==null&&(g=Gm(e,Km(l,h),h,E)),g!=null&&(f[h]=g)}if(a&&Er.call(a,n)){const E=a[n];for(h in E)Er.call(E,h)&&!Er.call(f,h)&&(f[h]=E[h])}return f}function Gm(e,t,n,s){return t?Array.isArray(s)?ww(e,t,n,s):Ug(e,t,n,s):void 0}function ww(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Ug(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Ug(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&Iw(e,n,s)){if(typeof t=="object"&&t.length>1){let a=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(s))){a=!0;break}}else if(l===s){a=!0;break}}if(!a)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+s:s}}function Iw(e,t,n){const s=e.schema.protocols&&Er.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!s||s.length===0)return!0;const a=String(n),o=a.indexOf(":"),l=a.indexOf("?"),d=a.indexOf("#"),f=a.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||d>-1&&o>d)return!0;let h=-1;for(;++h<s.length;){const E=s[h];if(o===E.length&&a.slice(0,E.length)===E)return!0}return!1}function ua(e,t){const n=i1(t);t.data&&(e.data=qr(t.data)),n&&(e.position=n)}function Km(e,t){let n,s=-1;if(e)for(;++s<e.length;){const a=e[s],o=typeof a=="string"?a:a[0];if(o===t)return a;o==="data*"&&(n=a)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function Lw(e){return function(t){return kw(t,e)}}const $c=zc,jr=(e,...t)=>{var n;return[...((n=$c.attributes)==null?void 0:n[e])??[],...t]},Rw={...$c,attributes:{...$c.attributes,p:jr("p","align"),div:jr("div","align"),h1:jr("h1","align"),h2:jr("h2","align"),h3:jr("h3","align"),img:jr("img","width","height","align"),a:jr("a","align")}},Ow=new Set(["code","pre","svg","math","style","script","textarea"]),Dw="fade-word";function Pw(e){const t=[];for(const n of e.split(/(\s+)/))if(n){if(/^\s+$/.test(n)){t.push({type:"text",value:n});continue}t.push({type:"element",tagName:"span",properties:{className:[Dw]},children:[{type:"text",value:n}]})}return t}function jg(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...Pw(s.value??""));continue}if(s.type==="element"&&Ow.has(s.tagName??"")){n.push(s);continue}jg(s),n.push(s)}e.children=n}function Mw(){return e=>jg(e)}const Fw=256*1024;let Hr=null,Bw=0;const ju=new Map;function Xm(e,t){var n;(n=ju.get(e))==null||n(t),ju.delete(e)}function Uw(){if(Hr)return Hr;try{Hr=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Hr.addEventListener("message",e=>Xm(e.data.id,e.data.html)),Hr.addEventListener("error",()=>{for(const e of[...ju.keys()])Xm(e,null);Hr=null})}catch{return null}return Hr}async function Ad(e,t){if(e.length>Fw)return null;const n=Uw();if(!n)return null;const s=++Bw;return new Promise(a=>{ju.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function jw({code:e,lang:t}){const[n,s]=A.useState(null);A.useEffect(()=>{let o=!1;return Ad(e,t).then(l=>{o||s(l)}).catch(()=>{o||s(null)}),()=>{o=!0}},[e,t]);const a=()=>{var o;return void((o=navigator.clipboard)==null?void 0:o.writeText(e))};return T.jsxs("div",{className:"codeblock",children:[T.jsxs("div",{className:"codeblock-bar",children:[T.jsx("span",{className:"codeblock-lang",children:t||"text"}),T.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?T.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):T.jsx("pre",{className:"codeblock-body codeblock-plain",children:T.jsx("code",{children:e})})]})}let yc=null;function Hw(){return yc||(yc=Nc(()=>import("./mermaid.core-BkEkrWDL.js").then(e=>e.bp),[]).then(e=>(e.default.initialize({startOnLoad:!1,theme:"dark",securityLevel:"strict",themeVariables:{primaryColor:"#44475a",primaryTextColor:"#f8f8f2",primaryBorderColor:"#bd93f9",lineColor:"#8be9fd",fontFamily:"Inter, sans-serif"}}),e.default))),yc}let zw=0;function $w({code:e}){const t=A.useRef(null),[n,s]=A.useState(!1);return A.useEffect(()=>{let a=!1;s(!1);const o=e.trim();if(o)return Hw().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${zw++}`,o);a||!t.current||(t.current.innerHTML=f,s(!0))}).catch(()=>{}),()=>{a=!0}},[e]),T.jsxs("div",{className:"mermaid-wrap",children:[T.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&T.jsxs("div",{className:"codeblock",children:[T.jsx("div",{className:"codeblock-bar",children:T.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),T.jsx("pre",{className:"codeblock-body codeblock-plain",children:T.jsx("code",{children:e})})]})]})}const Ww=/language-(\w+)/,Yw=/\n$/,Vw={code(e){const{className:t,children:n}=e,s=Ww.exec(t??""),a=String(n).replace(Yw,"");if(!t&&!a.includes(`
|
|
91
|
+
`))return T.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?T.jsx($w,{code:a}):T.jsx(jw,{code:a,lang:l})},a(e){return T.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let wi=null,Jm=null;function Hg(){return Jm??(Jm=Promise.all([Nc(()=>import("./index-DbaSy_a8.js"),__vite__mapDeps([0,1])),Nc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{wi=e.default})),Jm}let Zm=!1;function qw(){if(Zm||wi)return;Zm=!0;const e=()=>void Hg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const Qw=/(^|[^\\])\$/,Xs=A.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=A.useMemo(()=>lN(t),[t]),o=Qw.test(a),[l,d]=A.useState(()=>wi!==null);A.useEffect(()=>{if(wi)return;if(!o){qw();return}let h=!0;return Hg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=A.useMemo(()=>{const h=o&&wi?[wi]:[];return n?[bw,[Lw,Rw],...h]:s?[...h,Mw]:h},[n,s,o,l]);return T.jsx("div",{className:"md",children:T.jsx(w_,{remarkPlugins:Z3,rehypePlugins:f,components:Vw,children:a})})});function Gw(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return t0(t.replace(/^\.\//,""));const n=e0(e),s=t0(e0(t));return s===null||s===n?null:s.startsWith(`${n}/`)?s.slice(n.length+1):null}const e0=e=>e.replace(/\/+$/,"");function t0(e){const t=e.startsWith("/"),n=[];for(const a of e.split("/"))if(!(a===""||a===".")){if(a!==".."){n.push(a);continue}if(n.length===0)return null;n.pop()}const s=n.join("/");return t?`/${s}`:s}const Kw=4e5;function n0(e,t){const n=e.split(`
|
|
92
|
+
`),s=t.split(`
|
|
93
|
+
`),a=n.length,o=s.length;if(a*o>Kw)return[...n.map(E=>({type:"del",text:E})),...s.map(E=>({type:"add",text:E}))];const l=Array.from({length:a+1},()=>new Array(o+1).fill(0));for(let E=a-1;E>=0;E--)for(let g=o-1;g>=0;g--)l[E][g]=n[E]===s[g]?l[E+1][g+1]+1:Math.max(l[E+1][g],l[E][g+1]);const d=[];let f=0,h=0;for(;f<a&&h<o;)n[f]===s[h]?(d.push({type:"ctx",text:n[f]}),f++,h++):l[f+1][h]>=l[f][h+1]?(d.push({type:"del",text:n[f]}),f++):(d.push({type:"add",text:s[h]}),h++);for(;f<a;)d.push({type:"del",text:n[f++]});for(;h<o;)d.push({type:"add",text:s[h++]});return d}const zg={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},Xw=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function Jw(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return Xw.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const Zw={ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonl:"json",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown",html:"html",htm:"html",xml:"xml",css:"css",scss:"scss",less:"less",py:"python",rs:"rust",go:"go",java:"java",c:"c",h:"c",cpp:"cpp",cc:"cpp",cxx:"cpp",hpp:"cpp",cs:"csharp",rb:"ruby",php:"php",kt:"kotlin",kts:"kotlin",swift:"swift",zig:"zig",lua:"lua",tex:"latex",toml:"toml",ini:"ini",cfg:"ini",conf:"ini",sh:"bash",bash:"bash",zsh:"bash",fish:"bash",dockerfile:"docker",sql:"sql",diff:"diff",patch:"diff",jsonc:"json",svg:"xml",vue:"vue",svelte:"svelte",env:"ini",proto:"proto",graphql:"graphql"};function $g(e){return Wg(e.trim().split("/").pop()??"")||"text"}function Wg(e){const t=e.toLowerCase();if(t==="dockerfile")return"docker";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return Zw[n]??""}const Tn=e=>!!e&&typeof e=="object";function vd(e){switch(e.name){case"shell":return"shell";case"write":case"strReplace":return"write";case"read":return"read";case"grep":return"grep";case"todo_list":return"todo";case"web_fetch":return"webfetch";case"web_search":return"websearch";case"introspect":return"introspect"}if(e.name)return"generic";const t=Tn(e.input)?e.input:{},n=e.kind,s=typeof t.command=="string"?t.command:void 0,a=o=>Object.prototype.hasOwnProperty.call(t,o);return e.title==="todo_list"||a("tasks")||a("task_list_description")||a("completed_task_ids")||a("remove_task_ids")||s!==void 0&&["complete","add","remove","list"].includes(s)?"todo":n==="read"||Array.isArray(t.operations)||e.title==="read"?"read":e.title==="grep"||typeof t.pattern=="string"&&!a("operations")?"grep":n==="edit"||e.title==="write"||e.title==="strReplace"||(s==="create"||s==="strReplace"||s==="insert")&&typeof t.path=="string"||typeof t.oldStr=="string"&&typeof t.newStr=="string"?"write":n==="execute"||e.title==="shell"||typeof t.command=="string"?"shell":typeof t.url=="string"?"webfetch":typeof t.query=="string"&&(n==="search"||e.title==="web_search")?"websearch":e.title==="introspect"||typeof t.doc_path=="string"?"introspect":"generic"}const eI={shell:"shell",write:"write",read:"read",grep:"grep",todo:"todo_list",webfetch:"web_fetch",websearch:"web_search",introspect:"introspect",generic:void 0},tI=/^@?([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,nI=/@([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)/;function rI(e){const t=tI.exec(e.name??"");if(t)return`@${t[1]}/${t[2]}`;const n=nI.exec(e.title??"");return!n||e.name&&e.name!==n[2]?null:`@${n[1]}/${n[2]}`}function iI(e){const t=rI(e);if(t)return t;if(e.name)return e.name;const n=eI[vd(e)];if(n)return n;const s=e.title??"";return s&&!/\s/.test(s)?s:"tool"}function Xr(e){const t=[];for(const n of e)Tn(n)&&(n.type==="content"&&Tn(n.content)&&typeof n.content.text=="string"?t.push(n.content.text):n.type==="text"&&typeof n.text=="string"?t.push(n.text):n.kind==="text"&&typeof n.data=="string"&&t.push(n.data));return t.join("")}function Jr(e){for(const t of e)if(Tn(t)&&t.kind==="json"&&Tn(t.data))return t.data;return null}function wd(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function sI(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(Tn(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)Tn(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):Tn(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function kr(e){return[...Array.isArray(e.content)?e.content:[],...sI(e.output)]}function aI(e){for(const t of e)if(Tn(t)&&t.type==="diff"&&typeof t.oldText=="string"&&typeof t.newText=="string")return{path:typeof t.path=="string"?t.path:void 0,oldText:t.oldText,newText:t.newText};return null}function uI(e){let t=Jr(e);if(!t||!Array.isArray(t.tasks)){const n=Xr(e).trim();if(n.startsWith("{"))try{const s=JSON.parse(n);t=Tn(s)?s:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const s=Tn(n)?n:{};return{desc:typeof s.task_description=="string"?s.task_description:"",done:s.completed===!0}}):null}const oI="show_widget";function lI(e){var a;if(!((a=e.name)!=null&&a.endsWith(oI)))return null;const t=e.input??{},n=typeof t.widget_code=="string"?t.widget_code:"";return{title:typeof t.title=="string"?t.title:"",code:n}}function cI(e){return e.replace(/_/g," ").trim()}function dI(e){var o;if(!((o=e.name)!=null&&o.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",s=Array.isArray(t.options)?t.options:[],a=[];for(const l of s){const d=l??{},f=typeof d.label=="string"&&d.label.trim()?d.label:"";if(!f)continue;const h=typeof d.detail=="string"&&d.detail.trim()?d.detail:void 0,E=typeof d.prompt=="string"&&d.prompt.trim()?d.prompt:f;a.push({label:f,detail:h,prompt:E})}return!n||a.length<2?null:{question:n,options:a}}function fI(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(s=>s.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function hI(e){var a;const{items:t,pending:n}=xe.getState(),s=t.findIndex(o=>o.type==="tool_call"&&o.tool.id===e);if(s===-1)return null;for(const o of t.slice(s+1))if(o.type==="message"&&o.message.role==="user")return o.message.text;return((a=n[0])==null?void 0:a.text)??null}function pI({data:e,toolId:t}){const n=xe(E=>E.items),s=xe(E=>E.pending),[a,o]=A.useState(null),l=fI(e.options,n.length||s.length?hI(t):null),d=a??l.picked,f=d!==null||l.superseded,h=E=>{f||B0(E.prompt)&&o(E.label)};return T.jsxs("div",{className:"tpl-choice",children:[T.jsx("p",{className:"tpl-choice-q",children:e.question}),T.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const g=d===E.label;return T.jsxs("button",{className:`tpl-choice-opt${g?" is-picked":""}`,onClick:()=>h(E),disabled:f,"aria-pressed":g,children:[T.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&T.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const mI=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function gI(){const e=mI.join(" ");return["default-src 'none'",`script-src 'unsafe-inline' ${e}`,`style-src 'unsafe-inline' ${e} https://fonts.googleapis.com`,"img-src data: blob: https:","font-src data: https:",`connect-src ${e}`].join("; ")}const EI=`
|
|
94
|
+
(function () {
|
|
95
|
+
var parent = window.parent;
|
|
96
|
+
var root = document.getElementById('root');
|
|
97
|
+
var last = null;
|
|
98
|
+
var scripted = false;
|
|
99
|
+
|
|
100
|
+
function post(msg) { parent.postMessage(msg, '*'); }
|
|
101
|
+
|
|
102
|
+
// The only way a widget can talk to Casper: ask for a prompt to be sent. The
|
|
103
|
+
// app decides whether to honour it.
|
|
104
|
+
window.casper = {
|
|
105
|
+
sendPrompt: function (text) {
|
|
106
|
+
if (typeof text !== 'string' || !text.trim()) return;
|
|
107
|
+
post({ type: 'casper:prompt', text: text.slice(0, 4000) });
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
// Guarded, because a second pass would replace the nodes a widget's scripts are
|
|
112
|
+
// already driving with inert copies.
|
|
113
|
+
function setContent(html) {
|
|
114
|
+
if (!root) root = document.getElementById('root');
|
|
115
|
+
if (!root || html === last) return;
|
|
116
|
+
last = html;
|
|
117
|
+
root.innerHTML = html;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// innerHTML leaves scripts inert; recreating them runs them, once the content is
|
|
121
|
+
// final so a half-written script never executes. One at a time, waiting on anything
|
|
122
|
+
// with a src: a real document blocks there, and running them all at once is how you
|
|
123
|
+
// get "Chart is not defined".
|
|
124
|
+
function runScripts() {
|
|
125
|
+
if (scripted) return;
|
|
126
|
+
scripted = true;
|
|
127
|
+
var list = [].slice.call(root.querySelectorAll('script'));
|
|
128
|
+
var index = 0;
|
|
129
|
+
|
|
130
|
+
function next() {
|
|
131
|
+
if (index >= list.length) return;
|
|
132
|
+
var old = list[index++];
|
|
133
|
+
var fresh = document.createElement('script');
|
|
134
|
+
for (var a = 0; a < old.attributes.length; a++) {
|
|
135
|
+
fresh.setAttribute(old.attributes[a].name, old.attributes[a].value);
|
|
136
|
+
}
|
|
137
|
+
fresh.textContent = old.textContent;
|
|
138
|
+
var external = Boolean(old.getAttribute('src'));
|
|
139
|
+
if (external) {
|
|
140
|
+
fresh.async = false;
|
|
141
|
+
var moved = false;
|
|
142
|
+
var advance = function () {
|
|
143
|
+
if (moved) return;
|
|
144
|
+
moved = true;
|
|
145
|
+
next();
|
|
146
|
+
};
|
|
147
|
+
fresh.onload = advance;
|
|
148
|
+
fresh.onerror = advance;
|
|
149
|
+
// A CDN that never answers shouldn't strand the rest of the widget.
|
|
150
|
+
setTimeout(advance, 10000);
|
|
151
|
+
}
|
|
152
|
+
old.parentNode.replaceChild(fresh, old);
|
|
153
|
+
if (!external) next();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
next();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
var lastHeight = 0;
|
|
160
|
+
|
|
161
|
+
// Measured off #root, not the document: in a frame the html box is the viewport,
|
|
162
|
+
// so it reports the size the host already chose rather than the content's. The
|
|
163
|
+
// two spare pixels absorb fractional layout heights, which otherwise leave a
|
|
164
|
+
// sliver of overflow and a scrollbar.
|
|
165
|
+
function contentHeight() {
|
|
166
|
+
if (!root) root = document.getElementById('root');
|
|
167
|
+
var bottom = 0;
|
|
168
|
+
if (root) {
|
|
169
|
+
var box = root.getBoundingClientRect();
|
|
170
|
+
bottom = box.top + Math.max(root.scrollHeight, box.height);
|
|
171
|
+
}
|
|
172
|
+
var body = document.body ? document.body.scrollHeight : 0;
|
|
173
|
+
return Math.ceil(Math.max(bottom, body)) + 2;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function reportHeight() {
|
|
177
|
+
var h = contentHeight();
|
|
178
|
+
if (h !== lastHeight) { lastHeight = h; post({ type: 'casper:height', height: h }); }
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if (window.ResizeObserver) {
|
|
182
|
+
var ro = new ResizeObserver(reportHeight);
|
|
183
|
+
ro.observe(document.documentElement);
|
|
184
|
+
// The one that actually grows with the content.
|
|
185
|
+
if (root) ro.observe(root);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Canvases and late fonts resize without tripping the observer, so poll too -
|
|
189
|
+
// but only briefly after the content settles. A transcript full of widgets each
|
|
190
|
+
// polling forever would read layout dozens of times a second.
|
|
191
|
+
var poll = null;
|
|
192
|
+
function pollHeight(ms) {
|
|
193
|
+
if (poll) clearInterval(poll);
|
|
194
|
+
var until = Date.now() + ms;
|
|
195
|
+
poll = setInterval(function () {
|
|
196
|
+
reportHeight();
|
|
197
|
+
if (Date.now() > until) { clearInterval(poll); poll = null; }
|
|
198
|
+
}, 250);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
window.addEventListener('message', function (e) {
|
|
202
|
+
if (e.source !== parent) return;
|
|
203
|
+
var d = e.data;
|
|
204
|
+
if (!d || typeof d !== 'object') return;
|
|
205
|
+
if (d.type === 'casper:theme') {
|
|
206
|
+
document.getElementById('theme').textContent = ':root{' + d.css + '}';
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
if (d.type !== 'casper:html') return;
|
|
210
|
+
setContent(d.html);
|
|
211
|
+
reportHeight();
|
|
212
|
+
runScripts();
|
|
213
|
+
// Scripts can draw for a while after they run; watch a little longer.
|
|
214
|
+
pollHeight(4000);
|
|
215
|
+
});
|
|
216
|
+
})();
|
|
217
|
+
`,TI=`
|
|
218
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
219
|
+
html, body { margin: 0; padding: 0; background: transparent; }
|
|
220
|
+
/* The host sizes the frame to fit, so a scrollbar in here is always a measuring
|
|
221
|
+
error rather than something to scroll. */
|
|
222
|
+
html { overflow: hidden; }
|
|
223
|
+
body {
|
|
224
|
+
font-family: var(--font-body, system-ui, sans-serif);
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
line-height: 1.5;
|
|
227
|
+
color: var(--color-text-primary, #f8f8f2);
|
|
228
|
+
overflow-x: hidden;
|
|
229
|
+
}
|
|
230
|
+
#root { overflow-x: hidden; }
|
|
231
|
+
a { color: var(--color-accent, #bd93f9); }
|
|
232
|
+
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
233
|
+
::-webkit-scrollbar-thumb { background: var(--color-border, #44475a); border-radius: 4px; }
|
|
234
|
+
`;function yI(){return`<!doctype html>
|
|
235
|
+
<html>
|
|
236
|
+
<head>
|
|
237
|
+
<meta charset="utf-8">
|
|
238
|
+
<meta http-equiv="Content-Security-Policy" content="${gI()}">
|
|
239
|
+
<meta name="color-scheme" content="dark">
|
|
240
|
+
<style>${TI}</style>
|
|
241
|
+
<style id="theme"></style>
|
|
242
|
+
</head>
|
|
243
|
+
<body><div id="root"></div>
|
|
244
|
+
<!-- Runtime last: it grabs #root on the way in, so the element has to exist. -->
|
|
245
|
+
<script>${EI}<\/script>
|
|
246
|
+
</body>
|
|
247
|
+
</html>`}const xI=yI(),bI=256*1024;function kI(){const e=getComputedStyle(document.documentElement),t=n=>e.getPropertyValue(n).trim();return[`--color-background-primary:${t("--n0")}`,`--color-background-secondary:${t("--n1")}`,`--color-border:${t("--n2")}`,`--color-text-secondary:${t("--n4")}`,`--color-text-primary:${t("--n5")}`,`--color-accent:${t("--frost")}`,`--color-accent-alt:${t("--aurora-purple")}`,`--color-teal:${t("--frost-teal")}`,`--color-green:${t("--aurora-green")}`,`--color-yellow:${t("--aurora-yellow")}`,`--color-orange:${t("--aurora-orange")}`,`--color-red:${t("--aurora-red")}`,`--font-body:${t("--font-body")}`,`--font-mono:${t("--font-mono")}`].join(";")}function SI({code:e}){const t=A.useRef(null),[n,s]=A.useState(!1),[a,o]=A.useState(120),l=e.length>bI;A.useEffect(()=>{const f=t.current;if(!f)return;const h=E=>{if(E.source!==f.contentWindow)return;const g=E.data;(g==null?void 0:g.type)==="casper:height"&&typeof g.height=="number"?o(Math.min(Math.max(g.height,40),2e3)):(g==null?void 0:g.type)==="casper:prompt"&&typeof g.text=="string"&&B0(g.text)};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]),A.useEffect(()=>{var f,h;n&&((h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:theme",css:kI()},"*"))},[n]),A.useEffect(()=>{var f,h;!n||l||(h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:html",html:e.trimStart()},"*")},[e,n,l]);const d=()=>s(!0);return l?T.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):T.jsx("div",{className:"widget-wrap",style:{height:a},children:T.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:xI,onLoad:d})})}const _I={pending:"queued",in_progress:"running",completed:"done",failed:"failed"},kt=e=>e&&typeof e=="object"?e:null,$e=e=>typeof e=="string"?e:void 0,r0=e=>e.split("/").pop()||e;function CI(e){const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const s=kt(n);if(s&&typeof s.path=="string")return s.path;if(s&&Array.isArray(s.image_paths)&&typeof s.image_paths[0]=="string")return s.image_paths[0]}}function NI(e){const t=kt(e.input);if(!t)return null;const n=$e(t.__tool_use_purpose);if(n)return{text:n};switch(vd(e)){case"write":{const s=$e(t.path);return s?{text:r0(s),title:s}:null}case"read":{const s=CI(t);return s?{text:r0(s),title:s}:null}case"grep":{const s=$e(t.pattern);return s?{text:s}:null}case"websearch":case"introspect":{const s=$e(t.query)??$e(t.doc_path);return s?{text:s}:null}case"webfetch":{const s=$e(t.url);if(!s)return null;let a=s;try{a=new URL(s).hostname||s}catch{}return{text:a,title:s}}default:return null}}function Yg(e){const t=kt(e);if(!t||!Array.isArray(t.operations))return[];const n=[];for(const s of t.operations){const a=kt(s);if(a&&a.mode==="Image"&&Array.isArray(a.image_paths))for(const o of a.image_paths)typeof o=="string"&&n.push(o)}return n}const i0=e=>`/api/fs/file?path=${encodeURIComponent(e)}`;function AI({tool:e,arriving:t}){const n=lI(e);if(n)return e.status==="failed"?T.jsxs("div",{className:"widget-error",children:["Widget ",cI(n.title)||"call"," failed."]}):n.code?T.jsx(SI,{code:n.code}):null;const s=dI(e);return s?T.jsx(pI,{data:s,toolId:e.id}):T.jsx(vI,{tool:e,arriving:t})}function vI({tool:e,arriving:t=!1}){const n=e.status,[s,a]=A.useState(n==="failed"),o=NI(e),l=Yg(e.input);return T.jsxs("div",{className:`toolcall toolcall-${n} ${t?"is-arriving":""}`,children:[T.jsxs("button",{className:"toolcall-head",onClick:()=>a(d=>!d),children:[T.jsx("span",{className:`toolcall-dot dot-${n}`}),T.jsx("span",{className:"toolcall-title",children:iI(e)}),o&&T.jsx("span",{className:"toolcall-summary",title:o.title??o.text,children:o.text}),T.jsx("span",{className:"toolcall-status",children:_I[n]??n}),T.jsx("span",{className:`toolcall-chevron ${s?"is-open":""}`,children:"▸"})]}),l.length>0&&T.jsx("div",{className:"toolcall-images",children:l.map(d=>T.jsx("a",{href:i0(d),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:T.jsx("img",{src:i0(d),alt:d.split("/").pop()??"image",className:"toolcall-image",...zg})},d))}),T.jsx(wI,{open:s,children:T.jsx("div",{className:"toolcall-body",children:II(e)})})]})}function wI({open:e,children:t}){const[n,s]=A.useState(e);A.useEffect(()=>{e&&s(!0)},[e]);const a=o=>{o.propertyName==="grid-template-rows"&&!e&&s(!1)};return T.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:T.jsx("div",{className:"collapse-inner",children:n?t:null})})}function II(e){switch(vd(e)){case"shell":return LI(e);case"write":return RI(e);case"read":return OI(e);case"grep":return DI(e);case"todo":return PI(e);case"webfetch":return FI(e);case"websearch":return UI(e);case"introspect":return MI(e);default:return Sr(e)}}function LI(e){const t=kt(e.input),n=$e(t==null?void 0:t.command)??"",s=kr(e),a=Jr(s),o=a?$e(a.stdout)??"":Xr(s),l=a?$e(a.stderr)??"":"",d=a?String(a.exit_status??""):"",f=d!==""&&!/\b0$/.test(d);return T.jsxs(T.Fragment,{children:[n&&T.jsx(an,{code:n,lang:"bash"}),o.trim()&&T.jsx(an,{code:o,lang:"text"}),l.trim()&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"stderr"}),T.jsx(an,{code:l,lang:"text"})]}),f&&T.jsx("div",{className:"toolcall-exit",children:d})]})}function Vg({path:e}){const t=xe(l=>l.activeId),n=xe(l=>{var d;return((d=l.sessions.find(f=>f.sessionId===l.activeId))==null?void 0:d.cwd)??""}),s=xe(l=>l.openFilePreview),a=t?Gw(n,e):null,o=a??e;return a?T.jsx("div",{className:"toolcall-file",children:T.jsx("button",{className:"toolcall-file-name",onClick:()=>s(a),title:`Preview ${e}`,children:o})}):T.jsx("div",{className:"toolcall-file",title:e,children:T.jsx("span",{className:"toolcall-file-name is-plain",children:o})})}function RI(e){const t=kt(e.input),n=$e(t==null?void 0:t.path)??"",s=f=>n?T.jsxs(T.Fragment,{children:[T.jsx(Vg,{path:n}),f]}):f,a=$e(t==null?void 0:t.command);if(a==="create"||a==="insert"){const f=$e(t==null?void 0:t.content);if(f!==void 0)return s(T.jsx(an,{code:f,lang:$g(n)}))}const o=$e(t==null?void 0:t.oldStr),l=$e(t==null?void 0:t.newStr);if(o!==void 0&&l!==void 0)return s(T.jsx(s0,{diff:n0(o,l)}));const d=aI(e.content);return s(d?T.jsx(s0,{diff:n0(d.oldText,d.newText)}):Sr(e))}function OI(e){const t=kt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],s=Xr(kr(e));if(!s.trim())return Yg(e.input).length>0?null:Sr(e);const a=n.map(kt).find(d=>d&&d.mode!=="Image"),o=a&&typeof a.path=="string"?a.path:"",l=(a==null?void 0:a.mode)==="Line"?$g(o):"text";return T.jsxs(T.Fragment,{children:[o&&T.jsx(Vg,{path:o}),T.jsx(an,{code:s,lang:l})]})}function DI(e){const t=kr(e),n=Jr(t),s=n&&Array.isArray(n.results)?n.results.filter(o=>{const l=kt(o);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(s&&s.length>0)return T.jsx("div",{className:"grep",children:s.map((o,l)=>{const d=kt(o),f=d&&typeof d.file=="string"?d.file:"",h=d&&Array.isArray(d.matches)?d.matches.map(String):[];return T.jsxs("div",{className:"grep-file",children:[T.jsx("div",{className:"grep-fname",children:f}),T.jsx("pre",{className:"grep-matches",children:h.join(`
|
|
248
|
+
`)})]},l)})});const a=Xr(t);return a.trim()?T.jsx(an,{code:a,lang:"text"}):Sr(e)}function PI(e){const t=uI(kr(e));return!t||t.length===0?Sr(e):T.jsx("div",{className:"todo",children:t.map((n,s)=>T.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[T.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),T.jsx("span",{className:"todo-text",children:n.desc})]},s))})}function MI(e){const t=kt(e.input),n=$e(t==null?void 0:t.query)??$e(t==null?void 0:t.doc_path),s=kr(e),a=Jr(s),o=(a?$e(a.documentation)??wd(a):null)??Xr(s);return T.jsxs(T.Fragment,{children:[n&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"query"}),T.jsx(an,{code:n,lang:"text"})]}),o.trim()?T.jsx("div",{className:"toolcall-doc",children:T.jsx(Xs,{text:o})}):Sr(e)]})}function FI(e){const t=kt(e.input),n=$e(t==null?void 0:t.url),s=$e(t==null?void 0:t.mode),a=$e(t==null?void 0:t.search_terms),o=kr(e),l=Jr(o),d=l?wd(l)??$e(l.content)??JSON.stringify(l,null,2):Xr(o);return T.jsxs(T.Fragment,{children:[n&&T.jsxs("div",{className:"toolcall-meta",children:[T.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),s&&T.jsx("span",{className:"toolcall-tag",children:s})]}),a&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"search terms"}),T.jsx(an,{code:a,lang:"text"})]}),d.trim()?T.jsx(an,{code:d,lang:"markdown"}):Sr(e)]})}function BI(e){if(!e)return null;const t=Array.isArray(e.results)?e.results:Array.isArray(e.items)?e.items:Array.isArray(e.data)?e.data:null;if(!t)return null;const n=[];for(const s of t){const a=kt(s);a&&n.push({title:$e(a.title)??$e(a.name),url:$e(a.url)??$e(a.link)??$e(a.href),snippet:$e(a.snippet)??$e(a.description)??$e(a.content)??$e(a.text)})}return n.length?n:null}function UI(e){var a;const t=kr(e),n=BI(Jr(t));if(!n)return Sr(e);const s=$e((a=kt(e.input))==null?void 0:a.query);return T.jsxs(T.Fragment,{children:[s&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"query"}),T.jsx(an,{code:s,lang:"text"})]}),T.jsx("ol",{className:"websearch",children:n.map((o,l)=>T.jsxs("li",{className:"websearch-item",children:[o.url?T.jsx("a",{className:"websearch-title",href:o.url,target:"_blank",rel:"noopener noreferrer",children:o.title??o.url}):T.jsx("span",{className:"websearch-title",children:o.title??"(untitled)"}),o.url&&T.jsx("div",{className:"websearch-url",children:o.url}),o.snippet&&T.jsx("p",{className:"websearch-snippet",children:o.snippet})]},l))})]})}function Sr(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(kt(t)){const{__tool_use_purpose:f,...h}=kt(t);n=JSON.stringify(h,null,2)}const s=kr(e),a=Jr(s),o=a?wd(a):null,l=o??(a?JSON.stringify(a,null,2):Xr(s)),d=o?"text":/^\s*[[{]/.test(l)?"json":"text";return T.jsxs(T.Fragment,{children:[n&&n!=="{}"&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"input"}),T.jsx(an,{code:n,lang:kt(t)?"json":"text"})]}),l.trim()&&T.jsxs("div",{className:"toolcall-section",children:[T.jsx("div",{className:"toolcall-label",children:"output"}),T.jsx(an,{code:l,lang:d})]})]})}function an({code:e,lang:t}){const[n,s]=A.useState(null);return A.useEffect(()=>{let a=!1;return Ad(e,t).then(o=>!a&&s(o)).catch(()=>!a&&s(null)),()=>{a=!0}},[e,t]),n?T.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):T.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function s0({diff:e}){return T.jsx("div",{className:"diff-body",children:e.map((t,n)=>T.jsxs("div",{className:`diff-line diff-${t.type}`,children:[T.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),T.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const jI=A.memo(AI),HI=4,zI=300,$I=240,WI=80;function YI(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function VI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+HI}class qI{constructor(t){Le(this,"ports");Le(this,"frames");Le(this,"follow",!1);Le(this,"lastScrollTop",0);Le(this,"lastMaxTop",0);Le(this,"anchor",null);Le(this,"loadingOlder",!1);Le(this,"showButton",!1);Le(this,"initializedFor",null);Le(this,"prevPendingCount",0);Le(this,"raf",0);Le(this,"content",{sessionId:null,itemCount:0,pendingCount:0,remainingOlder:0});Le(this,"followTick",()=>{var a,o;this.raf=0;const t=this.ports.element();if(!t||!this.follow)return;const n=this.bottomOf(t),s=n-t.scrollTop;if(s<=1||(o=(a=this.ports).reducedMotion)!=null&&o.call(a)){t.scrollTop=n,this.lastScrollTop=t.scrollTop,this.lastMaxTop=n;return}t.scrollTop+=Math.max(10,Math.ceil(s*.3)),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.raf=this.frames.request(this.followTick)});this.ports=t,this.frames=t.frames??{request:n=>requestAnimationFrame(n),cancel:n=>cancelAnimationFrame(n)}}reset(){this.follow=!1,this.prevPendingCount=0,this.anchor=null,this.cancelFollow(),this.setFlags({loadingOlder:!1,showScrollButton:!1})}dispose(){this.cancelFollow()}onContent(t){this.content=t;const n=this.ports.element();if(n){if(this.initializedFor!==t.sessionId&&t.itemCount>0){this.initializedFor=t.sessionId,this.follow=!1,n.scrollTop=this.bottomOf(n),this.lastScrollTop=n.scrollTop,this.lastMaxTop=this.bottomOf(n),this.prevPendingCount=t.pendingCount,this.setFlags({showScrollButton:!1});return}t.pendingCount>this.prevPendingCount&&(this.follow=!0),this.prevPendingCount=t.pendingCount,this.follow?this.scheduleFollow():this.updateButton(n)}}onScroll(){const t=this.ports.element();if(!t)return;const n=this.bottomOf(t);VI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<zI&&this.loadOlder()}jumpToLatest(){this.follow=!0,this.setFlags({showScrollButton:!1}),this.scheduleFollow()}restoreAnchor(){if(this.anchor==null)return;const t=this.ports.element();t&&(t.scrollTop=t.scrollHeight-this.anchor),this.anchor=null,this.setFlags({loadingOlder:!1})}loadOlder(){const t=this.ports.element(),n=this.content.sessionId;if(!t||!n||this.loadingOlder||this.content.remainingOlder<=0)return;this.setFlags({loadingOlder:!0});const{offset:s,limit:a}=YI(this.content.remainingOlder,WI);this.anchor=t.scrollHeight-t.scrollTop,this.ports.fetchPage(n,s,a).then(o=>{if(this.content.sessionId!==n)return this.abandonPage();if(o.length===0)return this.abandonPage();this.ports.prepend(o)}).catch(()=>{this.abandonPage(),console.error("could not load earlier transcript page")})}abandonPage(){this.anchor=null,this.setFlags({loadingOlder:!1})}scheduleFollow(){this.raf||(this.raf=this.frames.request(this.followTick))}cancelFollow(){this.raf&&this.frames.cancel(this.raf),this.raf=0}bottomOf(t){return t.scrollHeight-t.clientHeight}updateButton(t){const n=this.bottomOf(t)-t.scrollTop;this.setFlags({showScrollButton:n>$I})}setFlags(t){const n=t.loadingOlder??this.loadingOlder,s=t.showScrollButton??this.showButton;n===this.loadingOlder&&s===this.showButton||(this.loadingOlder=n,this.showButton=s,this.ports.onFlags({loadingOlder:n,showScrollButton:s}))}}const QI=700,xc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function a0({sessionId:e,attachments:t,onOpen:n}){return T.jsx("div",{className:"msg-attachments",children:t.map(s=>s.kind==="image"?T.jsx("a",{href:dt.previewUrl(e,s.path),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:T.jsx("img",{src:dt.previewUrl(e,s.path),alt:s.name,className:"msg-image",...zg})},s.path):T.jsxs("button",{type:"button",className:"msg-file",title:s.path,onClick:()=>n(s.path),children:[T.jsx(W0,{size:14}),T.jsx("span",{className:"msg-file-name",children:s.name}),T.jsx("span",{className:"msg-file-size",children:q0(s.size)})]},s.path))})}const GI=A.memo(function(){const t=xe($=>$.items),n=xe($=>$.streamingText),s=xe($=>$.streamingThought),a=xe($=>$.pending),o=a.some($=>$.status==="sending"),l=xe($=>$.observability.turnStatus),d=xe($=>$.observability.compacting),f=xe($=>$.activeId),h=xe($=>$.openFilePreview),E=xe($=>$.remainingOlder),g=A.useRef({session:null,ids:new Set});g.current.session!==f&&(g.current={session:f,ids:new Set(t.filter($=>$.type==="tool_call").map($=>$.tool.id))});const x=$=>!g.current.ids.has($),[b,C]=A.useState(!1);A.useEffect(()=>{if(C(!1),l!=="running")return;const $=setTimeout(()=>C(!0),QI);return()=>clearTimeout($)},[l,n,s,t.length]);const v=A.useRef(null),[O,R]=A.useState({loadingOlder:!1,showScrollButton:!1}),B=A.useRef(null);B.current||(B.current=new qI({element:()=>v.current,fetchPage:($,H,ee)=>dt.transcriptPage($,H,ee).then(ue=>ue.items),prepend:$=>xe.getState().prependItems($),onFlags:R,reducedMotion:()=>(xc==null?void 0:xc.matches)??!1}));const M=B.current;A.useEffect(()=>(M.reset(),()=>M.dispose()),[f,M]),A.useEffect(()=>{M.onContent({sessionId:f,itemCount:t.length,pendingCount:a.length,remainingOlder:E})},[t,n,s,a,f,d,E,M]),A.useLayoutEffect(()=>{M.restoreAnchor()},[t,M]);const se=t.length===0&&!n&&!s&&a.length===0;return T.jsxs("div",{className:"transcript-wrap",children:[O.loadingOlder&&T.jsxs("div",{className:"loading-older",role:"status",children:[T.jsx(yr,{size:14}),T.jsx("span",{children:"Loading earlier messages…"})]}),T.jsxs("div",{className:"transcript",ref:v,onScroll:()=>M.onScroll(),children:[se&&T.jsxs("div",{className:"transcript-empty",children:[T.jsx("p",{className:"empty-title",children:"Casper is here."}),T.jsx("p",{className:"empty-sub",children:"Hand off a task. Casper keeps working server-side and has it ready when you get back."})]}),t.map($=>$.type==="message"?$.message.role==="thinking"?T.jsx(u0,{text:$.message.text},$.message.id):T.jsx("div",{className:`msg msg-${$.message.role}`,children:$.message.role==="assistant"?T.jsx(Xs,{text:$.message.text}):T.jsxs(T.Fragment,{children:[f&&$.message.attachments&&$.message.attachments.length>0&&T.jsx(a0,{sessionId:f,attachments:$.message.attachments,onOpen:h}),$.message.text&&T.jsx("div",{className:"msg-user-text",children:$.message.text})]})},$.message.id):$.type==="tool_call"?T.jsx(jI,{tool:$.tool,arriving:x($.tool.id)},$.tool.id):$.type==="turn_error"?T.jsx(KI,{message:$.message},$.id):T.jsx(XI,{summary:$.summary},$.id)),a.map($=>T.jsxs("div",{className:`msg msg-user msg-pending ${$.status==="failed"?"is-failed":""}`,children:[f&&$.attachments&&$.attachments.length>0&&T.jsx(a0,{sessionId:f,attachments:$.attachments,onOpen:h}),$.text&&T.jsx("div",{className:"msg-user-text",children:$.text}),$.status==="failed"&&T.jsxs("div",{className:"msg-failed",children:[T.jsx("span",{className:"msg-failed-why",children:$.error??"Failed to send."}),T.jsx("button",{className:"msg-retry",onClick:()=>nt.retrySend($.id),children:"Retry"})]})]},$.id)),s&&T.jsx(u0,{text:s,live:!0}),n&&T.jsx("div",{className:"msg msg-assistant",children:T.jsx(Xs,{text:n,streaming:!0})}),(l==="running"||o)&&(b||!n&&!s)&&T.jsxs("div",{className:"thinking",children:[T.jsx("span",{className:"thinking-dot"}),T.jsx("span",{className:"thinking-dot"}),T.jsx("span",{className:"thinking-dot"})]}),d&&T.jsx("div",{className:"compaction compaction-live",children:T.jsx("div",{className:"compaction-rule",children:T.jsxs("span",{className:"compaction-head",children:[T.jsx(yr,{size:13,className:"compaction-icon"}),T.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),O.showScrollButton&&T.jsx("button",{className:"scroll-to-bottom",onClick:()=>M.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:T.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:T.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})});function u0({text:e,live:t=!1}){const[n,s]=A.useState(!1);return T.jsxs("div",{className:`thought ${t?"is-live":""}`,children:[T.jsxs("button",{className:"thought-head",onClick:()=>s(a=>!a),children:[T.jsx("span",{className:"thought-chevron",children:n?"▾":"▸"}),T.jsx("span",{className:`thought-label ${t?"is-live":""}`,children:"Thinking"})]}),n&&T.jsx("div",{className:"thought-body",children:T.jsx("div",{className:"thought-text",children:e})})]})}function KI({message:e}){const[t,n]=A.useState(!1),[s,a]=A.useState(!1),o=P0(e),l=xe(f=>{for(let h=f.items.length-1;h>=0;h--){const E=f.items[h];if(E.type==="message"&&E.message.role==="user")return E.message.text}return""}),d=()=>{var f;(f=navigator.clipboard)==null||f.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)},()=>{})};return T.jsxs("div",{className:"sysnote",children:[T.jsx("div",{className:"sysnote-rule",children:T.jsxs("button",{className:"sysnote-head",onClick:()=>n(f=>!f),"aria-expanded":t,children:[T.jsx("span",{"aria-hidden":!0,children:"⚠"}),T.jsx("span",{className:"sysnote-label",children:o.title}),T.jsx("span",{className:"sysnote-toggle",children:t?"Hide details":"Show details"})]})}),t&&T.jsxs("div",{className:"sysnote-body",children:[o.fix&&T.jsx("p",{className:"sysnote-fix",children:o.fix}),T.jsx("pre",{className:"sysnote-raw",children:e}),T.jsxs("div",{className:"sysnote-actions",children:[l&&T.jsx("button",{className:"btn-sm is-danger",onClick:()=>nt.retryTurn(l),children:"Retry turn"}),T.jsx("button",{className:"btn-sm",onClick:d,children:s?"Copied":"Copy details"})]})]})]})}function XI({summary:e}){const[t,n]=A.useState(!1);return T.jsxs("div",{className:"compaction",children:[T.jsx("div",{className:"compaction-rule",children:T.jsxs("button",{className:"compaction-head",onClick:()=>n(s=>!s),"aria-expanded":t,children:[T.jsx(cx,{size:14,className:"compaction-icon"}),T.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),T.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&T.jsx("div",{className:"compaction-body",children:T.jsx(Xs,{text:e})})]})}const mn="/",bc=2;function JI(e){if(!e||e===mn)return mn;const t=e.replace(/\/+$/,"").lastIndexOf(mn);return t<=0?mn:e.slice(0,t)}function ZI(e){const t=[{name:mn,path:mn}];let n="";for(const s of e.split(mn).filter(Boolean))n=`${n}${mn}${s}`,t.push({name:s,path:n});return t}function e6(e,t){return t.slice(e.length).replace(/^\/+/,"")}function t6({initialPath:e,onChange:t,onSubmit:n}){const[s,a]=A.useState(e.trim()),[o,l]=A.useState(""),[d,f]=A.useState(null),[h,E]=A.useState(-1),[g,x]=A.useState(null),b=A.useRef(null),C=A.useRef(null),v=A.useRef(""),O=A.useRef(!1),R=A.useRef(s);R.current=s;const B=A.useRef(t);B.current=t;const M=A.useId(),se=`${M}-listbox`,$=A.useMemo(()=>{if(o.startsWith(mn)||!s)return o;const S=s.endsWith(mn)?s:s+mn;return o?S+o:S},[s,o]);A.useEffect(()=>{v.current=$;const S=setTimeout(()=>{dt.listDirs($).then(D=>{v.current===$&&(f(D),!O.current&&D.dir&&(O.current=!0,R.current||a(D.dir)),B.current(D.target))}).catch(()=>{v.current===$&&f(null)})},150);return()=>clearTimeout(S)},[$]);const H=(d==null?void 0:d.entries)??[],ee=(d==null?void 0:d.dir)??s,ue=ZI(ee),fe=ue.length>bc+2,U=fe?ue.slice(1,-bc):[],re=fe?ue.slice(-bc):ue.slice(1),ce=ue[0],ke=ue[ue.length-1];A.useEffect(()=>{var D,G;if(h<0)return;const S=(D=C.current)==null?void 0:D.children[h];(G=S==null?void 0:S.scrollIntoView)==null||G.call(S,{block:"nearest"})},[h]);const de=S=>{var D;a(S),l(""),E(-1),(D=b.current)==null||D.focus()},Y=S=>{if(S.key==="ArrowDown"&&H.length>0)S.preventDefault(),E(D=>Math.min(D+1,H.length-1));else if(S.key==="ArrowUp"&&H.length>0)S.preventDefault(),E(D=>Math.max(D-1,-1));else if(S.key==="ArrowLeft"&&S.currentTarget.selectionStart===0&&!o)S.preventDefault(),de(JI(ee));else if(S.key==="Enter"){S.preventDefault();const D=h>=0?H[h]:void 0;D?de(D):n()}else S.key==="Escape"&&h>=0&&(S.stopPropagation(),E(-1))},ge=d==null?void 0:d.target,pe=!!ge&&(d==null?void 0:d.targetKind)==="missing",K=!!ge&&(d==null?void 0:d.targetKind)==="file",oe=(S,D="")=>T.jsx("button",{type:"button",className:`dirpick-crumb ${S===ke?"is-here":""} ${D}`,onClick:()=>S!==ke&&de(S.path),disabled:S===ke,title:S.path,children:S.name});return T.jsxs("div",{className:"dirpick",children:[T.jsxs("div",{className:"dirpick-crumbs",children:[oe(ce),U.length>0&&T.jsx("button",{type:"button",className:"dirpick-crumb dirpick-more","aria-haspopup":"menu","aria-expanded":g!==null,"aria-label":`Show ${U.length} folders above`,title:`${U.length} folders above`,onClick:S=>x(g?null:S.currentTarget),children:T.jsx(K2,{size:15})}),re.map((S,D)=>T.jsxs("span",{className:"dirpick-crumb-wrap",children:[(D>0||U.length>0)&&T.jsx("span",{className:"dirpick-sep",children:"/"}),oe(S)]},S.path))]}),g&&T.jsx(Y0,{anchor:g,onClose:()=>x(null),children:U.map(S=>T.jsx("button",{className:"menu-item",onClick:()=>{x(null),de(S.path)},children:S.name},S.path))}),T.jsx("input",{ref:b,className:"dirpick-input",role:"combobox","aria-expanded":H.length>0,"aria-controls":se,"aria-autocomplete":"list","aria-label":"Working directory","aria-activedescendant":h>=0?`${M}-opt-${h}`:void 0,value:o,placeholder:"Search folders…",autoComplete:"off",spellCheck:!1,onChange:S=>{l(S.target.value),E(-1)},onKeyDown:Y}),T.jsxs("div",{ref:C,id:se,role:"listbox","aria-label":"Folders",className:"dirpick-list",children:[H.map((S,D)=>T.jsx("button",{id:`${M}-opt-${D}`,type:"button",role:"option","aria-selected":D===h,className:`dirpick-opt ${D===h?"is-active":""}`,title:S,onMouseDown:G=>G.preventDefault(),onClick:()=>de(S),children:T.jsx("span",{className:"dirpick-tail",children:T.jsx("span",{children:e6(ee,S)})})},S)),H.length===0&&T.jsx("div",{className:"dirpick-empty",children:o?"Nothing here matches.":"No subfolders."})]}),T.jsxs("div",{className:"dirpick-status","aria-live":"polite",children:[pe&&T.jsx("span",{className:"dirpick-note is-new",children:"This folder will be created"}),K&&T.jsx("span",{className:"dirpick-note is-bad",children:"That path is a file, not a folder"})]})]})}function n6({sessionId:e,currentCwd:t,onChanged:n,onClose:s}){const[a,o]=A.useState(t??""),[l,d]=A.useState(!1),[f,h]=A.useState(null),E=A.useRef(!1);A.useEffect(()=>{const x=b=>{b.key==="Escape"&&s()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[s]);const g=async()=>{const x=a.trim();if(!(!x||l)){d(!0),h(null);try{const b=await dt.setSessionCwd(e,x);n(b.cwd),s()}catch(b){h(b.message)}finally{d(!1)}}};return T.jsx("div",{className:"sheet-backdrop",onMouseDown:x=>{E.current=x.target===x.currentTarget},onClick:x=>{x.target===x.currentTarget&&E.current&&s(),E.current=!1},children:T.jsxs("div",{className:"sheet",role:"dialog","aria-modal":"true","aria-labelledby":"change-folder-title",children:[T.jsx("h2",{className:"sheet-title",id:"change-folder-title",children:"Change working directory"}),T.jsx(t6,{initialPath:t??"",onChange:o,onSubmit:g}),f&&T.jsx("div",{className:"sheet-error",children:f}),T.jsxs("div",{className:"sheet-actions",children:[T.jsx("button",{className:"btn-ghost",onClick:s,disabled:l,children:"Cancel"}),T.jsx("button",{className:"btn-primary",onClick:g,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function r6({name:e}){var n;switch((n=e.split(".").pop())==null?void 0:n.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":case"vue":case"svelte":return T.jsx(Pp,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return T.jsx(rx,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return T.jsx(ix,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return T.jsx(ax,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return T.jsx(Pp,{size:15,className:"ftree-icon-svg ftree-icon-markup"});case"png":case"jpg":case"jpeg":case"gif":case"webp":case"bmp":case"ico":case"avif":return T.jsx(sx,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return T.jsx(ux,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return T.jsx(W0,{size:15,className:"ftree-icon-svg"})}}function qg({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=xe(g=>g.fsVersion[e.path]??0),[l,d]=A.useState({expanded:!1,children:null,loading:!1});A.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),A.useEffect(()=>{if(!o||!l.expanded)return;let g=!0;return dt.tree(t,e.path).then(x=>{g&&d(b=>({...b,children:x.entries}))}).catch(()=>{}),()=>{g=!1}},[o]);const f=A.useCallback(async()=>{if(e.type==="directory"&&!l.loading){if(l.expanded){d(g=>({...g,expanded:!1}));return}if(l.children===null){d(g=>({...g,loading:!0}));try{const g=await dt.tree(t,e.path);d({expanded:!0,children:g.entries,loading:!1})}catch{d(g=>({...g,loading:!1}))}}else d(g=>({...g,expanded:!0}))}},[e,t,l.expanded,l.children,l.loading]),h=A.useCallback(()=>{e.type==="file"&&s(e)},[e,s]),E=n*16;return e.type==="directory"?T.jsxs(T.Fragment,{children:[T.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${E+8}px`},children:[T.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?T.jsx(yr,{size:12}):T.jsx(U0,{size:12,className:"ftree-chevron-icon"})}),T.jsx("span",{className:"ftree-icon",children:l.expanded?T.jsx(nx,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):T.jsx($0,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),T.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&T.jsxs("div",{className:"ftree-children",children:[l.children.map(g=>T.jsx(qg,{entry:g,sessionId:t,depth:n+1,onPreview:s,onExpanded:a},g.path)),l.children.length===0&&T.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${E+24}px`},children:"Empty"})]})]}):T.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${E+8}px`},onClick:h,children:[T.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),T.jsx("span",{className:"ftree-icon",children:T.jsx(r6,{name:e.name})}),T.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&T.jsx("span",{className:"ftree-size",children:q0(e.size)})]})}function i6({sessionId:e,onClose:t}){var H;const[n,s]=A.useState([]),[a,o]=A.useState(""),[l,d]=A.useState(!0),[f,h]=A.useState(null),[E,g]=A.useState(!1),x=xe(ee=>ee.sessions),b=xe(ee=>ee.setWatchedPaths),C=xe(ee=>ee.fsVersion[""]??0),v=A.useRef(new Set),O=xe(ee=>ee.setSessions),R=xe(ee=>ee.openFilePreview),B=(H=x.find(ee=>ee.sessionId===e))==null?void 0:H.cwd,M=A.useCallback(()=>{b(["",...v.current])},[b]),se=A.useCallback((ee,ue)=>{const fe=v.current;ue!==fe.has(ee)&&(ue?fe.add(ee):fe.delete(ee),M())},[M]);A.useEffect(()=>(M(),()=>b([])),[M,b]);const $=A.useCallback(async(ee=!1)=>{ee||d(!0),h(null);try{const ue=await dt.tree(e);s(ue.entries),o(ue.cwd)}catch(ue){h(ue.message)}finally{ee||d(!1)}},[e]);return A.useEffect(()=>{$()},[$]),A.useEffect(()=>{C&&$(!0)},[C]),T.jsxs("div",{className:"ftree-panel",children:[T.jsxs("div",{className:"ftree-header",children:[T.jsx("span",{className:"ftree-title",title:a,children:"Files"}),T.jsx("button",{className:"ftree-refresh",onClick:()=>g(!0),title:"Change working directory","aria-label":"Change working directory",children:T.jsx($0,{size:14})}),t&&T.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:T.jsx(j0,{size:15})})]}),a&&T.jsx("div",{className:"ftree-cwd",title:a,children:a}),T.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&T.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&T.jsxs("div",{className:"ftree-error",children:[f,T.jsx("button",{className:"ftree-repoint",onClick:()=>g(!0),children:"Change folder…"})]}),!l&&!f&&n.length===0&&T.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(ee=>T.jsx(qg,{entry:ee,sessionId:e,depth:0,onPreview:ue=>R(ue.path),onExpanded:se},ee.path))]}),E&&T.jsx(n6,{sessionId:e,currentCwd:a||B,onChanged:ee=>{O(x.map(ue=>ue.sessionId===e?{...ue,cwd:ee}:ue)),$()},onClose:()=>g(!1)})]})}const kc=e=>e.split("/").pop()||e;function s6({preview:e,sessionId:t,onClose:n}){const[s,a]=A.useState(!1),[o,l]=A.useState({}),d=()=>{window.open(dt.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};A.useEffect(()=>{const b=C=>{C.key==="Escape"&&n()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[n]);const h=o[e.path]??!1,E=e.kind==="html"||e.kind==="markdown",g=E&&!h,x=e.kind!=="image"&&e.kind!=="pdf"&&!g;return T.jsx("div",{className:"fpreview-backdrop",onClick:f,children:T.jsxs("div",{className:`fpreview-modal${s?" fpreview-full":""}`,children:[T.jsxs("div",{className:"fpreview-header",children:[E&&!e.error&&T.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[T.jsx("button",{className:`fpreview-seg-btn${h?"":" is-active"}`,onClick:()=>l(b=>({...b,[e.path]:!1})),title:"Rendered","aria-label":"Rendered","aria-pressed":!h,children:T.jsx(dx,{size:17})}),T.jsx("button",{className:`fpreview-seg-btn${h?" is-active":""}`,onClick:()=>l(b=>({...b,[e.path]:!0})),title:"Source","aria-label":"Source","aria-pressed":h,children:T.jsx(fx,{size:17})})]}),T.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),T.jsx("button",{className:"fpreview-dl",onClick:d,title:"Download file","aria-label":"Download file",children:T.jsx(ox,{size:18})}),T.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:s?"Exit fullscreen":"Fullscreen","aria-label":s?"Exit fullscreen":"Fullscreen",children:s?T.jsx(px,{size:18}):T.jsx(hx,{size:18})}),T.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:T.jsx(j0,{size:18})})]}),T.jsxs("div",{className:"fpreview-body",children:[e.loading&&T.jsx("div",{className:"fpreview-loading",children:T.jsx(yr,{size:48})}),e.error&&T.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&T.jsx("img",{src:dt.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&T.jsx("iframe",{src:dt.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&g&&T.jsx("iframe",{src:`${dt.previewUrl(t,e.path)}&raw=1`,title:e.name,className:"fpreview-html",sandbox:"allow-scripts allow-forms"}),!e.loading&&!e.error&&e.kind==="markdown"&&g&&e.content!==null&&T.jsx("div",{className:"fpreview-md",children:T.jsx(Xs,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&T.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&T.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function a6(){const e=xe(l=>l.previewPath),t=xe(l=>l.activeId),n=xe(l=>l.closeFilePreview),[s,a]=A.useState(null),o=A.useCallback(()=>n(),[n]);return A.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const d=Jw(kc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:kc(e),content:null,highlightedHtml:null,kind:d,loading:f,error:null}),!!f)return(async()=>{try{const h=await fetch(dt.previewUrl(t,e),{credentials:"same-origin"});if(!h.ok)throw new Error(await h.text()||`HTTP ${h.status}`);const E=await h.text();if(l)return;a(b=>b&&b.path===e?{...b,content:E,loading:!1}:b);const g=Wg(kc(e));if(!g)return;const x=await Ad(E,g);if(l||!x)return;a(b=>b&&b.path===e?{...b,highlightedHtml:x}:b)}catch(h){if(l)return;a(E=>E&&E.path===e?{...E,loading:!1,error:h instanceof Error?h.message:"Could not read the file"}:E)}})(),()=>{l=!0}},[e,t]),!s||!t?null:ea.createPortal(T.jsx(s6,{preview:s,sessionId:t,onClose:o}),document.body)}function Qg({ariaLabel:e,value:t,options:n,onChange:s}){const[a,o]=A.useState(!1),[l,d]=A.useState(0),f=A.useRef(null),h=n.find(x=>x.value===t);A.useEffect(()=>{if(!a)return;const x=b=>{f.current&&!f.current.contains(b.target)&&o(!1)};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[a]),A.useEffect(()=>{if(!a)return;const x=n.findIndex(b=>b.value===t);d(x>=0?x:0)},[a]);const E=x=>{s(x),o(!1)},g=x=>{if(!a){(x.key==="Enter"||x.key===" "||x.key==="ArrowDown")&&(x.preventDefault(),o(!0));return}if(x.key==="Escape")o(!1);else if(x.key==="ArrowDown")x.preventDefault(),d(b=>Math.min(b+1,n.length-1));else if(x.key==="ArrowUp")x.preventDefault(),d(b=>Math.max(b-1,0));else if(x.key==="Enter"){x.preventDefault();const b=n[l];b&&E(b.value)}};return T.jsxs("div",{className:"dd",ref:f,children:[T.jsxs("button",{type:"button",className:`dd-trigger ${a?"is-open":""}`,"aria-haspopup":"listbox","aria-expanded":a,onClick:()=>o(x=>!x),onKeyDown:g,"aria-label":e,children:[T.jsx("span",{className:"dd-value",children:(h==null?void 0:h.label)??t??"Select…"}),T.jsx(U0,{size:13,className:"dd-chevron"})]}),a&&T.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>T.jsxs("button",{type:"button",role:"option","aria-selected":x.value===t,className:`dd-option ${b===l?"is-active":""} ${x.value===t?"is-selected":""}`,onMouseEnter:()=>d(b),onClick:()=>E(x.value),children:[T.jsx("span",{className:"dd-check",children:x.value===t&&T.jsx(Z2,{size:15})}),T.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&T.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}function u6({value:e,onChange:t}){var a;const n=xe(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return T.jsx(Qg,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function o6({value:e,onChange:t}){const n=xe(d=>d.modes),s=xe(d=>d.agents),a=xe(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return T.jsx(Qg,{ariaLabel:"Agent",value:l,onChange:t,options:o.map(d=>({value:d.id,label:d.name}))})}const pn=18,Wc=2.5,Yc=(pn-Wc)/2,o0=2*Math.PI*Yc;function l6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const l0=new Intl.NumberFormat;function c6(){var C;const e=xe(v=>v.observability.contextUsagePercentage),t=xe(v=>v.observability.compacting),n=xe(v=>v.observability.turnStatus),s=xe(v=>v.activeId),a=xe(v=>v.currentModelId),o=xe(v=>v.models),[l,d]=A.useState(!1),f=A.useRef(null);A.useEffect(()=>{if(!l)return;const v=R=>{f.current&&!f.current.contains(R.target)&&d(!1)},O=R=>{R.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",v),document.addEventListener("keydown",O),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",O)}},[l]);const h=Math.max(0,Math.min(100,e)),E=l6(h),g=h/100*o0,x=(C=o.find(v=>v.modelId===a))==null?void 0:C.contextWindowTokens,b=x?Math.round(h/100*x):void 0;return s?T.jsxs("div",{className:"ctx",ref:f,children:[T.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>d(v=>!v),"aria-haspopup":"dialog","aria-expanded":l,"aria-label":`Context ${h.toFixed(0)}% used`,title:`Context ${h.toFixed(0)}% used`,children:T.jsx("svg",{width:pn,height:pn,viewBox:`0 0 ${pn} ${pn}`,"aria-hidden":!0,children:T.jsxs("g",{transform:`rotate(-90 ${pn/2} ${pn/2})`,children:[T.jsx("circle",{cx:pn/2,cy:pn/2,r:Yc,fill:"none",stroke:"var(--n2)",strokeWidth:Wc}),T.jsx("circle",{cx:pn/2,cy:pn/2,r:Yc,fill:"none",stroke:E,strokeWidth:Wc,strokeLinecap:"round",strokeDasharray:`${g} ${o0-g}`})]})})}),l&&T.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[T.jsxs("div",{className:"ctx-pop-head",children:[T.jsx("span",{className:"ctx-pop-title",children:"Context used"}),T.jsxs("span",{className:"ctx-pop-pct",style:{color:E},children:[h.toFixed(1),"%"]})]}),T.jsx("div",{className:"ctx-pop-bar",children:T.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${h}%`,background:E}})}),x?T.jsxs("dl",{className:"ctx-pop-rows",children:[T.jsxs("div",{className:"ctx-pop-row",children:[T.jsx("dt",{children:"Used"}),T.jsxs("dd",{children:[l0.format(b??0)," tokens"]})]}),T.jsxs("div",{className:"ctx-pop-row",children:[T.jsx("dt",{children:"Window"}),T.jsxs("dd",{children:[l0.format(x)," tokens"]})]})]}):T.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),T.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:t||n!=="idle",onClick:()=>{d(!1),nt.compact()},children:t?"Compacting…":"Compact conversation"})]})]}):null}const d6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function f6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":d6[e.connStatus]??"Connecting…"}const c0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function h6({chatId:e,connStatus:t,draft:n}){const[s,a]=A.useState(""),[o,l]=A.useState([]),[d,f]=A.useState(!1),[h,E]=A.useState(null),g=xe(Y=>Y.observability.turnStatus),x=xe(Y=>Y.observability.compacting),b=xe(Y=>Y.currentModeId),C=xe(Y=>Y.currentModelId),v=g==="running",O=g==="cancelling",R=n||t==="connected",B=A.useRef(null),M=A.useRef(null),se=Y=>new Promise((ge,pe)=>{const K=new FileReader;K.onload=()=>ge(K.result.split(",")[1]??""),K.onerror=()=>pe(new Error("Failed to read file")),K.readAsDataURL(Y)}),$=A.useCallback(()=>{const Y=M.current;Y&&(Y.style.height="auto",Y.style.height=`${Math.min(Y.scrollHeight,200)}px`)},[]);A.useEffect(()=>{$()},[s,$]);const H=A.useCallback(Y=>{const ge=Y.map(pe=>{const K=c0.has(pe.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:pe,isImage:K,previewUrl:K?URL.createObjectURL(pe):void 0}});l(pe=>[...pe,...ge])},[]),ee=async(Y,ge,pe)=>{const K=[];Y.length>0&&K.push({type:"text",text:O0+Y.map(oe=>oe.path).join(", ")+`
|
|
249
|
+
`});for(let oe=0;oe<Y.length;oe++){const S=Y[oe],D=ge[oe];if(S&&S.kind==="image"&&D)try{const G=await se(D.file);K.push({type:"image",data:G,mimeType:S.mimeType})}catch{}}return pe&&K.push({type:"text",text:pe}),K},ue=async()=>{const Y=s.trim();if(!Y&&o.length===0||v||O||x||!R||d)return;let ge=[];const pe=o;if(pe.length>0){if(!e){E("No chat to upload to.");return}f(!0),E(null);try{ge=(await dt.uploadFiles(e,pe.map(S=>S.file))).files}catch(oe){E(oe.message),f(!1);return}f(!1)}const K=await ee(ge,pe,Y);K.length!==0&&(nt.send(K,ge.map(oe=>({path:oe.path,name:oe.name,size:oe.size,kind:oe.kind}))),a(""),pe.forEach(oe=>oe.previewUrl&&URL.revokeObjectURL(oe.previewUrl)),l([]),requestAnimationFrame(()=>{M.current&&(M.current.style.height="auto")}))},fe=Y=>{Y.key==="Enter"&&!Y.shiftKey&&(Y.preventDefault(),ue())},U=A.useCallback(Y=>{var K;const ge=(K=Y.clipboardData)==null?void 0:K.items;if(!ge)return;const pe=[];for(const oe of Array.from(ge))if(oe.kind==="file"&&c0.has(oe.type)){const S=oe.getAsFile();S&&pe.push(S)}pe.length>0&&(Y.preventDefault(),H(pe))},[H]),re=Y=>{Y.target.files&&H(Array.from(Y.target.files)),Y.target.value=""},ce=Y=>{l(ge=>{const pe=ge.find(K=>K.id===Y);return pe!=null&&pe.previewUrl&&URL.revokeObjectURL(pe.previewUrl),ge.filter(K=>K.id!==Y)})};A.useEffect(()=>()=>{l(Y=>(Y.forEach(ge=>ge.previewUrl&&URL.revokeObjectURL(ge.previewUrl)),Y))},[]);const ke=f6({live:R,connStatus:t,uploading:d,cancelling:O,compacting:x,running:v}),de=(s.trim()||o.length>0)&&!v&&!O&&!x&&!d&&R;return T.jsxs("div",{className:"composer",children:[h&&T.jsx("div",{className:"composer-error",children:h}),o.length>0&&T.jsx("div",{className:"composer-attachments",children:o.map(Y=>T.jsxs("div",{className:"composer-att",children:[Y.isImage&&Y.previewUrl?T.jsx("img",{src:Y.previewUrl,alt:Y.file.name,className:"composer-att-img"}):T.jsxs("div",{className:"composer-att-file",title:Y.file.name,children:[T.jsx("span",{className:"composer-att-file-icon",children:"📄"}),T.jsx("span",{className:"composer-att-file-name",children:Y.file.name})]}),T.jsx("button",{className:"composer-att-remove",onClick:()=>ce(Y.id),"aria-label":`Remove ${Y.file.name}`,children:"×"})]},Y.id))}),T.jsxs("div",{className:"composer-box",children:[T.jsx("textarea",{ref:M,className:"composer-input",value:s,onChange:Y=>a(Y.target.value),onKeyDown:fe,onPaste:U,placeholder:ke,rows:1}),T.jsxs("div",{className:"composer-actions",children:[T.jsx("button",{className:"composer-plus",onClick:()=>{var Y;return(Y=B.current)==null?void 0:Y.click()},disabled:!R||d,title:"Add photos & files","aria-label":"Add photos and files",children:T.jsx(H0,{size:18})}),T.jsxs("div",{className:"composer-actions-right",children:[T.jsx(c6,{}),T.jsx(o6,{value:b,onChange:Y=>nt.changeAgent(Y)}),T.jsx(u6,{value:C,onChange:Y=>nt.changeModel(Y)}),v?T.jsx("button",{className:"composer-btn composer-stop",onClick:()=>nt.cancel(),title:"Stop","aria-label":"Stop",children:T.jsx(Dp,{size:15})}):O?T.jsx("button",{className:"composer-btn composer-stop",disabled:!0,title:"Stopping…","aria-label":"Stopping",children:T.jsx(Dp,{size:15})}):T.jsx("button",{className:"composer-btn composer-send",onClick:ue,disabled:!de,title:d?"Uploading…":"Send","aria-label":d?"Uploading":"Send",children:d?T.jsx(yr,{size:15}):T.jsx(tx,{size:17})})]})]})]}),T.jsx("input",{ref:B,type:"file",multiple:!0,onChange:re,className:"composer-file-input"})]})}const p6={connecting:{cls:"busy",label:"Connecting"},replaying:{cls:"busy",label:"Catching up"},connected:{cls:"ok",label:"Live"},reconnecting:{cls:"busy",label:"Reconnecting"},resyncing:{cls:"busy",label:"Resyncing"},closed:{cls:"down",label:"Offline"}};function m6({status:e}){const{cls:t,label:n}=p6[e];return T.jsxs("span",{className:`conndot conndot-${t}`,children:[T.jsx("span",{className:"conndot-blip"}),T.jsx("span",{className:"conndot-label",children:n})]})}function g6({isDraft:e,navOpen:t,onToggleNav:n}){const s=xe(M=>M.loadingSessionId),a=xe(M=>M.connStatus),o=xe(M=>M.createError),l=xe(M=>{var se;return(se=M.sessions.find($=>$.sessionId===M.activeId))==null?void 0:se.title}),d=xe(M=>e&&M.pending.length===0&&M.items.length===0),f=xe(M=>M.activeId),h=xe(M=>M.chatId),E=xe(M=>M.sessionNotice),g=xe(M=>M.reloadingId!==null&&M.reloadingId===M.activeId),x=xe(M=>M.observability.turnStatus==="running"),b=xe(M=>M.dismissSessionNotice),[C,v]=A.useState(!1);if(A.useEffect(()=>{v(!1)},[f]),s)return T.jsxs("main",{className:"chatpane",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:T.jsx(Zl,{size:20})}),T.jsx("span",{className:"chat-title",children:"Opening session…"})]}),T.jsx("div",{className:"chat-blank",children:T.jsx(yr,{size:48,className:"chat-spinner"})})]});if(o)return T.jsxs("main",{className:"chatpane",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:T.jsx(Zl,{size:20})}),T.jsx("span",{className:"chat-title",children:"New session"})]}),T.jsxs("div",{className:"chat-blank",children:[T.jsx("p",{className:"chat-blank-title",children:"Couldn't start the session"}),T.jsx("p",{className:"chat-blank-sub",children:o}),T.jsxs("div",{className:"chat-error-actions",children:[T.jsx("button",{className:"btn-primary",onClick:()=>nt.retryCreate(),children:"Try again"}),T.jsx("button",{className:"btn-ghost",onClick:()=>nt.dismissCreateError(),children:"Back to sessions"})]})]})]});const O=T.jsxs("div",{className:"composer-wrap",children:[E&&T.jsxs("div",{className:"notice-banner",role:"alert",children:[T.jsx("span",{className:"notice-icon","aria-hidden":!0,children:"⚠"}),T.jsxs("div",{className:"notice-text",children:[T.jsx("p",{className:"notice-title",children:E.title}),E.fix&&T.jsx("p",{className:"notice-sub",children:E.fix})]}),T.jsx("button",{className:"notice-x",onClick:b,"aria-label":"Dismiss",children:"×"})]}),T.jsx(h6,{chatId:h,connStatus:a,draft:e})]}),R=T.jsxs("div",{className:"chat-draft",children:[T.jsxs("div",{className:"draft-hero",children:[T.jsx("img",{className:"draft-logo",src:"/logo.svg",alt:""}),T.jsx("h1",{className:"draft-title",children:"Casper"})]}),O]}),B=T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"chat-body",children:T.jsx(GI,{})}),O]});return T.jsxs("main",{className:`chatpane chatpane-split ${C?"has-tree":""}`,children:[T.jsxs("div",{className:"chat-col",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:n,"aria-label":t?"Hide sessions":"Show sessions","aria-expanded":t,children:T.jsx(Zl,{size:20})}),!e&&T.jsx("span",{className:"chat-title",title:l,children:l??"Session"}),!e&&T.jsx(m6,{status:a}),!e&&T.jsx("button",{className:"chat-head-btn chat-reload",onClick:()=>void nt.reloadSession(),disabled:g||x,title:x?"Reload after the turn":"Reload session","aria-label":"Reload session",children:g?T.jsx(yr,{size:18}):T.jsx(J2,{size:18})}),!e&&T.jsx("button",{className:`chat-head-btn ftree-toggle ${C?"is-active":""}`,onClick:()=>v(M=>!M),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":C,children:T.jsx(lx,{size:18})})]}),d?R:B]}),f&&T.jsxs("aside",{className:`ftree-aside ${C?"is-open":""}`,children:[C&&T.jsx(i6,{sessionId:f,onClose:()=>v(!1)}),T.jsx(a6,{})]}),f&&C&&T.jsx("div",{className:"ftree-backdrop",onClick:()=>v(!1),"aria-hidden":!0})]})}function E6({onReady:e}){const[t,n]=A.useState(""),[s,a]=A.useState(null),[o,l]=A.useState(!1),d=async()=>{l(!0),a(null);try{await U2(t.trim()),e()}catch(f){a(f.message)}finally{l(!1)}};return T.jsxs("div",{className:"gate",children:[T.jsx("img",{className:"gate-logo",src:"/logo.svg",alt:""}),T.jsx("h1",{className:"gate-title",children:"Casper"}),T.jsx("p",{className:"gate-sub",children:"Enter your access token to continue."}),T.jsx("input",{className:"gate-input",type:"password",value:t,placeholder:"access token",onChange:f=>n(f.target.value),onKeyDown:f=>f.key==="Enter"&&d()}),s&&T.jsx("p",{className:"gate-error",children:s}),T.jsx("button",{className:"btn-primary gate-btn",onClick:d,disabled:o,children:o?"Checking…":"Continue"}),T.jsxs("p",{className:"gate-hint",children:["Don't have it? On the machine running Casper, run ",T.jsx("code",{children:"casper token"}),"."]})]})}const Sc=768;function T6(){const[e,t]=A.useState("checking");return A.useEffect(()=>{e==="checking"&&dt.listSessions().then(n=>{xe.getState().setSessions(n.sessions),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?T.jsx("div",{className:"app-splash"}):e==="gate"?T.jsx(E6,{onReady:()=>t("ready")}):T.jsx(k2,{children:T.jsxs(Jy,{children:[T.jsxs(Ps,{element:T.jsx(y6,{onLock:()=>t("gate")}),children:[T.jsx(Ps,{index:!0,element:null}),T.jsx(Ps,{path:"sessions/:sessionId",element:null})]}),T.jsx(Ps,{path:"*",element:T.jsx(Ky,{to:"/",replace:!0})})]})})}function y6({onLock:e}){var v;const t=xe(O=>O.sessions),n=xe(O=>O.activeId),s=xe(O=>O.watchedPaths),a=xe(O=>O.connStatus),o=xe(O=>O.loadingSessionId),l=Xc(),d=((v=Py(V2))==null?void 0:v.params.sessionId)??null,h=d==="new"||!d&&n===null,E=h?null:d;A.useEffect(()=>{nt.attach({navigate:l,onLock:e})},[l,e]),A.useEffect(()=>{nt.loadPickers(),xe.getState().sessions.length===0&&nt.refreshSessions()},[]),A.useEffect(()=>{nt.syncRoute(E,h)},[E,h]),A.useEffect(()=>{a==="connected"&&nt.watchPaths(s)},[s,a]);const g=A.useCallback(()=>{j2(),nt.lock()},[]),[x,b]=A.useState(()=>window.innerWidth>Sc);A.useEffect(()=>{const O=window.matchMedia(`(max-width: ${Sc}px)`),R=B=>b(!B.matches);return O.addEventListener("change",R),()=>O.removeEventListener("change",R)},[]);const C=A.useCallback(()=>{window.innerWidth<=Sc&&b(!1)},[]);return T.jsxs("div",{className:`layout ${x?"nav-open":""}`,children:[T.jsx(xx,{sessions:t,activeId:n,loadingId:o,onOpen:O=>{nt.markLoading(O),C()},onNew:()=>{nt.startDraft(),C()},onDelete:O=>void nt.deleteSession(O),onRename:(O,R)=>void nt.renameSession(O,R),onLock:g}),x&&T.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>b(!1)}),T.jsx(g6,{navOpen:x,onToggleNav:()=>b(O=>!O),isDraft:h})]})}if("serviceWorker"in navigator){const e=!!navigator.serviceWorker.controller;let t=!1;navigator.serviceWorker.addEventListener("controllerchange",()=>{t||!e||(t=!0,window.location.reload())}),navigator.serviceWorker.ready.then(n=>{n.update().catch(()=>{}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&n.update().catch(()=>{})})}).catch(()=>{})}JT.createRoot(document.getElementById("root")).render(T.jsx(Ds.StrictMode,{children:T.jsx(T6,{})}));export{KS as S,Nc as _,Ku as c,Vc as g,gN as h,EN as s,w1 as v,$r as w};
|