@joeyshi12/casper 0.10.2 → 0.11.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.
Files changed (70) hide show
  1. package/dist/mcp.js +1 -1
  2. package/dist/server.js +8 -5
  3. package/dist/web/assets/{abnfDiagram-N423BO3Z-BOt2oedB.js → abnfDiagram-N423BO3Z-B88fK1c8.js} +1 -1
  4. package/dist/web/assets/{arc-CJ0OegkD.js → arc-DMIevERD.js} +1 -1
  5. package/dist/web/assets/{architectureDiagram-T3A2C74G-BaPzpGkE.js → architectureDiagram-T3A2C74G-CJ5mXlmv.js} +1 -1
  6. package/dist/web/assets/{blockDiagram-VBNYF7ZC-FhUU8yRq.js → blockDiagram-VBNYF7ZC-BssSdi9Q.js} +1 -1
  7. package/dist/web/assets/{c4Diagram-5PPSVZJV-DiGoNhfT.js → c4Diagram-5PPSVZJV-BJHrRcC9.js} +1 -1
  8. package/dist/web/assets/channel-CFhLIKKC.js +1 -0
  9. package/dist/web/assets/{chunk-2GRJ4B5K-B-x5jVOB.js → chunk-2GRJ4B5K-Bmq_IVc0.js} +1 -1
  10. package/dist/web/assets/{chunk-2Q5K7J3B-DSh8M9q0.js → chunk-2Q5K7J3B-B2erbhym.js} +1 -1
  11. package/dist/web/assets/{chunk-5RXB4S5H-Btk7hl75.js → chunk-5RXB4S5H-B_DuY9SH.js} +1 -1
  12. package/dist/web/assets/{chunk-5VM5RSS4-CyplenJX.js → chunk-5VM5RSS4-BgiHQCU1.js} +1 -1
  13. package/dist/web/assets/{chunk-6Q2QTUOP-DtohW6Ga.js → chunk-6Q2QTUOP-pmOmsjWC.js} +1 -1
  14. package/dist/web/assets/{chunk-GF5L2VYU-VNW8BUeq.js → chunk-GF5L2VYU-B-PjTMWL.js} +1 -1
  15. package/dist/web/assets/{chunk-JWPE2WC7-BNS8VdV5.js → chunk-JWPE2WC7-Be9UnGmk.js} +1 -1
  16. package/dist/web/assets/{chunk-KBJHAD2P-BV2Vf23h.js → chunk-KBJHAD2P-DPxdXs9r.js} +1 -1
  17. package/dist/web/assets/{chunk-RYQCIY6F-DYmETIxn.js → chunk-RYQCIY6F-BKc5gOjQ.js} +1 -1
  18. package/dist/web/assets/{chunk-XXDRQBXY-HuXFE1c3.js → chunk-XXDRQBXY-CoOnbv-S.js} +1 -1
  19. package/dist/web/assets/classDiagram-JCYQIIEL-CyTqHDI_.js +1 -0
  20. package/dist/web/assets/classDiagram-v2-OCEON4UE-CyTqHDI_.js +1 -0
  21. package/dist/web/assets/{cose-bilkent-JH36ORCC-ChjYQYqW.js → cose-bilkent-JH36ORCC-BZ5Oon1z.js} +1 -1
  22. package/dist/web/assets/{cynefin-VYW2F7L2-0SvgqCiO.js → cynefin-VYW2F7L2-DlXmf5Bs.js} +1 -1
  23. package/dist/web/assets/{cynefinDiagram-MW4NZA55-NEFmMNou.js → cynefinDiagram-MW4NZA55-ClZQ1oTx.js} +1 -1
  24. package/dist/web/assets/{dagre-VZM6K2ZE-D_p5IBF9.js → dagre-VZM6K2ZE-CX3pDtYQ.js} +1 -1
  25. package/dist/web/assets/{diagram-7IWD3JNH-CDZ5uJm4.js → diagram-7IWD3JNH-DBelWFkJ.js} +1 -1
  26. package/dist/web/assets/{diagram-B4RE2ZJO-Dzd-MSKW.js → diagram-B4RE2ZJO-CDqvztqK.js} +1 -1
  27. package/dist/web/assets/{diagram-LBJQPF4R-B6hsBa1t.js → diagram-LBJQPF4R-DWL1uAJS.js} +1 -1
  28. package/dist/web/assets/{diagram-Q27KOJAE-DJZkhdF3.js → diagram-Q27KOJAE-BRsHqM1Z.js} +1 -1
  29. package/dist/web/assets/{diagram-UB23O5K3-7nsFomCT.js → diagram-UB23O5K3-Ci1U9Hdl.js} +1 -1
  30. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-B1f56hXD.js → ebnfDiagram-BXEA7PRR-CBPphElN.js} +1 -1
  31. package/dist/web/assets/{erDiagram-JOGREHBK-COrWC6hw.js → erDiagram-JOGREHBK-FI4byJC2.js} +1 -1
  32. package/dist/web/assets/{flowDiagram-UKHOOZJN-COS4lI6r.js → flowDiagram-UKHOOZJN-BCKR_o2t.js} +1 -1
  33. package/dist/web/assets/{ganttDiagram-PKOTCBZU-Lk2VUmay.js → ganttDiagram-PKOTCBZU-BYp35VGe.js} +1 -1
  34. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-DtAvGOFk.js → gitGraphDiagram-DS77QQ5N--AySchaL.js} +1 -1
  35. package/dist/web/assets/{index-CTPzyuSS.js → index-D9ooBx1d.js} +1 -1
  36. package/dist/web/assets/index-Dd6MG4c6.css +1 -0
  37. package/dist/web/assets/index-DigNQUdR.js +253 -0
  38. package/dist/web/assets/{infoDiagram-6WML65LV-OKmxiILi.js → infoDiagram-6WML65LV-CbKYvHyN.js} +1 -1
  39. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-BUc3kT4w.js → ishikawaDiagram-WSZJBQD7-dLs0tgi6.js} +1 -1
  40. package/dist/web/assets/{journeyDiagram-NVQOT4AX-DvBEKBLD.js → journeyDiagram-NVQOT4AX-CXUsDb3x.js} +1 -1
  41. package/dist/web/assets/{kanban-definition-27J2QSJJ-CV7kLUrv.js → kanban-definition-27J2QSJJ-r33P8KpU.js} +1 -1
  42. package/dist/web/assets/{linear-nKe_FmKR.js → linear-s7N3jDHb.js} +1 -1
  43. package/dist/web/assets/{mermaid.core-DQxD-Al4.js → mermaid.core-Cw282Xmk.js} +4 -4
  44. package/dist/web/assets/{mindmap-definition-FAOFIHXS-DZ7D_fsY.js → mindmap-definition-FAOFIHXS-BXPAvM6U.js} +1 -1
  45. package/dist/web/assets/{pegDiagram-VL7TDLO6-DsGgpFSF.js → pegDiagram-VL7TDLO6-D-H5hjvM.js} +1 -1
  46. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-B9M0nB9V.js → pieDiagram-7S7Q4E2Y-D3W5_BlG.js} +1 -1
  47. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-CHuiGp3C.js → quadrantDiagram-CIZ2JOQS-BNSHhxkB.js} +1 -1
  48. package/dist/web/assets/{railroadDiagram-AXF67PYL-BFNAk_rL.js → railroadDiagram-AXF67PYL-BvLjuIqc.js} +1 -1
  49. package/dist/web/assets/{requirementDiagram-LRYGKXZP-DRh6dlwQ.js → requirementDiagram-LRYGKXZP-CZTpqoEk.js} +1 -1
  50. package/dist/web/assets/{sankeyDiagram-W5VNT64P-ChkVLVRB.js → sankeyDiagram-W5VNT64P-xvU-3Mf_.js} +1 -1
  51. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-hVuQEWrZ.js → sequenceDiagram-SI44F4Z6-Bpugvm4V.js} +1 -1
  52. package/dist/web/assets/{sizeCapture-X5ZJPWSS-ZpEHmsZv.js → sizeCapture-X5ZJPWSS-B87TxLF7.js} +1 -1
  53. package/dist/web/assets/{stateDiagram-OKZ733FA-QPbFpYci.js → stateDiagram-OKZ733FA-BEQB_m5r.js} +1 -1
  54. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-OtsvcH8I.js +1 -0
  55. package/dist/web/assets/{swimlanes-SLNWSIFB-CT0EVasj.js → swimlanes-SLNWSIFB-CVMCMeYR.js} +2 -2
  56. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-TYfbhlBN.js +8 -0
  57. package/dist/web/assets/{timeline-definition-Z64GVDOM-BPh850i9.js → timeline-definition-Z64GVDOM-Dylz4pg-.js} +1 -1
  58. package/dist/web/assets/{vennDiagram-T6HMQDX7-DOyN_2Pw.js → vennDiagram-T6HMQDX7-BmS_JQjJ.js} +1 -1
  59. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-DvQUJsO9.js → wardleyDiagram-T6FBY63Y-C0qCz7i-.js} +1 -1
  60. package/dist/web/assets/{xychartDiagram-ELKLHX3M-CvfYk_7X.js → xychartDiagram-ELKLHX3M-aOG1xxkv.js} +1 -1
  61. package/dist/web/index.html +2 -2
  62. package/dist/web/sw.js +1 -1
  63. package/package.json +1 -1
  64. package/dist/web/assets/channel-6363Y3xP.js +0 -1
  65. package/dist/web/assets/classDiagram-JCYQIIEL-GUX5DKpE.js +0 -1
  66. package/dist/web/assets/classDiagram-v2-OCEON4UE-GUX5DKpE.js +0 -1
  67. package/dist/web/assets/index-BFfEb9Vs.js +0 -253
  68. package/dist/web/assets/index-CK9lPdh7.css +0 -1
  69. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-L8aPswP5.js +0 -1
  70. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-Bu9-A5QB.js +0 -8
@@ -0,0 +1,253 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-D9ooBx1d.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
2
+ var UT=Object.defineProperty;var jT=(e,t,n)=>t in e?UT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>jT(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 Wl={exports:{}},Cs={},Yl={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 HT(){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(P){return P===null||typeof P!="object"?null:(P=g&&P[g]||P["@@iterator"],typeof P=="function"?P:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,I={};function O(P,Y,v){this.props=P,this.context=Y,this.refs=I,this.updater=v||b}O.prototype.isReactComponent={},O.prototype.setState=function(P,Y){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,Y,"setState")},O.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function w(){}w.prototype=O.prototype;function F(P,Y,v){this.props=P,this.context=Y,this.refs=I,this.updater=v||b}var z=F.prototype=new w;z.constructor=F,N(z,O.prototype),z.isPureReactComponent=!0;var K=Array.isArray,Z=Object.prototype.hasOwnProperty,D={current:null},Q={key:!0,ref:!0,__self:!0,__source:!0};function ae(P,Y,v){var he,Ce={},be=null,Be=null;if(Y!=null)for(he in Y.ref!==void 0&&(Be=Y.ref),Y.key!==void 0&&(be=""+Y.key),Y)Z.call(Y,he)&&!Q.hasOwnProperty(he)&&(Ce[he]=Y[he]);var Re=arguments.length-2;if(Re===1)Ce.children=v;else if(1<Re){for(var ze=Array(Re),at=0;at<Re;at++)ze[at]=arguments[at+2];Ce.children=ze}if(P&&P.defaultProps)for(he in Re=P.defaultProps,Re)Ce[he]===void 0&&(Ce[he]=Re[he]);return{$$typeof:e,type:P,key:be,ref:Be,props:Ce,_owner:D.current}}function ce(P,Y){return{$$typeof:e,type:P.type,key:Y,ref:P.ref,props:P.props,_owner:P._owner}}function U(P){return typeof P=="object"&&P!==null&&P.$$typeof===e}function ee(P){var Y={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(v){return Y[v]})}var te=/\/+/g;function xe(P,Y){return typeof P=="object"&&P!==null&&P.key!=null?ee(""+P.key):Y.toString(36)}function de(P,Y,v,he,Ce){var be=typeof P;(be==="undefined"||be==="boolean")&&(P=null);var Be=!1;if(P===null)Be=!0;else switch(be){case"string":case"number":Be=!0;break;case"object":switch(P.$$typeof){case e:case t:Be=!0}}if(Be)return Be=P,Ce=Ce(Be),P=he===""?"."+xe(Be,0):he,K(Ce)?(v="",P!=null&&(v=P.replace(te,"$&/")+"/"),de(Ce,Y,v,"",function(at){return at})):Ce!=null&&(U(Ce)&&(Ce=ce(Ce,v+(!Ce.key||Be&&Be.key===Ce.key?"":(""+Ce.key).replace(te,"$&/")+"/")+P)),Y.push(Ce)),1;if(Be=0,he=he===""?".":he+":",K(P))for(var Re=0;Re<P.length;Re++){be=P[Re];var ze=he+xe(be,Re);Be+=de(be,Y,v,ze,Ce)}else if(ze=x(P),typeof ze=="function")for(P=ze.call(P),Re=0;!(be=P.next()).done;)be=be.value,ze=he+xe(be,Re++),Be+=de(be,Y,v,ze,Ce);else if(be==="object")throw Y=String(P),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Be}function ie(P,Y,v){if(P==null)return P;var he=[],Ce=0;return de(P,he,"","",function(be){return Y.call(v,be,Ce++)}),he}function Ne(P){if(P._status===-1){var Y=P._result;Y=Y(),Y.then(function(v){(P._status===0||P._status===-1)&&(P._status=1,P._result=v)},function(v){(P._status===0||P._status===-1)&&(P._status=2,P._result=v)}),P._status===-1&&(P._status=0,P._result=Y)}if(P._status===1)return P._result.default;throw P._result}var we={current:null},oe={transition:null},me={ReactCurrentDispatcher:we,ReactCurrentBatchConfig:oe,ReactCurrentOwner:D};function S(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:ie,forEach:function(P,Y,v){ie(P,function(){Y.apply(this,arguments)},v)},count:function(P){var Y=0;return ie(P,function(){Y++}),Y},toArray:function(P){return ie(P,function(Y){return Y})||[]},only:function(P){if(!U(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},De.Component=O,De.Fragment=n,De.Profiler=a,De.PureComponent=F,De.StrictMode=s,De.Suspense=f,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=me,De.act=S,De.cloneElement=function(P,Y,v){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var he=N({},P.props),Ce=P.key,be=P.ref,Be=P._owner;if(Y!=null){if(Y.ref!==void 0&&(be=Y.ref,Be=D.current),Y.key!==void 0&&(Ce=""+Y.key),P.type&&P.type.defaultProps)var Re=P.type.defaultProps;for(ze in Y)Z.call(Y,ze)&&!Q.hasOwnProperty(ze)&&(he[ze]=Y[ze]===void 0&&Re!==void 0?Re[ze]:Y[ze])}var ze=arguments.length-2;if(ze===1)he.children=v;else if(1<ze){Re=Array(ze);for(var at=0;at<ze;at++)Re[at]=arguments[at+2];he.children=Re}return{$$typeof:e,type:P.type,key:Ce,ref:be,props:he,_owner:Be}},De.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:o,_context:P},P.Consumer=P},De.createElement=ae,De.createFactory=function(P){var Y=ae.bind(null,P);return Y.type=P,Y},De.createRef=function(){return{current:null}},De.forwardRef=function(P){return{$$typeof:d,render:P}},De.isValidElement=U,De.lazy=function(P){return{$$typeof:E,_payload:{_status:-1,_result:P},_init:Ne}},De.memo=function(P,Y){return{$$typeof:h,type:P,compare:Y===void 0?null:Y}},De.startTransition=function(P){var Y=oe.transition;oe.transition={};try{P()}finally{oe.transition=Y}},De.unstable_act=S,De.useCallback=function(P,Y){return we.current.useCallback(P,Y)},De.useContext=function(P){return we.current.useContext(P)},De.useDebugValue=function(){},De.useDeferredValue=function(P){return we.current.useDeferredValue(P)},De.useEffect=function(P,Y){return we.current.useEffect(P,Y)},De.useId=function(){return we.current.useId()},De.useImperativeHandle=function(P,Y,v){return we.current.useImperativeHandle(P,Y,v)},De.useInsertionEffect=function(P,Y){return we.current.useInsertionEffect(P,Y)},De.useLayoutEffect=function(P,Y){return we.current.useLayoutEffect(P,Y)},De.useMemo=function(P,Y){return we.current.useMemo(P,Y)},De.useReducer=function(P,Y,v){return we.current.useReducer(P,Y,v)},De.useRef=function(P){return we.current.useRef(P)},De.useState=function(P){return we.current.useState(P)},De.useSyncExternalStore=function(P,Y,v){return we.current.useSyncExternalStore(P,Y,v)},De.useTransition=function(){return we.current.useTransition()},De.version="18.3.1",De}var mp;function qc(){return mp||(mp=1,Yl.exports=HT()),Yl.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 zT(){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 $T(){return Ep||(Ep=1,Wl.exports=zT()),Wl.exports}var T=$T(),A=qc();const Ds=Vc(A);var xu={},Vl={exports:{}},Bt={},ql={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 WT(){return Tp||(Tp=1,(function(e){function t(oe,me){var S=oe.length;oe.push(me);e:for(;0<S;){var P=S-1>>>1,Y=oe[P];if(0<a(Y,me))oe[P]=me,oe[S]=Y,S=P;else break e}}function n(oe){return oe.length===0?null:oe[0]}function s(oe){if(oe.length===0)return null;var me=oe[0],S=oe.pop();if(S!==me){oe[0]=S;e:for(var P=0,Y=oe.length,v=Y>>>1;P<v;){var he=2*(P+1)-1,Ce=oe[he],be=he+1,Be=oe[be];if(0>a(Ce,S))be<Y&&0>a(Be,Ce)?(oe[P]=Be,oe[be]=S,P=be):(oe[P]=Ce,oe[he]=S,P=he);else if(be<Y&&0>a(Be,S))oe[P]=Be,oe[be]=S,P=be;else break e}}return me}function a(oe,me){var S=oe.sortIndex-me.sortIndex;return S!==0?S:oe.id-me.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,N=!1,I=!1,O=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function z(oe){for(var me=n(h);me!==null;){if(me.callback===null)s(h);else if(me.startTime<=oe)s(h),me.sortIndex=me.expirationTime,t(f,me);else break;me=n(h)}}function K(oe){if(I=!1,z(oe),!N)if(n(f)!==null)N=!0,Ne(Z);else{var me=n(h);me!==null&&we(K,me.startTime-oe)}}function Z(oe,me){N=!1,I&&(I=!1,w(ae),ae=-1),b=!0;var S=x;try{for(z(me),g=n(f);g!==null&&(!(g.expirationTime>me)||oe&&!ee());){var P=g.callback;if(typeof P=="function"){g.callback=null,x=g.priorityLevel;var Y=P(g.expirationTime<=me);me=e.unstable_now(),typeof Y=="function"?g.callback=Y:g===n(f)&&s(f),z(me)}else s(f);g=n(f)}if(g!==null)var v=!0;else{var he=n(h);he!==null&&we(K,he.startTime-me),v=!1}return v}finally{g=null,x=S,b=!1}}var D=!1,Q=null,ae=-1,ce=5,U=-1;function ee(){return!(e.unstable_now()-U<ce)}function te(){if(Q!==null){var oe=e.unstable_now();U=oe;var me=!0;try{me=Q(!0,oe)}finally{me?xe():(D=!1,Q=null)}}else D=!1}var xe;if(typeof F=="function")xe=function(){F(te)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,ie=de.port2;de.port1.onmessage=te,xe=function(){ie.postMessage(null)}}else xe=function(){O(te,0)};function Ne(oe){Q=oe,D||(D=!0,xe())}function we(oe,me){ae=O(function(){oe(e.unstable_now())},me)}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(oe){oe.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,Ne(Z))},e.unstable_forceFrameRate=function(oe){0>oe||125<oe?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ce=0<oe?Math.floor(1e3/oe):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(oe){switch(x){case 1:case 2:case 3:var me=3;break;default:me=x}var S=x;x=me;try{return oe()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(oe,me){switch(oe){case 1:case 2:case 3:case 4:case 5:break;default:oe=3}var S=x;x=oe;try{return me()}finally{x=S}},e.unstable_scheduleCallback=function(oe,me,S){var P=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?P+S:P):S=P,oe){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=S+Y,oe={id:E++,callback:me,priorityLevel:oe,startTime:S,expirationTime:Y,sortIndex:-1},S>P?(oe.sortIndex=S,t(h,oe),n(f)===null&&oe===n(h)&&(I?(w(ae),ae=-1):I=!0,we(K,S-P))):(oe.sortIndex=Y,t(f,oe),N||b||(N=!0,Ne(Z))),oe},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(oe){var me=x;return function(){var S=x;x=me;try{return oe.apply(this,arguments)}finally{x=S}}}})(Ql)),Ql}var yp;function YT(){return yp||(yp=1,ql.exports=WT()),ql.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 VT(){if(xp)return Bt;xp=1;var e=qc(),t=YT();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 N(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 I(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 I(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 I(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){O[r]=new I(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){O[r]=new I(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 I(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){O[r]=new I(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){O[r]=new I(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){O[r]=new I(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){O[r]=new I(r,5,!1,r.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function F(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(w,F);O[i]=new I(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(w,F);O[i]=new I(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(w,F);O[i]=new I(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){O[r]=new I(r,1,!1,r.toLowerCase(),null,!1,!1)}),O.xlinkHref=new I("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){O[r]=new I(r,1,!1,r.toLowerCase(),null,!0,!0)});function z(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")&&(N(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 K=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Z=Symbol.for("react.element"),D=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),U=Symbol.for("react.provider"),ee=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),xe=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Ne=Symbol.for("react.lazy"),we=Symbol.for("react.offscreen"),oe=Symbol.iterator;function me(r){return r===null||typeof r!="object"?null:(r=oe&&r[oe]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,P;function Y(r){if(P===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);P=i&&i[1]||""}return`
35
+ `+P+r}var v=!1;function he(r,i){if(!r||v)return"";v=!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(W){var c=W}Reflect.construct(r,[],i)}else{try{i.call()}catch(W){c=W}r.call(i.prototype)}else{try{throw Error()}catch(W){c=W}r()}}catch(W){if(W&&c&&typeof W.stack=="string"){for(var m=W.stack.split(`
36
+ `),y=c.stack.split(`
37
+ `),k=m.length-1,L=y.length-1;1<=k&&0<=L&&m[k]!==y[L];)L--;for(;1<=k&&0<=L;k--,L--)if(m[k]!==y[L]){if(k!==1||L!==1)do if(k--,L--,0>L||m[k]!==y[L]){var M=`
38
+ `+m[k].replace(" at new "," at ");return r.displayName&&M.includes("<anonymous>")&&(M=M.replace("<anonymous>",r.displayName)),M}while(1<=k&&0<=L);break}}}finally{v=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Y(r):""}function Ce(r){switch(r.tag){case 5:return Y(r.type);case 16:return Y("Lazy");case 13:return Y("Suspense");case 19:return Y("SuspenseList");case 0:case 2:case 15:return r=he(r.type,!1),r;case 11:return r=he(r.type.render,!1),r;case 1:return r=he(r.type,!0),r;default:return""}}function be(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 Q:return"Fragment";case D:return"Portal";case ce:return"Profiler";case ae:return"StrictMode";case xe:return"Suspense";case de:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case ee:return(r.displayName||"Context")+".Consumer";case U:return(r._context.displayName||"Context")+".Provider";case te:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case ie:return i=r.displayName||null,i!==null?i:be(r.type)||"Memo";case Ne:i=r._payload,r=r._init;try{return be(r(i))}catch{}}return null}function Be(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 be(i);case 8:return i===ae?"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&&z(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 ve,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(ve=ve||document.createElement("div"),ve.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=ve.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;i.firstChild;)r.appendChild(i.firstChild)}});function Ue(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 io(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var so=null,ni=null,ri=null;function Id(r){if(r=cs(r)){if(typeof so!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Pa(i),so(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 ao=!1;function Pd(r,i,u){if(ao)return r(i,u);ao=!0;try{return Od(r,i,u)}finally{ao=!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 uo=!1;if(d)try{var Wi={};Object.defineProperty(Wi,"passive",{get:function(){uo=!0}}),window.addEventListener("test",Wi,Wi),window.removeEventListener("test",Wi,Wi)}catch{uo=!1}function Yg(r,i,u,c,m,y,k,L,M){var W=Array.prototype.slice.call(arguments,3);try{i.apply(u,W)}catch(J){this.onError(J)}}var Yi=!1,ha=null,pa=!1,oo=null,Vg={onError:function(r){Yi=!0,ha=r}};function qg(r,i,u,c,m,y,k,L,M){Yi=!1,ha=null,Yg.apply(Vg,arguments)}function Qg(r,i,u,c,m,y,k,L,M){if(qg.apply(this,arguments),Yi){if(Yi){var W=ha;Yi=!1,ha=null}else throw Error(n(198));pa||(pa=!0,oo=W)}}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 Gg(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,L=m.child;L;){if(L===u){k=!0,u=m,c=y;break}if(L===c){k=!0,c=m,u=y;break}L=L.sibling}if(!k){for(L=y.child;L;){if(L===u){k=!0,u=y,c=m;break}if(L===c){k=!0,c=y,u=m;break}L=L.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=Gg(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,Kg=t.unstable_shouldYield,Xg=t.unstable_requestPaint,rt=t.unstable_now,Jg=t.unstable_getCurrentPriorityLevel,lo=t.unstable_ImmediatePriority,zd=t.unstable_UserBlockingPriority,ma=t.unstable_NormalPriority,Zg=t.unstable_LowPriority,$d=t.unstable_IdlePriority,ga=null,Sn=null;function eE(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:rE,tE=Math.log,nE=Math.LN2;function rE(r){return r>>>=0,r===0?32:31-(tE(r)/nE|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 L=k&~m;L!==0?c=Vi(L):(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 iE(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 sE(r,i){for(var u=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,y=r.pendingLanes;0<y;){var k=31-un(y),L=1<<k,M=m[k];M===-1?((L&u)===0||(L&c)!==0)&&(m[k]=iE(L,i)):M<=i&&(r.expiredLanes|=L),y&=~L}}function co(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 fo(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 aE(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 ho(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,po,qd,Qd,Gd,mo=!1,xa=[],Gn=null,Kn=null,Xn=null,Qi=new Map,Gi=new Map,Jn=[],uE="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&&po(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function oE(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=Eo(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&&po(i),r.blockedOn=u,!1;i.shift()}return!0}function Jd(r,i,u){ba(r)&&u.delete(i)}function lE(){mo=!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,mo||(mo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,lE)))}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=K.ReactCurrentBatchConfig,ka=!0;function cE(r,i,u,c){var m=We,y=ii.transition;ii.transition=null;try{We=1,go(r,i,u,c)}finally{We=m,ii.transition=y}}function dE(r,i,u,c){var m=We,y=ii.transition;ii.transition=null;try{We=4,go(r,i,u,c)}finally{We=m,ii.transition=y}}function go(r,i,u,c){if(ka){var m=Eo(r,i,u,c);if(m===null)Do(r,i,c,Sa,u),Kd(r,c);else if(oE(m,r,i,u,c))c.stopPropagation();else if(Kd(r,c),i&4&&-1<uE.indexOf(r)){for(;m!==null;){var y=cs(m);if(y!==null&&Vd(y),y=Eo(r,i,u,c),y===null&&Do(r,i,c,Sa,u),y===m)break;m=y}m!==null&&c.stopPropagation()}else Do(r,i,c,null,u)}}var Sa=null;function Eo(r,i,u,c){if(Sa=null,r=io(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(Jg()){case lo:return 1;case zd:return 4;case ma:case Zg:return 16;case $d:return 536870912;default:return 16}default:return 16}}var Zn=null,To=null,_a=null;function ef(){if(_a)return _a;var r,i=To,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 L in r)r.hasOwnProperty(L)&&(u=r[L],this[L]=u?u(y):y[L]);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},yo=$t(si),Zi=S({},si,{view:0,detail:0}),fE=$t(Zi),xo,bo,es,va=S({},Zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:So,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"?(xo=r.screenX-es.screenX,bo=r.screenY-es.screenY):bo=xo=0,es=r),xo)},movementY:function(r){return"movementY"in r?r.movementY:bo}}),nf=$t(va),hE=S({},va,{dataTransfer:0}),pE=$t(hE),mE=S({},Zi,{relatedTarget:0}),ko=$t(mE),gE=S({},si,{animationName:0,elapsedTime:0,pseudoElement:0}),EE=$t(gE),TE=S({},si,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),yE=$t(TE),xE=S({},si,{data:0}),rf=$t(xE),bE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kE={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"},SE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _E(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=SE[r])?!!i[r]:!1}function So(){return _E}var CE=S({},Zi,{key:function(r){if(r.key){var i=bE[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"?kE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:So,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}}),NE=$t(CE),vE=S({},va,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sf=$t(vE),AE=S({},Zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:So}),wE=$t(AE),IE=S({},si,{propertyName:0,elapsedTime:0,pseudoElement:0}),LE=$t(IE),RE=S({},va,{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}),OE=$t(RE),DE=[9,13,27,32],_o=d&&"CompositionEvent"in window,ts=null;d&&"documentMode"in document&&(ts=document.documentMode);var PE=d&&"TextEvent"in window&&!ts,af=d&&(!_o||ts&&8<ts&&11>=ts),uf=" ",of=!1;function lf(r,i){switch(r){case"keyup":return DE.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 ME(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 FE(r,i){if(ai)return r==="compositionend"||!_o&&lf(r,i)?(r=ef(),_a=To=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 BE={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"?!!BE[r.type]:i==="textarea"}function ff(r,i,u,c){Ld(c),i=Ra(i,"onChange"),0<i.length&&(u=new yo("onChange","change",null,u,c),r.push({event:u,listeners:i}))}var ns=null,rs=null;function UE(r){If(r,0)}function Aa(r){var i=di(r);if(oa(i))return r}function jE(r,i){if(r==="change")return i}var hf=!1;if(d){var Co;if(d){var No="oninput"in document;if(!No){var pf=document.createElement("div");pf.setAttribute("oninput","return;"),No=typeof pf.oninput=="function"}Co=No}else Co=!1;hf=Co&&(!document.documentMode||9<document.documentMode)}function mf(){ns&&(ns.detachEvent("onpropertychange",gf),rs=ns=null)}function gf(r){if(r.propertyName==="value"&&Aa(rs)){var i=[];ff(i,rs,r,io(r)),Pd(UE,i)}}function HE(r,i,u){r==="focusin"?(mf(),ns=i,rs=u,ns.attachEvent("onpropertychange",gf)):r==="focusout"&&mf()}function zE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Aa(rs)}function $E(r,i){if(r==="click")return Aa(i)}function WE(r,i){if(r==="input"||r==="change")return Aa(i)}function YE(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var on=typeof Object.is=="function"?Object.is:YE;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 vo(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 VE(r){var i=xf(),u=r.focusedElem,c=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&yf(u.ownerDocument.documentElement,u)){if(c!==null&&vo(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 qE=d&&"documentMode"in document&&11>=document.documentMode,ui=null,Ao=null,ss=null,wo=!1;function bf(r,i,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;wo||ui==null||ui!==Zr(c)||(c=ui,"selectionStart"in c&&vo(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 yo("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")},Io={},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(Io[r])return Io[r];if(!oi[r])return r;var i=oi[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in kf)return Io[r]=i[u];return r}var Sf=Ia("animationend"),_f=Ia("animationiteration"),Cf=Ia("animationstart"),Nf=Ia("transitionend"),vf=new Map,Af="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){vf.set(r,i),o(i,[r])}for(var Lo=0;Lo<Af.length;Lo++){var Ro=Af[Lo],QE=Ro.toLowerCase(),GE=Ro[0].toUpperCase()+Ro.slice(1);er(QE,"on"+GE)}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(" "),KE=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,Qg(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 L=c[k],M=L.instance,W=L.currentTarget;if(L=L.listener,M!==y&&m.isPropagationStopped())break e;wf(m,L,W),y=M}else for(k=0;k<c.length;k++){if(L=c[k],M=L.instance,W=L.currentTarget,L=L.listener,M!==y&&m.isPropagationStopped())break e;wf(m,L,W),y=M}}}if(pa)throw r=oo,pa=!1,oo=null,r}function Qe(r,i){var u=i[jo];u===void 0&&(u=i[jo]=new Set);var c=r+"__bubble";u.has(c)||(Lf(i,r,2,!1),u.add(c))}function Oo(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"&&(KE.has(u)||Oo(u,!1,r),Oo(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[La]||(i[La]=!0,Oo("selectionchange",!1,i))}}function Lf(r,i,u,c){switch(Zd(i)){case 1:var m=cE;break;case 4:m=dE;break;default:m=go}u=m.bind(null,i,u,r),m=void 0,!uo||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 Do(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 L=c.stateNode.containerInfo;if(L===m||L.nodeType===8&&L.parentNode===m)break;if(k===4)for(k=c.return;k!==null;){var M=k.tag;if((M===3||M===4)&&(M=k.stateNode.containerInfo,M===m||M.nodeType===8&&M.parentNode===m))return;k=k.return}for(;L!==null;){if(k=Nr(L),k===null)return;if(M=k.tag,M===5||M===6){c=y=k;continue e}L=L.parentNode}}c=c.return}Pd(function(){var W=y,J=io(u),ne=[];e:{var G=vf.get(r);if(G!==void 0){var fe=yo,ge=r;switch(r){case"keypress":if(Ca(u)===0)break e;case"keydown":case"keyup":fe=NE;break;case"focusin":ge="focus",fe=ko;break;case"focusout":ge="blur",fe=ko;break;case"beforeblur":case"afterblur":fe=ko;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":fe=nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=pE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=wE;break;case Sf:case _f:case Cf:fe=EE;break;case Nf:fe=LE;break;case"scroll":fe=fE;break;case"wheel":fe=OE;break;case"copy":case"cut":case"paste":fe=yE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=sf}var Ee=(i&4)!==0,it=!Ee&&r==="scroll",j=Ee?G!==null?G+"Capture":null:G;Ee=[];for(var B=W,$;B!==null;){$=B;var ue=$.stateNode;if($.tag===5&&ue!==null&&($=ue,j!==null&&(ue=$i(B,j),ue!=null&&Ee.push(os(B,ue,$)))),it)break;B=B.return}0<Ee.length&&(G=new fe(G,ge,null,u,J),ne.push({event:G,listeners:Ee}))}}if((i&7)===0){e:{if(G=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",G&&u!==zt&&(ge=u.relatedTarget||u.fromElement)&&(Nr(ge)||ge[Pn]))break e;if((fe||G)&&(G=J.window===J?J:(G=J.ownerDocument)?G.defaultView||G.parentWindow:window,fe?(ge=u.relatedTarget||u.toElement,fe=W,ge=ge?Nr(ge):null,ge!==null&&(it=Cr(ge),ge!==it||ge.tag!==5&&ge.tag!==6)&&(ge=null)):(fe=null,ge=W),fe!==ge)){if(Ee=nf,ue="onMouseLeave",j="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(Ee=sf,ue="onPointerLeave",j="onPointerEnter",B="pointer"),it=fe==null?G:di(fe),$=ge==null?G:di(ge),G=new Ee(ue,B+"leave",fe,u,J),G.target=it,G.relatedTarget=$,ue=null,Nr(J)===W&&(Ee=new Ee(j,B+"enter",ge,u,J),Ee.target=$,Ee.relatedTarget=it,ue=Ee),it=ue,fe&&ge)t:{for(Ee=fe,j=ge,B=0,$=Ee;$;$=li($))B++;for($=0,ue=j;ue;ue=li(ue))$++;for(;0<B-$;)Ee=li(Ee),B--;for(;0<$-B;)j=li(j),$--;for(;B--;){if(Ee===j||j!==null&&Ee===j.alternate)break t;Ee=li(Ee),j=li(j)}Ee=null}else Ee=null;fe!==null&&Rf(ne,G,fe,Ee,!1),ge!==null&&it!==null&&Rf(ne,it,ge,Ee,!0)}}e:{if(G=W?di(W):window,fe=G.nodeName&&G.nodeName.toLowerCase(),fe==="select"||fe==="input"&&G.type==="file")var Te=jE;else if(df(G))if(hf)Te=WE;else{Te=zE;var Se=HE}else(fe=G.nodeName)&&fe.toLowerCase()==="input"&&(G.type==="checkbox"||G.type==="radio")&&(Te=$E);if(Te&&(Te=Te(r,W))){ff(ne,Te,u,J);break e}Se&&Se(r,G,W),r==="focusout"&&(Se=G._wrapperState)&&Se.controlled&&G.type==="number"&&ti(G,"number",G.value)}switch(Se=W?di(W):window,r){case"focusin":(df(Se)||Se.contentEditable==="true")&&(ui=Se,Ao=W,ss=null);break;case"focusout":ss=Ao=ui=null;break;case"mousedown":wo=!0;break;case"contextmenu":case"mouseup":case"dragend":wo=!1,bf(ne,u,J);break;case"selectionchange":if(qE)break;case"keydown":case"keyup":bf(ne,u,J)}var _e;if(_o)e:{switch(r){case"compositionstart":var Ae="onCompositionStart";break e;case"compositionend":Ae="onCompositionEnd";break e;case"compositionupdate":Ae="onCompositionUpdate";break e}Ae=void 0}else ai?lf(r,u)&&(Ae="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ae="onCompositionStart");Ae&&(af&&u.locale!=="ko"&&(ai||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&ai&&(_e=ef()):(Zn=J,To="value"in Zn?Zn.value:Zn.textContent,ai=!0)),Se=Ra(W,Ae),0<Se.length&&(Ae=new rf(Ae,r,null,u,J),ne.push({event:Ae,listeners:Se}),_e?Ae.data=_e:(_e=cf(u),_e!==null&&(Ae.data=_e)))),(_e=PE?ME(r,u):FE(r,u))&&(W=Ra(W,"onBeforeInput"),0<W.length&&(J=new rf("onBeforeInput","beforeinput",null,u,J),ne.push({event:J,listeners:W}),J.data=_e))}If(ne,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 L=u,M=L.alternate,W=L.stateNode;if(M!==null&&M===c)break;L.tag===5&&W!==null&&(L=W,m?(M=$i(u,y),M!=null&&k.unshift(os(u,M,L))):m||(M=$i(u,y),M!=null&&k.push(os(u,M,L)))),u=u.return}k.length!==0&&r.push({event:i,listeners:k})}var XE=/\r\n?/g,JE=/\u0000|\uFFFD/g;function Of(r){return(typeof r=="string"?r:""+r).replace(XE,`
39
+ `).replace(JE,"")}function Oa(r,i,u){if(i=Of(i),Of(r)!==i&&u)throw Error(n(425))}function Da(){}var Po=null,Mo=null;function Fo(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 Bo=typeof setTimeout=="function"?setTimeout:void 0,ZE=typeof clearTimeout=="function"?clearTimeout:void 0,Df=typeof Promise=="function"?Promise:void 0,eT=typeof queueMicrotask=="function"?queueMicrotask:typeof Df<"u"?function(r){return Df.resolve(null).then(r).catch(tT)}:Bo;function tT(r){setTimeout(function(){throw r})}function Uo(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,jo="__reactEvents$"+ci,nT="__reactListeners$"+ci,rT="__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 Ho=[],fi=-1;function nr(r){return{current:r}}function Ge(r){0>fi||(r.current=Ho[fi],Ho[fi]=null,fi--)}function qe(r,i){fi++,Ho[fi]=r.current,r.current=i}var rr={},St=nr(rr),Ot=nr(!1),vr=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,Be(r)||"Unknown",m));return S({},u,c)}function Fa(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||rr,vr=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,vr),c.__reactInternalMemoizedMergedChildContext=r,Ge(Ot),Ge(St),qe(St,r)):Ge(Ot),qe(Ot,u)}var Mn=null,Ba=!1,zo=!1;function Uf(r){Mn===null?Mn=[r]:Mn.push(r)}function iT(r){Ba=!0,Uf(r)}function ir(){if(!zo&&Mn!==null){zo=!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(lo,ir),m}finally{We=i,zo=!1}}return null}var pi=[],mi=0,Ua=null,ja=0,Xt=[],Jt=0,Ar=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++]=Ar,Ar=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 $o(r){r.return!==null&&(wr(r,1),jf(r,1,0))}function Wo(r){for(;r===Ua;)Ua=pi[--mi],pi[mi]=null,ja=pi[--mi],pi[mi]=null;for(;r===Ar;)Ar=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=Ar!==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 Yo(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Vo(r){if(Xe){var i=Yt;if(i){var u=i;if(!zf(r,i)){if(Yo(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(Yo(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"&&!Fo(r.type,r.memoizedProps)),i&&(i=Yt)){if(Yo(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 qo(r){ln===null?ln=[r]:ln.push(r)}var sT=K.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 L=m.refs;k===null?delete L[y]:L[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,B){if(r){var $=j.deletions;$===null?(j.deletions=[B],j.flags|=16):$.push(B)}}function u(j,B){if(!r)return null;for(;B!==null;)i(j,B),B=B.sibling;return null}function c(j,B){for(j=new Map;B!==null;)B.key!==null?j.set(B.key,B):j.set(B.index,B),B=B.sibling;return j}function m(j,B){return j=fr(j,B),j.index=0,j.sibling=null,j}function y(j,B,$){return j.index=$,r?($=j.alternate,$!==null?($=$.index,$<B?(j.flags|=2,B):$):(j.flags|=2,B)):(j.flags|=1048576,B)}function k(j){return r&&j.alternate===null&&(j.flags|=2),j}function L(j,B,$,ue){return B===null||B.tag!==6?(B=Bl($,j.mode,ue),B.return=j,B):(B=m(B,$),B.return=j,B)}function M(j,B,$,ue){var Te=$.type;return Te===Q?J(j,B,$.props.children,ue,$.key):B!==null&&(B.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Ne&&Yf(Te)===B.type)?(ue=m(B,$.props),ue.ref=ds(j,B,$),ue.return=j,ue):(ue=fu($.type,$.key,$.props,null,j.mode,ue),ue.ref=ds(j,B,$),ue.return=j,ue)}function W(j,B,$,ue){return B===null||B.tag!==4||B.stateNode.containerInfo!==$.containerInfo||B.stateNode.implementation!==$.implementation?(B=Ul($,j.mode,ue),B.return=j,B):(B=m(B,$.children||[]),B.return=j,B)}function J(j,B,$,ue,Te){return B===null||B.tag!==7?(B=Fr($,j.mode,ue,Te),B.return=j,B):(B=m(B,$),B.return=j,B)}function ne(j,B,$){if(typeof B=="string"&&B!==""||typeof B=="number")return B=Bl(""+B,j.mode,$),B.return=j,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case Z:return $=fu(B.type,B.key,B.props,null,j.mode,$),$.ref=ds(j,null,B),$.return=j,$;case D:return B=Ul(B,j.mode,$),B.return=j,B;case Ne:var ue=B._init;return ne(j,ue(B._payload),$)}if(Vn(B)||me(B))return B=Fr(B,j.mode,$,null),B.return=j,B;za(j,B)}return null}function G(j,B,$,ue){var Te=B!==null?B.key:null;if(typeof $=="string"&&$!==""||typeof $=="number")return Te!==null?null:L(j,B,""+$,ue);if(typeof $=="object"&&$!==null){switch($.$$typeof){case Z:return $.key===Te?M(j,B,$,ue):null;case D:return $.key===Te?W(j,B,$,ue):null;case Ne:return Te=$._init,G(j,B,Te($._payload),ue)}if(Vn($)||me($))return Te!==null?null:J(j,B,$,ue,null);za(j,$)}return null}function fe(j,B,$,ue,Te){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return j=j.get($)||null,L(B,j,""+ue,Te);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case Z:return j=j.get(ue.key===null?$:ue.key)||null,M(B,j,ue,Te);case D:return j=j.get(ue.key===null?$:ue.key)||null,W(B,j,ue,Te);case Ne:var Se=ue._init;return fe(j,B,$,Se(ue._payload),Te)}if(Vn(ue)||me(ue))return j=j.get($)||null,J(B,j,ue,Te,null);za(B,ue)}return null}function ge(j,B,$,ue){for(var Te=null,Se=null,_e=B,Ae=B=0,pt=null;_e!==null&&Ae<$.length;Ae++){_e.index>Ae?(pt=_e,_e=null):pt=_e.sibling;var He=G(j,_e,$[Ae],ue);if(He===null){_e===null&&(_e=pt);break}r&&_e&&He.alternate===null&&i(j,_e),B=y(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He,_e=pt}if(Ae===$.length)return u(j,_e),Xe&&wr(j,Ae),Te;if(_e===null){for(;Ae<$.length;Ae++)_e=ne(j,$[Ae],ue),_e!==null&&(B=y(_e,B,Ae),Se===null?Te=_e:Se.sibling=_e,Se=_e);return Xe&&wr(j,Ae),Te}for(_e=c(j,_e);Ae<$.length;Ae++)pt=fe(_e,j,Ae,$[Ae],ue),pt!==null&&(r&&pt.alternate!==null&&_e.delete(pt.key===null?Ae:pt.key),B=y(pt,B,Ae),Se===null?Te=pt:Se.sibling=pt,Se=pt);return r&&_e.forEach(function(hr){return i(j,hr)}),Xe&&wr(j,Ae),Te}function Ee(j,B,$,ue){var Te=me($);if(typeof Te!="function")throw Error(n(150));if($=Te.call($),$==null)throw Error(n(151));for(var Se=Te=null,_e=B,Ae=B=0,pt=null,He=$.next();_e!==null&&!He.done;Ae++,He=$.next()){_e.index>Ae?(pt=_e,_e=null):pt=_e.sibling;var hr=G(j,_e,He.value,ue);if(hr===null){_e===null&&(_e=pt);break}r&&_e&&hr.alternate===null&&i(j,_e),B=y(hr,B,Ae),Se===null?Te=hr:Se.sibling=hr,Se=hr,_e=pt}if(He.done)return u(j,_e),Xe&&wr(j,Ae),Te;if(_e===null){for(;!He.done;Ae++,He=$.next())He=ne(j,He.value,ue),He!==null&&(B=y(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He);return Xe&&wr(j,Ae),Te}for(_e=c(j,_e);!He.done;Ae++,He=$.next())He=fe(_e,j,Ae,He.value,ue),He!==null&&(r&&He.alternate!==null&&_e.delete(He.key===null?Ae:He.key),B=y(He,B,Ae),Se===null?Te=He:Se.sibling=He,Se=He);return r&&_e.forEach(function(BT){return i(j,BT)}),Xe&&wr(j,Ae),Te}function it(j,B,$,ue){if(typeof $=="object"&&$!==null&&$.type===Q&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case Z:e:{for(var Te=$.key,Se=B;Se!==null;){if(Se.key===Te){if(Te=$.type,Te===Q){if(Se.tag===7){u(j,Se.sibling),B=m(Se,$.props.children),B.return=j,j=B;break e}}else if(Se.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===Ne&&Yf(Te)===Se.type){u(j,Se.sibling),B=m(Se,$.props),B.ref=ds(j,Se,$),B.return=j,j=B;break e}u(j,Se);break}else i(j,Se);Se=Se.sibling}$.type===Q?(B=Fr($.props.children,j.mode,ue,$.key),B.return=j,j=B):(ue=fu($.type,$.key,$.props,null,j.mode,ue),ue.ref=ds(j,B,$),ue.return=j,j=ue)}return k(j);case D:e:{for(Se=$.key;B!==null;){if(B.key===Se)if(B.tag===4&&B.stateNode.containerInfo===$.containerInfo&&B.stateNode.implementation===$.implementation){u(j,B.sibling),B=m(B,$.children||[]),B.return=j,j=B;break e}else{u(j,B);break}else i(j,B);B=B.sibling}B=Ul($,j.mode,ue),B.return=j,j=B}return k(j);case Ne:return Se=$._init,it(j,B,Se($._payload),ue)}if(Vn($))return ge(j,B,$,ue);if(me($))return Ee(j,B,$,ue);za(j,$)}return typeof $=="string"&&$!==""||typeof $=="number"?($=""+$,B!==null&&B.tag===6?(u(j,B.sibling),B=m(B,$),B.return=j,j=B):(u(j,B),B=Bl($,j.mode,ue),B.return=j,j=B),k(j)):u(j,B)}return it}var Ei=Vf(!0),qf=Vf(!1),$a=nr(null),Wa=null,Ti=null,Qo=null;function Go(){Qo=Ti=Wa=null}function Ko(r){var i=$a.current;Ge($a),r._currentValue=i}function Xo(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 Jo(r){Ir===null?Ir=[r]:Ir.push(r)}function Qf(r,i,u,c){var m=i.interleaved;return m===null?(u.next=u,Jo(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 Zo(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,(je&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,Jo(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,ho(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,L=m.shared.pending;if(L!==null){m.shared.pending=null;var M=L,W=M.next;M.next=null,k===null?y=W:k.next=W,k=M;var J=r.alternate;J!==null&&(J=J.updateQueue,L=J.lastBaseUpdate,L!==k&&(L===null?J.firstBaseUpdate=W:L.next=W,J.lastBaseUpdate=M))}if(y!==null){var ne=m.baseState;k=0,J=W=M=null,L=y;do{var G=L.lane,fe=L.eventTime;if((c&G)===G){J!==null&&(J=J.next={eventTime:fe,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var ge=r,Ee=L;switch(G=i,fe=u,Ee.tag){case 1:if(ge=Ee.payload,typeof ge=="function"){ne=ge.call(fe,ne,G);break e}ne=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Ee.payload,G=typeof ge=="function"?ge.call(fe,ne,G):ge,G==null)break e;ne=S({},ne,G);break e;case 2:sr=!0}}L.callback!==null&&L.lane!==0&&(r.flags|=64,G=m.effects,G===null?m.effects=[L]:G.push(L))}else fe={eventTime:fe,lane:G,tag:L.tag,payload:L.payload,callback:L.callback,next:null},J===null?(W=J=fe,M=ne):J=J.next=fe,k|=G;if(L=L.next,L===null){if(L=m.shared.pending,L===null)break;G=L,L=G.next,G.next=null,m.lastBaseUpdate=G,m.shared.pending=null}}while(!0);if(J===null&&(M=ne),m.baseState=M,m.firstBaseUpdate=W,m.lastBaseUpdate=J,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=ne}}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 el(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 tl(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 nl=[];function rl(){for(var r=0;r<nl.length;r++)nl[r]._workInProgressVersionPrimary=null;nl.length=0}var Qa=K.ReactCurrentDispatcher,il=K.ReactCurrentBatchConfig,Rr=0,et=null,lt=null,ft=null,Ga=!1,ms=!1,gs=0,aT=0;function _t(){throw Error(n(321))}function sl(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 al(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?cT:dT,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=fT,r=u(c,m)}while(ms)}if(Qa.current=Ja,i=lt!==null&&lt.next!==null,Rr=0,ft=lt=et=null,Ga=!1,i)throw Error(n(300));return r}function ul(){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 ol(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 L=k=null,M=null,W=y;do{var J=W.lane;if((Rr&J)===J)M!==null&&(M=M.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),c=W.hasEagerState?W.eagerState:r(c,W.action);else{var ne={lane:J,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};M===null?(L=M=ne,k=c):M=M.next=ne,et.lanes|=J,Or|=J}W=W.next}while(W!==null&&W!==y);M===null?k=c:M.next=L,on(c,i.memoizedState)||(Pt=!0),i.memoizedState=c,i.baseState=k,i.baseQueue=M,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 ll(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,cl(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=lT.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&&sl(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 cl(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 dl(){}function hh(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&sl(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&&sl(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 uT(r,i){var u=We;We=u!==0&&4>u?u:4,r(!0);var c=il.transition;il.transition={};try{r(!1),i()}finally{We=u,il.transition=c}}function gh(){return en().memoizedState}function oT(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 lT(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,L=y(k,u);if(m.hasEagerState=!0,m.eagerState=L,on(L,k)){var M=i.interleaved;M===null?(m.next=m,Jo(i)):(m.next=M.next,M.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,ho(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},cT={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=oT.bind(null,et,r),[c.memoizedState,r]},useRef:function(r){var i=Nn();return r={current:r},i.memoizedState=r},useState:ah,useDebugValue:dl,useDeferredValue:function(r){return Nn().memoizedState=r},useTransition:function(){var r=ah(!1),i=r[0];return r=uT.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=aT++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},dT={readContext:Zt,useCallback:hh,useContext:Zt,useEffect:cl,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:ch,useMemo:ph,useReducer:ol,useRef:uh,useState:function(){return ol(Es)},useDebugValue:dl,useDeferredValue:function(r){var i=en();return 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},fT={readContext:Zt,useCallback:hh,useContext:Zt,useEffect:cl,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:ch,useMemo:ph,useReducer:ll,useRef:uh,useState:function(){return ll(Es)},useDebugValue:dl,useDeferredValue:function(r){var i=en();return lt===null?i.memoizedState=r:mh(i,lt.memoizedState,r)},useTransition:function(){var r=ll(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 fl(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)?vr: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 hl(r,i,u,c){var m=r.stateNode;m.props=u,m.state=r.memoizedState,m.refs={},Zo(r);var y=i.contextType;typeof y=="object"&&y!==null?m.context=Zt(y):(y=Dt(i)?vr:St.current,m.context=hi(r,y)),m.state=r.memoizedState,y=i.getDerivedStateFromProps,typeof y=="function"&&(fl(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+=Ce(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 pl(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function ml(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var hT=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,Il=c),ml(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(){ml(r,i)}}var y=r.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(u.callback=function(){ml(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 hT;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=vT.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 vh(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 pT=K.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 Ah(r,i,u,c,m){u=u.render;var y=i.ref;return yi(i,m),c=al(r,i,u,c,y,m),u=ul(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&u&&$o(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"&&!Fl(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 gl(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 gl(r,i,u,c,m){var y=Dt(u)?vr:St.current;return y=hi(i,y),yi(i,m),u=al(r,i,u,c,y,m),c=ul(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&c&&$o(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),hl(i,u,c,m),c=!0;else if(r===null){var k=i.stateNode,L=i.memoizedProps;k.props=L;var M=k.context,W=u.contextType;typeof W=="object"&&W!==null?W=Zt(W):(W=Dt(u)?vr:St.current,W=hi(i,W));var J=u.getDerivedStateFromProps,ne=typeof J=="function"||typeof k.getSnapshotBeforeUpdate=="function";ne||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(L!==c||M!==W)&&kh(i,k,c,W),sr=!1;var G=i.memoizedState;k.state=G,Va(i,c,k,m),M=i.memoizedState,L!==c||G!==M||Ot.current||sr?(typeof J=="function"&&(fl(i,u,J,c),M=i.memoizedState),(L=sr||xh(i,u,L,c,G,M,W))?(ne||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=M),k.props=c,k.state=M,k.context=W,c=L):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{k=i.stateNode,Gf(r,i),L=i.memoizedProps,W=i.type===i.elementType?L:cn(i.type,L),k.props=W,ne=i.pendingProps,G=k.context,M=u.contextType,typeof M=="object"&&M!==null?M=Zt(M):(M=Dt(u)?vr:St.current,M=hi(i,M));var fe=u.getDerivedStateFromProps;(J=typeof fe=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(L!==ne||G!==M)&&kh(i,k,c,M),sr=!1,G=i.memoizedState,k.state=G,Va(i,c,k,m);var ge=i.memoizedState;L!==ne||G!==ge||Ot.current||sr?(typeof fe=="function"&&(fl(i,u,fe,c),ge=i.memoizedState),(W=sr||xh(i,u,W,c,G,ge,M)||!1)?(J||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(c,ge,M),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(c,ge,M)),typeof k.componentDidUpdate=="function"&&(i.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof k.componentDidUpdate!="function"||L===r.memoizedProps&&G===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||L===r.memoizedProps&&G===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=ge),k.props=c,k.state=ge,k.context=M,c=W):(typeof k.componentDidUpdate!="function"||L===r.memoizedProps&&G===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||L===r.memoizedProps&&G===r.memoizedState||(i.flags|=1024),c=!1)}return El(r,i,u,c,y,m)}function El(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,pT.current=i;var L=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,L,y)):It(r,i,L,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),el(r,i.containerInfo)}function Ph(r,i,u,c,m){return gi(),qo(m),i.flags|=256,It(r,i,u,c),i.child}var Tl={dehydrated:null,treeContext:null,retryLane:0};function yl(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,L;if((L=k)||(L=r!==null&&r.memoizedState===null?!1:(m&2)!==0),L?(y=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(m|=1),qe(Ze,m&1),r===null)return Vo(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=yl(u),i.memoizedState=Tl,r):xl(i,k));if(m=r.memoizedState,m!==null&&(L=m.dehydrated,L!==null))return mT(r,i,k,c,L,m,u);if(y){y=c.fallback,k=i.mode,m=r.child,L=m.sibling;var M={mode:"hidden",children:c.children};return(k&1)===0&&i.child!==m?(c=i.child,c.childLanes=0,c.pendingProps=M,i.deletions=null):(c=fr(m,M),c.subtreeFlags=m.subtreeFlags&14680064),L!==null?y=fr(L,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?yl(u):{baseLanes:k.baseLanes|u,cachePool:null,transitions:k.transitions},y.memoizedState=k,y.childLanes=r.childLanes&~u,i.memoizedState=Tl,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 xl(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&&qo(c),Ei(i,r.child,null,u),r=xl(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function mT(r,i,u,c,m,y,k){if(u)return i.flags&256?(i.flags&=-257,c=pl(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=yl(k),i.memoizedState=Tl,y);if((i.mode&1)===0)return eu(r,i,k,null);if(m.data==="$!"){if(c=m.nextSibling&&m.nextSibling.dataset,c)var L=c.dgst;return c=L,y=Error(n(419)),c=pl(y,c,void 0),eu(r,i,k,c)}if(L=(k&r.childLanes)!==0,Pt||L){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 Ml(),c=pl(Error(n(421))),eu(r,i,k,c)}return m.data==="$?"?(i.flags|=128,i.child=r.child,i=AT.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++]=Ar,Fn=r.id,Bn=r.overflow,Ar=i),i=xl(i,c.children),i.flags|=4096,i)}function Fh(r,i,u){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Xo(r.return,i,u)}function bl(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),bl(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}bl(i,!0,u,null,y);break;case"together":bl(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 gT(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:el(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,kl,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}},kl=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(W in m)if(!c.hasOwnProperty(W)&&m.hasOwnProperty(W)&&m[W]!=null)if(W==="style"){var L=m[W];for(k in L)L.hasOwnProperty(k)&&(u||(u={}),u[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(a.hasOwnProperty(W)?y||(y=[]):(y=y||[]).push(W,null));for(W in c){var M=c[W];if(L=m!=null?m[W]:void 0,c.hasOwnProperty(W)&&M!==L&&(M!=null||L!=null))if(W==="style")if(L){for(k in L)!L.hasOwnProperty(k)||M&&M.hasOwnProperty(k)||(u||(u={}),u[k]="");for(k in M)M.hasOwnProperty(k)&&L[k]!==M[k]&&(u||(u={}),u[k]=M[k])}else u||(y||(y=[]),y.push(W,u)),u=M;else W==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,L=L?L.__html:void 0,M!=null&&L!==M&&(y=y||[]).push(W,M)):W==="children"?typeof M!="string"&&typeof M!="number"||(y=y||[]).push(W,""+M):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(a.hasOwnProperty(W)?(M!=null&&W==="onScroll"&&Qe("scroll",r),y||L===M||(y=[])):(y=y||[]).push(W,M))}u&&(y=y||[]).push("style",u);var W=y;(i.updateQueue=W)&&(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 ET(r,i,u){var c=i.pendingProps;switch(Wo(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),rl(),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&&(Ol(ln),ln=null))),kl(r,i),Ct(i),null;case 5:tl(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 L=y[k];k==="children"?typeof L=="string"?c.textContent!==L&&(y.suppressHydrationWarning!==!0&&Oa(c.textContent,L,r),m=["children",L]):typeof L=="number"&&c.textContent!==""+L&&(y.suppressHydrationWarning!==!0&&Oa(c.textContent,L,r),m=["children",""+L]):a.hasOwnProperty(k)&&L!=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),L=m;for(y in L)if(L.hasOwnProperty(y)){var M=L[y];y==="style"?Qn(r,M):y==="dangerouslySetInnerHTML"?(M=M?M.__html:void 0,M!=null&&Oe(r,M)):y==="children"?typeof M=="string"?(u!=="textarea"||M!=="")&&Ue(r,M):typeof M=="number"&&Ue(r,""+M):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(a.hasOwnProperty(y)?M!=null&&y==="onScroll"&&Qe("scroll",r):M!=null&&z(r,y,M,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&&(Ol(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):Ml())),i.updateQueue!==null&&(i.flags|=4),Ct(i),null);case 4:return xi(),kl(r,i),r===null&&us(i.stateNode.containerInfo),Ct(i),null;case 10:return Ko(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 Pl(),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 TT(r,i){switch(Wo(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),rl(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return tl(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 Ko(i.type._context),null;case 22:case 23:return Pl(),null;case 24:return null;default:return null}}var nu=!1,Nt=!1,yT=typeof WeakSet=="function"?WeakSet:Set,pe=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 Sl(r,i,u){try{u()}catch(c){tt(r,i,c)}}var zh=!1;function xT(r,i){if(Po=ka,r=xf(),vo(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,L=-1,M=-1,W=0,J=0,ne=r,G=null;t:for(;;){for(var fe;ne!==u||m!==0&&ne.nodeType!==3||(L=k+m),ne!==y||c!==0&&ne.nodeType!==3||(M=k+c),ne.nodeType===3&&(k+=ne.nodeValue.length),(fe=ne.firstChild)!==null;)G=ne,ne=fe;for(;;){if(ne===r)break t;if(G===u&&++W===m&&(L=k),G===y&&++J===c&&(M=k),(fe=ne.nextSibling)!==null)break;ne=G,G=ne.parentNode}ne=fe}u=L===-1||M===-1?null:{start:L,end:M}}else u=null}u=u||{start:0,end:0}}else u=null;for(Mo={focusedElem:r,selectionRange:u},ka=!1,pe=i;pe!==null;)if(i=pe,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,pe=r;else for(;pe!==null;){i=pe;try{var ge=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(ge!==null){var Ee=ge.memoizedProps,it=ge.memoizedState,j=i.stateNode,B=j.getSnapshotBeforeUpdate(i.elementType===i.type?Ee:cn(i.type,Ee),it);j.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var $=i.stateNode.containerInfo;$.nodeType===1?$.textContent="":$.nodeType===9&&$.documentElement&&$.removeChild($.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ue){tt(i,i.return,ue)}if(r=i.sibling,r!==null){r.return=i.return,pe=r;break}pe=i.return}return ge=zh,zh=!1,ge}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&&Sl(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 _l(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[jo],delete i[nT],delete i[rT])),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 Cl(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(Cl(r,i,u),r=r.sibling;r!==null;)Cl(r,i,u),r=r.sibling}function Nl(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(Nl(r,i,u),r=r.sibling;r!==null;)Nl(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?Uo(r.parentNode,u):r.nodeType===1&&Uo(r,u),Ji(r)):Uo(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)&&Sl(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(L){tt(u,i,L)}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 yT),i.forEach(function(c){var m=wT.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,L=k;e:for(;L!==null;){switch(L.tag){case 5:yt=L.stateNode,dn=!1;break e;case 3:yt=L.stateNode.containerInfo,dn=!0;break e;case 4:yt=L.stateNode.containerInfo,dn=!0;break e}L=L.return}if(yt===null)throw Error(n(160));Vh(y,k,m),yt=null,dn=!1;var M=m.alternate;M!==null&&(M.return=null),m.return=null}catch(W){tt(m,i,W)}}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),vn(r),c&4){try{xs(3,r,r.return),ru(3,r)}catch(Ee){tt(r,r.return,Ee)}try{xs(5,r,r.return)}catch(Ee){tt(r,r.return,Ee)}}break;case 1:fn(i,r),vn(r),c&512&&u!==null&&ki(u,u.return);break;case 5:if(fn(i,r),vn(r),c&512&&u!==null&&ki(u,u.return),r.flags&32){var m=r.stateNode;try{Ue(m,"")}catch(Ee){tt(r,r.return,Ee)}}if(c&4&&(m=r.stateNode,m!=null)){var y=r.memoizedProps,k=u!==null?u.memoizedProps:y,L=r.type,M=r.updateQueue;if(r.updateQueue=null,M!==null)try{L==="input"&&y.type==="radio"&&y.name!=null&&Hi(m,y),kn(L,k);var W=kn(L,y);for(k=0;k<M.length;k+=2){var J=M[k],ne=M[k+1];J==="style"?Qn(m,ne):J==="dangerouslySetInnerHTML"?Oe(m,ne):J==="children"?Ue(m,ne):z(m,J,ne,W)}switch(L){case"input":ei(m,y);break;case"textarea":da(m,y);break;case"select":var G=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!y.multiple;var fe=y.value;fe!=null?qn(m,!!y.multiple,fe,!1):G!==!!y.multiple&&(y.defaultValue!=null?qn(m,!!y.multiple,y.defaultValue,!0):qn(m,!!y.multiple,y.multiple?[]:"",!1))}m[ls]=y}catch(Ee){tt(r,r.return,Ee)}}break;case 6:if(fn(i,r),vn(r),c&4){if(r.stateNode===null)throw Error(n(162));m=r.stateNode,y=r.memoizedProps;try{m.nodeValue=y}catch(Ee){tt(r,r.return,Ee)}}break;case 3:if(fn(i,r),vn(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{Ji(i.containerInfo)}catch(Ee){tt(r,r.return,Ee)}break;case 4:fn(i,r),vn(r);break;case 13:fn(i,r),vn(r),m=r.child,m.flags&8192&&(y=m.memoizedState!==null,m.stateNode.isHidden=y,!y||m.alternate!==null&&m.alternate.memoizedState!==null||(wl=rt())),c&4&&qh(r);break;case 22:if(J=u!==null&&u.memoizedState!==null,r.mode&1?(Nt=(W=Nt)||J,fn(i,r),Nt=W):fn(i,r),vn(r),c&8192){if(W=r.memoizedState!==null,(r.stateNode.isHidden=W)&&!J&&(r.mode&1)!==0)for(pe=r,J=r.child;J!==null;){for(ne=pe=J;pe!==null;){switch(G=pe,fe=G.child,G.tag){case 0:case 11:case 14:case 15:xs(4,G,G.return);break;case 1:ki(G,G.return);var ge=G.stateNode;if(typeof ge.componentWillUnmount=="function"){c=G,u=G.return;try{i=c,ge.props=i.memoizedProps,ge.state=i.memoizedState,ge.componentWillUnmount()}catch(Ee){tt(c,u,Ee)}}break;case 5:ki(G,G.return);break;case 22:if(G.memoizedState!==null){Xh(ne);continue}}fe!==null?(fe.return=G,pe=fe):Xh(ne)}J=J.sibling}e:for(J=null,ne=r;;){if(ne.tag===5){if(J===null){J=ne;try{m=ne.stateNode,W?(y=m.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(L=ne.stateNode,M=ne.memoizedProps.style,k=M!=null&&M.hasOwnProperty("display")?M.display:null,L.style.display=Kt("display",k))}catch(Ee){tt(r,r.return,Ee)}}}else if(ne.tag===6){if(J===null)try{ne.stateNode.nodeValue=W?"":ne.memoizedProps}catch(Ee){tt(r,r.return,Ee)}}else if((ne.tag!==22&&ne.tag!==23||ne.memoizedState===null||ne===r)&&ne.child!==null){ne.child.return=ne,ne=ne.child;continue}if(ne===r)break e;for(;ne.sibling===null;){if(ne.return===null||ne.return===r)break e;J===ne&&(J=null),ne=ne.return}J===ne&&(J=null),ne.sibling.return=ne.return,ne=ne.sibling}}break;case 19:fn(i,r),vn(r),c&4&&qh(r);break;case 21:break;default:fn(i,r),vn(r)}}function vn(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&&(Ue(m,""),c.flags&=-33);var y=Yh(r);Nl(r,y,m);break;case 3:case 4:var k=c.stateNode.containerInfo,L=Yh(r);Cl(r,L,k);break;default:throw Error(n(161))}}catch(M){tt(r,r.return,M)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function bT(r,i,u){pe=r,Gh(r)}function Gh(r,i,u){for(var c=(r.mode&1)!==0;pe!==null;){var m=pe,y=m.child;if(m.tag===22&&c){var k=m.memoizedState!==null||nu;if(!k){var L=m.alternate,M=L!==null&&L.memoizedState!==null||Nt;L=nu;var W=Nt;if(nu=k,(Nt=M)&&!W)for(pe=m;pe!==null;)k=pe,M=k.child,k.tag===22&&k.memoizedState!==null?Jh(m):M!==null?(M.return=k,pe=M):Jh(m);for(;y!==null;)pe=y,Gh(y),y=y.sibling;pe=m,nu=L,Nt=W}Kh(r)}else(m.subtreeFlags&8772)!==0&&y!==null?(y.return=m,pe=y):Kh(r)}}function Kh(r){for(;pe!==null;){var i=pe;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 L=i.stateNode;if(u===null&&i.flags&4){u=L;var M=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":M.autoFocus&&u.focus();break;case"img":M.src&&(u.src=M.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var W=i.alternate;if(W!==null){var J=W.memoizedState;if(J!==null){var ne=J.dehydrated;ne!==null&&Ji(ne)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Nt||i.flags&512&&_l(i)}catch(G){tt(i,i.return,G)}}if(i===r){pe=null;break}if(u=i.sibling,u!==null){u.return=i.return,pe=u;break}pe=i.return}}function Xh(r){for(;pe!==null;){var i=pe;if(i===r){pe=null;break}var u=i.sibling;if(u!==null){u.return=i.return,pe=u;break}pe=i.return}}function Jh(r){for(;pe!==null;){var i=pe;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{ru(4,i)}catch(M){tt(i,u,M)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var m=i.return;try{c.componentDidMount()}catch(M){tt(i,m,M)}}var y=i.return;try{_l(i)}catch(M){tt(i,y,M)}break;case 5:var k=i.return;try{_l(i)}catch(M){tt(i,k,M)}}}catch(M){tt(i,i.return,M)}if(i===r){pe=null;break}var L=i.sibling;if(L!==null){L.return=i.return,pe=L;break}pe=i.return}}var kT=Math.ceil,iu=K.ReactCurrentDispatcher,vl=K.ReactCurrentOwner,tn=K.ReactCurrentBatchConfig,je=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,wl=0,_i=1/0,zn=null,au=!1,Il=null,or=null,uu=!1,lr=null,ou=0,Ss=0,Ll=null,lu=-1,cu=0;function Lt(){return(je&6)!==0?rt():lu!==-1?lu:lu=rt()}function cr(r){return(r.mode&1)===0?1:(je&2)!==0&&xt!==0?xt&-xt:sT.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,Ll=null,Error(n(185));qi(r,u,c),((je&2)===0||r!==ht)&&(r===ht&&((je&2)===0&&(su|=u),ct===4&&dr(r,xt)),Ft(r,c),u===1&&je===0&&(i.mode&1)===0&&(_i=rt()+500,Ba&&ir()))}function Ft(r,i){var u=r.callbackNode;sE(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?iT(ep.bind(null,r)):Uf(ep.bind(null,r)),eT(function(){(je&6)===0&&ir()}),u=null;else{switch(Yd(c)){case 1:u=lo;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,(je&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=je;je|=2;var y=np();(ht!==r||xt!==i)&&(zn=null,_i=rt()+500,Pr(r,i));do try{CT();break}catch(L){tp(r,L)}while(!0);Go(),iu.current=y,je=m,ut!==null?i=0:(ht=null,xt=0,i=ct)}if(i!==0){if(i===2&&(m=co(r),m!==0&&(c=m,i=Rl(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&&!ST(m)&&(i=du(r,c),i===2&&(y=co(r),y!==0&&(c=y,i=Rl(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=wl+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=Bo(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*kT(c/1960))-c,10<c){r.timeoutHandle=Bo(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 Rl(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&&Ol(i)),r}function Ol(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function ST(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((je&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=co(r);c!==0&&(i=c,u=Rl(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 Dl(r,i){var u=je;je|=1;try{return r(i)}finally{je=u,je===0&&(_i=rt()+500,Ba&&ir())}}function Dr(r){lr!==null&&lr.tag===0&&(je&6)===0&&Ci();var i=je;je|=1;var u=tn.transition,c=We;try{if(tn.transition=null,We=1,r)return r()}finally{We=c,tn.transition=u,je=i,(je&6)===0&&ir()}}function Pl(){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,ZE(u)),ut!==null)for(u=ut.return;u!==null;){var c=u;switch(Wo(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Ma();break;case 3:xi(),Ge(Ot),Ge(St),rl();break;case 5:tl(c);break;case 4:xi();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:Ko(c.type._context);break;case 22:case 23:Pl()}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(Go(),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,vl.current=null,u===null||u.return===null){ct=1,bs=i,ut=null;break}e:{var y=r,k=u.return,L=u,M=i;if(i=xt,L.flags|=32768,M!==null&&typeof M=="object"&&typeof M.then=="function"){var W=M,J=L,ne=J.tag;if((J.mode&1)===0&&(ne===0||ne===11||ne===15)){var G=J.alternate;G?(J.updateQueue=G.updateQueue,J.memoizedState=G.memoizedState,J.lanes=G.lanes):(J.updateQueue=null,J.memoizedState=null)}var fe=Nh(k);if(fe!==null){fe.flags&=-257,vh(fe,k,L,y,i),fe.mode&1&&Ch(y,W,i),i=fe,M=W;var ge=i.updateQueue;if(ge===null){var Ee=new Set;Ee.add(M),i.updateQueue=Ee}else ge.add(M);break e}else{if((i&1)===0){Ch(y,W,i),Ml();break e}M=Error(n(426))}}else if(Xe&&L.mode&1){var it=Nh(k);if(it!==null){(it.flags&65536)===0&&(it.flags|=256),vh(it,k,L,y,i),qo(bi(M,L));break e}}y=M=bi(M,L),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,M,i);Kf(y,j);break e;case 1:L=M;var B=y.type,$=y.stateNode;if((y.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||$!==null&&typeof $.componentDidCatch=="function"&&(or===null||!or.has($)))){y.flags|=65536,i&=-i,y.lanes|=i;var ue=_h(y,L,i);Kf(y,ue);break e}}y=y.return}while(y!==null)}ip(u)}catch(Te){i=Te,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 Ml(){(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=je;je|=2;var c=np();(ht!==r||xt!==i)&&(zn=null,Pr(r,i));do try{_T();break}catch(m){tp(r,m)}while(!0);if(Go(),je=u,iu.current=c,ut!==null)throw Error(n(261));return ht=null,xt=0,ct}function _T(){for(;ut!==null;)rp(ut)}function CT(){for(;ut!==null&&!Kg();)rp(ut)}function rp(r){var i=up(r.alternate,r,Vt);r.memoizedProps=r.pendingProps,i===null?ip(r):ut=i,vl.current=null}function ip(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=ET(u,i,Vt),u!==null){ut=u;return}}else{if(u=TT(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,NT(r,i,u,c)}finally{tn.transition=m,We=c}return null}function NT(r,i,u,c){do Ci();while(lr!==null);if((je&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(aE(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 L=je;je|=4,vl.current=null,xT(r,u),Qh(u,r),VE(Mo),ka=!!Po,Mo=Po=null,r.current=u,bT(u),Xg(),je=L,We=k,tn.transition=y}else r.current=u;if(uu&&(uu=!1,lr=r,ou=m),y=r.pendingLanes,y===0&&(or=null),eE(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=Il,Il=null,r;return(ou&1)!==0&&r.tag!==0&&Ci(),y=r.pendingLanes,(y&1)!==0?r===Ll?Ss++:(Ss=0,Ll=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,(je&6)!==0)throw Error(n(331));var m=je;for(je|=4,pe=r.current;pe!==null;){var y=pe,k=y.child;if((pe.flags&16)!==0){var L=y.deletions;if(L!==null){for(var M=0;M<L.length;M++){var W=L[M];for(pe=W;pe!==null;){var J=pe;switch(J.tag){case 0:case 11:case 15:xs(8,J,y)}var ne=J.child;if(ne!==null)ne.return=J,pe=ne;else for(;pe!==null;){J=pe;var G=J.sibling,fe=J.return;if($h(J),J===W){pe=null;break}if(G!==null){G.return=fe,pe=G;break}pe=fe}}}var ge=y.alternate;if(ge!==null){var Ee=ge.child;if(Ee!==null){ge.child=null;do{var it=Ee.sibling;Ee.sibling=null,Ee=it}while(Ee!==null)}}pe=y}}if((y.subtreeFlags&2064)!==0&&k!==null)k.return=y,pe=k;else e:for(;pe!==null;){if(y=pe,(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,pe=j;break e}pe=y.return}}var B=r.current;for(pe=B;pe!==null;){k=pe;var $=k.child;if((k.subtreeFlags&2064)!==0&&$!==null)$.return=k,pe=$;else e:for(k=B;pe!==null;){if(L=pe,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:ru(9,L)}}catch(Te){tt(L,L.return,Te)}if(L===k){pe=null;break e}var ue=L.sibling;if(ue!==null){ue.return=L.return,pe=ue;break e}pe=L.return}}if(je=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 vT(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()-wl?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 AT(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),ap(r,u)}function wT(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,gT(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=al(null,i,c,r,m,u);var y=ul();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,Zo(i),m.updater=Za,i.stateNode=m,m._reactInternals=i,hl(i,c,r,u),i=El(null,i,c,!0,y,u)):(i.tag=0,Xe&&y&&$o(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=LT(c),r=cn(c,r),m){case 0:i=gl(null,i,c,r,u);break e;case 1:i=Oh(null,i,c,r,u);break e;case 11:i=Ah(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),gl(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&&Vo(i),c=i.type,m=i.pendingProps,y=r!==null?r.memoizedProps:null,k=m.children,Fo(c,m)?k=null:y!==null&&Fo(c,y)&&(i.flags|=32),Rh(r,i),It(r,i,k,u),i.child;case 6:return r===null&&Vo(i),null;case 13:return Mh(r,i,u);case 4:return el(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),Ah(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 L=y.dependencies;if(L!==null){k=y.child;for(var M=L.firstContext;M!==null;){if(M.context===c){if(y.tag===1){M=jn(-1,u&-u),M.tag=2;var W=y.updateQueue;if(W!==null){W=W.shared;var J=W.pending;J===null?M.next=M:(M.next=J.next,J.next=M),W.pending=M}}y.lanes|=u,M=y.alternate,M!==null&&(M.lanes|=u),Xo(y.return,u,i),L.lanes|=u;break}M=M.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,L=k.alternate,L!==null&&(L.lanes|=u),Xo(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),hl(i,c,m,u),El(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 IT(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 IT(r,i,u,c)}function Fl(r){return r=r.prototype,!(!r||!r.isReactComponent)}function LT(r){if(typeof r=="function")return Fl(r)?1:0;if(r!=null){if(r=r.$$typeof,r===te)return 11;if(r===ie)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")Fl(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case Q:return Fr(u.children,m,y,i);case ae:k=8,m|=8;break;case ce:return r=nn(12,u,i,m|2),r.elementType=ce,r.lanes=y,r;case xe:return r=nn(13,u,i,m),r.elementType=xe,r.lanes=y,r;case de:return r=nn(19,u,i,m),r.elementType=de,r.lanes=y,r;case we:return hu(u,m,y,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case U:k=10;break e;case ee:k=9;break e;case te:k=11;break e;case ie:k=14;break e;case Ne: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=we,r.lanes=u,r.stateNode={isHidden:!1},r}function Bl(r,i,u){return r=nn(6,r,null,i),r.lanes=u,r}function Ul(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 RT(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=fo(0),this.expirationTimes=fo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fo(0),this.identifierPrefix=c,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function jl(r,i,u,c,m,y,k,L,M){return r=new RT(r,i,u,L,M),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},Zo(y),r}function OT(r,i,u){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:D,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,L,M){return r=jl(u,c,!0,r,m,y,k,L,M),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 Hl(r,i){dp(r,i),(r=r.alternate)&&dp(r,i)}function DT(){return null}var fp=typeof reportError=="function"?reportError:function(r){console.error(r)};function zl(r){this._internalRoot=r}gu.prototype.render=zl.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));pu(r,i,null,null)},gu.prototype.unmount=zl.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 $l(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 PT(r,i,u,c,m){if(m){if(typeof c=="function"){var y=c;c=function(){var W=mu(k);y.call(W)}}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 L=c;c=function(){var W=mu(M);L.call(W)}}var M=jl(r,0,!1,null,null,!1,!1,"",hp);return r._reactRootContainer=M,r[Pn]=M.current,us(r.nodeType===8?r.parentNode:r),Dr(function(){pu(i,M,u,c)}),M}function Tu(r,i,u,c,m){var y=u._reactRootContainer;if(y){var k=y;if(typeof m=="function"){var L=m;m=function(){var M=mu(k);L.call(M)}}pu(i,k,r,m)}else k=PT(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&&(ho(i,u|1),Ft(i,rt()),(je&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)}}),Hl(r,1)}},po=function(r){if(r.tag===13){var i=Un(r,134217728);if(i!==null){var u=Lt();hn(i,r,134217728,u)}Hl(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)}Hl(r,i)}},Qd=function(){return We},Gd=function(r,i){var u=We;try{return We=r,i()}finally{We=u}},so=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=Dl,Dd=Dr;var MT={usingClientEntryPoint:!1,Events:[cs,di,Pa,Ld,Rd,Dl]},_s={findFiberByHostInstance:Nr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},FT={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:K.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Bd(r),r===null?null:r.stateNode},findFiberByHostInstance:_s.findFiberByHostInstance||DT,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(FT),Sn=yu}catch{}}return Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=MT,Bt.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$l(i))throw Error(n(200));return OT(r,i,null,u)},Bt.createRoot=function(r,i){if(!$l(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=jl(r,1,!1,null,null,u,!1,c,m),r[Pn]=i.current,us(r.nodeType===8?r.parentNode:r),new zl(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(!$l(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=Dl,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 Vl.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(),Vl.exports=VT(),Vl.exports}var kp;function qT(){if(kp)return xu;kp=1;var e=d0();return xu.createRoot=e.createRoot,xu.hydrateRoot=e.hydrateRoot,xu}var QT=qT();/**
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 GT(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 KT(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 JT(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 XT(){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||XT(),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 JT(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(),w=O==null?null:O-h;h=O,f&&f({action:d,location:I.location,delta:w})}function x(O,w){d="PUSH";let F=_p(O)?O:_c(I.location,O,w);h=E()+1;let z=Cp(F,h),K=I.createHref(F.mask||F);try{l.pushState(z,"",K)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;a.location.assign(K)}o&&f&&f({action:d,location:I.location,delta:1})}function b(O,w){d="REPLACE";let F=_p(O)?O:_c(I.location,O,w);h=E();let z=Cp(F,h),K=I.createHref(F.mask||F);l.replaceState(z,"",K),o&&f&&f({action:d,location:I.location,delta:0})}function N(O){return ZT(a,O)}let I={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:N,encodeLocation(O){let w=N(O);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:x,replace:b,go(O){return l.go(O)}};return I}function ZT(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 ey(e,t,n,!1)}function ey(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=ty(e),f=null,h=T0(l);for(let E=0;f==null&&E<d.length;++E)f=dy(d[E],h,s);return f}function ty(e){let t=p0(e);return ny(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:ly(g,l.index),routesMeta:x.map((b,N)=>{let[I,O]=E0(b.relativePath,b.caseSensitive,N===x.length-1);return{...b,matcher:I,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 ny(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:cy(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var ry=/^:[\w-]+$/,iy=3,sy=2,ay=1,uy=10,oy=-2,Np=e=>e==="*";function ly(e,t){let n=e.split("/"),s=n.length;return n.some(Np)&&(s+=oy),t&&(s+=sy),n.filter(a=>!Np(a)).reduce((a,o)=>a+(ry.test(o)?iy:o===""?ay:uy),s)}function cy(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 dy(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:py(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 N=d[x]||"";l=o.slice(0,o.length-N.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 fy(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Ri(e):e,o;return n?(n=y0(n),n.startsWith("/")?o=vp(n.substring(1),"/"):o=vp(n,t)):o=t,{pathname:o,search:my(s),hash:gy(a)}}function vp(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 Gl(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 hy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Gc(e){let t=hy(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function zu(e,t,n,s=!1){let a;typeof e=="string"?a=Ri(e):(a={...e},Ke(!a.pathname||!a.pathname.includes("?"),Gl("?","pathname","search",a)),Ke(!a.pathname||!a.pathname.includes("#"),Gl("#","pathname","hash",a)),Ke(!a.search||!a.search.includes("#"),Gl("#","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=fy(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(/\/+$/,""),py=e=>Ou(e).replace(/^\/*/,"/"),my=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Ey=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 Ty(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function yy(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(GT(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 xy=["GET",...k0];new Set(xy);var by=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function ky(e){try{return by.includes(new URL(e).protocol)}catch{return!1}}var Oi=A.createContext(null);Oi.displayName="DataRouter";var $u=A.createContext(null);$u.displayName="DataRouterState";var S0=A.createContext(!1);function Sy(){return A.useContext(S0)}var _0=A.createContext({isTransitioning:!1});_0.displayName="ViewTransition";var _y=A.createContext(new Map);_y.displayName="Fetchers";var Cy=A.createContext(null);Cy.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",Ny="REDIRECT",vy="ROUTE_ERROR_RESPONSE";function Ay(e){if(e.startsWith(`${C0}:${Ny}:{`))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 wy(e){if(e.startsWith(`${C0}:${vy}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ey(t.status,t.statusText,t.data)}catch{}}function Iy(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 Ly(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 v0(e){A.useContext(Gt).static||A.useLayoutEffect(e)}function Xc(){let{isDataRoute:e}=A.useContext(In);return e?Wy():Ry()}function Ry(){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 v0(()=>{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=zu(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(()=>zu(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function Oy(e,t){return A0(e,t)}function A0(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 w=h&&h.path||"";I0(d,!h||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${w}">) 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="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let E=xn(),g;if(t){let w=typeof t=="string"?Ri(t):t;Ke(f==="/"||((O=w.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 "${w.pathname}" was given in the \`location\` prop.`),g=w}else g=E;let x=g.pathname||"/",b=x;if(f!=="/"){let w=f.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(w.length).join("/")}let N=n&&n.state.matches.length?n.state.matches.map(w=>Object.assign(w,{route:n.manifest[w.route.id]||w.route})):h0(e,{pathname:b});yn(h||N!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),yn(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.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 I=By(N&&N.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:gn([f,s.encodeLocation?s.encodeLocation(w.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:gn([f,s.encodeLocation?s.encodeLocation(w.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),a,n);return t&&I?A.createElement(Js.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},I):I}function Dy(){let e=$y(),t=Ty(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 Py=A.createElement(Dy,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=wy(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(My,{error:e},t):t}};w0.contextType=S0;var Kl=new WeakMap;function My({children:e,error:t}){let{basename:n}=A.useContext(Gt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Ay(t.digest);if(s){let a=Kl.get(t);if(a)throw a;let o=b0(s.location,n),l=o.absoluteURL||o.to;if(ky(l))throw new Error("Invalid redirect location");if(x0&&!Kl.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 Kl.set(t,d),d}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Fy({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 By(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,N=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!b||b[g.route.id]===void 0);if(g.route.lazy||N){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:yy(s.matches),errorInfo:g})}:void 0;return a.reduceRight((E,g,x)=>{let b,N=!1,I=null,O=null;s&&(b=o&&g.route.id?o[g.route.id]:void 0,I=g.route.errorElement||Py,l&&(d<0&&x===0?(I0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),N=!0,O=null):d===x&&(N=!0,O=g.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,x+1)),F=()=>{let z;return b?z=I:N?z=O:g.route.Component?z=A.createElement(g.route.Component,null):g.route.element?z=g.route.element:z=E,A.createElement(Fy,{match:g,routeContext:{outlet:E,matches:w,isDataRoute:s!=null},children:z})};return s&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?A.createElement(w0,{location:s.location,revalidation:s.revalidation,component:I,error:b,children:F(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:h}):F()},null)}function Jc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uy(e){let t=A.useContext(Oi);return Ke(t,Jc(e)),t}function jy(e){let t=A.useContext($u);return Ke(t,Jc(e)),t}function Hy(e){let t=A.useContext(In);return Ke(t,Jc(e)),t}function Zc(e){let t=Hy(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 zy(){return Zc("useRouteId")}function $y(){var s;let e=A.useContext(Kc),t=jy("useRouteError"),n=Zc("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function Wy(){let{router:e}=Uy("useNavigate"),t=Zc("useNavigate"),n=A.useRef(!1);return v0(()=>{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 Ap={};function I0(e,t,n){!t&&!Ap[e]&&(Ap[e]=!0,yn(!1,n))}A.memo(Yy);function Yy({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:o}){return A0(e,void 0,{manifest:t,state:s,isStatic:a,onError:o})}function Vy({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=zu(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 qy({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:N}=n,I=A.useMemo(()=>{let O=Wn(h,d);return O==null?null:{location:{pathname:O,search:E,hash:g,state:x,key:b,mask:N},navigationType:s}},[d,h,E,g,x,b,s,N]);return yn(I!=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.`),I==null?null:A.createElement(Gt.Provider,{value:f},A.createElement(Js.Provider,{children:t,value:I}))}function Qy({children:e,location:t}){return Oy(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 vu="get",Au="application/x-www-form-urlencoded";function Wu(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Gy(e){return Wu(e)&&e.tagName.toLowerCase()==="button"}function Ky(e){return Wu(e)&&e.tagName.toLowerCase()==="form"}function Xy(e){return Wu(e)&&e.tagName.toLowerCase()==="input"}function Jy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zy(e,t){return e.button===0&&(!t||t==="_self")&&!Jy(e)}var bu=null;function e2(){if(bu===null)try{new FormData(document.createElement("form"),0),bu=!1}catch{bu=!0}return bu}var t2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xl(e){return e!=null&&!t2.has(e)?(yn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Au}"`),null):e}function n2(e,t){let n,s,a,o,l;if(Ky(e)){let d=e.getAttribute("action");s=d?Wn(d,t):null,n=e.getAttribute("method")||vu,a=Xl(e.getAttribute("enctype"))||Au,o=new FormData(e)}else if(Gy(e)||Xy(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")||vu,a=Xl(e.getAttribute("formenctype"))||Xl(d.getAttribute("enctype"))||Au,o=new FormData(d,e),!e2()){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(Wu(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=vu,s=null,a=Au,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 r2(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 i2(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 s2(e,t,n){let s=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await r2(o,n);return l.links?l.links():[]}return[]}));return l2(s.flat(1).filter(i2).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 a2(e,t,{includeHydrateFallback:n}={}){return u2(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 u2(e){return[...new Set(e)]}function o2(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function l2(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let o=JSON.stringify(o2(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 c2(){let e=A.useContext($u);return ed(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var nd=A.createContext(void 0);nd.displayName="FrameworkContext";function Yu(){let e=A.useContext(nd);return ed(e,"You must render this element inside a <HydratedRouter> element"),e}function d2(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 I=w=>{w.forEach(F=>{l(F.isIntersecting)})},O=new IntersectionObserver(I,{threshold:.5});return x.current&&O.observe(x.current),()=>{O.disconnect()}}},[e]),A.useEffect(()=>{if(s){let I=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(I)}}},[s]);let b=()=>{a(!0)},N=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Ns(d,b),onBlur:Ns(f,N),onMouseEnter:Ns(h,b),onMouseLeave:Ns(E,N),onTouchStart:Ns(g,b)}]:[!1,x,{}]}function Ns(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function f2({page:e,...t}){let n=Sy(),{nonce:s}=Yu(),{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(p2,{page:e,matches:o,...t}):A.createElement(m2,{page:e,matches:o,...t})):null}function h2(e){let{manifest:t,routeModules:n}=Yu(),[s,a]=A.useState([]);return A.useEffect(()=>{let o=!1;return s2(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),s}function p2({page:e,matches:t,...n}){let s=xn(),{future:a}=Yu(),{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 m2({page:e,matches:t,...n}){let s=xn(),{future:a,manifest:o,routeModules:l}=Yu(),{basename:d}=td(),{loaderData:f,matches:h}=c2(),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 I=new Set,O=!1;if(t.forEach(F=>{var K;let z=o.routes[F.route.id];!z||!z.hasLoader||(!E.some(Z=>Z.route.id===F.route.id)&&F.route.id in f&&((K=l[F.route.id])!=null&&K.shouldRevalidate)||z.hasClientLoader?O=!0:I.add(F.route.id))}),I.size===0)return[];let w=L0(e,d,a.v8_trailingSlashAwareDataRequests,"data");return O&&I.size>0&&w.searchParams.set("_routes",t.filter(F=>I.has(F.route.id)).map(F=>F.route.id).join(",")),[w.pathname+w.search]},[d,a.v8_trailingSlashAwareDataRequests,f,s,o,E,t,e,l]),b=A.useMemo(()=>a2(g,o),[g,o]),N=h2(g);return A.createElement(A.Fragment,null,x.map(I=>A.createElement("link",{key:I,rel:"prefetch",as:"fetch",href:I,...n})),b.map(I=>A.createElement("link",{key:I,rel:"modulepreload",href:I,...n})),N.map(({key:I,link:O})=>A.createElement("link",{key:I,nonce:n.nonce,...O,crossOrigin:O.crossOrigin??n.crossOrigin})))}function g2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var E2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{E2&&(window.__reactRouterVersion="7.18.2")}catch{}function T2({basename:e,children:t,useTransitions:n,window:s}){let a=A.useRef();a.current==null&&(a.current=KT({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(qy,{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,...N},I){let{basename:O,navigator:w,useTransitions:F}=A.useContext(Gt),z=typeof E=="string"&&Qc.test(E),K=b0(E,O);E=K.to;let Z=Iy(E,{relative:a}),D=xn(),Q=null;if(d){let ie=zu(d,[],D.mask?D.mask.pathname:"/",!0);O!=="/"&&(ie.pathname=ie.pathname==="/"?O:gn([O,ie.pathname])),Q=w.createHref(ie)}let[ae,ce,U]=d2(s,N),ee=k2(E,{replace:l,mask:d,state:f,target:h,preventScrollReset:g,relative:a,viewTransition:x,defaultShouldRevalidate:b,useTransitions:F});function te(ie){t&&t(ie),ie.defaultPrevented||ee(ie)}let xe=!(K.isExternal||o),de=A.createElement("a",{...N,...U,href:(xe?Q:void 0)||K.absoluteURL||Z,onClick:xe?te:t,ref:g2(I,ce),target:h,"data-discover":!z&&n==="render"?"true":void 0});return ae&&!z?A.createElement(A.Fragment,null,de,A.createElement(f2,{page:Z})):de});rd.displayName="Link";var y2=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($u),{navigator:N,basename:I}=A.useContext(Gt),O=b!=null&&v2(g)&&d===!0,w=N.encodeLocation?N.encodeLocation(g).pathname:g.pathname,F=x.pathname,z=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;n||(F=F.toLowerCase(),z=z?z.toLowerCase():null,w=w.toLowerCase()),z&&I&&(z=Wn(z,I)||z);const K=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let Z=F===w||!a&&F.startsWith(w)&&F.charAt(K)==="/",D=z!=null&&(z===w||!a&&z.startsWith(w)&&z.charAt(w.length)==="/"),Q={isActive:Z,isPending:D,isTransitioning:O},ae=Z?t:void 0,ce;typeof s=="function"?ce=s(Q):ce=[s,Z?"active":null,D?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(Q):o;return A.createElement(rd,{...h,"aria-current":ae,className:ce,ref:E,style:U,to:l,viewTransition:d},typeof f=="function"?f(Q):f)});y2.displayName="NavLink";var x2=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:o,method:l=vu,action:d,onSubmit:f,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x,...b},N)=>{let{useTransitions:I}=A.useContext(Gt),O=C2(),w=N2(d,{relative:h}),F=l.toLowerCase()==="get"?"get":"post",z=typeof d=="string"&&Qc.test(d),K=Z=>{if(f&&f(Z),Z.defaultPrevented)return;Z.preventDefault();let D=Z.nativeEvent.submitter,Q=(D==null?void 0:D.getAttribute("formmethod"))||l,ae=()=>O(D||Z.currentTarget,{fetcherKey:t,method:Q,navigate:n,replace:a,state:o,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x});I&&n!==!1?A.startTransition(()=>ae()):ae()};return A.createElement("form",{ref:N,method:F,action:w,onSubmit:s?f:K,...b,"data-discover":!z&&e==="render"?"true":void 0})});x2.displayName="Form";function b2(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,b2(e)),t}function k2(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(Zy(b,t)){b.preventDefault();let N=n!==void 0?n:Ys(g)===Ys(x),I=()=>E(e,{replace:N,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f});h?A.startTransition(()=>I()):I()}},[g,E,x,n,s,a,t,e,o,l,d,f,h])}var S2=0,_2=()=>`__${String(++S2)}__`;function C2(){let{router:e}=R0("useSubmit"),{basename:t}=A.useContext(Gt),n=zy(),s=e.fetch,a=e.navigate;return A.useCallback(async(o,l={})=>{let{action:d,method:f,encType:h,formData:E,body:g}=n2(o,t);if(l.navigate===!1){let x=l.fetcherKey||_2();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 N2(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 v2(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},A2=(e=>e?Ip(e):Ip),w2=e=>e;function I2(e,t=w2){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=A2(e),n=s=>I2(t,s);return Object.assign(n,t),n},L2=(e=>e?Lp(e):Lp),Du="Attached files: ",R2=[".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".avif"];function O2(e){const t=e.split(`
53
+ `).find(n=>n.startsWith(Du));return t?t.slice(Du.length).split(", ").map(n=>n.trim()).filter(Boolean):[]}function D2(e){return O2(e).filter(t=>{const n=t.toLowerCase();return R2.some(s=>n.endsWith(s))})}function id(e){return e.split(`
54
+ `).filter(t=>!t.startsWith(Du)).join(`
55
+ `).trim()}function Rp(){return{turnStatus:"idle",creditsSpent:0,lastTurnCredits:0,contextUsagePercentage:0,lastTurnDurationMs:0,subagents:[],pendingStages:[],mcpServers:[],availableCommands:[],oauthPrompts:[],compacting:!1}}const Jl=60;function P2(e){const t=e.filter(o=>o.type==="text").map(o=>o.text).join(`
56
+ `),n=id(t).replace(/```[\s\S]*?```/g," ").replace(/\s+/g," ").trim();if(!n)return"";if(n.length<=Jl)return n.replace(/[.,;:!?]+$/,"");const s=n.slice(0,Jl),a=s.lastIndexOf(" ");return`${(a>Jl/2?s.slice(0,a):s).replace(/[.,;:!?]+$/,"")}…`}const M2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function O0(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(M2)}function F2(e,t,n){const s=e.find(a=>a.sessionId===t);return s?O0(e,{...s,updatedAt:n}):e}function D0(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 ke=L2((e,t)=>({sessions:[],models:[],agents:[],defaultAgentId:"kiro_default",activeId: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,loadingSessionId:null,sessions:O0(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)})),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,s)=>e(a=>({pending:[...a.pending,{id:n,text:s,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(I=>I.type==="text").map(I=>I.text).join(""),E=id(h),g=D2(h),x=s.pending.findIndex(I=>I.status==="sending"),b=new Date(n.ts).toISOString(),N=F2(s.sessions,n.sessionId,b);e({items:[...s.items,{type:"message",message:{id:`u-${n.seq}`,role:"user",text:E,timestamp:n.ts,imagePaths:g}}],pending:x===-1?s.pending:s.pending.filter((I,O)=>O!==x),sessions:N,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:[...Zl(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:Zl(s,`s-${n.seq}`,n.ts),sessionNotice:null,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"turn_error":{const h=D0(a.message);e({items:[...Zl(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":{const h=(a.params.meteringUsage??[]).reduce((E,g)=>E+g.value,0);e({observability:{...s.observability,contextUsagePercentage:a.params.contextUsagePercentage??s.observability.contextUsagePercentage,creditsSpent:h>0?s.observability.creditsSpent+h:s.observability.creditsSpent,lastTurnCredits:h>0?h:s.observability.lastTurnCredits,lastTurnDurationMs:a.params.turnDurationMs??s.observability.lastTurnDurationMs}});break}case"subagent_update":e({observability:{...s.observability,subagents:a.params.subagents,pendingStages:a.params.pendingStages}});break;case"mcp_health":{const h=s.observability.mcpServers.filter(E=>E.serverName!==a.params.serverName);h.push({serverName:a.params.serverName,status:a.ok?"initialized":"failed",error:a.params.error,updatedAt:n.ts}),e({observability:{...s.observability,mcpServers:h}});break}case"commands_available":e({observability:{...s.observability,availableCommands:a.params.commands}});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"oauth_request":e({observability:{...s.observability,oauthPrompts:[...s.observability.oauthPrompts,{serverName:a.params.serverName,url:a.params.url,createdAt:n.ts}]}});break;case"process_exited":e({observability:{...s.observability,turnStatus:"idle"}});break}}}));function Zl(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 B2(e){return bt("POST","/api/login",{token:e})}function U2(){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)=>`/api/sessions/${e}/download?path=${encodeURIComponent(t)}`,previewUrl:(e,t)=>`/api/sessions/${e}/preview?path=${encodeURIComponent(t)}`,attachmentUrl:(e,t)=>t.startsWith("/")?`/api/fs/image?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/sessions/${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},j2=8e3,P0=25e3,H2=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>j2:e.now-e.lastMessageAt>P0+H2}function z2(e){return e.state===wu.OPEN&&e.now-e.lastMessageAt>P0}const $2=1008;class W2{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():z2(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===$2){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){return this.send({type:"prompt",content:t})}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,n){this.send({type:"exec_command",command:t,args:n})}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",Y2=`${sd}/:sessionId`;function M0(e){return`${sd}/${encodeURIComponent(e)}`}const V2=`${sd}/new`,q2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",exec_command:"Command"};class Q2{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 W2(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 ke.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){this.isDraft=n,this.handledRoute!==t&&(this.handledRoute=t,t?this.openSession(t):(this.openTarget=null,this.closeSocket(),this.state.clearActive(),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)}},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({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(M0(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.setCreateError(null),(t=this.host)==null||t.navigate(V2)}send(t){const n=`pending-${this.msgSeq++}`,s=id(t.filter(o=>o.type==="text").map(o=>o.text).join(`
57
+ `)),a=t.some(o=>o.type==="image");if(this.state.addPending(n,s||(a?"[image]":"[attachment]")),this.isDraft){const{currentModeId:o,currentModelId:l}=this.state;this.createSession({agentId:o,modelId:l,title:P2(t)}).then(d=>{d?this.firstPrompt={id:n,content:t}:this.state.markPendingFailed(n,"Could not start the session.")});return}this.deliver(n,t)}deliver(t,n){var s;this.lastSent=t,!((s=this.socket)!=null&&s.prompt(n))&&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,n){this.state.markPendingSending(t),this.deliver(t,[{type:"text",text:n}])}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||ke.getState().activeId!==null}}const nt=new Q2;function F0(e){const t=e.trim().slice(0,4e3);return!t||!nt.canSend?!1:(nt.send([{type:"text",text:t}]),!0)}function B0({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 G2({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 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:"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 X2({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 U0({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 J2({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 Z2({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 ex({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 j0({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 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("circle",{cx:"11",cy:"11",r:"7"}),T.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function z0({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 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",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 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:"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 ec({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 vs=8,Mp=6;function $0({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+vs<=window.innerHeight?h:Math.max(vs,d.top-Mp-f.height),x=Math.min(Math.max(vs,d.right-f.width),Math.max(vs,window.innerWidth-f.width-vs));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(H0,{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 Ex(e){const t=Math.round((Date.now()-Date.parse(e))/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;const n=Math.round(t/60);return n<24?`${n}h ago`:`${Math.round(n/24)}d ago`}function Tx(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 yx({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:[Tx(h.userAgent),h.current&&T.jsx("span",{className:"device-badge",children:"This device"})]}),T.jsxs("span",{className:"device-sub",children:["Active ",Ex(h.lastSeenAt)]})]}),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 xx({title:e,message:t,confirmLabel:n="Confirm",cancelLabel:s="Cancel",danger:a=!1,onConfirm:o,onCancel:l}){return A.useEffect(()=>{const d=f=>{f.key==="Escape"&&l()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]),ea.createPortal(T.jsx("div",{className:"confirm-backdrop",onClick:d=>{d.target===d.currentTarget&&l()},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:l,children:s}),T.jsx("button",{className:a?"btn-danger":"btn-primary",onClick:o,autoFocus:!0,children:n})]})]})}),document.body)}function bx(e){const t=Date.parse(e);if(Number.isNaN(t))return"";const n=Math.round((Date.now()-t)/6e4);if(n<1)return"now";if(n<60)return`${n}m`;const s=Math.round(n/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}function kx({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),[N,I]=A.useState(null),[O,w]=A.useState(null),[F,z]=A.useState(null),[K,Z]=A.useState(null),[D,Q]=A.useState(""),ae=A.useCallback(()=>{I(null),w(null)},[]);A.useEffect(()=>{if(!x)return;const U=()=>b(!1);return document.addEventListener("click",U),()=>document.removeEventListener("click",U)},[x]);const ce=U=>{const ee=D.trim();ee&&l(U,ee),Z(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(ee=>!ee)},children:T.jsx(Z2,{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(H0,{size:20})}),T.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"New session",title:"New session",onClick:a,children:T.jsx(j0,{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":""} ${N===U.sessionId?"is-menu-open":""}`,children:[K===U.sessionId?T.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:ee=>ee.currentTarget.select(),value:D,onChange:ee=>Q(ee.target.value),onBlur:()=>ce(U.sessionId),onKeyDown:ee=>{ee.key==="Enter"&&ce(U.sessionId),ee.key==="Escape"&&Z(null)},onClick:ee=>ee.stopPropagation()}):T.jsx(rd,{className:"srow-open",to:M0(U.sessionId),onClick:ee=>{ee.metaKey||ee.ctrlKey||ee.shiftKey||ee.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:bx(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":N===U.sessionId,onClick:ee=>{ee.stopPropagation();const te=N===U.sessionId;w(te?null:ee.currentTarget),I(te?null:U.sessionId)},children:T.jsx(K2,{size:16})}),N===U.sessionId&&T.jsxs($0,{anchor:O,onClose:ae,children:[T.jsx("button",{className:"menu-item",onClick:()=>{Q(U.title),Z(U.sessionId),ae()},children:"Rename"}),T.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{ae(),z(U.sessionId)},children:"Delete"})]})]})]},U.sessionId))}),f&&T.jsx(gx,{sessions:e,onOpen:s,onClose:()=>h(!1)}),E&&T.jsx(yx,{onClose:()=>g(!1),onSelfRevoked:()=>{g(!1),d()}}),F&&T.jsx(xx,{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=F;z(null),o(U)},onCancel:()=>z(null)})]})}const Sx="modulepreload",_x=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=_x(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":Sx,E||(x.as="script"),x.crossOrigin="",x.href=h,f&&x.setAttribute("nonce",f),document.head.appendChild(x),E)return new Promise((b,N)=>{x.addEventListener("load",b),x.addEventListener("error",()=>N(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 W0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Cx=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Nx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vx={};function Up(e,t){return(vx.jsx?Nx:Cx).test(e)}const Ax=/[ \t\n\f\r]/g;function wx(e){return typeof e=="object"?e.type==="text"?jp(e.value):!1:jp(e)}function jp(e){return e.replace(Ax,"")===""}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 Y0(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 Ix=0;const Ie=Gr(),ot=Gr(),vc=Gr(),se=Gr(),Ye=Gr(),Wr=Gr(),qt=Gr();function Gr(){return 2**++Ix}const Ac=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:ot,commaOrSpaceSeparated:qt,commaSeparated:Wr,number:se,overloadedBoolean:vc,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),tc=Object.keys(Ac);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<tc.length;){const l=tc[o];Hp(this,tc[o],(s&Ac[l])===Ac[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 V0=Di({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,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:se,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Ye,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:ot,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function q0(e,t){return t in e?e[t]:t}function Q0(e,t){return q0(e,t.toLowerCase())}const Lx=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:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alpha:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:Ye,autoFocus:Ie,autoPlay:Ie,blocking:Ye,capture:null,charSet:null,checked:Ie,cite:null,className:Ye,closedBy:null,colorSpace:null,cols:se,colSpan:se,command:null,commandFor:null,content:null,contentEditable:ot,controls:Ie,controlsList:Ye,coords:se|Wr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:vc,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:Ye,height:se,hidden:vc,high:se,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:Ie,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:se,pattern:null,ping:Ye,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:Ye,required:Ie,reversed:Ie,rows:se,rowSpan:se,sandbox:Ye,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootCustomElementRegistry:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shadowRootSerializable:Ie,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:ot,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ie,disablePictureInPicture:Ie,disableRemotePlayback:Ie,exportParts:Wr,part:Ye,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:Q0}),Rx=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:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className: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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wr,g2:Wr,glyphName:Wr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:q0}),G0=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()}}),K0=Di({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Q0}),X0=Di({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ox={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"},Dx=/[A-Z]/g,zp=/-[a-z]/g,Px=/^data[-\w.:]+$/i;function Vu(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"&&Px.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(zp,Fx);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!zp.test(o)){let l=o.replace(Dx,Mx);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=ad}return new a(s,t)}function Mx(e){return"-"+e.toLowerCase()}function Fx(e){return e.charAt(1).toUpperCase()}const na=Y0([V0,Lx,G0,K0,X0],"html"),xr=Y0([V0,Rx,G0,K0,X0],"svg");function $p(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function J0(e){return e.join(" ").trim()}var Ni={},nc,Wp;function Bx(){if(Wp)return nc;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=`
58
+ `,h="/",E="*",g="",x="comment",b="declaration";function N(O,w){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];w=w||{};var F=1,z=1;function K(de){var ie=de.match(t);ie&&(F+=ie.length);var Ne=de.lastIndexOf(f);z=~Ne?de.length-Ne:z+de.length}function Z(){var de={line:F,column:z};return function(ie){return ie.position=new D(de),ce(),ie}}function D(de){this.start=de,this.end={line:F,column:z},this.source=w.source}D.prototype.content=O;function Q(de){var ie=new Error(w.source+":"+F+":"+z+": "+de);if(ie.reason=de,ie.filename=w.source,ie.line=F,ie.column=z,ie.source=O,!w.silent)throw ie}function ae(de){var ie=de.exec(O);if(ie){var Ne=ie[0];return K(Ne),O=O.slice(Ne.length),ie}}function ce(){ae(n)}function U(de){var ie;for(de=de||[];ie=ee();)ie!==!1&&de.push(ie);return de}function ee(){var de=Z();if(!(h!=O.charAt(0)||E!=O.charAt(1))){for(var ie=2;g!=O.charAt(ie)&&(E!=O.charAt(ie)||h!=O.charAt(ie+1));)++ie;if(ie+=2,g===O.charAt(ie-1))return Q("End of comment missing");var Ne=O.slice(2,ie-2);return z+=2,K(Ne),O=O.slice(ie),z+=2,de({type:x,comment:Ne})}}function te(){var de=Z(),ie=ae(s);if(ie){if(ee(),!ae(a))return Q("property missing ':'");var Ne=ae(o),we=de({type:b,property:I(ie[0].replace(e,g)),value:Ne?I(Ne[0].replace(e,g)):g});return ae(l),we}}function xe(){var de=[];U(de);for(var ie;ie=te();)ie!==!1&&(de.push(ie),U(de));return de}return ce(),xe()}function I(O){return O?O.replace(d,g):g}return nc=N,nc}var Yp;function Ux(){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(Bx());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 As={},Vp;function jx(){if(Vp)return As;Vp=1,Object.defineProperty(As,"__esModule",{value:!0}),As.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 As.camelCase=f,As}var ws,qp;function Hx(){if(qp)return ws;qp=1;var e=ws&&ws.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Ux()),n=jx();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 zx=Hx();const $x=Vc(zx),qu=Z0("end"),Ln=Z0("start");function Z0(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 e1(e){const t=Ln(e),n=qu(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 At 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}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const ud={}.hasOwnProperty,Wx=new Map,Yx=/[A-Z]/g,Vx=new Set(["table","tbody","thead","tfoot","tr"]),qx=new Set(["td","th"]),t1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Qx(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=nb(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=tb(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=n1(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function n1(e,t,n){if(t.type==="element")return Gx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Kx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Jx(e,t,n);if(t.type==="mdxjsEsm")return Xx(e,t);if(t.type==="root")return Zx(e,t,n);if(t.type==="text")return eb(e,t)}function Gx(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=i1(e,t.tagName,!1),l=rb(e,t);let d=ld(e,t);return Vx.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!wx(f):!0})),r1(e,l,o,t),od(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Kx(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 Xx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Qs(e,t.position)}function Jx(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:i1(e,t.name,!0),l=ib(e,t),d=ld(e,t);return r1(e,l,o,t),od(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Zx(e,t,n){const s={};return od(s,ld(e,t)),e.create(t,e.Fragment,s,n)}function eb(e,t){return t.value}function r1(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 tb(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 nb(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 rb(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&ud.call(t.properties,a)){const o=sb(e,a,t.properties[a]);if(o){const[l,d]=o;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&qx.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 ib(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:Wx;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=n1(e,o,l);d!==void 0&&n.push(d)}return n}function sb(e,t,n){const s=Vu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?W0(n):J0(n)),s.property==="style"){let a=typeof n=="object"?n:ab(e,String(n));return e.stylePropertyNameCase==="css"&&(a=ub(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?Ox[s.property]||s.property:s.attribute,n]}}function ab(e,t){try{return $x(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new At("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=t1+"#cannot-parse-style-attribute",a}}function i1(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 At("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=t1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function ub(e){const t={};let n;for(n in e)ud.call(e,n)&&(t[ob(n)]=e[n]);return t}function ob(e){let t=e.replace(Yx,lb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lb(e){return"-"+e.toLowerCase()}const rc={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"]},cb={};function cd(e,t){const n=cb,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return s1(e,s,a)}function s1(e,t,n){if(db(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]=s1(e[a],t,n);return s.join("")}function db(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 a1(e){const t={};let n=-1;for(;++n<e.length;)fb(t,e[n]);return t}function fb(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];hb(a[l],Array.isArray(d)?d:d?[d]:[])}}}function hb(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 u1(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]/),vt=br(/[\dA-Za-z]/),pb=br(/[#-'*+\--9=?A-Z^-~]/);function Pu(e){return e!==null&&(e<32||e===127)}const Ic=br(/\d/),mb=br(/[\dA-Fa-f]/),gb=br(/[!-/:-@[-`{-~]/);function ye(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&&vt(e.charCodeAt(n+1))&&vt(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 Eb={tokenize:Tb};function Tb(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 ye(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),l)}}const yb={tokenize:xb},Zp={tokenize:bb};function xb(e){const t=this,n=[];let s=0,a,o,l;return d;function d(z){if(s<n.length){const K=n[s];return t.containerState=K[1],e.attempt(K[0].continuation,f,h)(z)}return h(z)}function f(z){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&F();const K=t.events.length;let Z=K,D;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){D=t.events[Z][1].end;break}w(s);let Q=K;for(;Q<t.events.length;)t.events[Q][1].end={...D},Q++;return Qt(t.events,Z+1,0,t.events.slice(K)),t.events.length=Q,h(z)}return d(z)}function h(z){if(s===n.length){if(!a)return x(z);if(a.currentConstruct&&a.currentConstruct.concrete)return N(z);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Zp,E,g)(z)}function E(z){return a&&F(),w(s),x(z)}function g(z){return t.parser.lazy[t.now().line]=s!==n.length,l=t.now().offset,N(z)}function x(z){return t.containerState={},e.attempt(Zp,b,N)(z)}function b(z){return s++,n.push([t.currentConstruct,t.containerState]),x(z)}function N(z){if(z===null){a&&F(),w(0),e.consume(z);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),I(z)}function I(z){if(z===null){O(e.exit("chunkFlow"),!0),w(0),e.consume(z);return}return ye(z)?(e.consume(z),O(e.exit("chunkFlow")),s=0,t.interrupt=void 0,d):(e.consume(z),I)}function O(z,K){const Z=t.sliceStream(z);if(K&&Z.push(null),z.previous=o,o&&(o.next=z),o=z,a.defineSkip(z.start),a.write(Z),t.parser.lazy[z.start.line]){let D=a.events.length;for(;D--;)if(a.events[D][1].start.offset<l&&(!a.events[D][1].end||a.events[D][1].end.offset>l))return;const Q=t.events.length;let ae=Q,ce,U;for(;ae--;)if(t.events[ae][0]==="exit"&&t.events[ae][1].type==="chunkFlow"){if(ce){U=t.events[ae][1].end;break}ce=!0}for(w(s),D=Q;D<t.events.length;)t.events[D][1].end={...U},D++;Qt(t.events,ae+1,0,t.events.slice(Q)),t.events.length=D}}function w(z){let K=n.length;for(;K-- >z;){const Z=n[K];t.containerState=Z[1],Z[0].exit.call(t,e)}n.length=z}function F(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function bb(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 Gu(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:kb,tokenize:Sb};function kb(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,Gu(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 Sb(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 _b={name:"autolink",tokenize:Cb};function Cb(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||vt(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||vt(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||Pu(b)?n(b):(e.consume(b),f)}function h(b){return b===64?(e.consume(b),E):pb(b)?(e.consume(b),h):n(b)}function E(b){return vt(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||vt(b))&&s++<63){const N=b===45?x:g;return e.consume(b),N}return n(b)}}const ra={partial:!0,tokenize:Nb};function Nb(e,t,n){return s;function s(o){return Fe(o)?Me(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||ye(o)?t(o):n(o)}}const o1={continuation:{tokenize:Ab},exit:wb,name:"blockQuote",tokenize:vb};function vb(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 Ab(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(o1,t,n)(l)}}function wb(e){e.exit("blockQuote")}const l1={name:"characterEscape",tokenize:Ib};function Ib(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 gb(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const c1={name:"characterReference",tokenize:Lb};function Lb(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=vt,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=mb,E):(e.enter("characterReferenceValue"),o=7,l=Ic,E(g))}function E(g){if(g===59&&a){const x=e.exit("characterReferenceValue");return l===vt&&!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:Ob},nm={concrete:!0,name:"codeFenced",tokenize:Rb};function Rb(e,t,n){const s=this,a={partial:!0,tokenize:Z};let o=0,l=0,d;return f;function f(D){return h(D)}function h(D){const Q=s.events[s.events.length-1];return o=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,d=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),E(D)}function E(D){return D===d?(l++,e.consume(D),E):l<3?n(D):(e.exit("codeFencedFenceSequence"),Fe(D)?Me(e,g,"whitespace")(D):g(D))}function g(D){return D===null||ye(D)?(e.exit("codeFencedFence"),s.interrupt?t(D):e.check(tm,I,K)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(D)):Fe(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Me(e,b,"whitespace")(D)):D===96&&D===d?n(D):(e.consume(D),x)}function b(D){return D===null||ye(D)?g(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),N(D))}function N(D){return D===null||ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(D)):D===96&&D===d?n(D):(e.consume(D),N)}function I(D){return e.attempt(a,K,O)(D)}function O(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),w}function w(D){return o>0&&Fe(D)?Me(e,F,"linePrefix",o+1)(D):F(D)}function F(D){return D===null||ye(D)?e.check(tm,I,K)(D):(e.enter("codeFlowValue"),z(D))}function z(D){return D===null||ye(D)?(e.exit("codeFlowValue"),F(D)):(e.consume(D),z)}function K(D){return e.exit("codeFenced"),t(D)}function Z(D,Q,ae){let ce=0;return U;function U(ie){return D.enter("lineEnding"),D.consume(ie),D.exit("lineEnding"),ee}function ee(ie){return D.enter("codeFencedFence"),Fe(ie)?Me(D,te,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):te(ie)}function te(ie){return ie===d?(D.enter("codeFencedFenceSequence"),xe(ie)):ae(ie)}function xe(ie){return ie===d?(ce++,D.consume(ie),xe):ce>=l?(D.exit("codeFencedFenceSequence"),Fe(ie)?Me(D,de,"whitespace")(ie):de(ie)):ae(ie)}function de(ie){return ie===null||ye(ie)?(D.exit("codeFencedFence"),Q(ie)):ae(ie)}}}function Ob(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 ic={name:"codeIndented",tokenize:Pb},Db={partial:!0,tokenize:Mb};function Pb(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):ye(h)?e.attempt(Db,l,f)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||ye(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),d)}function f(h){return e.exit("codeIndented"),t(h)}}function Mb(e,t,n){const s=this;return a;function a(l){return s.parser.lazy[s.now().line]?n(l):ye(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):ye(l)?a(l):n(l)}}const Fb={name:"codeText",previous:Ub,resolve:Bb,tokenize:jb};function Bb(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 Ub(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function jb(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)):ye(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||ye(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 Hb{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 d1(e){const t={};let n=-1,s,a,o,l,d,f,h;const E=new Hb(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,zb(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 zb(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,N=0,I=0;const O=[I];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&&(I=x+1,O.push(I),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 w=d.slice(O[x],O[x+1]),F=o.pop();f.push([F,F+w.length-1]),e.splice(F,2,w)}for(f.reverse(),x=-1;++x<f.length;)h[N+f[x][0]]=N+f[x][1],N+=f[x][1]-f[x][0]-1;return h}const $b={resolve:Yb,tokenize:Vb},Wb={partial:!0,tokenize:qb};function Yb(e){return d1(e),e}function Vb(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):ye(d)?e.check(Wb,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 qb(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||ye(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 f1(e,t,n,s,a,o,l,d,f){const h=f||Number.POSITIVE_INFINITY;let E=0;return g;function g(w){return w===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(w),e.exit(o),x):w===null||w===32||w===41||Pu(w)?n(w):(e.enter(s),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),I(w))}function x(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(w))}function b(w){return w===62?(e.exit("chunkString"),e.exit(d),x(w)):w===null||w===60||ye(w)?n(w):(e.consume(w),w===92?N:b)}function N(w){return w===60||w===62||w===92?(e.consume(w),b):b(w)}function I(w){return!E&&(w===null||w===41||Ve(w))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(s),t(w)):E<h&&w===40?(e.consume(w),E++,I):w===41?(e.consume(w),E--,I):w===null||w===32||w===40||Pu(w)?n(w):(e.consume(w),w===92?O:I)}function O(w){return w===40||w===41||w===92?(e.consume(w),I):I(w)}}function h1(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):ye(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||ye(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 p1(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):ye(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||ye(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 ye(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 Qb={name:"definition",tokenize:Kb},Gb={partial:!0,tokenize:Xb};function Kb(e,t,n){const s=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return h1.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 f1(e,E,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function E(b){return e.attempt(Gb,g,g)(b)}function g(b){return Fe(b)?Me(e,x,"whitespace")(b):x(b)}function x(b){return b===null||ye(b)?(e.exit("definition"),s.parser.defined.push(a),t(b)):n(b)}}function Xb(e,t,n){return s;function s(d){return Ve(d)?Bs(e,a)(d):n(d)}function a(d){return p1(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||ye(d)?t(d):n(d)}}const Jb={name:"hardBreakEscape",tokenize:Zb};function Zb(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return ye(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ek={name:"headingAtx",resolve:tk,tokenize:nk};function tk(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 nk(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||ye(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 rk=["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"],ik={concrete:!0,name:"htmlFlow",resolveTo:uk,tokenize:ok},sk={partial:!0,tokenize:ck},ak={partial:!0,tokenize:lk};function uk(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 ok(e,t,n){const s=this;let a,o,l,d,f;return h;function h(v){return E(v)}function E(v){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(v),g}function g(v){return v===33?(e.consume(v),x):v===47?(e.consume(v),o=!0,I):v===63?(e.consume(v),a=3,s.interrupt?t:S):Rt(v)?(e.consume(v),l=String.fromCharCode(v),O):n(v)}function x(v){return v===45?(e.consume(v),a=2,b):v===91?(e.consume(v),a=5,d=0,N):Rt(v)?(e.consume(v),a=4,s.interrupt?t:S):n(v)}function b(v){return v===45?(e.consume(v),s.interrupt?t:S):n(v)}function N(v){const he="CDATA[";return v===he.charCodeAt(d++)?(e.consume(v),d===he.length?s.interrupt?t:te:N):n(v)}function I(v){return Rt(v)?(e.consume(v),l=String.fromCharCode(v),O):n(v)}function O(v){if(v===null||v===47||v===62||Ve(v)){const he=v===47,Ce=l.toLowerCase();return!he&&!o&&rm.includes(Ce)?(a=1,s.interrupt?t(v):te(v)):rk.includes(l.toLowerCase())?(a=6,he?(e.consume(v),w):s.interrupt?t(v):te(v)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(v):o?F(v):z(v))}return v===45||vt(v)?(e.consume(v),l+=String.fromCharCode(v),O):n(v)}function w(v){return v===62?(e.consume(v),s.interrupt?t:te):n(v)}function F(v){return Fe(v)?(e.consume(v),F):U(v)}function z(v){return v===47?(e.consume(v),U):v===58||v===95||Rt(v)?(e.consume(v),K):Fe(v)?(e.consume(v),z):U(v)}function K(v){return v===45||v===46||v===58||v===95||vt(v)?(e.consume(v),K):Z(v)}function Z(v){return v===61?(e.consume(v),D):Fe(v)?(e.consume(v),Z):z(v)}function D(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),f=v,Q):Fe(v)?(e.consume(v),D):ae(v)}function Q(v){return v===f?(e.consume(v),f=null,ce):v===null||ye(v)?n(v):(e.consume(v),Q)}function ae(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||Ve(v)?Z(v):(e.consume(v),ae)}function ce(v){return v===47||v===62||Fe(v)?z(v):n(v)}function U(v){return v===62?(e.consume(v),ee):n(v)}function ee(v){return v===null||ye(v)?te(v):Fe(v)?(e.consume(v),ee):n(v)}function te(v){return v===45&&a===2?(e.consume(v),Ne):v===60&&a===1?(e.consume(v),we):v===62&&a===4?(e.consume(v),P):v===63&&a===3?(e.consume(v),S):v===93&&a===5?(e.consume(v),me):ye(v)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(sk,Y,xe)(v)):v===null||ye(v)?(e.exit("htmlFlowData"),xe(v)):(e.consume(v),te)}function xe(v){return e.check(ak,de,Y)(v)}function de(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),ie}function ie(v){return v===null||ye(v)?xe(v):(e.enter("htmlFlowData"),te(v))}function Ne(v){return v===45?(e.consume(v),S):te(v)}function we(v){return v===47?(e.consume(v),l="",oe):te(v)}function oe(v){if(v===62){const he=l.toLowerCase();return rm.includes(he)?(e.consume(v),P):te(v)}return Rt(v)&&l.length<8?(e.consume(v),l+=String.fromCharCode(v),oe):te(v)}function me(v){return v===93?(e.consume(v),S):te(v)}function S(v){return v===62?(e.consume(v),P):v===45&&a===2?(e.consume(v),S):te(v)}function P(v){return v===null||ye(v)?(e.exit("htmlFlowData"),Y(v)):(e.consume(v),P)}function Y(v){return e.exit("htmlFlow"),t(v)}}function lk(e,t,n){const s=this;return a;function a(l){return ye(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 ck(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ra,t,n)}}const dk={name:"htmlText",tokenize:fk};function fk(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),Z):S===63?(e.consume(S),z):Rt(S)?(e.consume(S),ae):n(S)}function h(S){return S===45?(e.consume(S),E):S===91?(e.consume(S),o=0,N):Rt(S)?(e.consume(S),F):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):ye(S)?(l=g,we(S)):(e.consume(S),g)}function x(S){return S===45?(e.consume(S),b):g(S)}function b(S){return S===62?Ne(S):S===45?x(S):g(S)}function N(S){const P="CDATA[";return S===P.charCodeAt(o++)?(e.consume(S),o===P.length?I:N):n(S)}function I(S){return S===null?n(S):S===93?(e.consume(S),O):ye(S)?(l=I,we(S)):(e.consume(S),I)}function O(S){return S===93?(e.consume(S),w):I(S)}function w(S){return S===62?Ne(S):S===93?(e.consume(S),w):I(S)}function F(S){return S===null||S===62?Ne(S):ye(S)?(l=F,we(S)):(e.consume(S),F)}function z(S){return S===null?n(S):S===63?(e.consume(S),K):ye(S)?(l=z,we(S)):(e.consume(S),z)}function K(S){return S===62?Ne(S):z(S)}function Z(S){return Rt(S)?(e.consume(S),D):n(S)}function D(S){return S===45||vt(S)?(e.consume(S),D):Q(S)}function Q(S){return ye(S)?(l=Q,we(S)):Fe(S)?(e.consume(S),Q):Ne(S)}function ae(S){return S===45||vt(S)?(e.consume(S),ae):S===47||S===62||Ve(S)?ce(S):n(S)}function ce(S){return S===47?(e.consume(S),Ne):S===58||S===95||Rt(S)?(e.consume(S),U):ye(S)?(l=ce,we(S)):Fe(S)?(e.consume(S),ce):Ne(S)}function U(S){return S===45||S===46||S===58||S===95||vt(S)?(e.consume(S),U):ee(S)}function ee(S){return S===61?(e.consume(S),te):ye(S)?(l=ee,we(S)):Fe(S)?(e.consume(S),ee):ce(S)}function te(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,xe):ye(S)?(l=te,we(S)):Fe(S)?(e.consume(S),te):(e.consume(S),de)}function xe(S){return S===a?(e.consume(S),a=void 0,ie):S===null?n(S):ye(S)?(l=xe,we(S)):(e.consume(S),xe)}function de(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ve(S)?ce(S):(e.consume(S),de)}function ie(S){return S===47||S===62||Ve(S)?ce(S):n(S)}function Ne(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function we(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),oe}function oe(S){return Fe(S)?Me(e,me,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):me(S)}function me(S){return e.enter("htmlTextData"),l(S)}}const fd={name:"labelEnd",resolveAll:gk,resolveTo:Ek,tokenize:Tk},hk={tokenize:yk},pk={tokenize:xk},mk={tokenize:bk};function gk(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 Ek(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,Gu(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 Tk(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(hk,E,l?E:g)(x):x===91?e.attempt(pk,E,l?h:g)(x):l?E(x):g(x)}function h(x){return e.attempt(mk,E,g)(x)}function E(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function yk(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):f1(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?p1(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 xk(e,t,n){const s=this;return a;function a(d){return h1.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 bk(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 kk={name:"labelStartImage",resolveAll:fd.resolveAll,tokenize:Sk};function Sk(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 _k={name:"labelStartLink",resolveAll:fd.resolveAll,tokenize:Ck};function Ck(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 sc={name:"lineEnding",tokenize:Nk};function Nk(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:vk};function vk(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||ye(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:Lk},exit:Ok,name:"list",tokenize:Ik},Ak={partial:!0,tokenize:Dk},wk={partial:!0,tokenize:Rk};function Ik(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 N=s.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!s.containerState.marker||b===s.containerState.marker:Ic(b)){if(s.containerState.type||(s.containerState.type=N,e.enter(N,{_container:!0})),N==="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(Ak,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 Lk(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(wk,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 Rk(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 Ok(e){e.exit(this.containerState.type)}function Dk(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:Pk,tokenize:Mk};function Pk(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 Mk(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||ye(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const Fk={tokenize:Bk};function Bk(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($b,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 Uk={resolveAll:g1()},jk=m1("string"),Hk=m1("text");function m1(e){return{resolveAll:g1(e==="text"?zk: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 g1(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 zk(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 $k={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:o1},Wk={91:Qb},Yk={[-2]:ic,[-1]:ic,32:ic},Vk={35:ek,42:Iu,45:[im,Iu],60:ik,61:im,95:Iu,96:nm,126:nm},qk={38:c1,92:l1},Qk={[-5]:sc,[-4]:sc,[-3]:sc,33:kk,38:c1,42:Lc,60:[_b,dk],91:_k,92:[Jb,l1],93:fd,95:Lc,96:Fb},Gk={null:[Lc,Uk]},Kk={null:[42,95]},Xk={null:[]},Jk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Kk,contentInitial:Wk,disable:Xk,document:$k,flow:Vk,flowInitial:Yk,insideSpan:Gk,string:qk,text:Qk},Symbol.toStringTag,{value:"Module"}));function Zk(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:Q(Z),check:Q(D),consume:F,enter:z,exit:K,interrupt:Q(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:I,events:[],now:N,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(ee){return l=rn(l,ee),O(),l[l.length-1]!==null?[]:(ae(t,0),h.events=Gu(o,h.events,h),h.events)}function x(ee,te){return tS(b(ee),te)}function b(ee){return eS(l,ee)}function N(){const{_bufferIndex:ee,_index:te,line:xe,column:de,offset:ie}=s;return{_bufferIndex:ee,_index:te,line:xe,column:de,offset:ie}}function I(ee){a[ee.line]=ee.column,U()}function O(){let ee;for(;s._index<l.length;){const te=l[s._index];if(typeof te=="string")for(ee=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===ee&&s._bufferIndex<te.length;)w(te.charCodeAt(s._bufferIndex));else w(te)}}function w(ee){E=E(ee)}function F(ee){ye(ee)?(s.line++,s.column=1,s.offset+=ee===-3?2:1,U()):ee!==-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=ee}function z(ee,te){const xe=te||{};return xe.type=ee,xe.start=N(),h.events.push(["enter",xe,h]),d.push(xe),xe}function K(ee){const te=d.pop();return te.end=N(),h.events.push(["exit",te,h]),te}function Z(ee,te){ae(ee,te.from)}function D(ee,te){te.restore()}function Q(ee,te){return xe;function xe(de,ie,Ne){let we,oe,me,S;return Array.isArray(de)?Y(de):"tokenize"in de?Y([de]):P(de);function P(be){return Be;function Be(Re){const ze=Re!==null&&be[Re],at=Re!==null&&be.null,On=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(at)?at:at?[at]:[]];return Y(On)(Re)}}function Y(be){return we=be,oe=0,be.length===0?Ne:v(be[oe])}function v(be){return Be;function Be(Re){return S=ce(),me=be,be.partial||(h.currentConstruct=be),be.name&&h.parser.constructs.disable.null.includes(be.name)?Ce():be.tokenize.call(te?Object.assign(Object.create(h),te):h,f,he,Ce)(Re)}}function he(be){return ee(me,S),ie}function Ce(be){return S.restore(),++oe<we.length?v(we[oe]):Ne}}}function ae(ee,te){ee.resolveAll&&!o.includes(ee)&&o.push(ee),ee.resolve&&Qt(h.events,te,h.events.length-te,ee.resolve(h.events.slice(te),h)),ee.resolveTo&&(h.events=ee.resolveTo(h.events,h))}function ce(){const ee=N(),te=h.previous,xe=h.currentConstruct,de=h.events.length,ie=Array.from(d);return{from:de,restore:Ne};function Ne(){s=ee,h.previous=te,h.currentConstruct=xe,h.events.length=de,d=ie,U()}}function U(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function eS(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 tS(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=`
59
+ `;break}case-3:{l=`\r
60
+ `;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 nS(e){const s={constructs:a1([Jk,...(e||{}).extensions||[]]),content:a(Eb),defined:[],document:a(yb),flow:a(Fk),lazy:{},string:a(jk),text:a(Hk)};return s;function a(o){return l;function l(d){return Zk(s,o,d)}}}function rS(e){for(;!d1(e););return e}const sm=/[\0\t\n\r]/g;function iS(){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 sS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aS(e){return e.replace(sS,uS)}function uS(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return u1(n.slice(o?2:1),o?16:10)}return dd(n)||e}const E1={}.hasOwnProperty;function oS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lS(n)(rS(nS(n).document().write(iS()(e,t,!0))))}function lS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ti),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:o(ji),blockQuote:o(at),characterEscape:ce,characterReference:ce,codeFenced:o(On),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(On,l),codeText:o(oa,l),codeTextData:ce,data:ce,codeFlowValue:ce,definition:o(Zr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Ui),hardBreakEscape:o(Hi),hardBreakTrailing:o(Hi),htmlFlow:o(ei,l),htmlFlowData:ce,htmlText:o(ei,l),htmlTextData:ce,image:o(la),label:l,link:o(ti),listItem:o(qn),listItemValue:x,listOrdered:o(Vn,g),listUnordered:o(Vn),paragraph:o(zi),reference:v,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(ji),strong:o(ca),thematicBreak:o(fa)},exit:{atxHeading:f(),atxHeadingSequence:Z,autolink:f(),autolinkEmail:ze,autolinkProtocol:Re,blockQuote:f(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:Ce,characterReferenceMarkerNumeric:Ce,characterReferenceValue:be,characterReference:Be,codeFenced:f(O),codeFencedFence:I,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:U,codeIndented:f(w),codeText:f(ie),codeTextData:U,data:U,definition:f(),definitionDestinationString:K,definitionLabelString:F,definitionTitleString:z,emphasis:f(),hardBreakEscape:f(te),hardBreakTrailing:f(te),htmlFlow:f(xe),htmlFlowData:U,htmlText:f(de),htmlTextData:U,image:f(we),label:me,labelText:oe,lineEnding:ee,link:f(Ne),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:he,resourceDestinationString:S,resourceTitleString:P,resource:Y,setextHeading:f(ae),setextHeadingLineSequence:Q,setextHeadingText:D,strong:f(),thematicBreak:f()}};T1(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(q){let le={type:"root",children:[]};const ve={stack:[le],tokenStack:[],config:t,enter:d,exit:h,buffer:l,resume:E,data:n},Oe=[];let Ue=-1;for(;++Ue<q.length;)if(q[Ue][1].type==="listOrdered"||q[Ue][1].type==="listUnordered")if(q[Ue][0]==="enter")Oe.push(Ue);else{const Et=Oe.pop();Ue=a(q,Et,Ue)}for(Ue=-1;++Ue<q.length;){const Et=t[q[Ue][0]];E1.call(Et,q[Ue][1].type)&&Et[q[Ue][1].type].call(Object.assign({sliceSerialize:q[Ue][2].sliceSerialize},ve),q[Ue][1])}if(ve.tokenStack.length>0){const Et=ve.tokenStack[ve.tokenStack.length-1];(Et[1]||am).call(ve,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})},Ue=-1;++Ue<t.transforms.length;)le=t.transforms[Ue](le)||le;return le}function a(q,le,ve){let Oe=le-1,Ue=-1,Et=!1,Dn,Kt,Qn,_r;for(;++Oe<=ve;){const Tt=q[Oe];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Ue++:Ue--,_r=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(Dn&&!_r&&!Ue&&!Qn&&(Qn=Oe),_r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_r=void 0}if(!Ue&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||Ue===-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++,ve++}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++,ve++,Qn=void 0,_r=!0}}}return q[le][1]._spread=Et,ve}function o(q,le){return ve;function ve(Oe){d.call(this,q(Oe),Oe),le&&le.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(q,le,ve){this.stack[this.stack.length-1].children.push(q),this.stack.push(q),this.tokenStack.push([le,ve||void 0]),q.position={start:pr(le.start),end:void 0}}function f(q){return le;function le(ve){q&&q.call(this,ve),h.call(this,ve)}}function h(q,le){const ve=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");ve.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 N(){const q=this.resume(),le=this.stack[this.stack.length-1];le.meta=q}function I(){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 w(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q.replace(/(\r?\n|\r)$/g,"")}function F(q){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=En(this.sliceSerialize(q)).toLowerCase()}function z(){const q=this.resume(),le=this.stack[this.stack.length-1];le.title=q}function K(){const q=this.resume(),le=this.stack[this.stack.length-1];le.url=q}function Z(q){const le=this.stack[this.stack.length-1];if(!le.depth){const ve=this.sliceSerialize(q).length;le.depth=ve}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function Q(q){const le=this.stack[this.stack.length-1];le.depth=this.sliceSerialize(q).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(q){const ve=this.stack[this.stack.length-1].children;let Oe=ve[ve.length-1];(!Oe||Oe.type!=="text")&&(Oe=da(),Oe.position={start:pr(q.start),end:void 0},ve.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 ee(q){const le=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=le.children[le.children.length-1];ve.position.end=pr(q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(le.type)&&(ce.call(this,q),U.call(this,q))}function te(){this.data.atHardBreak=!0}function xe(){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 ie(){const q=this.resume(),le=this.stack[this.stack.length-1];le.value=q}function Ne(){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 we(){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 oe(q){const le=this.sliceSerialize(q),ve=this.stack[this.stack.length-2];ve.label=aS(le),ve.identifier=En(le).toLowerCase()}function me(){const q=this.stack[this.stack.length-1],le=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Oe=q.children;ve.children=Oe}else ve.alt=le}function S(){const q=this.resume(),le=this.stack[this.stack.length-1];le.url=q}function P(){const q=this.resume(),le=this.stack[this.stack.length-1];le.title=q}function Y(){this.data.inReference=void 0}function v(){this.data.referenceType="collapsed"}function he(q){const le=this.resume(),ve=this.stack[this.stack.length-1];ve.label=le,ve.identifier=En(this.sliceSerialize(q)).toLowerCase(),this.data.referenceType="full"}function Ce(q){this.data.characterReferenceType=q.type}function be(q){const le=this.sliceSerialize(q),ve=this.data.characterReferenceType;let Oe;ve?(Oe=u1(le,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=dd(le);const Ue=this.stack[this.stack.length-1];Ue.value+=Oe}function Be(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 T1(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?T1(e,s):cS(e,s)}}function cS(e,t){let n;for(n in t)if(E1.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 dS(e){const t=this;t.parser=n;function n(s){return oS(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fS(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 hS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
61
+ `}]}function pS(e,t){const n=t.value?t.value+`
62
+ `:"",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 mS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ES(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 TS(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 yS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function y1(e,t){const n=t.referenceType;let 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 xS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return y1(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 bS(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 kS(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 SS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return y1(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 _S(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 CS(e,t,n){const s=e.all(t),a=n?NS(n):x1(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:`
63
+ `}),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:`
64
+ `});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function NS(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=x1(n[s])}return t}function x1(e){const t=e.spread;return t??e.children.length>1}function vS(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 AS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function IS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function LS(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=qu(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 RS(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 N={type:"element",tagName:o,properties:x,children:[]};g&&(N.children=e.all(g),e.patch(g,N),N=e.applyData(g,N)),h.push(N)}const E={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,E),e.applyData(t,E)}function OS(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 DS(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 PS(e,t){const n={type:"text",value:DS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function MS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const FS={blockquote:fS,break:hS,code:pS,delete:mS,emphasis:gS,footnoteReference:ES,heading:TS,html:yS,imageReference:xS,image:bS,inlineCode:kS,linkReference:SS,link:_S,listItem:CS,list:vS,paragraph:AS,root:wS,strong:IS,table:LS,tableCell:OS,tableRow:RS,text:PS,thematicBreak:MS,toml:ku,yaml:ku,definition:ku,footnoteDefinition:ku};function ku(){}const b1=-1,Ku=0,Us=1,Mu=2,hd=3,pd=4,md=5,gd=6,k1=7,S1=8,BS=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 BS[e](t)},US=(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 Ku:case b1:return n(l,a);case Us:{const d=n([],a);for(const f of l)d.push(s(f));return d}case Mu:{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 k1:{const{name:d,message:f}=l;return n(cm(d,f),a)}case S1: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=>US(new Map,e)(0),zr="",{toString:jS}={},{keys:HS}=Object,Ls=e=>{const t=typeof e;if(t!=="object"||!e)return[Ku,t];const n=jS.call(e).slice(8,-1);switch(n){case"Array":return[Us,zr];case"Object":return[Mu,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")?[k1,n]:[Mu,n]},Su=([e,t])=>e===Ku&&(t==="function"||t==="symbol"),zS=(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 Ku:{let E=l;switch(f){case"bigint":d=S1,E=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);E=null;break;case"undefined":return a([b1],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 Mu:{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 HS(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 zS(!(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 $S(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 WS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function YS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$S,s=e.options.footnoteBackLabel||WS,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 N=[],I=e.footnoteCounts.get(g);for(;I!==void 0&&++b<=I;){N.length>0&&N.push({type:"text",value:" "});let F=typeof n=="string"?n:n(f,b);typeof F=="string"&&(F={type:"text",value:F}),N.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(F)?F:[F]})}const O=E[E.length-1];if(O&&O.type==="element"&&O.tagName==="p"){const F=O.children[O.children.length-1];F&&F.type==="text"?F.value+=" ":O.children.push({type:"text",value:" "}),O.children.push(...N)}else E.push(...N);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(E,!0)};e.patch(h,w),d.push(w)}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:`
65
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
66
+ `}]}}const Xu=(function(e){if(e==null)return GS;if(typeof e=="function")return Ju(e);if(typeof e=="object")return Array.isArray(e)?VS(e):qS(e);if(typeof e=="string")return QS(e);throw new Error("Expected function, string, or object as test")});function VS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xu(e[n]);return Ju(s);function s(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function qS(e){const t=e;return Ju(n);function n(s){const a=s;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function QS(e){return Ju(t);function t(n){return n&&n.type===e}}function Ju(e){return t;function t(n,s,a){return!!(KS(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function GS(){return!0}function KS(e){return e!==null&&typeof e=="object"&&"type"in e}const _1=[],XS=!0,Rc=!1,JS="skip";function C1(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const o=Xu(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=_1,N,I,O;if((!t||o(f,h,E[E.length-1]||void 0))&&(b=ZS(n(f,E)),b[0]===Rc))return b;if("children"in f&&f.children){const w=f;if(w.children&&b[0]!==JS)for(I=(s?w.children.length:-1)+l,O=E.concat(w);I>-1&&I<w.children.length;){const F=w.children[I];if(N=d(F,I,O)(),N[0]===Rc)return N;I=typeof N[1]=="number"?N[1]:I+l}}return b}}}function ZS(e){return Array.isArray(e)?e:typeof e=="number"?[XS,e]:e==null?_1:[e]}function Zu(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),C1(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,e_={};function t_(e,t){const n=t||e_,s=new Map,a=new Map,o=new Map,l={...FS,...n.handlers},d={all:h,applyData:r_,definitionById:s,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:n_,wrap:s_};return Zu(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:I,...O}=E,w=qr(O);return w.children=d.all(E),w}return qr(E)}return(d.options.unknownHandler||i_)(d,E,g)}function h(E){const g=[];if("children"in E){const x=E.children;let b=-1;for(;++b<x.length;){const N=d.one(x[b],E);if(N){if(b&&x[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=hm(N.value)),!Array.isArray(N)&&N.type==="element")){const I=N.children[0];I&&I.type==="text"&&(I.value=hm(I.value))}Array.isArray(N)?g.push(...N):g.push(N)}}}return g}}function n_(e,t){e.position&&(t.position=e1(e))}function r_(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 i_(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 s_(e,t){const n=[];let s=-1;for(t&&n.push({type:"text",value:`
67
+ `});++s<e.length;)s&&n.push({type:"text",value:`
68
+ `}),n.push(e[s]);return t&&e.length>0&&n.push({type:"text",value:`
69
+ `}),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=t_(e,t),s=n.one(e,void 0),a=YS(n),o=Array.isArray(s)?{type:"root",children:s}:s||{type:"root",children:[]};return a&&o.children.push({type:"text",value:`
70
+ `},a),o}function a_(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 ac,gm;function u_(){if(gm)return ac;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 ac=function f(){var h,E,g,x,b,N,I=arguments[0],O=1,w=arguments.length,F=!1;for(typeof I=="boolean"&&(F=I,I=arguments[1]||{},O=2),(I==null||typeof I!="object"&&typeof I!="function")&&(I={});O<w;++O)if(h=arguments[O],h!=null)for(E in h)g=d(I,E),x=d(h,E),I!==x&&(F&&x&&(o(x)||(b=a(x)))?(b?(b=!1,N=g&&a(g)?g:[]):N=g&&o(g)?g:{},l(I,{name:E,newValue:f(F,N,x)})):typeof x<"u"&&l(I,{name:E,newValue:x}));return I},ac}var o_=u_();const uc=Vc(o_);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 l_(){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?c_(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 c_(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 An={basename:d_,dirname:f_,extname:h_,join:p_,sep:"/"};function d_(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 f_(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 h_(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 p_(...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?".":m_(n)}function m_(e){ia(e);const t=e.codePointAt(0)===47;let n=g_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function g_(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 E_={cwd:T_};function T_(){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 y_(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 x_(e)}function x_(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 oc=["history","path","basename","stem","extname","dirname"];class N1{constructor(t){let n;t?Pc(t)?n={path:t}:typeof t=="string"||b_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":E_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<oc.length;){const o=oc[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)oc.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){cc(t,"basename"),lc(t,"basename"),this.path=An.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?An.dirname(this.path):void 0}set dirname(t){Em(this.basename,"dirname"),this.path=An.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?An.extname(this.path):void 0}set extname(t){if(lc(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=An.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pc(t)&&(t=y_(t)),cc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?An.basename(this.path,this.extname):void 0}set stem(t){cc(t,"stem"),lc(t,"stem"),this.path=An.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 At(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 lc(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function cc(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 b_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const k_=(function(e){const s=this.constructor.prototype,a=s[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),S_={}.hasOwnProperty;class Ed extends k_{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=l_()}copy(){const t=new Ed;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(uc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(hc("data",this.frozen),this.namespace[t]=n,this):S_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(hc("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 dc("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),dc("process",this.parser||this.Parser),fc("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,N=s.stringify(b,x);N_(N)?x.value=N:x.result=N,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(),dc("processSync",this.parser||this.Parser),fc("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 fc("stringify",a),Tm(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(hc("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=uc(!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,...N]=E;const I=s[x][1];Dc(I)&&Dc(b)&&(b=uc(!0,I,b)),s[x]=[h,b,...N]}}}}const __=new Ed().freeze();function dc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function fc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function hc(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 C_(e)?e:new N1(e)}function C_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function N_(e){return typeof e=="string"||v_(e)}function v_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const A_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",xm=[],bm={allowDangerousHtml:!0},w_=/^(https?|ircs?|mailto|xmpp)$/i,I_=[{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 L_(e){const t=R_(e),n=O_(e);return D_(t.runSync(t.parse(n),n),e)}function R_(e){const t=e.rehypePlugins||xm,n=e.remarkPlugins||xm,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...bm}:bm;return __().use(dS).use(n).use(a_,s).use(t)}function O_(e){const t=e.children||"",n=new N1;return typeof t=="string"&&(n.value=t),n}function D_(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||P_;for(const E of I_)Object.hasOwn(t,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+A_+E.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Zu(e,h),Qx(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 rc)if(Object.hasOwn(rc,b)&&Object.hasOwn(E.properties,b)){const N=E.properties[b],I=rc[b];(I===null||I.includes(E.tagName))&&(E.properties[b]=f(String(N||""),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 P_(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||w_.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 M_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function F_(e,t,n){const a=Xu((n||{}).ignore||[]),o=B_(t);let l=-1;for(;++l<o.length;)C1(e,"text",d);function d(h,E){let g=-1,x;for(;++g<E.length;){const b=E[g],N=x?x.children:void 0;if(a(b,N?N.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 N=0;const O=g.children.indexOf(h);let w=!1,F=[];x.lastIndex=0;let z=x.exec(h.value);for(;z;){const K=z.index,Z={index:z.index,input:z.input,stack:[...E,h]};let D=b(...z,Z);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=K+1:(N!==K&&F.push({type:"text",value:h.value.slice(N,K)}),Array.isArray(D)?F.push(...D):D&&F.push(D),N=K+z[0].length,w=!0),!x.global)break;z=x.exec(h.value)}return w?(N<h.value.length&&F.push({type:"text",value:h.value.slice(N)}),g.children.splice(O,1,...F)):F=[h],O+F.length}}function B_(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([U_(a[0]),j_(a[1])])}return t}function U_(e){return typeof e=="string"?new RegExp(M_(e),"g"):e}function j_(e){return typeof e=="function"?e:function(){return e}}const pc="phrasing",mc=["autolink","link","image","label"];function H_(){return{transforms:[Q_],enter:{literalAutolink:$_,literalAutolinkEmail:gc,literalAutolinkHttp:gc,literalAutolinkWww:gc},exit:{literalAutolink:q_,literalAutolinkEmail:V_,literalAutolinkHttp:W_,literalAutolinkWww:Y_}}}function z_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:pc,notInConstruct:mc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:pc,notInConstruct:mc},{character:":",before:"[ps]",after:"\\/",inConstruct:pc,notInConstruct:mc}]}}function $_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function gc(e){this.config.enter.autolinkProtocol.call(this,e)}function W_(e){this.config.exit.autolinkProtocol.call(this,e)}function Y_(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 V_(e){this.config.exit.autolinkEmail.call(this,e)}function q_(e){this.exit(e)}function Q_(e){F_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),K_]],{ignore:["link","linkReference"]})}function G_(e,t,n,s,a){let o="";if(!v1(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!X_(n)))return!1;const l=J_(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 K_(e,t,n,s){return!v1(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function X_(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 J_(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 v1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Vr(n)||Qu(n))&&(!t||n!==47)}A1.peek=uC;function Z_(){this.buffer()}function eC(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function tC(){this.buffer()}function nC(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},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(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 aC(e){this.exit(e)}function uC(){return"["}function A1(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 oC(){return{enter:{gfmFootnoteCallString:Z_,gfmFootnoteCall:eC,gfmFootnoteDefinitionLabelString:tC,gfmFootnoteDefinition:nC},exit:{gfmFootnoteCallString:rC,gfmFootnoteCall:iC,gfmFootnoteDefinitionLabelString:sC,gfmFootnoteDefinition:aC}}}function lC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:A1},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?`
71
+ `:" ")+o.indentLines(o.containerFlow(s,d.current()),t?w1:cC))),h(),f}}function cC(e,t,n){return t===0?e:w1(e,t,n)}function w1(e,t,n){return(n?"":" ")+e}const dC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];I1.peek=gC;function fC(){return{canContainEols:["delete"],enter:{strikethrough:pC},exit:{strikethrough:mC}}}function hC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dC}],handlers:{delete:I1}}}function pC(e){this.enter({type:"delete",children:[]},e)}function mC(e){this.exit(e)}function I1(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 gC(){return"~"}function EC(e){return e.length}function TC(e,t){const n=t||{},s=(n.align||[]).concat(),a=n.stringLength||EC,o=[],l=[],d=[],f=[];let h=0,E=-1;for(;++E<e.length;){const I=[],O=[];let w=-1;for(e[E].length>h&&(h=e[E].length);++w<e[E].length;){const F=yC(e[E][w]);if(n.alignDelimiters!==!1){const z=a(F);O[w]=z,(f[w]===void 0||z>f[w])&&(f[w]=z)}I.push(F)}l[E]=I,d[E]=O}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<h;)o[g]=Sm(s[g]);else{const I=Sm(s);for(;++g<h;)o[g]=I}g=-1;const x=[],b=[];for(;++g<h;){const I=o[g];let O="",w="";I===99?(O=":",w=":"):I===108?O=":":I===114&&(w=":");let F=n.alignDelimiters===!1?1:Math.max(1,f[g]-O.length-w.length);const z=O+"-".repeat(F)+w;n.alignDelimiters!==!1&&(F=O.length+F+w.length,F>f[g]&&(f[g]=F),b[g]=F),x[g]=z}l.splice(1,0,x),d.splice(1,0,b),E=-1;const N=[];for(;++E<l.length;){const I=l[E],O=d[E];g=-1;const w=[];for(;++g<h;){const F=I[g]||"";let z="",K="";if(n.alignDelimiters!==!1){const Z=f[g]-(O[g]||0),D=o[g];D===114?z=" ".repeat(Z):D===99?Z%2?(z=" ".repeat(Z/2+.5),K=" ".repeat(Z/2-.5)):(z=" ".repeat(Z/2),K=z):K=" ".repeat(Z)}n.delimiterStart!==!1&&!g&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||g)&&w.push(" "),n.alignDelimiters!==!1&&w.push(z),w.push(F),n.alignDelimiters!==!1&&w.push(K),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&w.push("|")}N.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return N.join(`
72
+ `)}function yC(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 L1(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 xC(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()),bC);return a(),l}function bC(e,t,n){return">"+(n?"":" ")+e}function kC(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===`
73
+ `&&kC(n.stack,n.unsafe[a]))return/[ \t]/.test(s.before)?"":" ";return`\\
74
+ `}function R1(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 SC(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 _C(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 CC(e,t,n,s){const a=_C(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(SC(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,NC);return g(),x}const d=n.createTracker(s),f=a.repeat(Math.max(R1(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:`
75
+ `,encode:["`"],...d.current()})),g()}return E+=d.move(`
76
+ `),o&&(E+=d.move(o+`
77
+ `)),E+=d.move(f),h(),E}function NC(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 vC(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?" ":`
78
+ `,...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 AC(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 Fu(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}}O1.peek=wC;function O1(e,t,n,s){const a=AC(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=Fu(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=Fu(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 wC(e,t,n){return n.options.emphasis||"*"}function IC(e,t){let n=!1;return Zu(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 LC(e,t,n,s){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(s);if(IC(e,n)){const E=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
79
+ `,after:`
80
+ `});return g(),E(),x+`
81
+ `+(a===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
82
+ `))+1))}const l="#".repeat(a),d=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
83
+ `,...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}D1.peek=RC;function D1(e){return e.value||""}function RC(){return"<"}P1.peek=OC;function P1(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 OC(){return"!"}M1.peek=DC;function M1(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 DC(){return"!"}F1.peek=PC;function F1(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 PC(){return"`"}function B1(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))}U1.peek=MC;function U1(e,t,n,s){const a=Td(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(s);let d,f;if(B1(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 MC(e,t,n){return B1(e,n)?"<":"["}j1.peek=FC;function j1(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 FC(){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 BC(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 UC(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 H1(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 jC(e,t,n,s){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?UC(n):yd(n);const d=e.ordered?l==="."?")":".":BC(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),H1(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 HC(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 zC(e,t,n,s){const a=HC(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 $C(e,t,n,s){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,s);return o(),a(),l}const WC=Xu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function YC(e,t,n,s){return(e.children.some(function(l){return WC(l)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function VC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}z1.peek=qC;function z1(e,t,n,s){const a=VC(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=Fu(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=Fu(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 qC(e,t,n){return n.options.strong||"*"}function QC(e,t,n,s){return n.safe(e.value,s)}function GC(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 KC(e,t,n){const s=(H1(n)+(n.options.ruleSpaces?" ":"")).repeat(GC(n));return n.options.ruleSpaces?s.slice(0,-1):s}const $1={blockquote:xC,break:Nm,code:CC,definition:vC,emphasis:O1,hardBreak:Nm,heading:LC,html:D1,image:P1,imageReference:M1,inlineCode:F1,link:U1,linkReference:j1,list:jC,listItem:zC,paragraph:$C,root:YC,strong:z1,text:QC,thematicBreak:KC};function XC(){return{enter:{table:JC,tableData:vm,tableHeader:vm,tableRow:e3},exit:{codeText:t3,table:ZC,tableData:Ec,tableHeader:Ec,tableRow:Ec}}}function JC(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 ZC(e){this.exit(e),this.data.inTable=void 0}function e3(e){this.enter({type:"tableRow",children:[]},e)}function Ec(e){this.exit(e)}function vm(e){this.enter({type:"tableCell",children:[]},e)}function t3(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,n3));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function n3(e,t){return t==="|"?t:e}function r3(e){const t=e||{},n=t.tableCellPadding,s=t.tablePipeAlign,a=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
84
+ `,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,N,I,O){return h(E(b,I,O),b.align)}function d(b,N,I,O){const w=g(b,I,O),F=h([w]);return F.slice(0,F.indexOf(`
85
+ `))}function f(b,N,I,O){const w=I.enter("tableCell"),F=I.enter("phrasing"),z=I.containerPhrasing(b,{...O,before:o,after:o});return F(),w(),z}function h(b,N){return TC(b,{align:N,alignDelimiters:s,padding:n,stringLength:a})}function E(b,N,I){const O=b.children;let w=-1;const F=[],z=N.enter("table");for(;++w<O.length;)F[w]=g(O[w],N,I);return z(),F}function g(b,N,I){const O=b.children;let w=-1;const F=[],z=N.enter("tableRow");for(;++w<O.length;)F[w]=f(O[w],b,N,I);return z(),F}function x(b,N,I){let O=$1.inlineCode(b,N,I);return I.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function i3(){return{exit:{taskListCheckValueChecked:Am,taskListCheckValueUnchecked:Am,paragraph:a3}}}function s3(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:u3}}}function Am(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function a3(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 u3(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=$1.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 o3(){return[H_(),oC(),fC(),XC(),i3()]}function l3(e){return{extensions:[z_(),lC(e),hC(),r3(e),s3()]}}const c3={tokenize:g3,partial:!0},W1={tokenize:E3,partial:!0},Y1={tokenize:T3,partial:!0},V1={tokenize:y3,partial:!0},d3={tokenize:x3,partial:!0},q1={name:"wwwAutolink",tokenize:p3,previous:G1},Q1={name:"protocolAutolink",tokenize:m3,previous:K1},Yn={name:"emailAutolink",tokenize:h3,previous:X1},Rn={};function f3(){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,Q1];Rn[104]=[Yn,Q1];Rn[87]=[Yn,q1];Rn[119]=[Yn,q1];function h3(e,t,n){const s=this;let a,o;return l;function l(g){return!Mc(g)||!X1.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(d3,E,h)(g):g===45||g===95||vt(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 p3(e,t,n){const s=this;return a;function a(l){return l!==87&&l!==119||!G1.call(s,s.previous)||xd(s.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(c3,e.attempt(W1,e.attempt(Y1,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function m3(e,t,n){const s=this;let a="",o=!1;return l;function l(g){return(g===72||g===104)&&K1.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||Pu(g)||Ve(g)||Vr(g)||Qu(g)?n(g):e.attempt(W1,e.attempt(Y1,E),n)(g)}function E(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function g3(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 E3(e,t,n){let s,a,o;return l;function l(h){return h===46||h===95?e.check(V1,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 T3(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(V1,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 y3(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 x3(e,t,n){return s;function s(o){return e.consume(o),a}function a(o){return vt(o)?n(o):t(o)}}function G1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ve(e)}function K1(e){return!Rt(e)}function X1(e){return!(e===47||Mc(e))}function Mc(e){return e===43||e===45||e===46||e===95||vt(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 b3={tokenize:w3,partial:!0};function k3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:N3,continuation:{tokenize:v3},exit:A3}},text:{91:{name:"gfmFootnoteCall",tokenize:C3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:S3,resolveTo:_3}}}}function S3(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 _3(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 C3(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 N3(e,t,n){const s=this,a=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let o,l=0,d;return f;function f(N){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(N){return N===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",E):n(N)}function E(N){if(l>999||N===93&&!d||N===null||N===91||Ve(N))return n(N);if(N===93){e.exit("chunkString");const I=e.exit("gfmFootnoteDefinitionLabelString");return o=En(s.sliceSerialize(I)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(N),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Ve(N)||(d=!0),l++,e.consume(N),N===92?g:E}function g(N){return N===91||N===92||N===93?(e.consume(N),l++,E):E(N)}function x(N){return N===58?(e.enter("definitionMarker"),e.consume(N),e.exit("definitionMarker"),a.includes(o)||a.push(o),Me(e,b,"gfmFootnoteDefinitionWhitespace")):n(N)}function b(N){return t(N)}}function v3(e,t,n){return e.check(ra,t,e.attempt(b3,t,n))}function A3(e){e.exit("gfmFootnoteDefinition")}function w3(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 I3(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,Gu(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(N){return h===126&&E[E.length-1][1].type!=="characterEscape"?f(N):(l.enter("strikethroughSequenceTemporary"),b(N))}function b(N){const I=Ii(h);if(N===126)return g>1?f(N):(l.consume(N),g++,b);if(g<2&&!n)return f(N);const O=l.exit("strikethroughSequenceTemporary"),w=Ii(N);return O._open=!w||w===2&&!!I,O._close=!I||I===2&&!!w,d(N)}}}class L3{constructor(){this.map=[]}add(t,n,s){R3(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 R3(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 O3(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 D3(){return{flow:{null:{name:"table",tokenize:P3,resolveAll:M3}}}}function P3(e,t,n){const s=this;let a=0,o=0,l;return d;function d(U){let ee=s.events.length-1;for(;ee>-1;){const de=s.events[ee][1].type;if(de==="lineEnding"||de==="linePrefix")ee--;else break}const te=ee>-1?s.events[ee][1].type:null,xe=te==="tableHead"||te==="tableRow"?D:f;return xe===D&&s.parser.lazy[s.now().line]?n(U):xe(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):ye(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,N,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):N(U))}function N(U){return U===45||U===58?O(U):U===124?(l=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),I):Z(U)}function I(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"),w):U===45?(o+=1,w(U)):U===null||ye(U)?K(U):Z(U)}function w(U){return U===45?(e.enter("tableDelimiterFiller"),F(U)):Z(U)}function F(U){return U===45?(e.consume(U),F):U===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z(U))}function z(U){return Fe(U)?Me(e,K,"whitespace")(U):K(U)}function K(U){return U===124?N(U):U===null||ye(U)?!l||a!==o?Z(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):Z(U)}function Z(U){return n(U)}function D(U){return e.enter("tableRow"),Q(U)}function Q(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),Q):U===null||ye(U)?(e.exit("tableRow"),t(U)):Fe(U)?Me(e,Q,"whitespace")(U):(e.enter("data"),ae(U))}function ae(U){return U===null||U===124||Ve(U)?(e.exit("data"),Q(U)):(e.consume(U),U===92?ce:ae)}function ce(U){return U===92||U===124?(e.consume(U),ae):ae(U)}}function M3(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 L3;for(;++n<e.length;){const b=e[n],N=b[1];b[0]==="enter"?N.type==="tableHead"?(d=!1,f!==0&&(wm(x,t,f,h,E),E=void 0,f=0),h={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(n,0,[["enter",h,t]])):N.type==="tableRow"||N.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({},N.start),end:Object.assign({},N.end)},x.add(n,0,[["enter",E,t]])),a=N.type==="tableDelimiterRow"?2:E?3:1):a&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.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)):N.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])):N.type==="tableHead"?(d=!0,f=n):N.type==="tableRow"||N.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&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.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=O3(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({},vi(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=vi(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=vi(t.events,n[2]),E=vi(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 N=n[2]+1,I=n[3]-n[2]-1;e.add(N,I,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return a!==void 0&&(o.end=Object.assign({},vi(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function wm(e,t,n,s,a){const o=[],l=vi(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 vi(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const F3={name:"tasklistCheck",tokenize:U3};function B3(){return{text:{91:F3}}}function U3(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 ye(f)?t(f):Fe(f)?e.check({tokenize:j3},t,n)(f):n(f)}}function j3(e,t,n){return Me(e,s,"whitespace");function s(a){return a===null?n(a):t(a)}}function H3(e){return a1([f3(),k3(),I3(e),D3(),B3()])}const z3={};function $3(e){const t=this,n=e||z3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(H3(n)),o.push(o3()),l.push(l3(n))}function W3(){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 Y3(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),s.peek=a,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
86
+ `,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(R1(h,"$")+1,2)),x=d.enter("mathFlow");let b=E.move(g);if(o.meta){const N=d.enter("mathFlowMeta");b+=E.move(d.safe(o.meta,{after:`
87
+ `,before:b,encode:["$"],...E.current()})),N()}return b+=E.move(`
88
+ `),h&&(b+=E.move(h+`
89
+ `)),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 N;for(;N=b.exec(f);){let I=N.index;f.codePointAt(I)===10&&f.codePointAt(I-1)===13&&I--,f=f.slice(0,I)+" "+f.slice(N.index+1)}}return E+f+E}function a(){return"$"}}const V3={tokenize:q3,concrete:!0,name:"mathFlow"},Im={tokenize:Q3,partial:!0};function q3(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(F){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),f(F)}function f(F){return F===36?(e.consume(F),l++,f):l<2?n(F):(e.exit("mathFlowFenceSequence"),Me(e,h,"whitespace")(F))}function h(F){return F===null||ye(F)?g(F):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(F))}function E(F){return F===null||ye(F)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),g(F)):F===36?n(F):(e.consume(F),E)}function g(F){return e.exit("mathFlowFence"),s.interrupt?t(F):e.attempt(Im,x,O)(F)}function x(F){return e.attempt({tokenize:w,partial:!0},O,b)(F)}function b(F){return(o?Me(e,N,"linePrefix",o+1):N)(F)}function N(F){return F===null?O(F):ye(F)?e.attempt(Im,x,O)(F):(e.enter("mathFlowValue"),I(F))}function I(F){return F===null||ye(F)?(e.exit("mathFlowValue"),N(F)):(e.consume(F),I)}function O(F){return e.exit("mathFlow"),t(F)}function w(F,z,K){let Z=0;return Me(F,D,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function D(ce){return F.enter("mathFlowFence"),F.enter("mathFlowFenceSequence"),Q(ce)}function Q(ce){return ce===36?(Z++,F.consume(ce),Q):Z<l?K(ce):(F.exit("mathFlowFenceSequence"),Me(F,ae,"whitespace")(ce))}function ae(ce){return ce===null||ye(ce)?(F.exit("mathFlowFence"),z(ce)):K(ce)}}}function Q3(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 G3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:s,resolve:K3,previous:X3,name:"mathText"};function s(a,o,l){let d=0,f,h;return E;function E(I){return a.enter("mathText"),a.enter("mathTextSequence"),g(I)}function g(I){return I===36?(a.consume(I),d++,g):d<2&&!n?l(I):(a.exit("mathTextSequence"),x(I))}function x(I){return I===null?l(I):I===36?(h=a.enter("mathTextSequence"),f=0,N(I)):I===32?(a.enter("space"),a.consume(I),a.exit("space"),x):ye(I)?(a.enter("lineEnding"),a.consume(I),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(I))}function b(I){return I===null||I===32||I===36||ye(I)?(a.exit("mathTextData"),x(I)):(a.consume(I),b)}function N(I){return I===36?(a.consume(I),f++,N):f===d?(a.exit("mathTextSequence"),a.exit("mathText"),o(I)):(h.type="mathTextData",b(I))}}}function K3(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 X3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function J3(e){return{flow:{36:V3},text:{36:G3(e)}}}const Z3={};function eN(e){const t=this,n=e||Z3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(J3(n)),o.push(W3()),l.push(Y3(n))}const tN=[$3,eN],nN=/\\[a-zA-Z]+|[\^_]/,rN=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,iN=/^[a-zA-Z]{3,}$/,Lm=/[=+\-*/<>≤≥±×÷]/,sN=/[.,;:!?]$/,aN=/\n/,uN=/\s+/,oN=/\d,\d{3}\b/;function lN(e){const t=e.trim();if(!t||aN.test(e))return!1;if(nN.test(t))return!0;if(rN.test(t))return!1;const n=t.split(uN),s=n.filter(o=>iN.test(o.replace(sN,"")));return s.length>=2||oN.test(t)?!1:!!(n.every(o=>o.length<=4)&&(n.length===1||Lm.test(t))||Lm.test(t)&&s.length===0)}function cN(e,t){if(e.startsWith("```",t)||e.startsWith("~~~",t)){const n=e.slice(t,t+3),s=e.indexOf(`
90
+ ${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 dN(e){let t="",n=0;for(;n<e.length;){const s=cN(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(!lN(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 fN(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 J1(e,t,n){const s=n?gN(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=fN(o,t);const h=f.tagName.toLowerCase(),E=s?s.get(h):void 0;if(f.tagName=E||h,hN(l))d.unshift(l);else for(const[g,x]of Object.entries(l))pN(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 hN(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 pN(e,t,n,s){const a=Vu(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"?mN(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 mN(e){const t=[];for(const[n,s]of Object.entries(e))t.push([n,s].join(": "));return t.join("; ")}function gN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const EN=["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"],TN=J1(na,"div"),yN=J1(xr,"g",EN);function xN(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(`
91
+ `,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/"},Z1={}.hasOwnProperty,bN=Object.prototype;function kN(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:eg(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=xN(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=SN(e,t),n}}function eg(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=bd(e,t[n]);s.push(a)}return s}function SN(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;Z1.call(bN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?yN:TN)(t.tagName,a,eg(e,t.childNodes));if(Lu(e,t,l),l.tagName==="template"){const d=t,f=d.sourceCodeLocation,h=f&&f.startTag&&Ai(f.startTag),E=f&&f.endTag&&Ai(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=_N(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function _N(e,t,n){const s=Ai(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)Z1.call(n.attrs,l)&&(o[Vu(e.schema,l).property]=Ai(n.attrs[l]));n.startTag;const d=Ai(n.startTag),f=n.endTag?Ai(n.endTag):void 0,h={opening:d};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return s}function Ai(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 CN={},NN={}.hasOwnProperty,tg=L1("type",{handlers:{root:AN,element:ON,text:LN,comment:RN,doctype:IN}});function vN(e,t){const s=(t||CN).space;return tg(e,s==="svg"?xr:na)}function AN(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 wN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=kd(e.children,n,t),Mi(e,n),n}function IN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Mi(e,t),t}function LN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Mi(e,t),t}function RN(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Mi(e,t),t}function ON(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"&&NN.call(e.properties,o)){const f=DN(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=wN(e.content,s)),d}function DN(e,t,n){const s=Vu(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?W0(n):J0(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=tg(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 PN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],MN=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 ng(e){return e>=55296&&e<=57343}function FN(e){return e>=56320&&e<=57343}function BN(e,t){return(e-55296)*1024+9216+t}function rg(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function ig(e){return e>=64976&&e<=65007||MN.has(e)}var V;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(V||(V={}));const UN=65536;class jN{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=UN,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(FN(n))return this.pos++,this._addGap(),BN(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,_.EOF;return this._err(V.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let 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,ng(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){rg(t)?this._err(V.controlCharacterInInputStream):ig(t)&&this._err(V.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var 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 sg(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 HN=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୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢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;怳Ādp໩໮uct;戏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ǣጓ\0጖y;䐎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Ā;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀ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Ā;e᜚᜜lƀ;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\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩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ↄⅪ←ٖ↛ǰ↉\0↎proø₞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;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\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\0⹻m;櫳;櫽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))),zN=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 $N(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=zN.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 WN=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 YN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function VN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Bc(e)}function qN(e){return e===gt.EQUALS||VN(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 QN{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)|WN)===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)||YN(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($N(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=GN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===$n.Attribute&&(o===0||qN(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 GN(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 X;(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/"})(X||(X={}));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 H;(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"})(H||(H={}));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 KN=new Map([[H.A,p.A],[H.ADDRESS,p.ADDRESS],[H.ANNOTATION_XML,p.ANNOTATION_XML],[H.APPLET,p.APPLET],[H.AREA,p.AREA],[H.ARTICLE,p.ARTICLE],[H.ASIDE,p.ASIDE],[H.B,p.B],[H.BASE,p.BASE],[H.BASEFONT,p.BASEFONT],[H.BGSOUND,p.BGSOUND],[H.BIG,p.BIG],[H.BLOCKQUOTE,p.BLOCKQUOTE],[H.BODY,p.BODY],[H.BR,p.BR],[H.BUTTON,p.BUTTON],[H.CAPTION,p.CAPTION],[H.CENTER,p.CENTER],[H.CODE,p.CODE],[H.COL,p.COL],[H.COLGROUP,p.COLGROUP],[H.DD,p.DD],[H.DESC,p.DESC],[H.DETAILS,p.DETAILS],[H.DIALOG,p.DIALOG],[H.DIR,p.DIR],[H.DIV,p.DIV],[H.DL,p.DL],[H.DT,p.DT],[H.EM,p.EM],[H.EMBED,p.EMBED],[H.FIELDSET,p.FIELDSET],[H.FIGCAPTION,p.FIGCAPTION],[H.FIGURE,p.FIGURE],[H.FONT,p.FONT],[H.FOOTER,p.FOOTER],[H.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[H.FORM,p.FORM],[H.FRAME,p.FRAME],[H.FRAMESET,p.FRAMESET],[H.H1,p.H1],[H.H2,p.H2],[H.H3,p.H3],[H.H4,p.H4],[H.H5,p.H5],[H.H6,p.H6],[H.HEAD,p.HEAD],[H.HEADER,p.HEADER],[H.HGROUP,p.HGROUP],[H.HR,p.HR],[H.HTML,p.HTML],[H.I,p.I],[H.IMG,p.IMG],[H.IMAGE,p.IMAGE],[H.INPUT,p.INPUT],[H.IFRAME,p.IFRAME],[H.KEYGEN,p.KEYGEN],[H.LABEL,p.LABEL],[H.LI,p.LI],[H.LINK,p.LINK],[H.LISTING,p.LISTING],[H.MAIN,p.MAIN],[H.MALIGNMARK,p.MALIGNMARK],[H.MARQUEE,p.MARQUEE],[H.MATH,p.MATH],[H.MENU,p.MENU],[H.META,p.META],[H.MGLYPH,p.MGLYPH],[H.MI,p.MI],[H.MO,p.MO],[H.MN,p.MN],[H.MS,p.MS],[H.MTEXT,p.MTEXT],[H.NAV,p.NAV],[H.NOBR,p.NOBR],[H.NOFRAMES,p.NOFRAMES],[H.NOEMBED,p.NOEMBED],[H.NOSCRIPT,p.NOSCRIPT],[H.OBJECT,p.OBJECT],[H.OL,p.OL],[H.OPTGROUP,p.OPTGROUP],[H.OPTION,p.OPTION],[H.P,p.P],[H.PARAM,p.PARAM],[H.PLAINTEXT,p.PLAINTEXT],[H.PRE,p.PRE],[H.RB,p.RB],[H.RP,p.RP],[H.RT,p.RT],[H.RTC,p.RTC],[H.RUBY,p.RUBY],[H.S,p.S],[H.SCRIPT,p.SCRIPT],[H.SEARCH,p.SEARCH],[H.SECTION,p.SECTION],[H.SELECT,p.SELECT],[H.SOURCE,p.SOURCE],[H.SMALL,p.SMALL],[H.SPAN,p.SPAN],[H.STRIKE,p.STRIKE],[H.STRONG,p.STRONG],[H.STYLE,p.STYLE],[H.SUB,p.SUB],[H.SUMMARY,p.SUMMARY],[H.SUP,p.SUP],[H.TABLE,p.TABLE],[H.TBODY,p.TBODY],[H.TEMPLATE,p.TEMPLATE],[H.TEXTAREA,p.TEXTAREA],[H.TFOOT,p.TFOOT],[H.TD,p.TD],[H.TH,p.TH],[H.THEAD,p.THEAD],[H.TITLE,p.TITLE],[H.TR,p.TR],[H.TRACK,p.TRACK],[H.TT,p.TT],[H.U,p.U],[H.UL,p.UL],[H.SVG,p.SVG],[H.VAR,p.VAR],[H.WBR,p.WBR],[H.XMP,p.XMP]]);function Fi(e){var t;return(t=KN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const re=p,XN={[X.HTML]:new Set([re.ADDRESS,re.APPLET,re.AREA,re.ARTICLE,re.ASIDE,re.BASE,re.BASEFONT,re.BGSOUND,re.BLOCKQUOTE,re.BODY,re.BR,re.BUTTON,re.CAPTION,re.CENTER,re.COL,re.COLGROUP,re.DD,re.DETAILS,re.DIR,re.DIV,re.DL,re.DT,re.EMBED,re.FIELDSET,re.FIGCAPTION,re.FIGURE,re.FOOTER,re.FORM,re.FRAME,re.FRAMESET,re.H1,re.H2,re.H3,re.H4,re.H5,re.H6,re.HEAD,re.HEADER,re.HGROUP,re.HR,re.HTML,re.IFRAME,re.IMG,re.INPUT,re.LI,re.LINK,re.LISTING,re.MAIN,re.MARQUEE,re.MENU,re.META,re.NAV,re.NOEMBED,re.NOFRAMES,re.NOSCRIPT,re.OBJECT,re.OL,re.P,re.PARAM,re.PLAINTEXT,re.PRE,re.SCRIPT,re.SECTION,re.SELECT,re.SOURCE,re.STYLE,re.SUMMARY,re.TABLE,re.TBODY,re.TD,re.TEMPLATE,re.TEXTAREA,re.TFOOT,re.TH,re.THEAD,re.TITLE,re.TR,re.TRACK,re.UL,re.WBR,re.XMP]),[X.MATHML]:new Set([re.MI,re.MO,re.MN,re.MS,re.MTEXT,re.ANNOTATION_XML]),[X.SVG]:new Set([re.TITLE,re.FOREIGN_OBJECT,re.DESC]),[X.XLINK]:new Set,[X.XML]:new Set,[X.XMLNS]:new Set},Uc=new Set([re.H1,re.H2,re.H3,re.H4,re.H5,re.H6]);H.STYLE,H.SCRIPT,H.XMP,H.IFRAME,H.NOEMBED,H.NOFRAMES,H.PLAINTEXT;var C;(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"})(C||(C={}));const st={DATA:C.DATA,RCDATA:C.RCDATA,RAWTEXT:C.RAWTEXT,SCRIPT_DATA:C.SCRIPT_DATA,PLAINTEXT:C.PLAINTEXT,CDATA_SECTION:C.CDATA_SECTION};function JN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ms(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function ZN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function mr(e){return ZN(e)||Ms(e)}function Mm(e){return mr(e)||JN(e)}function Nu(e){return e+32}function ag(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Fm(e){return ag(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function ev(e){return e===_.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:ng(e)?V.surrogateCharacterReference:ig(e)?V.noncharacterCharacterReference:rg(e)||e===_.CARRIAGE_RETURN?V.controlCharacterReference:null}class tv{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=C.DATA,this.returnState=C.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new jN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new QN(HN,(s,a)=>{this.preprocessor.pos=this.entityStartPos+a-1,this._flushCodePointConsumedAsCharacterReference(s)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(V.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:s=>{this._err(V.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+s)},validateNumericCharacterReference:s=>{const a=ev(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(sg(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(V.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Fi(t.tagName),t.type===Pe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(V.endTagWithAttributes),t.selfClosing&&this._err(V.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case 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=ag(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=C.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?$n.Attribute:$n.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===C.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===C.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case C.DATA:{this._stateData(t);break}case C.RCDATA:{this._stateRcdata(t);break}case C.RAWTEXT:{this._stateRawtext(t);break}case C.SCRIPT_DATA:{this._stateScriptData(t);break}case C.PLAINTEXT:{this._statePlaintext(t);break}case C.TAG_OPEN:{this._stateTagOpen(t);break}case C.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case C.TAG_NAME:{this._stateTagName(t);break}case C.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case C.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case C.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case C.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case C.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case C.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case C.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case C.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case C.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case C.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case C.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case C.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case C.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case C.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case C.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case C.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case C.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case C.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case C.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case C.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case C.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case C.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case C.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case C.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case C.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case C.BOGUS_COMMENT:{this._stateBogusComment(t);break}case C.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case C.COMMENT_START:{this._stateCommentStart(t);break}case C.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case C.COMMENT:{this._stateComment(t);break}case C.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case C.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case C.COMMENT_END:{this._stateCommentEnd(t);break}case C.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case C.DOCTYPE:{this._stateDoctype(t);break}case C.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case C.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case C.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case C.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case C.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case C.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case C.CDATA_SECTION:{this._stateCdataSection(t);break}case C.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case C.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case C.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case C.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.TAG_OPEN;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.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=C.RCDATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.RAWTEXT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(mr(t))this._createStartTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.EXCLAMATION_MARK:{this.state=C.MARKUP_DECLARATION_OPEN;break}case _.SOLIDUS:{this.state=C.END_TAG_OPEN;break}case _.QUESTION_MARK:{this._err(V.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t);break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=C.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(mr(t))this._createEndTagToken(),this.state=C.TAG_NAME,this._stateTagName(t);else switch(t){case _.GREATER_THAN_SIGN:{this._err(V.missingEndTagName),this.state=C.DATA;break}case _.EOF:{this._err(V.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(V.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=C.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=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.tagName+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ms(t)?Nu(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){mr(t)?(this.state=C.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=C.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=C.BEFORE_ATTRIBUTE_NAME,!1;case _.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=C.SELF_CLOSING_START_TAG,!1;case _.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=C.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===_.SOLIDUS?this.state=C.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){mr(t)?(this.state=C.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case _.SOLIDUS:{this.state=C.SCRIPT_DATA_END_TAG_OPEN;break}case _.EXCLAMATION_MARK:{this.state=C.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=C.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){mr(t)?(this.state=C.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===_.HYPHEN_MINUS?(this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=C.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===_.SOLIDUS?this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:mr(t)?(this._emitChars("<"),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){mr(t)?(this.state=C.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=C.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=C.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=C.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case _.HYPHEN_MINUS:{this._emitChars("-");break}case _.LESS_THAN_SIGN:{this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case _.GREATER_THAN_SIGN:{this.state=C.SCRIPT_DATA,this._emitChars(">");break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Je);break}case _.EOF:{this._err(V.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=C.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===_.SOLIDUS?(this.state=C.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=C.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=C.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=C.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=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._err(V.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=C.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=C.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=C.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case _.EQUALS_SIGN:{this._leaveAttrName(),this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:{this._err(V.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case _.NULL:{this._err(V.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=C.SELF_CLOSING_START_TAG;break}case _.EQUALS_SIGN:{this.state=C.BEFORE_ATTRIBUTE_VALUE;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=C.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=C.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this.state=C.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingAttributeValue),this.state=C.DATA,this.emitCurrentTagToken();break}default:this.state=C.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case _.APOSTROPHE:{this.state=C.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.EOF:{this._err(V.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=C.BEFORE_ATTRIBUTE_NAME;break}case _.AMPERSAND:{this._startCharacterReference();break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.NULL:{this._err(V.unexpectedNullCharacter),this.currentAttr.value+=Je;break}case _.QUOTATION_MARK:case _.APOSTROPHE:case _.LESS_THAN_SIGN:case _.EQUALS_SIGN:case _.GRAVE_ACCENT:{this._err(V.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case _.EOF:{this._err(V.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=C.BEFORE_ATTRIBUTE_NAME;break}case _.SOLIDUS:{this._leaveAttrValue(),this.state=C.SELF_CLOSING_START_TAG;break}case _.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBetweenAttributes),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case _.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=C.DATA,this.emitCurrentTagToken();break}case _.EOF:{this._err(V.eofInTag),this._emitEOFToken();break}default:this._err(V.unexpectedSolidusInTag),this.state=C.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case _.NULL:{this._err(V.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=C.COMMENT_START):this._consumeSequenceIfMatch(Ut.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ut.DOCTYPE.length+1),this.state=C.DOCTYPE):this._consumeSequenceIfMatch(Ut.CDATA_START,!0)?this.inForeignNode?this.state=C.CDATA_SECTION:(this._err(V.cdataInHtmlContent),this._createCommentToken(Ut.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=C.BOGUS_COMMENT):this._ensureHibernation()||(this._err(V.incorrectlyOpenedComment),this._createCommentToken(2),this.state=C.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_START_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptClosingOfEmptyComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END_DASH;break}case _.LESS_THAN_SIGN:{n.data+="<",this.state=C.COMMENT_LESS_THAN_SIGN;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.data+=Je;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case _.EXCLAMATION_MARK:{n.data+="!",this.state=C.COMMENT_LESS_THAN_SIGN_BANG;break}case _.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=C.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=C.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===_.HYPHEN_MINUS?this.state=C.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=C.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==_.GREATER_THAN_SIGN&&t!==_.EOF&&this._err(V.nestedComment),this.state=C.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{this.state=C.COMMENT_END;break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentComment(n);break}case _.EXCLAMATION_MARK:{this.state=C.COMMENT_END_BANG;break}case _.HYPHEN_MINUS:{n.data+="-";break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=C.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case _.HYPHEN_MINUS:{n.data+="--!",this.state=C.COMMENT_END_DASH;break}case _.GREATER_THAN_SIGN:{this._err(V.incorrectlyClosedComment),this.state=C.DATA,this.emitCurrentComment(n);break}case _.EOF:{this._err(V.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=C.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BEFORE_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingWhitespaceBeforeDoctypeName),this.state=C.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ms(t))this._createDoctypeToken(String.fromCharCode(Nu(t))),this.state=C.DOCTYPE_NAME;else switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.NULL:{this._err(V.unexpectedNullCharacter),this._createDoctypeToken(Je),this.state=C.DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=C.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.AFTER_DOCTYPE_NAME;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.name+=Je;break}case _.EOF:{this._err(V.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=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ut.PUBLIC,!1)?this.state=C.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ut.SYSTEM,!1)?this.state=C.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(V.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=C.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=C.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.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=C.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.publicId="",this.state=C.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.publicId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:{this.state=C.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case _.GREATER_THAN_SIGN:{this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.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=C.DATA;break}case _.QUOTATION_MARK:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.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=C.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.QUOTATION_MARK:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{this._err(V.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.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=C.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case _.APOSTROPHE:{n.systemId="",this.state=C.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case _.GREATER_THAN_SIGN:{this._err(V.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.DATA,this.emitCurrentDoctype(n);break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case _.QUOTATION_MARK:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case _.APOSTROPHE:{this.state=C.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case _.NULL:{this._err(V.unexpectedNullCharacter),n.systemId+=Je;break}case _.GREATER_THAN_SIGN:{this._err(V.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case _.SPACE:case _.LINE_FEED:case _.TABULATION:case _.FORM_FEED:break;case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.EOF:{this._err(V.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(V.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=C.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case _.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=C.DATA;break}case _.NULL:{this._err(V.unexpectedNullCharacter);break}case _.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case _.RIGHT_SQUARE_BRACKET:{this.state=C.CDATA_SECTION_BRACKET;break}case _.EOF:{this._err(V.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===_.RIGHT_SQUARE_BRACKET?this.state=C.CDATA_SECTION_END:(this._emitChars("]"),this.state=C.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case _.GREATER_THAN_SIGN:{this.state=C.DATA;break}case _.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=C.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))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Mm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ug=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([...ug,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Bu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),nv=new Set([...Bu,p.OL,p.UL]),rv=new Set([...Bu,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]),iv=new Set([p.TR,p.TEMPLATE,p.HTML]),sv=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),av=new Set([p.TABLE,p.TEMPLATE,p.HTML]),uv=new Set([p.TD,p.TH]);class ov{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)===X.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])!==X.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,X.HTML)}popUntilTableCellPopped(){this.popUntilPopped(uv,X.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(av,X.HTML)}clearBackToTableBodyContext(){this.clearBackTo(sv,X.HTML)}clearBackToTableRowContext(){this.clearBackTo(iv,X.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 X.HTML:{if(a===t)return!0;if(n.has(a))return!1;break}case X.SVG:{if(jm.has(a))return!1;break}case X.MATHML:{if(Um.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bu)}hasInListItemScope(t){return this.hasInDynamicScope(t,nv)}hasInButtonScope(t){return this.hasInDynamicScope(t,rv)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case X.HTML:{if(Uc.has(n))return!0;if(Bu.has(n))return!1;break}case X.SVG:{if(jm.has(n))return!1;break}case X.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])===X.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])===X.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])===X.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&&ug.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 Tc=3;var wn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(wn||(wn={}));const Hm={type:wn.Marker};class lv{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<Tc)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<Tc)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>=Tc&&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}}},og="html",cv="about:legacy-compat",dv="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",lg=["+//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//"],fv=[...lg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],hv=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),cg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],pv=[...cg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function zm(e,t){return t.some(n=>e.startsWith(n))}function mv(e){return e.name===og&&e.publicId===null&&(e.systemId===null||e.systemId===cv)}function gv(e){if(e.name!==og)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===dv)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),hv.has(n))return sn.QUIRKS;let s=t===null?fv:lg;if(zm(n,s))return sn.QUIRKS;if(s=t===null?cg:pv,zm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const $m={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Ev="definitionurl",Tv="definitionURL",yv=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])),xv=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:X.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:X.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:X.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:X.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:X.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:X.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:X.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:X.XML}],["xml:space",{prefix:"xml",name:"space",namespace:X.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:X.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:X.XMLNS}]]),bv=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])),kv=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 Sv(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===Yr.COLOR||s===Yr.SIZE||s===Yr.FACE)||kv.has(t)}function dg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===Ev){e.attrs[t].name=Tv;break}}function fg(e){for(let t=0;t<e.attrs.length;t++){const n=yv.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=xv.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 _v(e){const t=bv.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Fi(e.tagName))}function Cv(e,t){return t===X.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function Nv(e,t,n){if(t===X.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===X.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function vv(e,t,n,s){return(!s||s===X.HTML)&&Nv(e,t,n)||(!s||s===X.MATHML)&&Cv(e,t)}const Av="hidden",wv=8,Iv=3;var R;(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"})(R||(R={}));const Lv={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},hg=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=R.INITIAL,this.originalInsertionMode=R.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 tv(this.options,this),this.activeFormattingElements=new lv(this.treeAdapter),this.fragmentContextID=s?Fi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new ov(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(H.TEMPLATE,X.HTML,[]));const a=s.treeAdapter.createElement("documentmock",X.HTML,[]),o=new this(s,a,t);return o.fragmentContextID===p.TEMPLATE&&o.tmplInsertionModeStack.unshift(R.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:Lv,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)===X.HTML;this.currentNotInHTML=!s,this.tokenizer.inForeignNode=!s&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,X.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=R.TEXT}switchToPlaintextParsing(){this.insertionMode=R.TEXT,this.originalInsertionMode=R.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)===H.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==X.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,X.HTML,[]);this._attachElementToTree(s,null),this.openElements.push(s,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,X.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(H.HTML,X.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)===H.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===X.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&s!==void 0&&!this._isIntegrationPoint(s,n,X.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 vv(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=R.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=R.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=R.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=R.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=R.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=R.IN_TABLE;return}case p.BODY:{this.insertionMode=R.IN_BODY;return}case p.FRAMESET:{this.insertionMode=R.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?R.AFTER_HEAD:R.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=R.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=R.IN_HEAD;return}break}}this.insertionMode=R.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=R.IN_SELECT_IN_TABLE;return}}this.insertionMode=R.IN_SELECT}_isElementCausesFosterParenting(t){return hg.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)===X.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 XN[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){uw(this,t);return}switch(this.insertionMode){case R.INITIAL:{Rs(this,t);break}case R.BEFORE_HTML:{js(this,t);break}case R.BEFORE_HEAD:{Hs(this,t);break}case R.IN_HEAD:{zs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case R.AFTER_HEAD:{Ws(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{mg(this,t);break}case R.TEXT:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{yc(this,t);break}case R.IN_TABLE_TEXT:{bg(this,t);break}case R.IN_COLUMN_GROUP:{Uu(this,t);break}case R.AFTER_BODY:{ju(this,t);break}case R.AFTER_AFTER_BODY:{Ru(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){aw(this,t);return}switch(this.insertionMode){case R.INITIAL:{Rs(this,t);break}case R.BEFORE_HTML:{js(this,t);break}case R.BEFORE_HEAD:{Hs(this,t);break}case R.IN_HEAD:{zs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case R.AFTER_HEAD:{Ws(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{yc(this,t);break}case R.IN_COLUMN_GROUP:{Uu(this,t);break}case R.AFTER_BODY:{ju(this,t);break}case R.AFTER_AFTER_BODY:{Ru(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){jc(this,t);return}switch(this.insertionMode){case R.INITIAL:case R.BEFORE_HTML:case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_TEMPLATE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{jc(this,t);break}case R.IN_TABLE_TEXT:{Os(this,t);break}case R.AFTER_BODY:{Bv(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{Uv(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{jv(this,t);break}case R.BEFORE_HEAD:case R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:{this._err(t,V.misplacedDoctype);break}case R.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,V.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?ow(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Rs(this,t);break}case R.BEFORE_HTML:{Hv(this,t);break}case R.BEFORE_HEAD:{$v(this,t);break}case R.IN_HEAD:{bn(this,t);break}case R.IN_HEAD_NO_SCRIPT:{Vv(this,t);break}case R.AFTER_HEAD:{Qv(this,t);break}case R.IN_BODY:{wt(this,t);break}case R.IN_TABLE:{Li(this,t);break}case R.IN_TABLE_TEXT:{Os(this,t);break}case R.IN_CAPTION:{WA(this,t);break}case R.IN_COLUMN_GROUP:{Nd(this,t);break}case R.IN_TABLE_BODY:{no(this,t);break}case R.IN_ROW:{ro(this,t);break}case R.IN_CELL:{qA(this,t);break}case R.IN_SELECT:{_g(this,t);break}case R.IN_SELECT_IN_TABLE:{GA(this,t);break}case R.IN_TEMPLATE:{XA(this,t);break}case R.AFTER_BODY:{ZA(this,t);break}case R.IN_FRAMESET:{ew(this,t);break}case R.AFTER_FRAMESET:{nw(this,t);break}case R.AFTER_AFTER_BODY:{iw(this,t);break}case R.AFTER_AFTER_FRAMESET:{sw(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?lw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Rs(this,t);break}case R.BEFORE_HTML:{zv(this,t);break}case R.BEFORE_HEAD:{Wv(this,t);break}case R.IN_HEAD:{Yv(this,t);break}case R.IN_HEAD_NO_SCRIPT:{qv(this,t);break}case R.AFTER_HEAD:{Gv(this,t);break}case R.IN_BODY:{to(this,t);break}case R.TEXT:{DA(this,t);break}case R.IN_TABLE:{Ks(this,t);break}case R.IN_TABLE_TEXT:{Os(this,t);break}case R.IN_CAPTION:{YA(this,t);break}case R.IN_COLUMN_GROUP:{VA(this,t);break}case R.IN_TABLE_BODY:{Hc(this,t);break}case R.IN_ROW:{Sg(this,t);break}case R.IN_CELL:{QA(this,t);break}case R.IN_SELECT:{Cg(this,t);break}case R.IN_SELECT_IN_TABLE:{KA(this,t);break}case R.IN_TEMPLATE:{JA(this,t);break}case R.AFTER_BODY:{vg(this,t);break}case R.IN_FRAMESET:{tw(this,t);break}case R.AFTER_FRAMESET:{rw(this,t);break}case R.AFTER_AFTER_BODY:{Ru(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{Rs(this,t);break}case R.BEFORE_HTML:{js(this,t);break}case R.BEFORE_HEAD:{Hs(this,t);break}case R.IN_HEAD:{zs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{$s(this,t);break}case R.AFTER_HEAD:{Ws(this,t);break}case R.IN_BODY:case R.IN_TABLE:case R.IN_CAPTION:case R.IN_COLUMN_GROUP:case R.IN_TABLE_BODY:case R.IN_ROW:case R.IN_CELL:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:{yg(this,t);break}case R.TEXT:{PA(this,t);break}case R.IN_TABLE_TEXT:{Os(this,t);break}case R.IN_TEMPLATE:{Ng(this,t);break}case R.AFTER_BODY:case R.IN_FRAMESET:case R.AFTER_FRAMESET:case R.AFTER_AFTER_BODY:case R.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 R.IN_HEAD:case R.IN_HEAD_NO_SCRIPT:case R.AFTER_HEAD:case R.TEXT:case R.IN_COLUMN_GROUP:case R.IN_SELECT:case R.IN_SELECT_IN_TABLE:case R.IN_FRAMESET:case R.AFTER_FRAMESET:{this._insertCharacters(t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:case R.AFTER_BODY:case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{pg(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{yc(this,t);break}case R.IN_TABLE_TEXT:{xg(this,t);break}}}}function Rv(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):Tg(e,t),n}function Ov(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 Dv(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>=Iv;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=Pv(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function Pv(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 Mv(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===X.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Fv(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<wv;n++){const s=Rv(e,t);if(!s)break;const a=Ov(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=Dv(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&Mv(e,l,o),Fv(e,a,s)}}function jc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Bv(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Uv(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 jv(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:gv(t);mv(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function Rs(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function Hv(e,t){t.tagID===p.HTML?(e._insertElement(t,X.HTML),e.insertionMode=R.BEFORE_HEAD):js(e,t)}function zv(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=R.BEFORE_HEAD,e._processToken(t)}function $v(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.HEAD:{e._insertElement(t,X.HTML),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD;break}default:Hs(e,t)}}function Wv(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Hs(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function Hs(e,t){e._insertFakeElement(H.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.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,X.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,X.HTML),e.insertionMode=R.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=R.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(R.IN_TEMPLATE);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:zs(e,t)}}function Yv(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=R.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,V.endTagWithoutMatchingOpenElement)}}function Kr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,V.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,V.endTagWithoutMatchingOpenElement)}function zs(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function Vv(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,V.nestedNoscriptInHead);break}default:$s(e,t)}}function qv(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case p.BR:{$s(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function $s(e,t){const n=t.type===Pe.EOF?V.openElementsLeftAfterEof:V.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=R.IN_HEAD,e._processToken(t)}function Qv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.BODY:{e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,X.HTML),e.insertionMode=R.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,V.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),bn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:Ws(e,t)}}function Gv(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,V.endTagWithoutMatchingOpenElement)}}function Ws(e,t){e._insertFakeElement(H.BODY,p.BODY),e.insertionMode=R.IN_BODY,eo(e,t)}function eo(e,t){switch(t.type){case Pe.CHARACTER:{mg(e,t);break}case Pe.WHITESPACE_CHARACTER:{pg(e,t);break}case Pe.COMMENT:{jc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{to(e,t);break}case Pe.EOF:{yg(e,t);break}}}function pg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function mg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function Kv(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function Xv(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function Jv(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_FRAMESET)}function Zv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function eA(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,X.HTML)}function tA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function nA(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),n||(e.formElement=e.openElements.current))}function rA(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,X.HTML)}function iA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.tokenizer.state=st.PLAINTEXT}function sA(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1}function aA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(_d(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function uA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function oA(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(_d(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function lA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function cA(e,t){e.treeAdapter.getDocumentMode(e.document)!==sn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=R.IN_TABLE}function gg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Eg(e){const t=sg(e,Yr.TYPE);return t!=null&&t.toLowerCase()===Av}function dA(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),Eg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function fA(e,t){e._appendElement(t,X.HTML),t.ackSelfClosing=!0}function hA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function pA(e,t){t.tagName=H.IMG,t.tagID=p.IMG,gg(e,t)}function mA(e,t){e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.tokenizer.state=st.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=R.TEXT}function gA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function EA(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function Vm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function TA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===R.IN_TABLE||e.insertionMode===R.IN_CAPTION||e.insertionMode===R.IN_TABLE_BODY||e.insertionMode===R.IN_ROW||e.insertionMode===R.IN_CELL?R.IN_SELECT_IN_TABLE:R.IN_SELECT}function yA(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function xA(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,X.HTML)}function bA(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,X.HTML)}function kA(e,t){e._reconstructActiveFormattingElements(),dg(t),Sd(t),t.selfClosing?e._appendElement(t,X.MATHML):e._insertElement(t,X.MATHML),t.ackSelfClosing=!0}function SA(e,t){e._reconstructActiveFormattingElements(),fg(t),Sd(t),t.selfClosing?e._appendElement(t,X.SVG):e._insertElement(t,X.SVG),t.ackSelfClosing=!0}function qm(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.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:{uA(e,t);break}case p.A:{aA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{eA(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:{Zv(e,t);break}case p.LI:case p.DD:case p.DT:{rA(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{gg(e,t);break}case p.HR:{hA(e,t);break}case p.RB:case p.RTC:{xA(e,t);break}case p.RT:case p.RP:{bA(e,t);break}case p.PRE:case p.LISTING:{tA(e,t);break}case p.XMP:{gA(e,t);break}case p.SVG:{SA(e,t);break}case p.HTML:{Kv(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:{Xv(e,t);break}case p.FORM:{nA(e,t);break}case p.NOBR:{oA(e,t);break}case p.MATH:{kA(e,t);break}case p.TABLE:{cA(e,t);break}case p.INPUT:{dA(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{fA(e,t);break}case p.IMAGE:{pA(e,t);break}case p.BUTTON:{sA(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{lA(e,t);break}case p.IFRAME:{EA(e,t);break}case p.SELECT:{TA(e,t);break}case p.OPTION:case p.OPTGROUP:{yA(e,t);break}case p.NOEMBED:case p.NOFRAMES:{Vm(e,t);break}case p.FRAMESET:{Jv(e,t);break}case p.TEXTAREA:{mA(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?Vm(e,t):qm(e,t);break}case p.PLAINTEXT:{iA(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 _A(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function CA(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,vg(e,t))}function NA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function vA(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 AA(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(H.P,p.P),e._closePElement()}function wA(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function IA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function LA(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function RA(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function OA(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function Tg(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 to(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:{AA(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:{NA(e,t);break}case p.LI:{wA(e);break}case p.DD:case p.DT:{IA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{LA(e);break}case p.BR:{OA(e);break}case p.BODY:{_A(e,t);break}case p.HTML:{CA(e,t);break}case p.FORM:{vA(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{RA(e,t);break}case p.TEMPLATE:{Kr(e,t);break}default:Tg(e,t)}}function yg(e,t){e.tmplInsertionModeStack.length>0?Ng(e,t):Cd(e,t)}function DA(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 PA(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function yc(e,t){if(e.openElements.currentTagId!==void 0&&hg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=R.IN_TABLE_TEXT,t.type){case Pe.CHARACTER:{bg(e,t);break}case Pe.WHITESPACE_CHARACTER:{xg(e,t);break}}else sa(e,t)}function MA(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CAPTION}function FA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function BA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,p.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,Nd(e,t)}function UA(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_TABLE_BODY}function jA(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,p.TBODY),e.insertionMode=R.IN_TABLE_BODY,no(e,t)}function HA(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function zA(e,t){Eg(t)?e._appendElement(t,X.HTML):sa(e,t),t.ackSelfClosing=!0}function $A(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,X.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:{jA(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{bn(e,t);break}case p.COL:{BA(e,t);break}case p.FORM:{$A(e,t);break}case p.TABLE:{HA(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{UA(e,t);break}case p.INPUT:{zA(e,t);break}case p.CAPTION:{MA(e,t);break}case p.COLGROUP:{FA(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,eo(e,t),e.fosterParentingEnabled=n}function xg(e,t){e.pendingCharacterTokens.push(t)}function bg(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 kg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function WA(e,t){const n=t.tagID;kg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,Li(e,t)):wt(e,t)}function YA(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=R.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:to(e,t)}}function Nd(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.COL:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{bn(e,t);break}default:Uu(e,t)}}function VA(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE);break}case p.TEMPLATE:{Kr(e,t);break}case p.COL:break;default:Uu(e,t)}}function Uu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function no(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(H.TR,p.TR),e.insertionMode=R.IN_ROW,ro(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=R.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=R.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=R.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 ro(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,X.HTML),e.insertionMode=R.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=R.IN_TABLE_BODY,no(e,t));break}default:Li(e,t)}}function Sg(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=R.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=R.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 qA(e,t){const n=t.tagID;kg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),ro(e,t)):wt(e,t)}function QA(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=R.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Sg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:to(e,t)}}function _g(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,X.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,X.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,X.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 Cg(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 GA(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)):_g(e,t)}function KA(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Cg(e,t)}function XA(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]=R.IN_TABLE,e.insertionMode=R.IN_TABLE,Li(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,Nd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,no(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,ro(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,wt(e,t)}}function JA(e,t){t.tagID===p.TEMPLATE&&Kr(e,t)}function Ng(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 ZA(e,t){t.tagID===p.HTML?wt(e,t):ju(e,t)}function vg(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=R.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 ju(e,t)}function ju(e,t){e.insertionMode=R.IN_BODY,eo(e,t)}function ew(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.FRAMESET:{e._insertElement(t,X.HTML);break}case p.FRAME:{e._appendElement(t,X.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{bn(e,t);break}}}function tw(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=R.AFTER_FRAMESET))}function nw(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{bn(e,t);break}}}function rw(e,t){t.tagID===p.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function iw(e,t){t.tagID===p.HTML?wt(e,t):Ru(e,t)}function Ru(e,t){e.insertionMode=R.IN_BODY,eo(e,t)}function sw(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{bn(e,t);break}}}function aw(e,t){t.chars=Je,e._insertCharacters(t)}function uw(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ag(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==X.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ow(e,t){if(Sv(t))Ag(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===X.MATHML?dg(t):s===X.SVG&&(_v(t),fg(t)),Sd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function lw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Ag(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)===X.HTML){e._endTagOutsideForeignContent(t);break}const a=e.treeAdapter.getTagName(s);if(a.toLowerCase()===t.tagName){t.tagName=a,e.openElements.shortenToLength(n);break}}}H.AREA,H.BASE,H.BASEFONT,H.BGSOUND,H.BR,H.COL,H.EMBED,H.FRAME,H.HR,H.IMG,H.INPUT,H.KEYGEN,H.LINK,H.META,H.PARAM,H.SOURCE,H.TRACK,H.WBR;const cw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,dw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Qm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function wg(e,t){const n=bw(e),s=L1("type",{handlers:{root:fw,element:hw,text:pw,comment:Lg,doctype:mw,raw:Ew},unknown:Tw}),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=kN(o,{file:a.options.file});return a.stitches&&Zu(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 Ig(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function fw(e,t){Ig(e.children,t)}function hw(e,t){yw(e,t),Ig(e.children,t),xw(e,t)}function pw(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 mw(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 gw(e,t){t.stitches=!0;const n=kw(e);if("children"in e&&"children"in n){const s=wg({type:"root",children:e.children},t.options);n.children=s.children}Lg({type:"comment",value:{stitch:n}},t)}function Lg(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 Ew(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,Rg(t,Ln(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(cw,"&lt;$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 Tw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))gw(n,t);else{let s="";throw dw.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){Rg(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 Rg(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 yw(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=vN({...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 xw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&PN.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Bi(t,qu(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 bw(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=qu(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 kw(e){return"children"in e?qr({...e,children:[]}):qr(e)}function Sw(e){return function(t,n){return wg(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 _w(e,t){let n={type:"root",children:[]};const s={schema:t?{...zc,...t}:zc,stack:[]},a=Og(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function Og(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Cw(e,n);case"doctype":return Nw(e,n);case"element":return vw(e,n);case"root":return Aw(e,n);case"text":return ww(e,n)}}}function Cw(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 Nw(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ua(n,t),n}}function vw(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=Dg(e,t.children),a=Iw(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 Aw(e,t){const s={type:"root",children:Dg(e,t.children)};return ua(s,t),s}function ww(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return ua(s,t),s}function Dg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=Og(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function Iw(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)?Lw(e,t,n,s):Pg(e,t,n,s):void 0}function Lw(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Pg(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Pg(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&Rw(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 Rw(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=e1(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 Ow(e){return function(t){return _w(t,e)}}const $c=zc,jr=(e,...t)=>{var n;return[...((n=$c.attributes)==null?void 0:n[e])??[],...t]},Dw={...$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")}},Pw=new Set(["code","pre","svg","math","style","script","textarea"]),Mw="fade-word";function Fw(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:[Mw]},children:[{type:"text",value:n}]})}return t}function Mg(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...Fw(s.value??""));continue}if(s.type==="element"&&Pw.has(s.tagName??"")){n.push(s);continue}Mg(s),n.push(s)}e.children=n}function Bw(){return e=>Mg(e)}const Uw=256*1024;let Hr=null,jw=0;const Hu=new Map;function Xm(e,t){var n;(n=Hu.get(e))==null||n(t),Hu.delete(e)}function Hw(){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[...Hu.keys()])Xm(e,null);Hr=null})}catch{return null}return Hr}async function vd(e,t){if(e.length>Uw)return null;const n=Hw();if(!n)return null;const s=++jw;return new Promise(a=>{Hu.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function zw({code:e,lang:t}){const[n,s]=A.useState(null);A.useEffect(()=>{let o=!1;return vd(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 xc=null;function $w(){return xc||(xc=Nc(()=>import("./mermaid.core-Cw282Xmk.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))),xc}let Ww=0;function Yw({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 $w().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${Ww++}`,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 Vw=/language-(\w+)/,qw=/\n$/,Qw={code(e){const{className:t,children:n}=e,s=Vw.exec(t??""),a=String(n).replace(qw,"");if(!t&&!a.includes(`
92
+ `))return T.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?T.jsx(Yw,{code:a}):T.jsx(zw,{code:a,lang:l})},a(e){return T.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let wi=null,Jm=null;function Fg(){return Jm??(Jm=Promise.all([Nc(()=>import("./index-D9ooBx1d.js"),__vite__mapDeps([0,1])),Nc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{wi=e.default})),Jm}let Zm=!1;function Gw(){if(Zm||wi)return;Zm=!0;const e=()=>void Fg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const Kw=/(^|[^\\])\$/,Xs=A.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=A.useMemo(()=>dN(t),[t]),o=Kw.test(a),[l,d]=A.useState(()=>wi!==null);A.useEffect(()=>{if(wi)return;if(!o){Gw();return}let h=!0;return Fg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=A.useMemo(()=>{const h=o&&wi?[wi]:[];return n?[Sw,[Ow,Dw],...h]:s?[...h,Bw]:h},[n,s,o,l]);return T.jsx("div",{className:"md",children:T.jsx(L_,{remarkPlugins:tN,rehypePlugins:f,components:Qw,children:a})})});function Xw(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 Jw=4e5;function n0(e,t){const n=e.split(`
93
+ `),s=t.split(`
94
+ `),a=n.length,o=s.length;if(a*o>Jw)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 Bg={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},Tn=e=>!!e&&typeof e=="object";function Ad(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 Zw={shell:"shell",write:"write",read:"read",grep:"grep",todo:"todo_list",webfetch:"web_fetch",websearch:"web_search",introspect:"introspect",generic:void 0},eI=/^@?([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,tI=/@([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)/;function nI(e){const t=eI.exec(e.name??"");if(t)return`@${t[1]}/${t[2]}`;const n=tI.exec(e.title??"");return!n||e.name&&e.name!==n[2]?null:`@${n[1]}/${n[2]}`}function rI(e){const t=nI(e);if(t)return t;if(e.name)return e.name;const n=Zw[Ad(e)];if(n)return n;const s=e.title??"";return s&&!/\s/.test(s)?s:"tool"}function Ug(e){const t=e.trim().split("/").pop()??"",n=t.includes(".")?t.split(".").pop().toLowerCase():t.toLowerCase();return{ts:"typescript",tsx:"tsx",js:"javascript",jsx:"jsx",mjs:"javascript",cjs:"javascript",json:"json",jsonc:"json",css:"css",scss:"scss",less:"less",html:"html",htm:"html",xml:"xml",svg:"xml",vue:"vue",svelte:"svelte",md:"markdown",markdown:"markdown",py:"python",rb:"ruby",rs:"rust",go:"go",java:"java",kt:"kotlin",c:"c",h:"c",cpp:"cpp",cc:"cpp",hpp:"cpp",cs:"csharp",sh:"bash",bash:"bash",zsh:"bash",yml:"yaml",yaml:"yaml",toml:"toml",sql:"sql",php:"php",swift:"swift",lua:"lua",dockerfile:"docker",ini:"ini",conf:"ini",env:"ini",proto:"proto",graphql:"graphql"}[n]??"text"}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 iI(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:[],...iI(e.output)]}function sI(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 aI(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 uI=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function oI(){const e=uI.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 lI=`
95
+ (function () {
96
+ var parent = window.parent;
97
+ var root = document.getElementById('root');
98
+ var last = null;
99
+ var scripted = false;
100
+
101
+ function post(msg) { parent.postMessage(msg, '*'); }
102
+
103
+ // The only way a widget can talk to Casper: ask for a prompt to be sent. The
104
+ // app decides whether to honour it.
105
+ window.casper = {
106
+ sendPrompt: function (text) {
107
+ if (typeof text !== 'string' || !text.trim()) return;
108
+ post({ type: 'casper:prompt', text: text.slice(0, 4000) });
109
+ },
110
+ };
111
+
112
+ // Guarded, because a second pass would replace the nodes a widget's scripts are
113
+ // already driving with inert copies.
114
+ function setContent(html) {
115
+ if (!root) root = document.getElementById('root');
116
+ if (!root || html === last) return;
117
+ last = html;
118
+ root.innerHTML = html;
119
+ }
120
+
121
+ // innerHTML leaves scripts inert; recreating them runs them, once the content is
122
+ // final so a half-written script never executes. One at a time, waiting on anything
123
+ // with a src: a real document blocks there, and running them all at once is how you
124
+ // get "Chart is not defined".
125
+ function runScripts() {
126
+ if (scripted) return;
127
+ scripted = true;
128
+ var list = [].slice.call(root.querySelectorAll('script'));
129
+ var index = 0;
130
+
131
+ function next() {
132
+ if (index >= list.length) return;
133
+ var old = list[index++];
134
+ var fresh = document.createElement('script');
135
+ for (var a = 0; a < old.attributes.length; a++) {
136
+ fresh.setAttribute(old.attributes[a].name, old.attributes[a].value);
137
+ }
138
+ fresh.textContent = old.textContent;
139
+ var external = Boolean(old.getAttribute('src'));
140
+ if (external) {
141
+ fresh.async = false;
142
+ var moved = false;
143
+ var advance = function () {
144
+ if (moved) return;
145
+ moved = true;
146
+ next();
147
+ };
148
+ fresh.onload = advance;
149
+ fresh.onerror = advance;
150
+ // A CDN that never answers shouldn't strand the rest of the widget.
151
+ setTimeout(advance, 10000);
152
+ }
153
+ old.parentNode.replaceChild(fresh, old);
154
+ if (!external) next();
155
+ }
156
+
157
+ next();
158
+ }
159
+
160
+ var lastHeight = 0;
161
+
162
+ // Measured off #root, not the document: in a frame the html box is the viewport,
163
+ // so it reports the size the host already chose rather than the content's. The
164
+ // two spare pixels absorb fractional layout heights, which otherwise leave a
165
+ // sliver of overflow and a scrollbar.
166
+ function contentHeight() {
167
+ if (!root) root = document.getElementById('root');
168
+ var bottom = 0;
169
+ if (root) {
170
+ var box = root.getBoundingClientRect();
171
+ bottom = box.top + Math.max(root.scrollHeight, box.height);
172
+ }
173
+ var body = document.body ? document.body.scrollHeight : 0;
174
+ return Math.ceil(Math.max(bottom, body)) + 2;
175
+ }
176
+
177
+ function reportHeight() {
178
+ var h = contentHeight();
179
+ if (h !== lastHeight) { lastHeight = h; post({ type: 'casper:height', height: h }); }
180
+ }
181
+
182
+ if (window.ResizeObserver) {
183
+ var ro = new ResizeObserver(reportHeight);
184
+ ro.observe(document.documentElement);
185
+ // The one that actually grows with the content.
186
+ if (root) ro.observe(root);
187
+ }
188
+
189
+ // Canvases and late fonts resize without tripping the observer, so poll too -
190
+ // but only briefly after the content settles. A transcript full of widgets each
191
+ // polling forever would read layout dozens of times a second.
192
+ var poll = null;
193
+ function pollHeight(ms) {
194
+ if (poll) clearInterval(poll);
195
+ var until = Date.now() + ms;
196
+ poll = setInterval(function () {
197
+ reportHeight();
198
+ if (Date.now() > until) { clearInterval(poll); poll = null; }
199
+ }, 250);
200
+ }
201
+
202
+ window.addEventListener('message', function (e) {
203
+ if (e.source !== parent) return;
204
+ var d = e.data;
205
+ if (!d || typeof d !== 'object') return;
206
+ if (d.type === 'casper:theme') {
207
+ document.getElementById('theme').textContent = ':root{' + d.css + '}';
208
+ return;
209
+ }
210
+ if (d.type !== 'casper:html') return;
211
+ setContent(d.html);
212
+ reportHeight();
213
+ runScripts();
214
+ // Scripts can draw for a while after they run; watch a little longer.
215
+ pollHeight(4000);
216
+ });
217
+ })();
218
+ `,cI=`
219
+ *, *::before, *::after { box-sizing: border-box; }
220
+ html, body { margin: 0; padding: 0; background: transparent; }
221
+ /* The host sizes the frame to fit, so a scrollbar in here is always a measuring
222
+ error rather than something to scroll. */
223
+ html { overflow: hidden; }
224
+ body {
225
+ font-family: var(--font-body, system-ui, sans-serif);
226
+ font-size: 14px;
227
+ line-height: 1.5;
228
+ color: var(--color-text-primary, #f8f8f2);
229
+ overflow-x: hidden;
230
+ }
231
+ #root { overflow-x: hidden; }
232
+ a { color: var(--color-accent, #bd93f9); }
233
+ ::-webkit-scrollbar { width: 8px; height: 8px; }
234
+ ::-webkit-scrollbar-thumb { background: var(--color-border, #44475a); border-radius: 4px; }
235
+ `;function dI(){return`<!doctype html>
236
+ <html>
237
+ <head>
238
+ <meta charset="utf-8">
239
+ <meta http-equiv="Content-Security-Policy" content="${oI()}">
240
+ <meta name="color-scheme" content="dark">
241
+ <style>${cI}</style>
242
+ <style id="theme"></style>
243
+ </head>
244
+ <body><div id="root"></div>
245
+ <!-- Runtime last: it grabs #root on the way in, so the element has to exist. -->
246
+ <script>${lI}<\/script>
247
+ </body>
248
+ </html>`}const fI=dI(),hI=256*1024;function pI(){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 mI({code:e}){const t=A.useRef(null),[n,s]=A.useState(!1),[a,o]=A.useState(120),l=e.length>hI;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"&&F0(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:pI()},"*"))},[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:fI,onLoad:d})})}const gI="show_widget";function jg(e){var a;if(!((a=e.name)!=null&&a.endsWith(gI)))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 EI(e){return e.replace(/_/g," ").trim()}function TI({tool:e}){const t=jg(e);return t?e.status==="failed"?T.jsxs("div",{className:"widget-error",children:["Widget ",EI(t.title)||"call"," failed."]}):t.code?T.jsx(mI,{code:t.code}):null:null}function yI(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 xI(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 bI(e){var a;const{items:t,pending:n}=ke.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 kI({data:e,toolId:t}){const n=ke(E=>E.items),s=ke(E=>E.pending),[a,o]=A.useState(null),l=xI(e.options,n.length||s.length?bI(t):null),d=a??l.picked,f=d!==null||l.superseded,h=E=>{f||F0(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 SI={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 _I(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 CI(e){const t=kt(e.input);if(!t)return null;const n=$e(t.__tool_use_purpose);if(n)return{text:n};switch(Ad(e)){case"write":{const s=$e(t.path);return s?{text:r0(s),title:s}:null}case"read":{const s=_I(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 Hg(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/image?path=${encodeURIComponent(e)}`;function NI({tool:e,arriving:t=!1}){if(jg(e))return T.jsx(TI,{tool:e});const n=yI(e);if(n)return T.jsx(kI,{data:n,toolId:e.id});const s=e.status,[a,o]=A.useState(s==="failed"),l=CI(e),d=Hg(e.input);return T.jsxs("div",{className:`toolcall toolcall-${s} ${t?"is-arriving":""}`,children:[T.jsxs("button",{className:"toolcall-head",onClick:()=>o(f=>!f),children:[T.jsx("span",{className:`toolcall-dot dot-${s}`}),T.jsx("span",{className:"toolcall-title",children:rI(e)}),l&&T.jsx("span",{className:"toolcall-summary",title:l.title??l.text,children:l.text}),T.jsx("span",{className:"toolcall-status",children:SI[s]??s}),T.jsx("span",{className:`toolcall-chevron ${a?"is-open":""}`,children:"▸"})]}),d.length>0&&T.jsx("div",{className:"toolcall-images",children:d.map(f=>T.jsx("a",{href:i0(f),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:T.jsx("img",{src:i0(f),alt:f.split("/").pop()??"image",className:"toolcall-image",...Bg})},f))}),T.jsx(vI,{open:a,children:T.jsx("div",{className:"toolcall-body",children:AI(e)})})]})}function vI({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 AI(e){switch(Ad(e)){case"shell":return wI(e);case"write":return II(e);case"read":return LI(e);case"grep":return RI(e);case"todo":return OI(e);case"webfetch":return PI(e);case"websearch":return FI(e);case"introspect":return DI(e);default:return Sr(e)}}function wI(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 zg({path:e}){const t=ke(l=>l.activeId),n=ke(l=>{var d;return((d=l.sessions.find(f=>f.sessionId===l.activeId))==null?void 0:d.cwd)??""}),s=ke(l=>l.openFilePreview),a=t?Xw(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 II(e){const t=kt(e.input),n=$e(t==null?void 0:t.path)??"",s=f=>n?T.jsxs(T.Fragment,{children:[T.jsx(zg,{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:Ug(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=sI(e.content);return s(d?T.jsx(s0,{diff:n0(d.oldText,d.newText)}):Sr(e))}function LI(e){const t=kt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],s=Xr(kr(e));if(!s.trim())return Hg(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"?Ug(o):"text";return T.jsxs(T.Fragment,{children:[o&&T.jsx(zg,{path:o}),T.jsx(an,{code:s,lang:l})]})}function RI(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(`
249
+ `)})]},l)})});const a=Xr(t);return a.trim()?T.jsx(an,{code:a,lang:"text"}):Sr(e)}function OI(e){const t=aI(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 DI(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 PI(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 MI(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 FI(e){var a;const t=kr(e),n=MI(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 vd(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 BI=A.memo(NI),UI=4,jI=300,HI=240,zI=80;function $I(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function WI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+UI}class YI{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);WI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<jI&&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}=$I(this.content.remainingOlder,zI);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>HI})}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 VI=700,bc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,qI=A.memo(function({onRetry:t,onRetryTurn:n}){const s=ke(D=>D.items),a=ke(D=>D.streamingText),o=ke(D=>D.streamingThought),l=ke(D=>D.pending),d=l.some(D=>D.status==="sending"),f=ke(D=>D.observability.turnStatus),h=ke(D=>D.observability.compacting),E=ke(D=>D.activeId),g=ke(D=>D.remainingOlder),x=A.useRef({session:null,ids:new Set});x.current.session!==E&&(x.current={session:E,ids:new Set(s.filter(D=>D.type==="tool_call").map(D=>D.tool.id))});const b=D=>!x.current.ids.has(D),[N,I]=A.useState(!1);A.useEffect(()=>{if(I(!1),f!=="running")return;const D=setTimeout(()=>I(!0),VI);return()=>clearTimeout(D)},[f,a,o,s.length]);const O=A.useRef(null),[w,F]=A.useState({loadingOlder:!1,showScrollButton:!1}),z=A.useRef(null);z.current||(z.current=new YI({element:()=>O.current,fetchPage:(D,Q,ae)=>dt.transcriptPage(D,Q,ae).then(ce=>ce.items),prepend:D=>ke.getState().prependItems(D),onFlags:F,reducedMotion:()=>(bc==null?void 0:bc.matches)??!1}));const K=z.current;A.useEffect(()=>(K.reset(),()=>K.dispose()),[E,K]),A.useEffect(()=>{K.onContent({sessionId:E,itemCount:s.length,pendingCount:l.length,remainingOlder:g})},[s,a,o,l,E,h,g,K]),A.useLayoutEffect(()=>{K.restoreAnchor()},[s,K]);const Z=s.length===0&&!a&&!o&&l.length===0;return T.jsxs("div",{className:"transcript-wrap",children:[w.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:O,onScroll:()=>K.onScroll(),children:[Z&&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."})]}),s.map(D=>D.type==="message"?D.message.role==="thinking"?T.jsx(a0,{text:D.message.text},D.message.id):T.jsx("div",{className:`msg msg-${D.message.role}`,children:D.message.role==="assistant"?T.jsx(Xs,{text:D.message.text}):T.jsxs(T.Fragment,{children:[E&&D.message.imagePaths&&D.message.imagePaths.length>0&&T.jsx("div",{className:"msg-images",children:D.message.imagePaths.map(Q=>T.jsx("a",{href:dt.attachmentUrl(E,Q),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:T.jsx("img",{src:dt.attachmentUrl(E,Q),alt:Q.split("/").pop()??"image",className:"msg-image",...Bg})},Q))}),D.message.text&&T.jsx("div",{className:"msg-user-text",children:D.message.text})]})},D.message.id):D.type==="tool_call"?T.jsx(BI,{tool:D.tool,arriving:b(D.tool.id)},D.tool.id):D.type==="turn_error"?T.jsx(QI,{message:D.message,onRetry:n},D.id):T.jsx(GI,{summary:D.summary},D.id)),l.map(D=>T.jsxs("div",{className:`msg msg-user msg-pending ${D.status==="failed"?"is-failed":""}`,children:[T.jsx("div",{className:"msg-user-text",children:D.text}),D.status==="failed"&&T.jsxs("div",{className:"msg-failed",children:[T.jsx("span",{className:"msg-failed-why",children:D.error??"Failed to send."}),T.jsx("button",{className:"msg-retry",onClick:()=>t(D.id,D.text),children:"Retry"})]})]},D.id)),o&&T.jsx(a0,{text:o,live:!0}),a&&T.jsx("div",{className:"msg msg-assistant",children:T.jsx(Xs,{text:a,streaming:!0})}),(f==="running"||d)&&(N||!a&&!o)&&T.jsxs("div",{className:"thinking",children:[T.jsx("span",{className:"thinking-dot"}),T.jsx("span",{className:"thinking-dot"}),T.jsx("span",{className:"thinking-dot"})]}),h&&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…"})]})})})]}),w.showScrollButton&&T.jsx("button",{className:"scroll-to-bottom",onClick:()=>K.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 a0({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 QI({message:e,onRetry:t}){const[n,s]=A.useState(!1),[a,o]=A.useState(!1),l=D0(e),d=ke(h=>{for(let E=h.items.length-1;E>=0;E--){const g=h.items[E];if(g.type==="message"&&g.message.role==="user")return g.message.text}return""}),f=()=>{var h;(h=navigator.clipboard)==null||h.writeText(e).then(()=>{o(!0),setTimeout(()=>o(!1),1500)},()=>{})};return T.jsxs("div",{className:"sysnote",children:[T.jsx("div",{className:"sysnote-rule",children:T.jsxs("button",{className:"sysnote-head",onClick:()=>s(h=>!h),"aria-expanded":n,children:[T.jsx("span",{"aria-hidden":!0,children:"⚠"}),T.jsx("span",{className:"sysnote-label",children:l.title}),T.jsx("span",{className:"sysnote-toggle",children:n?"Hide details":"Show details"})]})}),n&&T.jsxs("div",{className:"sysnote-body",children:[l.fix&&T.jsx("p",{className:"sysnote-fix",children:l.fix}),T.jsx("pre",{className:"sysnote-raw",children:e}),T.jsxs("div",{className:"sysnote-actions",children:[t&&d&&T.jsx("button",{className:"btn-sm is-danger",onClick:()=>t(d),children:"Retry turn"}),T.jsx("button",{className:"btn-sm",onClick:f,children:a?"Copied":"Copy details"})]})]})]})}function GI({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="/",kc=2;function KI(e){if(!e||e===mn)return mn;const t=e.replace(/\/+$/,"").lastIndexOf(mn);return t<=0?mn:e.slice(0,t)}function XI(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 JI(e,t){return t.slice(e.length).replace(/^\/+/,"")}function ZI({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),N=A.useRef(null),I=A.useRef(""),O=A.useRef(!1),w=A.useRef(s);w.current=s;const F=A.useRef(t);F.current=t;const z=A.useId(),K=`${z}-listbox`,Z=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(()=>{I.current=Z;const S=setTimeout(()=>{dt.listDirs(Z).then(P=>{I.current===Z&&(f(P),!O.current&&P.dir&&(O.current=!0,w.current||a(P.dir)),F.current(P.target))}).catch(()=>{I.current===Z&&f(null)})},150);return()=>clearTimeout(S)},[Z]);const D=(d==null?void 0:d.entries)??[],Q=(d==null?void 0:d.dir)??s,ae=XI(Q),ce=ae.length>kc+2,U=ce?ae.slice(1,-kc):[],ee=ce?ae.slice(-kc):ae.slice(1),te=ae[0],xe=ae[ae.length-1];A.useEffect(()=>{var P,Y;if(h<0)return;const S=(P=N.current)==null?void 0:P.children[h];(Y=S==null?void 0:S.scrollIntoView)==null||Y.call(S,{block:"nearest"})},[h]);const de=S=>{var P;a(S),l(""),E(-1),(P=b.current)==null||P.focus()},ie=S=>{if(S.key==="ArrowDown"&&D.length>0)S.preventDefault(),E(P=>Math.min(P+1,D.length-1));else if(S.key==="ArrowUp"&&D.length>0)S.preventDefault(),E(P=>Math.max(P-1,-1));else if(S.key==="ArrowLeft"&&S.currentTarget.selectionStart===0&&!o)S.preventDefault(),de(KI(Q));else if(S.key==="Enter"){S.preventDefault();const P=h>=0?D[h]:void 0;P?de(P):n()}else S.key==="Escape"&&h>=0&&(S.stopPropagation(),E(-1))},Ne=d==null?void 0:d.target,we=!!Ne&&(d==null?void 0:d.targetKind)==="missing",oe=!!Ne&&(d==null?void 0:d.targetKind)==="file",me=(S,P="")=>T.jsx("button",{type:"button",className:`dirpick-crumb ${S===xe?"is-here":""} ${P}`,onClick:()=>S!==xe&&de(S.path),disabled:S===xe,title:S.path,children:S.name});return T.jsxs("div",{className:"dirpick",children:[T.jsxs("div",{className:"dirpick-crumbs",children:[me(te),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(G2,{size:15})}),ee.map((S,P)=>T.jsxs("span",{className:"dirpick-crumb-wrap",children:[(P>0||U.length>0)&&T.jsx("span",{className:"dirpick-sep",children:"/"}),me(S)]},S.path))]}),g&&T.jsx($0,{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":D.length>0,"aria-controls":K,"aria-autocomplete":"list","aria-label":"Working directory","aria-activedescendant":h>=0?`${z}-opt-${h}`:void 0,value:o,placeholder:"Search folders…",autoComplete:"off",spellCheck:!1,onChange:S=>{l(S.target.value),E(-1)},onKeyDown:ie}),T.jsxs("div",{ref:N,id:K,role:"listbox","aria-label":"Folders",className:"dirpick-list",children:[D.map((S,P)=>T.jsx("button",{id:`${z}-opt-${P}`,type:"button",role:"option","aria-selected":P===h,className:`dirpick-opt ${P===h?"is-active":""}`,title:S,onMouseDown:Y=>Y.preventDefault(),onClick:()=>de(S),children:T.jsx("span",{className:"dirpick-tail",children:T.jsx("span",{children:JI(Q,S)})})},S)),D.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:[we&&T.jsx("span",{className:"dirpick-note is-new",children:"This folder will be created"}),oe&&T.jsx("span",{className:"dirpick-note is-bad",children:"That path is a file, not a folder"})]})]})}function e6({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(ZI,{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 t6(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function n6({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(nx,{size:15,className:"ftree-icon-svg"})}}function $g({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=ke(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(B0,{size:12,className:"ftree-chevron-icon"})}),T.jsx("span",{className:"ftree-icon",children:l.expanded?T.jsx(tx,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):T.jsx(z0,{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($g,{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(n6,{name:e.name})}),T.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&T.jsx("span",{className:"ftree-size",children:t6(e.size)})]})}function r6({sessionId:e,onClose:t}){var D;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=ke(Q=>Q.sessions),b=ke(Q=>Q.setWatchedPaths),N=ke(Q=>Q.fsVersion[""]??0),I=A.useRef(new Set),O=ke(Q=>Q.setSessions),w=ke(Q=>Q.openFilePreview),F=(D=x.find(Q=>Q.sessionId===e))==null?void 0:D.cwd,z=A.useCallback(()=>{b(["",...I.current])},[b]),K=A.useCallback((Q,ae)=>{const ce=I.current;ae!==ce.has(Q)&&(ae?ce.add(Q):ce.delete(Q),z())},[z]);A.useEffect(()=>(z(),()=>b([])),[z,b]);const Z=A.useCallback(async(Q=!1)=>{Q||d(!0),h(null);try{const ae=await dt.tree(e);s(ae.entries),o(ae.cwd)}catch(ae){h(ae.message)}finally{Q||d(!1)}},[e]);return A.useEffect(()=>{Z()},[Z]),A.useEffect(()=>{N&&Z(!0)},[N]),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(z0,{size:14})}),t&&T.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:T.jsx(U0,{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(Q=>T.jsx($g,{entry:Q,sessionId:e,depth:0,onPreview:ae=>w(ae.path),onExpanded:K},Q.path))]}),E&&T.jsx(e6,{sessionId:e,currentCwd:a||F,onChanged:Q=>{O(x.map(ae=>ae.sessionId===e?{...ae,cwd:Q}:ae)),Z()},onClose:()=>g(!1)})]})}const i6=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function s6(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return i6.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const a6={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:"css",less:"css",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:"dockerfile",sql:"sql",diff:"diff",patch:"diff"};function u6(e){const t=e.toLowerCase();if(t==="dockerfile")return"dockerfile";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return a6[n]??""}const Sc=e=>e.split("/").pop()||e;function o6({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=N=>{N.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(U0,{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 l6(){const e=ke(l=>l.previewPath),t=ke(l=>l.activeId),n=ke(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=s6(Sc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:Sc(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=u6(Sc(e));if(!g)return;const x=await vd(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(o6,{preview:s,sessionId:t,onClose:o}),document.body)}function Wg({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){const x=n.findIndex(b=>b.value===t);d(x>=0?x:0)}},[a,n,t]);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(B0,{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(J2,{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 c6({value:e,onChange:t}){var a;const n=ke(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return T.jsx(Wg,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function d6({value:e,onChange:t}){const n=ke(d=>d.modes),s=ke(d=>d.agents),a=ke(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return T.jsx(Wg,{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,u0=2*Math.PI*Yc;function f6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const o0=new Intl.NumberFormat;function h6({onCompact:e}){var I;const t=ke(O=>O.observability.contextUsagePercentage),n=ke(O=>O.observability.compacting),s=ke(O=>O.observability.turnStatus),a=ke(O=>O.activeId),o=ke(O=>O.currentModelId),l=ke(O=>O.models),[d,f]=A.useState(!1),h=A.useRef(null);A.useEffect(()=>{if(!d)return;const O=F=>{h.current&&!h.current.contains(F.target)&&f(!1)},w=F=>{F.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",w)}},[d]);const E=Math.max(0,Math.min(100,t)),g=f6(E),x=E/100*u0,b=(I=l.find(O=>O.modelId===o))==null?void 0:I.contextWindowTokens,N=b?Math.round(E/100*b):void 0;return a?T.jsxs("div",{className:"ctx",ref:h,children:[T.jsx("button",{type:"button",className:"ctx-btn",onClick:()=>f(O=>!O),"aria-haspopup":"dialog","aria-expanded":d,"aria-label":`Context ${E.toFixed(0)}% used`,title:`Context ${E.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:g,strokeWidth:Wc,strokeLinecap:"round",strokeDasharray:`${x} ${u0-x}`})]})})}),d&&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:g},children:[E.toFixed(1),"%"]})]}),T.jsx("div",{className:"ctx-pop-bar",children:T.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${E}%`,background:g}})}),b?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:[o0.format(N??0)," tokens"]})]}),T.jsxs("div",{className:"ctx-pop-row",children:[T.jsx("dt",{children:"Window"}),T.jsxs("dd",{children:[o0.format(b)," 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:!a||n||s!=="idle",onClick:()=>{f(!1),e()},children:n?"Compacting…":"Compact conversation"})]})]}):null}const p6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function m6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":p6[e.connStatus]??"Connecting…"}const l0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function g6({sessionId:e,onSend:t,onCancel:n,onCompact:s,onChangeModel:a,onChangeAgent:o,connStatus:l,draft:d}){const[f,h]=A.useState(""),[E,g]=A.useState([]),[x,b]=A.useState(!1),[N,I]=A.useState(null),O=ke(S=>S.observability.turnStatus),w=ke(S=>S.observability.compacting),F=ke(S=>S.currentModeId),z=ke(S=>S.currentModelId),K=O==="running",Z=O==="cancelling",D=d||l==="connected",Q=A.useRef(null),ae=A.useRef(null),ce=S=>new Promise((P,Y)=>{const v=new FileReader;v.onload=()=>P(v.result.split(",")[1]??""),v.onerror=()=>Y(new Error("Failed to read file")),v.readAsDataURL(S)}),U=A.useCallback(()=>{const S=ae.current;S&&(S.style.height="auto",S.style.height=`${Math.min(S.scrollHeight,200)}px`)},[]);A.useEffect(()=>{U()},[f,U]);const ee=A.useCallback(S=>{const P=S.map(Y=>{const v=l0.has(Y.type);return{id:`att-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,file:Y,isImage:v,previewUrl:v?URL.createObjectURL(Y):void 0}});g(Y=>[...Y,...P])},[]),te=async(S,P,Y)=>{const v=[];S.length>0&&v.push({type:"text",text:Du+S.map(he=>he.path).join(", ")+`
250
+ `});for(let he=0;he<S.length;he++){const Ce=S[he],be=P[he];if(Ce){if(Ce.kind==="image"&&be)try{const Be=await ce(be.file);v.push({type:"image",data:Be,mimeType:be.file.type})}catch{}else if(Ce.kind==="text"&&be)try{const Be=await be.file.text();v.push({type:"text",text:`[File: ${Ce.path}]
251
+ \`\`\`
252
+ ${Be}
253
+ \`\`\``})}catch{}}}return Y&&v.push({type:"text",text:Y}),v},xe=async()=>{const S=f.trim();if(!S&&E.length===0||K||Z||w||!D||x)return;let P=[];const Y=E;if(Y.length>0){if(!e){I("No active session to upload to.");return}b(!0),I(null);try{P=(await dt.uploadFiles(e,Y.map(Ce=>Ce.file))).files}catch(he){I(he.message),b(!1);return}b(!1)}const v=await te(P,Y,S);v.length!==0&&(t(v),h(""),Y.forEach(he=>he.previewUrl&&URL.revokeObjectURL(he.previewUrl)),g([]),requestAnimationFrame(()=>{ae.current&&(ae.current.style.height="auto")}))},de=S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),xe())},ie=A.useCallback(S=>{var v;const P=(v=S.clipboardData)==null?void 0:v.items;if(!P)return;const Y=[];for(const he of Array.from(P))if(he.kind==="file"&&l0.has(he.type)){const Ce=he.getAsFile();Ce&&Y.push(Ce)}Y.length>0&&(S.preventDefault(),ee(Y))},[ee]),Ne=S=>{S.target.files&&ee(Array.from(S.target.files)),S.target.value=""},we=S=>{g(P=>{const Y=P.find(v=>v.id===S);return Y!=null&&Y.previewUrl&&URL.revokeObjectURL(Y.previewUrl),P.filter(v=>v.id!==S)})};A.useEffect(()=>()=>{g(S=>(S.forEach(P=>P.previewUrl&&URL.revokeObjectURL(P.previewUrl)),S))},[]);const oe=m6({live:D,connStatus:l,uploading:x,cancelling:Z,compacting:w,running:K}),me=(f.trim()||E.length>0)&&!K&&!Z&&!w&&!x&&D;return T.jsxs("div",{className:"composer",children:[N&&T.jsx("div",{className:"composer-error",children:N}),E.length>0&&T.jsx("div",{className:"composer-attachments",children:E.map(S=>T.jsxs("div",{className:"composer-att",children:[S.isImage&&S.previewUrl?T.jsx("img",{src:S.previewUrl,alt:S.file.name,className:"composer-att-img"}):T.jsxs("div",{className:"composer-att-file",title:S.file.name,children:[T.jsx("span",{className:"composer-att-file-icon",children:"📄"}),T.jsx("span",{className:"composer-att-file-name",children:S.file.name})]}),T.jsx("button",{className:"composer-att-remove",onClick:()=>we(S.id),"aria-label":`Remove ${S.file.name}`,children:"×"})]},S.id))}),T.jsxs("div",{className:"composer-box",children:[T.jsx("textarea",{ref:ae,className:"composer-input",value:f,onChange:S=>h(S.target.value),onKeyDown:de,onPaste:ie,placeholder:oe,rows:1}),T.jsxs("div",{className:"composer-actions",children:[T.jsx("button",{className:"composer-plus",onClick:()=>{var S;return(S=Q.current)==null?void 0:S.click()},disabled:d||!D||x,title:d?"Send a message first to attach files":"Add photos & files","aria-label":"Add photos and files",children:T.jsx(j0,{size:18})}),T.jsxs("div",{className:"composer-actions-right",children:[T.jsx(h6,{onCompact:s}),T.jsx(d6,{value:F,onChange:o}),T.jsx(c6,{value:z,onChange:a}),K?T.jsx("button",{className:"composer-btn composer-stop",onClick:n,title:"Stop","aria-label":"Stop",children:T.jsx(Dp,{size:15})}):Z?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:xe,disabled:!me,title:x?"Uploading…":"Send","aria-label":x?"Uploading":"Send",children:x?T.jsx(yr,{size:15}):T.jsx(ex,{size:17})})]})]})]}),T.jsx("input",{ref:Q,type:"file",multiple:!0,onChange:Ne,className:"composer-file-input"})]})}const E6={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 T6({status:e}){const{cls:t,label:n}=E6[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 y6({isDraft:e,loadingSessionId:t,connStatus:n,createError:s,onRetryCreate:a,onDismissError:o,navOpen:l,onToggleNav:d,onSend:f,onRetry:h,onRetryTurn:E,onCancel:g,onChangeModel:x,onChangeAgent:b,onCompact:N,onReload:I}){const O=ke(te=>{var xe;return(xe=te.sessions.find(de=>de.sessionId===te.activeId))==null?void 0:xe.title}),w=ke(te=>e&&te.pending.length===0&&te.items.length===0),F=ke(te=>te.activeId),z=ke(te=>te.sessionNotice),K=ke(te=>te.reloadingId!==null&&te.reloadingId===te.activeId),Z=ke(te=>te.observability.turnStatus==="running"),D=ke(te=>te.dismissSessionNotice),[Q,ae]=A.useState(!1);if(A.useEffect(()=>{ae(!1)},[F]),t)return T.jsxs("main",{className:"chatpane",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:T.jsx(ec,{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(s)return T.jsxs("main",{className:"chatpane",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:T.jsx(ec,{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:s}),T.jsxs("div",{className:"chat-error-actions",children:[T.jsx("button",{className:"btn-primary",onClick:a,children:"Try again"}),T.jsx("button",{className:"btn-ghost",onClick:o,children:"Back to sessions"})]})]})]});const ce=T.jsxs("div",{className:"composer-wrap",children:[z&&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:z.title}),z.fix&&T.jsx("p",{className:"notice-sub",children:z.fix})]}),T.jsx("button",{className:"notice-x",onClick:D,"aria-label":"Dismiss",children:"×"})]}),T.jsx(g6,{sessionId:F,onSend:f,onCancel:g,onCompact:N,onChangeModel:x,onChangeAgent:b,connStatus:n,draft:e})]}),U=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"})]}),ce]}),ee=T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"chat-body",children:T.jsx(qI,{onRetry:h,onRetryTurn:E})}),ce]});return T.jsxs("main",{className:`chatpane chatpane-split ${Q?"has-tree":""}`,children:[T.jsxs("div",{className:"chat-col",children:[T.jsxs("header",{className:"chat-head",children:[T.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:T.jsx(ec,{size:20})}),!e&&T.jsx("span",{className:"chat-title",title:O,children:O??"Session"}),!e&&T.jsx(T6,{status:n}),!e&&T.jsx("button",{className:"chat-head-btn chat-reload",onClick:I,disabled:K||Z,title:Z?"Reload after the turn":"Reload session","aria-label":"Reload session",children:K?T.jsx(yr,{size:18}):T.jsx(X2,{size:18})}),!e&&T.jsx("button",{className:`chat-head-btn ftree-toggle ${Q?"is-active":""}`,onClick:()=>ae(te=>!te),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":Q,children:T.jsx(lx,{size:18})})]}),w?U:ee]}),F&&T.jsxs("aside",{className:`ftree-aside ${Q?"is-open":""}`,children:[Q&&T.jsx(r6,{sessionId:F,onClose:()=>ae(!1)}),T.jsx(l6,{})]}),F&&Q&&T.jsx("div",{className:"ftree-backdrop",onClick:()=>ae(!1),"aria-hidden":!0})]})}function x6({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 B2(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 c0=768;function b6(){const[e,t]=A.useState("checking");return A.useEffect(()=>{e==="checking"&&dt.listSessions().then(n=>{ke.getState().setSessions(n.sessions),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?T.jsx("div",{className:"app-splash"}):e==="gate"?T.jsx(x6,{onReady:()=>t("ready")}):T.jsx(T2,{children:T.jsxs(Qy,{children:[T.jsxs(Ps,{element:T.jsx(k6,{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(Vy,{to:"/",replace:!0})})]})})}function k6({onLock:e}){var O;const t=ke(w=>w.sessions),n=ke(w=>w.activeId),s=ke(w=>w.loadingSessionId),a=ke(w=>w.connStatus),o=ke(w=>w.createError),l=ke(w=>w.watchedPaths),d=Xc(),f=((O=Ly(Y2))==null?void 0:O.params.sessionId)??null,E=f==="new"||!f&&n===null,g=E?null:f;A.useEffect(()=>{nt.attach({navigate:d,onLock:e})},[d,e]),A.useEffect(()=>{nt.loadPickers(),ke.getState().sessions.length===0&&nt.refreshSessions()},[]),A.useEffect(()=>{nt.syncRoute(g,E)},[g,E]),A.useEffect(()=>{a==="connected"&&nt.watchPaths(l)},[l,a]);const x=A.useCallback(()=>{U2(),nt.lock()},[]),[b,N]=A.useState(()=>window.innerWidth>c0),I=A.useCallback(()=>{window.innerWidth<=c0&&N(!1)},[]);return T.jsxs("div",{className:`layout ${b?"nav-open":""}`,children:[T.jsx(kx,{sessions:t,activeId:n,loadingId:s,onOpen:w=>{nt.markLoading(w),I()},onNew:()=>{nt.startDraft(),I()},onDelete:w=>void nt.deleteSession(w),onRename:(w,F)=>void nt.renameSession(w,F),onLock:x}),b&&T.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>N(!1)}),T.jsx(y6,{navOpen:b,onToggleNav:()=>N(w=>!w),isDraft:E,loadingSessionId:s,connStatus:a,createError:o,onRetryCreate:()=>nt.retryCreate(),onDismissError:()=>nt.dismissCreateError(),onSend:w=>nt.send(w),onRetry:(w,F)=>nt.retrySend(w,F),onRetryTurn:w=>nt.retryTurn(w),onCancel:()=>nt.cancel(),onChangeModel:w=>nt.changeModel(w),onChangeAgent:w=>nt.changeAgent(w),onCompact:()=>nt.compact(),onReload:()=>void nt.reloadSession()})]})}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(()=>{})}QT.createRoot(document.getElementById("root")).render(T.jsx(Ds.StrictMode,{children:T.jsx(b6,{})}));export{JS as S,Nc as _,Xu as c,Vc as g,TN as h,yN as s,C1 as v,$r as w};