@joeyshi12/casper 0.9.7 → 0.10.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 (73) hide show
  1. package/README.md +6 -0
  2. package/dist/mcp.js +1 -1
  3. package/dist/server.js +565 -638
  4. package/dist/web/assets/{abnfDiagram-N423BO3Z-BNWwSSFp.js → abnfDiagram-N423BO3Z-DuqqTYEM.js} +1 -1
  5. package/dist/web/assets/{arc-CcwkM28l.js → arc-BbitKrIO.js} +1 -1
  6. package/dist/web/assets/{architectureDiagram-T3A2C74G-BTs-BMSL.js → architectureDiagram-T3A2C74G-Dc0p1FLK.js} +1 -1
  7. package/dist/web/assets/{blockDiagram-VBNYF7ZC-Cg3AKEAE.js → blockDiagram-VBNYF7ZC-A2tZMhwX.js} +1 -1
  8. package/dist/web/assets/{c4Diagram-5PPSVZJV-BeLOHTLt.js → c4Diagram-5PPSVZJV-BGYnWUNq.js} +1 -1
  9. package/dist/web/assets/channel-oev4WWHD.js +1 -0
  10. package/dist/web/assets/{chunk-2GRJ4B5K-BLdzjU64.js → chunk-2GRJ4B5K-DGcSgggV.js} +1 -1
  11. package/dist/web/assets/{chunk-2Q5K7J3B-OBq9M6-Y.js → chunk-2Q5K7J3B-Cqd5ykHS.js} +1 -1
  12. package/dist/web/assets/{chunk-5RXB4S5H-Bo5TlL5E.js → chunk-5RXB4S5H-4s-V0baK.js} +1 -1
  13. package/dist/web/assets/{chunk-5VM5RSS4-Bu73pV_h.js → chunk-5VM5RSS4-DN_MfTRV.js} +1 -1
  14. package/dist/web/assets/{chunk-6Q2QTUOP-zkF1AB2H.js → chunk-6Q2QTUOP-6-ncud5-.js} +1 -1
  15. package/dist/web/assets/{chunk-GF5L2VYU-1gox46V8.js → chunk-GF5L2VYU-CkCAkajU.js} +1 -1
  16. package/dist/web/assets/{chunk-JWPE2WC7-Co6JHAZe.js → chunk-JWPE2WC7-B2HT0tHT.js} +1 -1
  17. package/dist/web/assets/{chunk-KBJHAD2P-COImJ5cB.js → chunk-KBJHAD2P-DtYmpITE.js} +1 -1
  18. package/dist/web/assets/{chunk-RYQCIY6F-DwZzSkn2.js → chunk-RYQCIY6F-CqU4ZESr.js} +1 -1
  19. package/dist/web/assets/{chunk-XXDRQBXY-D7J4Ua5K.js → chunk-XXDRQBXY-5zlfmd8I.js} +1 -1
  20. package/dist/web/assets/classDiagram-JCYQIIEL-D4FIkEsQ.js +1 -0
  21. package/dist/web/assets/classDiagram-v2-OCEON4UE-D4FIkEsQ.js +1 -0
  22. package/dist/web/assets/{cose-bilkent-JH36ORCC-io_sMArY.js → cose-bilkent-JH36ORCC-BtXxufQe.js} +1 -1
  23. package/dist/web/assets/{cynefin-VYW2F7L2-2kI4W7NK.js → cynefin-VYW2F7L2-DFLsp7Rj.js} +1 -1
  24. package/dist/web/assets/{cynefinDiagram-MW4NZA55-DDOMF8nO.js → cynefinDiagram-MW4NZA55-BiXfZ5zy.js} +1 -1
  25. package/dist/web/assets/{dagre-VZM6K2ZE-D8ePE05C.js → dagre-VZM6K2ZE-MBbBcp4r.js} +1 -1
  26. package/dist/web/assets/{diagram-7IWD3JNH-D7-_PTKo.js → diagram-7IWD3JNH-BBJQPRUY.js} +1 -1
  27. package/dist/web/assets/{diagram-B4RE2ZJO-CotIn3Ty.js → diagram-B4RE2ZJO-D39huys8.js} +1 -1
  28. package/dist/web/assets/{diagram-LBJQPF4R-DofOzTTJ.js → diagram-LBJQPF4R-BEI6m3xw.js} +1 -1
  29. package/dist/web/assets/{diagram-Q27KOJAE-CVkyN7TJ.js → diagram-Q27KOJAE-0mMWjfIY.js} +1 -1
  30. package/dist/web/assets/{diagram-UB23O5K3-BMeuDkaO.js → diagram-UB23O5K3-Cq_AT0df.js} +1 -1
  31. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-DprK65id.js → ebnfDiagram-BXEA7PRR-CspS7m6Z.js} +1 -1
  32. package/dist/web/assets/{erDiagram-JOGREHBK-D-hwXtn8.js → erDiagram-JOGREHBK-B6NxTPkb.js} +1 -1
  33. package/dist/web/assets/{flowDiagram-UKHOOZJN-BanZuk45.js → flowDiagram-UKHOOZJN-D3Pt3-cN.js} +1 -1
  34. package/dist/web/assets/{ganttDiagram-PKOTCBZU-DKdLDEUL.js → ganttDiagram-PKOTCBZU-CV4orYkm.js} +1 -1
  35. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-CadXyKLa.js → gitGraphDiagram-DS77QQ5N-CANHeJZg.js} +1 -1
  36. package/dist/web/assets/index-CK4YbLbU.js +253 -0
  37. package/dist/web/assets/index-Cz-T9NEB.css +1 -0
  38. package/dist/web/assets/index-Dewf4nkF.js +3 -0
  39. package/dist/web/assets/{infoDiagram-6WML65LV-DguQBaFj.js → infoDiagram-6WML65LV-ySSVfb1E.js} +1 -1
  40. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-sCmvl_Ov.js → ishikawaDiagram-WSZJBQD7-C8PCYjFX.js} +1 -1
  41. package/dist/web/assets/{journeyDiagram-NVQOT4AX-Dp3H0qDU.js → journeyDiagram-NVQOT4AX-BS_jBDBe.js} +1 -1
  42. package/dist/web/assets/{kanban-definition-27J2QSJJ-C6mTugp9.js → kanban-definition-27J2QSJJ-H6jhmFjt.js} +1 -1
  43. package/dist/web/assets/katex-BYZTj3zW.css +1 -0
  44. package/dist/web/assets/katex-C5jXJg4s.js +257 -0
  45. package/dist/web/assets/{linear-CyDuoWyx.js → linear-YU9d9rPY.js} +1 -1
  46. package/dist/web/assets/{mermaid.core-BpVrpe6c.js → mermaid.core-DsId9yj5.js} +5 -5
  47. package/dist/web/assets/{mindmap-definition-FAOFIHXS-BPgOZVAx.js → mindmap-definition-FAOFIHXS-DVFyeioX.js} +1 -1
  48. package/dist/web/assets/{pegDiagram-VL7TDLO6-eXPwHM7z.js → pegDiagram-VL7TDLO6-BD4va82R.js} +1 -1
  49. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-CFIMahU1.js → pieDiagram-7S7Q4E2Y-CZAefhVe.js} +1 -1
  50. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-dnDjuXib.js → quadrantDiagram-CIZ2JOQS-D3RB1kgH.js} +1 -1
  51. package/dist/web/assets/{railroadDiagram-AXF67PYL-_3DCSEsR.js → railroadDiagram-AXF67PYL-Cvnf0WjF.js} +1 -1
  52. package/dist/web/assets/{requirementDiagram-LRYGKXZP-DimVO25E.js → requirementDiagram-LRYGKXZP-C4B6vv6V.js} +1 -1
  53. package/dist/web/assets/{sankeyDiagram-W5VNT64P-DtCSNUnd.js → sankeyDiagram-W5VNT64P-C5xg3C0D.js} +1 -1
  54. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-DyZDw9rq.js → sequenceDiagram-SI44F4Z6-DjWE-t7c.js} +1 -1
  55. package/dist/web/assets/{sizeCapture-X5ZJPWSS-DsJVViPa.js → sizeCapture-X5ZJPWSS-Bf7ugfWa.js} +1 -1
  56. package/dist/web/assets/{stateDiagram-OKZ733FA-3W1WK-Lx.js → stateDiagram-OKZ733FA-DxEitXwP.js} +1 -1
  57. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-BV8yVaCo.js +1 -0
  58. package/dist/web/assets/{swimlanes-SLNWSIFB-BdAToTPU.js → swimlanes-SLNWSIFB-DMW3T9iR.js} +2 -2
  59. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-DZu5mMsy.js +8 -0
  60. package/dist/web/assets/{timeline-definition-Z64GVDOM-W9PH8xTz.js → timeline-definition-Z64GVDOM-whI5A_En.js} +1 -1
  61. package/dist/web/assets/{vennDiagram-T6HMQDX7-DztY6X4E.js → vennDiagram-T6HMQDX7-DGdGbcJw.js} +1 -1
  62. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-BVJp-LQ1.js → wardleyDiagram-T6FBY63Y-CTNpUHSX.js} +1 -1
  63. package/dist/web/assets/{xychartDiagram-ELKLHX3M-CUgAA_UM.js → xychartDiagram-ELKLHX3M-C2j32C85.js} +1 -1
  64. package/dist/web/index.html +2 -2
  65. package/dist/web/sw.js +1 -1
  66. package/package.json +1 -1
  67. package/dist/web/assets/channel-DdxwT919.js +0 -1
  68. package/dist/web/assets/classDiagram-JCYQIIEL-CqM6S8tE.js +0 -1
  69. package/dist/web/assets/classDiagram-v2-OCEON4UE-CqM6S8tE.js +0 -1
  70. package/dist/web/assets/index-C0NwqMe_.css +0 -1
  71. package/dist/web/assets/index-Cv7GqnlJ.js +0 -510
  72. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-BIWqQTVE.js +0 -1
  73. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-iIR_M-eG.js +0 -8
@@ -0,0 +1,253 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dewf4nkF.js","assets/katex-C5jXJg4s.js","assets/katex-BYZTj3zW.css"])))=>i.map(i=>d[i]);
2
+ var DT=Object.defineProperty;var PT=(e,t,n)=>t in e?DT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>PT(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 $c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zl={exports:{}},_s={},$l={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 dp;function MT(){if(dp)return De;dp=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(M){return M===null||typeof M!="object"?null:(M=g&&M[g]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function O(M,Y,v){this.props=M,this.context=Y,this.refs=w,this.updater=v||b}O.prototype.isReactComponent={},O.prototype.setState=function(M,Y){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,Y,"setState")},O.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=O.prototype;function F(M,Y,v){this.props=M,this.context=Y,this.refs=w,this.updater=v||b}var z=F.prototype=new A;z.constructor=F,N(z,O.prototype),z.isPureReactComponent=!0;var G=Array.isArray,ne=Object.prototype.hasOwnProperty,D={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function Z(M,Y,v){var he,_e={},xe=null,Be=null;if(Y!=null)for(he in Y.ref!==void 0&&(Be=Y.ref),Y.key!==void 0&&(xe=""+Y.key),Y)ne.call(Y,he)&&!q.hasOwnProperty(he)&&(_e[he]=Y[he]);var Re=arguments.length-2;if(Re===1)_e.children=v;else if(1<Re){for(var ze=Array(Re),at=0;at<Re;at++)ze[at]=arguments[at+2];_e.children=ze}if(M&&M.defaultProps)for(he in Re=M.defaultProps,Re)_e[he]===void 0&&(_e[he]=Re[he]);return{$$typeof:e,type:M,key:xe,ref:Be,props:_e,_owner:D.current}}function oe(M,Y){return{$$typeof:e,type:M.type,key:Y,ref:M.ref,props:M.props,_owner:M._owner}}function $(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function le(M){var Y={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(v){return Y[v]})}var ce=/\/+/g;function Ce(M,Y){return typeof M=="object"&&M!==null&&M.key!=null?le(""+M.key):Y.toString(36)}function fe(M,Y,v,he,_e){var xe=typeof M;(xe==="undefined"||xe==="boolean")&&(M=null);var Be=!1;if(M===null)Be=!0;else switch(xe){case"string":case"number":Be=!0;break;case"object":switch(M.$$typeof){case e:case t:Be=!0}}if(Be)return Be=M,_e=_e(Be),M=he===""?"."+Ce(Be,0):he,G(_e)?(v="",M!=null&&(v=M.replace(ce,"$&/")+"/"),fe(_e,Y,v,"",function(at){return at})):_e!=null&&($(_e)&&(_e=oe(_e,v+(!_e.key||Be&&Be.key===_e.key?"":(""+_e.key).replace(ce,"$&/")+"/")+M)),Y.push(_e)),1;if(Be=0,he=he===""?".":he+":",G(M))for(var Re=0;Re<M.length;Re++){xe=M[Re];var ze=he+Ce(xe,Re);Be+=fe(xe,Y,v,ze,_e)}else if(ze=x(M),typeof ze=="function")for(M=ze.call(M),Re=0;!(xe=M.next()).done;)xe=xe.value,ze=he+Ce(xe,Re++),Be+=fe(xe,Y,v,ze,_e);else if(xe==="object")throw Y=String(M),Error("Objects are not valid as a React child (found: "+(Y==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":Y)+"). If you meant to render a collection of children, use an array instead.");return Be}function re(M,Y,v){if(M==null)return M;var he=[],_e=0;return fe(M,he,"","",function(xe){return Y.call(v,xe,_e++)}),he}function ve(M){if(M._status===-1){var Y=M._result;Y=Y(),Y.then(function(v){(M._status===0||M._status===-1)&&(M._status=1,M._result=v)},function(v){(M._status===0||M._status===-1)&&(M._status=2,M._result=v)}),M._status===-1&&(M._status=0,M._result=Y)}if(M._status===1)return M._result.default;throw M._result}var Ie={current:null},ae={transition:null},Ee={ReactCurrentDispatcher:Ie,ReactCurrentBatchConfig:ae,ReactCurrentOwner:D};function S(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:re,forEach:function(M,Y,v){re(M,function(){Y.apply(this,arguments)},v)},count:function(M){var Y=0;return re(M,function(){Y++}),Y},toArray:function(M){return re(M,function(Y){return Y})||[]},only:function(M){if(!$(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},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=Ee,De.act=S,De.cloneElement=function(M,Y,v){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var he=N({},M.props),_e=M.key,xe=M.ref,Be=M._owner;if(Y!=null){if(Y.ref!==void 0&&(xe=Y.ref,Be=D.current),Y.key!==void 0&&(_e=""+Y.key),M.type&&M.type.defaultProps)var Re=M.type.defaultProps;for(ze in Y)ne.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:M.type,key:_e,ref:xe,props:he,_owner:Be}},De.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:o,_context:M},M.Consumer=M},De.createElement=Z,De.createFactory=function(M){var Y=Z.bind(null,M);return Y.type=M,Y},De.createRef=function(){return{current:null}},De.forwardRef=function(M){return{$$typeof:d,render:M}},De.isValidElement=$,De.lazy=function(M){return{$$typeof:E,_payload:{_status:-1,_result:M},_init:ve}},De.memo=function(M,Y){return{$$typeof:h,type:M,compare:Y===void 0?null:Y}},De.startTransition=function(M){var Y=ae.transition;ae.transition={};try{M()}finally{ae.transition=Y}},De.unstable_act=S,De.useCallback=function(M,Y){return Ie.current.useCallback(M,Y)},De.useContext=function(M){return Ie.current.useContext(M)},De.useDebugValue=function(){},De.useDeferredValue=function(M){return Ie.current.useDeferredValue(M)},De.useEffect=function(M,Y){return Ie.current.useEffect(M,Y)},De.useId=function(){return Ie.current.useId()},De.useImperativeHandle=function(M,Y,v){return Ie.current.useImperativeHandle(M,Y,v)},De.useInsertionEffect=function(M,Y){return Ie.current.useInsertionEffect(M,Y)},De.useLayoutEffect=function(M,Y){return Ie.current.useLayoutEffect(M,Y)},De.useMemo=function(M,Y){return Ie.current.useMemo(M,Y)},De.useReducer=function(M,Y,v){return Ie.current.useReducer(M,Y,v)},De.useRef=function(M){return Ie.current.useRef(M)},De.useState=function(M){return Ie.current.useState(M)},De.useSyncExternalStore=function(M,Y,v){return Ie.current.useSyncExternalStore(M,Y,v)},De.useTransition=function(){return Ie.current.useTransition()},De.version="18.3.1",De}var fp;function Wc(){return fp||(fp=1,$l.exports=MT()),$l.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 hp;function FT(){if(hp)return _s;hp=1;var e=Wc(),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 _s.Fragment=n,_s.jsx=l,_s.jsxs=l,_s}var pp;function BT(){return pp||(pp=1,zl.exports=FT()),zl.exports}var y=BT(),L=Wc();const Rs=$c(L);var Eu={},Wl={exports:{}},Bt={},Yl={exports:{}},Vl={};/**
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 mp;function UT(){return mp||(mp=1,(function(e){function t(ae,Ee){var S=ae.length;ae.push(Ee);e:for(;0<S;){var M=S-1>>>1,Y=ae[M];if(0<a(Y,Ee))ae[M]=Ee,ae[S]=Y,S=M;else break e}}function n(ae){return ae.length===0?null:ae[0]}function s(ae){if(ae.length===0)return null;var Ee=ae[0],S=ae.pop();if(S!==Ee){ae[0]=S;e:for(var M=0,Y=ae.length,v=Y>>>1;M<v;){var he=2*(M+1)-1,_e=ae[he],xe=he+1,Be=ae[xe];if(0>a(_e,S))xe<Y&&0>a(Be,_e)?(ae[M]=Be,ae[xe]=S,M=xe):(ae[M]=_e,ae[he]=S,M=he);else if(xe<Y&&0>a(Be,S))ae[M]=Be,ae[xe]=S,M=xe;else break e}}return Ee}function a(ae,Ee){var S=ae.sortIndex-Ee.sortIndex;return S!==0?S:ae.id-Ee.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,w=!1,O=typeof setTimeout=="function"?setTimeout:null,A=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(ae){for(var Ee=n(h);Ee!==null;){if(Ee.callback===null)s(h);else if(Ee.startTime<=ae)s(h),Ee.sortIndex=Ee.expirationTime,t(f,Ee);else break;Ee=n(h)}}function G(ae){if(w=!1,z(ae),!N)if(n(f)!==null)N=!0,ve(ne);else{var Ee=n(h);Ee!==null&&Ie(G,Ee.startTime-ae)}}function ne(ae,Ee){N=!1,w&&(w=!1,A(Z),Z=-1),b=!0;var S=x;try{for(z(Ee),g=n(f);g!==null&&(!(g.expirationTime>Ee)||ae&&!le());){var M=g.callback;if(typeof M=="function"){g.callback=null,x=g.priorityLevel;var Y=M(g.expirationTime<=Ee);Ee=e.unstable_now(),typeof Y=="function"?g.callback=Y:g===n(f)&&s(f),z(Ee)}else s(f);g=n(f)}if(g!==null)var v=!0;else{var he=n(h);he!==null&&Ie(G,he.startTime-Ee),v=!1}return v}finally{g=null,x=S,b=!1}}var D=!1,q=null,Z=-1,oe=5,$=-1;function le(){return!(e.unstable_now()-$<oe)}function ce(){if(q!==null){var ae=e.unstable_now();$=ae;var Ee=!0;try{Ee=q(!0,ae)}finally{Ee?Ce():(D=!1,q=null)}}else D=!1}var Ce;if(typeof F=="function")Ce=function(){F(ce)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,re=fe.port2;fe.port1.onmessage=ce,Ce=function(){re.postMessage(null)}}else Ce=function(){O(ce,0)};function ve(ae){q=ae,D||(D=!0,Ce())}function Ie(ae,Ee){Z=O(function(){ae(e.unstable_now())},Ee)}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(ae){ae.callback=null},e.unstable_continueExecution=function(){N||b||(N=!0,ve(ne))},e.unstable_forceFrameRate=function(ae){0>ae||125<ae?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<ae?Math.floor(1e3/ae):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_getFirstCallbackNode=function(){return n(f)},e.unstable_next=function(ae){switch(x){case 1:case 2:case 3:var Ee=3;break;default:Ee=x}var S=x;x=Ee;try{return ae()}finally{x=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(ae,Ee){switch(ae){case 1:case 2:case 3:case 4:case 5:break;default:ae=3}var S=x;x=ae;try{return Ee()}finally{x=S}},e.unstable_scheduleCallback=function(ae,Ee,S){var M=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?M+S:M):S=M,ae){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,ae={id:E++,callback:Ee,priorityLevel:ae,startTime:S,expirationTime:Y,sortIndex:-1},S>M?(ae.sortIndex=S,t(h,ae),n(f)===null&&ae===n(h)&&(w?(A(Z),Z=-1):w=!0,Ie(G,S-M))):(ae.sortIndex=Y,t(f,ae),N||b||(N=!0,ve(ne))),ae},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(ae){var Ee=x;return function(){var S=x;x=Ee;try{return ae.apply(this,arguments)}finally{x=S}}}})(Vl)),Vl}var gp;function HT(){return gp||(gp=1,Yl.exports=UT()),Yl.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 Ep;function jT(){if(Ep)return Bt;Ep=1;var e=Wc(),t=HT();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 w(r,i,u,c,m,T,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=T,this.removeEmptyString=k}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){O[r]=new w(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 w(i,1,!1,r[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(r){O[r]=new w(r,2,!1,r.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){O[r]=new w(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 w(r,3,!1,r.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(r){O[r]=new w(r,3,!0,r,null,!1,!1)}),["capture","download"].forEach(function(r){O[r]=new w(r,4,!1,r,null,!1,!1)}),["cols","rows","size","span"].forEach(function(r){O[r]=new w(r,6,!1,r,null,!1,!1)}),["rowSpan","start"].forEach(function(r){O[r]=new w(r,5,!1,r.toLowerCase(),null,!1,!1)});var A=/[\-:]([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(A,F);O[i]=new w(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(A,F);O[i]=new w(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(A,F);O[i]=new w(i,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(r){O[r]=new w(r,1,!1,r.toLowerCase(),null,!1,!1)}),O.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(r){O[r]=new w(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 G=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ne=Symbol.for("react.element"),D=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),oe=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),le=Symbol.for("react.context"),ce=Symbol.for("react.forward_ref"),Ce=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),re=Symbol.for("react.memo"),ve=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),ae=Symbol.iterator;function Ee(r){return r===null||typeof r!="object"?null:(r=ae&&r[ae]||r["@@iterator"],typeof r=="function"?r:null)}var S=Object.assign,M;function Y(r){if(M===void 0)try{throw Error()}catch(u){var i=u.stack.trim().match(/\n( *(at )?)/);M=i&&i[1]||""}return`
35
+ `+M+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
+ `),T=c.stack.split(`
37
+ `),k=m.length-1,I=T.length-1;1<=k&&0<=I&&m[k]!==T[I];)I--;for(;1<=k&&0<=I;k--,I--)if(m[k]!==T[I]){if(k!==1||I!==1)do if(k--,I--,0>I||m[k]!==T[I]){var P=`
38
+ `+m[k].replace(" at new "," at ");return r.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",r.displayName)),P}while(1<=k&&0<=I);break}}}finally{v=!1,Error.prepareStackTrace=u}return(r=r?r.displayName||r.name:"")?Y(r):""}function _e(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 xe(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 oe:return"Profiler";case Z:return"StrictMode";case Ce:return"Suspense";case fe:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case le:return(r.displayName||"Context")+".Consumer";case $:return(r._context.displayName||"Context")+".Provider";case ce:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case re:return i=r.displayName||null,i!==null?i:xe(r.type)||"Memo";case ve:i=r._payload,r=r._init;try{return xe(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 xe(i);case 8:return i===Z?"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,T=u.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(k){c=""+k,T.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 Rn(r){r._valueTracker||(r._valueTracker=at(r))}function sa(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 Jr(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 Bi(r,i){var u=i.checked;return S({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:u??r._wrapperState.initialChecked})}function Ui(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 Zr(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")?ei(r,i.type,u):i.hasOwnProperty("defaultValue")&&ei(r,i.type,Re(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(r.defaultChecked=!!i.defaultChecked)}function aa(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 ei(r,i,u){(i!=="number"||Jr(r.ownerDocument)!==r)&&(u==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+u&&(r.defaultValue=""+u))}var Yn=Array.isArray;function Vn(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 ji(r,i){if(i.dangerouslySetInnerHTML!=null)throw Error(n(91));return S({},i,{value:void 0,defaultValue:void 0,children:""+r._wrapperState.initialValue})}function ua(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(Yn(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 oa(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 la(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 ue(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 Ne,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(Ne=Ne||document.createElement("div"),Ne.innerHTML="<svg>"+i.valueOf().toString()+"</svg>",i=Ne.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},On=["Webkit","ms","Moz","O"];Object.keys(Et).forEach(function(r){On.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 kr=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(kr[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 bn(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 no(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ro=null,ti=null,ni=null;function Ad(r){if(r=ls(r)){if(typeof ro!="function")throw Error(n(280));var i=r.stateNode;i&&(i=Ra(i),ro(r.stateNode,r.type,i))}}function vd(r){ti?ni?ni.push(r):ni=[r]:ti=r}function wd(){if(ti){var r=ti,i=ni;if(ni=ti=null,Ad(r),i)for(r=0;r<i.length;r++)Ad(i[r])}}function Id(r,i){return r(i)}function Ld(){}var io=!1;function Rd(r,i,u){if(io)return r(i,u);io=!0;try{return Id(r,i,u)}finally{io=!1,(ti!==null||ni!==null)&&(Ld(),wd())}}function zi(r,i){var u=r.stateNode;if(u===null)return null;var c=Ra(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 so=!1;if(d)try{var $i={};Object.defineProperty($i,"passive",{get:function(){so=!0}}),window.addEventListener("test",$i,$i),window.removeEventListener("test",$i,$i)}catch{so=!1}function Hg(r,i,u,c,m,T,k,I,P){var W=Array.prototype.slice.call(arguments,3);try{i.apply(u,W)}catch(J){this.onError(J)}}var Wi=!1,ca=null,da=!1,ao=null,jg={onError:function(r){Wi=!0,ca=r}};function zg(r,i,u,c,m,T,k,I,P){Wi=!1,ca=null,Hg.apply(jg,arguments)}function $g(r,i,u,c,m,T,k,I,P){if(zg.apply(this,arguments),Wi){if(Wi){var W=ca;Wi=!1,ca=null}else throw Error(n(198));da||(da=!0,ao=W)}}function Sr(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 Od(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 Dd(r){if(Sr(r)!==r)throw Error(n(188))}function Wg(r){var i=r.alternate;if(!i){if(i=Sr(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 T=m.alternate;if(T===null){if(c=m.return,c!==null){u=c;continue}break}if(m.child===T.child){for(T=m.child;T;){if(T===u)return Dd(m),r;if(T===c)return Dd(m),i;T=T.sibling}throw Error(n(188))}if(u.return!==c.return)u=m,c=T;else{for(var k=!1,I=m.child;I;){if(I===u){k=!0,u=m,c=T;break}if(I===c){k=!0,c=m,u=T;break}I=I.sibling}if(!k){for(I=T.child;I;){if(I===u){k=!0,u=T,c=m;break}if(I===c){k=!0,c=T,u=m;break}I=I.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 Pd(r){return r=Wg(r),r!==null?Md(r):null}function Md(r){if(r.tag===5||r.tag===6)return r;for(r=r.child;r!==null;){var i=Md(r);if(i!==null)return i;r=r.sibling}return null}var Fd=t.unstable_scheduleCallback,Bd=t.unstable_cancelCallback,Yg=t.unstable_shouldYield,Vg=t.unstable_requestPaint,nt=t.unstable_now,qg=t.unstable_getCurrentPriorityLevel,uo=t.unstable_ImmediatePriority,Ud=t.unstable_UserBlockingPriority,fa=t.unstable_NormalPriority,Qg=t.unstable_LowPriority,Hd=t.unstable_IdlePriority,ha=null,kn=null;function Gg(r){if(kn&&typeof kn.onCommitFiberRoot=="function")try{kn.onCommitFiberRoot(ha,r,void 0,(r.current.flags&128)===128)}catch{}}var un=Math.clz32?Math.clz32:Jg,Kg=Math.log,Xg=Math.LN2;function Jg(r){return r>>>=0,r===0?32:31-(Kg(r)/Xg|0)|0}var pa=64,ma=4194304;function Yi(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 ga(r,i){var u=r.pendingLanes;if(u===0)return 0;var c=0,m=r.suspendedLanes,T=r.pingedLanes,k=u&268435455;if(k!==0){var I=k&~m;I!==0?c=Yi(I):(T&=k,T!==0&&(c=Yi(T)))}else k=u&~m,k!==0?c=Yi(k):T!==0&&(c=Yi(T));if(c===0)return 0;if(i!==0&&i!==c&&(i&m)===0&&(m=c&-c,T=i&-i,m>=T||m===16&&(T&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 Zg(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 eE(r,i){for(var u=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,T=r.pendingLanes;0<T;){var k=31-un(T),I=1<<k,P=m[k];P===-1?((I&u)===0||(I&c)!==0)&&(m[k]=Zg(I,i)):P<=i&&(r.expiredLanes|=I),T&=~I}}function oo(r){return r=r.pendingLanes&-1073741825,r!==0?r:r&1073741824?1073741824:0}function jd(){var r=pa;return pa<<=1,(pa&4194240)===0&&(pa=64),r}function lo(r){for(var i=[],u=0;31>u;u++)i.push(r);return i}function Vi(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 tE(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),T=1<<m;i[m]=0,c[m]=-1,r[m]=-1,u&=~T}}function co(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 zd(r){return r&=-r,1<r?4<r?(r&268435455)!==0?16:536870912:4:1}var $d,fo,Wd,Yd,Vd,ho=!1,Ea=[],Qn=null,Gn=null,Kn=null,qi=new Map,Qi=new Map,Xn=[],nE="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 qd(r,i){switch(r){case"focusin":case"focusout":Qn=null;break;case"dragenter":case"dragleave":Gn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":qi.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(i.pointerId)}}function Gi(r,i,u,c,m,T){return r===null||r.nativeEvent!==T?(r={blockedOn:i,domEventName:u,eventSystemFlags:c,nativeEvent:T,targetContainers:[m]},i!==null&&(i=ls(i),i!==null&&fo(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function rE(r,i,u,c,m){switch(i){case"focusin":return Qn=Gi(Qn,r,i,u,c,m),!0;case"dragenter":return Gn=Gi(Gn,r,i,u,c,m),!0;case"mouseover":return Kn=Gi(Kn,r,i,u,c,m),!0;case"pointerover":var T=m.pointerId;return qi.set(T,Gi(qi.get(T)||null,r,i,u,c,m)),!0;case"gotpointercapture":return T=m.pointerId,Qi.set(T,Gi(Qi.get(T)||null,r,i,u,c,m)),!0}return!1}function Qd(r){var i=_r(r.target);if(i!==null){var u=Sr(i);if(u!==null){if(i=u.tag,i===13){if(i=Od(u),i!==null){r.blockedOn=i,Vd(r.priority,function(){Wd(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 Ta(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var u=mo(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=ls(u),i!==null&&fo(i),r.blockedOn=u,!1;i.shift()}return!0}function Gd(r,i,u){Ta(r)&&u.delete(i)}function iE(){ho=!1,Qn!==null&&Ta(Qn)&&(Qn=null),Gn!==null&&Ta(Gn)&&(Gn=null),Kn!==null&&Ta(Kn)&&(Kn=null),qi.forEach(Gd),Qi.forEach(Gd)}function Ki(r,i){r.blockedOn===i&&(r.blockedOn=null,ho||(ho=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iE)))}function Xi(r){function i(m){return Ki(m,r)}if(0<Ea.length){Ki(Ea[0],r);for(var u=1;u<Ea.length;u++){var c=Ea[u];c.blockedOn===r&&(c.blockedOn=null)}}for(Qn!==null&&Ki(Qn,r),Gn!==null&&Ki(Gn,r),Kn!==null&&Ki(Kn,r),qi.forEach(i),Qi.forEach(i),u=0;u<Xn.length;u++)c=Xn[u],c.blockedOn===r&&(c.blockedOn=null);for(;0<Xn.length&&(u=Xn[0],u.blockedOn===null);)Qd(u),u.blockedOn===null&&Xn.shift()}var ri=G.ReactCurrentBatchConfig,ya=!0;function sE(r,i,u,c){var m=We,T=ri.transition;ri.transition=null;try{We=1,po(r,i,u,c)}finally{We=m,ri.transition=T}}function aE(r,i,u,c){var m=We,T=ri.transition;ri.transition=null;try{We=4,po(r,i,u,c)}finally{We=m,ri.transition=T}}function po(r,i,u,c){if(ya){var m=mo(r,i,u,c);if(m===null)Ro(r,i,c,xa,u),qd(r,c);else if(rE(m,r,i,u,c))c.stopPropagation();else if(qd(r,c),i&4&&-1<nE.indexOf(r)){for(;m!==null;){var T=ls(m);if(T!==null&&$d(T),T=mo(r,i,u,c),T===null&&Ro(r,i,c,xa,u),T===m)break;m=T}m!==null&&c.stopPropagation()}else Ro(r,i,c,null,u)}}var xa=null;function mo(r,i,u,c){if(xa=null,r=no(c),r=_r(r),r!==null)if(i=Sr(r),i===null)r=null;else if(u=i.tag,u===13){if(r=Od(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 xa=r,null}function Kd(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(qg()){case uo:return 1;case Ud:return 4;case fa:case Qg:return 16;case Hd:return 536870912;default:return 16}default:return 16}}var Jn=null,go=null,ba=null;function Xd(){if(ba)return ba;var r,i=go,u=i.length,c,m="value"in Jn?Jn.value:Jn.textContent,T=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[T-c];c++);return ba=m.slice(r,1<c?1-c:void 0)}function ka(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 Sa(){return!0}function Jd(){return!1}function $t(r){function i(u,c,m,T,k){this._reactName=u,this._targetInst=m,this.type=c,this.nativeEvent=T,this.target=k,this.currentTarget=null;for(var I in r)r.hasOwnProperty(I)&&(u=r[I],this[I]=u?u(T):T[I]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?Sa:Jd,this.isPropagationStopped=Jd,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=Sa)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Sa)},persist:function(){},isPersistent:Sa}),i}var ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Eo=$t(ii),Ji=S({},ii,{view:0,detail:0}),uE=$t(Ji),To,yo,Zi,_a=S({},Ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bo,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!==Zi&&(Zi&&r.type==="mousemove"?(To=r.screenX-Zi.screenX,yo=r.screenY-Zi.screenY):yo=To=0,Zi=r),To)},movementY:function(r){return"movementY"in r?r.movementY:yo}}),Zd=$t(_a),oE=S({},_a,{dataTransfer:0}),lE=$t(oE),cE=S({},Ji,{relatedTarget:0}),xo=$t(cE),dE=S({},ii,{animationName:0,elapsedTime:0,pseudoElement:0}),fE=$t(dE),hE=S({},ii,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),pE=$t(hE),mE=S({},ii,{data:0}),ef=$t(mE),gE={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},EE={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"},TE={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yE(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=TE[r])?!!i[r]:!1}function bo(){return yE}var xE=S({},Ji,{key:function(r){if(r.key){var i=gE[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=ka(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?EE[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bo,charCode:function(r){return r.type==="keypress"?ka(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?ka(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),bE=$t(xE),kE=S({},_a,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tf=$t(kE),SE=S({},Ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bo}),_E=$t(SE),CE=S({},ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),NE=$t(CE),AE=S({},_a,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),vE=$t(AE),wE=[9,13,27,32],ko=d&&"CompositionEvent"in window,es=null;d&&"documentMode"in document&&(es=document.documentMode);var IE=d&&"TextEvent"in window&&!es,nf=d&&(!ko||es&&8<es&&11>=es),rf=" ",sf=!1;function af(r,i){switch(r){case"keyup":return wE.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uf(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var si=!1;function LE(r,i){switch(r){case"compositionend":return uf(i);case"keypress":return i.which!==32?null:(sf=!0,rf);case"textInput":return r=i.data,r===rf&&sf?null:r;default:return null}}function RE(r,i){if(si)return r==="compositionend"||!ko&&af(r,i)?(r=Xd(),ba=go=Jn=null,si=!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 nf&&i.locale!=="ko"?null:i.data;default:return null}}var OE={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 of(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!OE[r.type]:i==="textarea"}function lf(r,i,u,c){vd(c),i=wa(i,"onChange"),0<i.length&&(u=new Eo("onChange","change",null,u,c),r.push({event:u,listeners:i}))}var ts=null,ns=null;function DE(r){Af(r,0)}function Ca(r){var i=ci(r);if(sa(i))return r}function PE(r,i){if(r==="change")return i}var cf=!1;if(d){var So;if(d){var _o="oninput"in document;if(!_o){var df=document.createElement("div");df.setAttribute("oninput","return;"),_o=typeof df.oninput=="function"}So=_o}else So=!1;cf=So&&(!document.documentMode||9<document.documentMode)}function ff(){ts&&(ts.detachEvent("onpropertychange",hf),ns=ts=null)}function hf(r){if(r.propertyName==="value"&&Ca(ns)){var i=[];lf(i,ns,r,no(r)),Rd(DE,i)}}function ME(r,i,u){r==="focusin"?(ff(),ts=i,ns=u,ts.attachEvent("onpropertychange",hf)):r==="focusout"&&ff()}function FE(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Ca(ns)}function BE(r,i){if(r==="click")return Ca(i)}function UE(r,i){if(r==="input"||r==="change")return Ca(i)}function HE(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var on=typeof Object.is=="function"?Object.is:HE;function rs(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 pf(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function mf(r,i){var u=pf(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=pf(u)}}function gf(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?gf(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function Ef(){for(var r=window,i=Jr();i instanceof r.HTMLIFrameElement;){try{var u=typeof i.contentWindow.location.href=="string"}catch{u=!1}if(u)r=i.contentWindow;else break;i=Jr(r.document)}return i}function Co(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 jE(r){var i=Ef(),u=r.focusedElem,c=r.selectionRange;if(i!==u&&u&&u.ownerDocument&&gf(u.ownerDocument.documentElement,u)){if(c!==null&&Co(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,T=Math.min(c.start,m);c=c.end===void 0?T:Math.min(c.end,m),!r.extend&&T>c&&(m=c,c=T,T=m),m=mf(u,T);var k=mf(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(),T>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 zE=d&&"documentMode"in document&&11>=document.documentMode,ai=null,No=null,is=null,Ao=!1;function Tf(r,i,u){var c=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Ao||ai==null||ai!==Jr(c)||(c=ai,"selectionStart"in c&&Co(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}),is&&rs(is,c)||(is=c,c=wa(No,"onSelect"),0<c.length&&(i=new Eo("onSelect","select",null,i,u),r.push({event:i,listeners:c}),i.target=ai)))}function Na(r,i){var u={};return u[r.toLowerCase()]=i.toLowerCase(),u["Webkit"+r]="webkit"+i,u["Moz"+r]="moz"+i,u}var ui={animationend:Na("Animation","AnimationEnd"),animationiteration:Na("Animation","AnimationIteration"),animationstart:Na("Animation","AnimationStart"),transitionend:Na("Transition","TransitionEnd")},vo={},yf={};d&&(yf=document.createElement("div").style,"AnimationEvent"in window||(delete ui.animationend.animation,delete ui.animationiteration.animation,delete ui.animationstart.animation),"TransitionEvent"in window||delete ui.transitionend.transition);function Aa(r){if(vo[r])return vo[r];if(!ui[r])return r;var i=ui[r],u;for(u in i)if(i.hasOwnProperty(u)&&u in yf)return vo[r]=i[u];return r}var xf=Aa("animationend"),bf=Aa("animationiteration"),kf=Aa("animationstart"),Sf=Aa("transitionend"),_f=new Map,Cf="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 Zn(r,i){_f.set(r,i),o(i,[r])}for(var wo=0;wo<Cf.length;wo++){var Io=Cf[wo],$E=Io.toLowerCase(),WE=Io[0].toUpperCase()+Io.slice(1);Zn($E,"on"+WE)}Zn(xf,"onAnimationEnd"),Zn(bf,"onAnimationIteration"),Zn(kf,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(Sf,"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 ss="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(" "),YE=new Set("cancel close invalid load scroll toggle".split(" ").concat(ss));function Nf(r,i,u){var c=r.type||"unknown-event";r.currentTarget=u,$g(c,i,void 0,r),r.currentTarget=null}function Af(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 T=void 0;if(i)for(var k=c.length-1;0<=k;k--){var I=c[k],P=I.instance,W=I.currentTarget;if(I=I.listener,P!==T&&m.isPropagationStopped())break e;Nf(m,I,W),T=P}else for(k=0;k<c.length;k++){if(I=c[k],P=I.instance,W=I.currentTarget,I=I.listener,P!==T&&m.isPropagationStopped())break e;Nf(m,I,W),T=P}}}if(da)throw r=ao,da=!1,ao=null,r}function Qe(r,i){var u=i[Bo];u===void 0&&(u=i[Bo]=new Set);var c=r+"__bubble";u.has(c)||(vf(i,r,2,!1),u.add(c))}function Lo(r,i,u){var c=0;i&&(c|=4),vf(u,r,c,i)}var va="_reactListening"+Math.random().toString(36).slice(2);function as(r){if(!r[va]){r[va]=!0,s.forEach(function(u){u!=="selectionchange"&&(YE.has(u)||Lo(u,!1,r),Lo(u,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[va]||(i[va]=!0,Lo("selectionchange",!1,i))}}function vf(r,i,u,c){switch(Kd(i)){case 1:var m=sE;break;case 4:m=aE;break;default:m=po}u=m.bind(null,i,u,r),m=void 0,!so||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 Ro(r,i,u,c,m){var T=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 I=c.stateNode.containerInfo;if(I===m||I.nodeType===8&&I.parentNode===m)break;if(k===4)for(k=c.return;k!==null;){var P=k.tag;if((P===3||P===4)&&(P=k.stateNode.containerInfo,P===m||P.nodeType===8&&P.parentNode===m))return;k=k.return}for(;I!==null;){if(k=_r(I),k===null)return;if(P=k.tag,P===5||P===6){c=T=k;continue e}I=I.parentNode}}c=c.return}Rd(function(){var W=T,J=no(u),ee=[];e:{var K=_f.get(r);if(K!==void 0){var de=Eo,me=r;switch(r){case"keypress":if(ka(u)===0)break e;case"keydown":case"keyup":de=bE;break;case"focusin":me="focus",de=xo;break;case"focusout":me="blur",de=xo;break;case"beforeblur":case"afterblur":de=xo;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":de=Zd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=lE;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=_E;break;case xf:case bf:case kf:de=fE;break;case Sf:de=NE;break;case"scroll":de=uE;break;case"wheel":de=vE;break;case"copy":case"cut":case"paste":de=pE;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=tf}var ge=(i&4)!==0,rt=!ge&&r==="scroll",U=ge?K!==null?K+"Capture":null:K;ge=[];for(var B=W,j;B!==null;){j=B;var se=j.stateNode;if(j.tag===5&&se!==null&&(j=se,U!==null&&(se=zi(B,U),se!=null&&ge.push(us(B,se,j)))),rt)break;B=B.return}0<ge.length&&(K=new de(K,me,null,u,J),ee.push({event:K,listeners:ge}))}}if((i&7)===0){e:{if(K=r==="mouseover"||r==="pointerover",de=r==="mouseout"||r==="pointerout",K&&u!==zt&&(me=u.relatedTarget||u.fromElement)&&(_r(me)||me[Dn]))break e;if((de||K)&&(K=J.window===J?J:(K=J.ownerDocument)?K.defaultView||K.parentWindow:window,de?(me=u.relatedTarget||u.toElement,de=W,me=me?_r(me):null,me!==null&&(rt=Sr(me),me!==rt||me.tag!==5&&me.tag!==6)&&(me=null)):(de=null,me=W),de!==me)){if(ge=Zd,se="onMouseLeave",U="onMouseEnter",B="mouse",(r==="pointerout"||r==="pointerover")&&(ge=tf,se="onPointerLeave",U="onPointerEnter",B="pointer"),rt=de==null?K:ci(de),j=me==null?K:ci(me),K=new ge(se,B+"leave",de,u,J),K.target=rt,K.relatedTarget=j,se=null,_r(J)===W&&(ge=new ge(U,B+"enter",me,u,J),ge.target=j,ge.relatedTarget=rt,se=ge),rt=se,de&&me)t:{for(ge=de,U=me,B=0,j=ge;j;j=oi(j))B++;for(j=0,se=U;se;se=oi(se))j++;for(;0<B-j;)ge=oi(ge),B--;for(;0<j-B;)U=oi(U),j--;for(;B--;){if(ge===U||U!==null&&ge===U.alternate)break t;ge=oi(ge),U=oi(U)}ge=null}else ge=null;de!==null&&wf(ee,K,de,ge,!1),me!==null&&rt!==null&&wf(ee,rt,me,ge,!0)}}e:{if(K=W?ci(W):window,de=K.nodeName&&K.nodeName.toLowerCase(),de==="select"||de==="input"&&K.type==="file")var Te=PE;else if(of(K))if(cf)Te=UE;else{Te=FE;var ke=ME}else(de=K.nodeName)&&de.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(Te=BE);if(Te&&(Te=Te(r,W))){lf(ee,Te,u,J);break e}ke&&ke(r,K,W),r==="focusout"&&(ke=K._wrapperState)&&ke.controlled&&K.type==="number"&&ei(K,"number",K.value)}switch(ke=W?ci(W):window,r){case"focusin":(of(ke)||ke.contentEditable==="true")&&(ai=ke,No=W,is=null);break;case"focusout":is=No=ai=null;break;case"mousedown":Ao=!0;break;case"contextmenu":case"mouseup":case"dragend":Ao=!1,Tf(ee,u,J);break;case"selectionchange":if(zE)break;case"keydown":case"keyup":Tf(ee,u,J)}var Se;if(ko)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 si?af(r,u)&&(Ae="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(Ae="onCompositionStart");Ae&&(nf&&u.locale!=="ko"&&(si||Ae!=="onCompositionStart"?Ae==="onCompositionEnd"&&si&&(Se=Xd()):(Jn=J,go="value"in Jn?Jn.value:Jn.textContent,si=!0)),ke=wa(W,Ae),0<ke.length&&(Ae=new ef(Ae,r,null,u,J),ee.push({event:Ae,listeners:ke}),Se?Ae.data=Se:(Se=uf(u),Se!==null&&(Ae.data=Se)))),(Se=IE?LE(r,u):RE(r,u))&&(W=wa(W,"onBeforeInput"),0<W.length&&(J=new ef("onBeforeInput","beforeinput",null,u,J),ee.push({event:J,listeners:W}),J.data=Se))}Af(ee,i)})}function us(r,i,u){return{instance:r,listener:i,currentTarget:u}}function wa(r,i){for(var u=i+"Capture",c=[];r!==null;){var m=r,T=m.stateNode;m.tag===5&&T!==null&&(m=T,T=zi(r,u),T!=null&&c.unshift(us(r,T,m)),T=zi(r,i),T!=null&&c.push(us(r,T,m))),r=r.return}return c}function oi(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5);return r||null}function wf(r,i,u,c,m){for(var T=i._reactName,k=[];u!==null&&u!==c;){var I=u,P=I.alternate,W=I.stateNode;if(P!==null&&P===c)break;I.tag===5&&W!==null&&(I=W,m?(P=zi(u,T),P!=null&&k.unshift(us(u,P,I))):m||(P=zi(u,T),P!=null&&k.push(us(u,P,I)))),u=u.return}k.length!==0&&r.push({event:i,listeners:k})}var VE=/\r\n?/g,qE=/\u0000|\uFFFD/g;function If(r){return(typeof r=="string"?r:""+r).replace(VE,`
39
+ `).replace(qE,"")}function Ia(r,i,u){if(i=If(i),If(r)!==i&&u)throw Error(n(425))}function La(){}var Oo=null,Do=null;function Po(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 Mo=typeof setTimeout=="function"?setTimeout:void 0,QE=typeof clearTimeout=="function"?clearTimeout:void 0,Lf=typeof Promise=="function"?Promise:void 0,GE=typeof queueMicrotask=="function"?queueMicrotask:typeof Lf<"u"?function(r){return Lf.resolve(null).then(r).catch(KE)}:Mo;function KE(r){setTimeout(function(){throw r})}function Fo(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),Xi(i);return}c--}else u!=="$"&&u!=="$?"&&u!=="$!"||c++;u=m}while(u);Xi(i)}function er(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 Rf(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 li=Math.random().toString(36).slice(2),Sn="__reactFiber$"+li,os="__reactProps$"+li,Dn="__reactContainer$"+li,Bo="__reactEvents$"+li,XE="__reactListeners$"+li,JE="__reactHandles$"+li;function _r(r){var i=r[Sn];if(i)return i;for(var u=r.parentNode;u;){if(i=u[Dn]||u[Sn]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(r=Rf(r);r!==null;){if(u=r[Sn])return u;r=Rf(r)}return i}r=u,u=r.parentNode}return null}function ls(r){return r=r[Sn]||r[Dn],!r||r.tag!==5&&r.tag!==6&&r.tag!==13&&r.tag!==3?null:r}function ci(r){if(r.tag===5||r.tag===6)return r.stateNode;throw Error(n(33))}function Ra(r){return r[os]||null}var Uo=[],di=-1;function tr(r){return{current:r}}function Ge(r){0>di||(r.current=Uo[di],Uo[di]=null,di--)}function qe(r,i){di++,Uo[di]=r.current,r.current=i}var nr={},kt=tr(nr),Ot=tr(!1),Cr=nr;function fi(r,i){var u=r.type.contextTypes;if(!u)return nr;var c=r.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===i)return c.__reactInternalMemoizedMaskedChildContext;var m={},T;for(T in u)m[T]=i[T];return c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=i,r.__reactInternalMemoizedMaskedChildContext=m),m}function Dt(r){return r=r.childContextTypes,r!=null}function Oa(){Ge(Ot),Ge(kt)}function Of(r,i,u){if(kt.current!==nr)throw Error(n(168));qe(kt,i),qe(Ot,u)}function Df(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 Da(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||nr,Cr=kt.current,qe(kt,r),qe(Ot,Ot.current),!0}function Pf(r,i,u){var c=r.stateNode;if(!c)throw Error(n(169));u?(r=Df(r,i,Cr),c.__reactInternalMemoizedMergedChildContext=r,Ge(Ot),Ge(kt),qe(kt,r)):Ge(Ot),qe(Ot,u)}var Pn=null,Pa=!1,Ho=!1;function Mf(r){Pn===null?Pn=[r]:Pn.push(r)}function ZE(r){Pa=!0,Mf(r)}function rr(){if(!Ho&&Pn!==null){Ho=!0;var r=0,i=We;try{var u=Pn;for(We=1;r<u.length;r++){var c=u[r];do c=c(!0);while(c!==null)}Pn=null,Pa=!1}catch(m){throw Pn!==null&&(Pn=Pn.slice(r+1)),Fd(uo,rr),m}finally{We=i,Ho=!1}}return null}var hi=[],pi=0,Ma=null,Fa=0,Xt=[],Jt=0,Nr=null,Mn=1,Fn="";function Ar(r,i){hi[pi++]=Fa,hi[pi++]=Ma,Ma=r,Fa=i}function Ff(r,i,u){Xt[Jt++]=Mn,Xt[Jt++]=Fn,Xt[Jt++]=Nr,Nr=r;var c=Mn;r=Fn;var m=32-un(c)-1;c&=~(1<<m),u+=1;var T=32-un(i)+m;if(30<T){var k=m-m%5;T=(c&(1<<k)-1).toString(32),c>>=k,m-=k,Mn=1<<32-un(i)+m|u<<m|c,Fn=T+r}else Mn=1<<T|u<<m|c,Fn=r}function jo(r){r.return!==null&&(Ar(r,1),Ff(r,1,0))}function zo(r){for(;r===Ma;)Ma=hi[--pi],hi[pi]=null,Fa=hi[--pi],hi[pi]=null;for(;r===Nr;)Nr=Xt[--Jt],Xt[Jt]=null,Fn=Xt[--Jt],Xt[Jt]=null,Mn=Xt[--Jt],Xt[Jt]=null}var Wt=null,Yt=null,Xe=!1,ln=null;function Bf(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 Uf(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=er(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=Nr!==null?{id:Mn,overflow:Fn}: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 $o(r){return(r.mode&1)!==0&&(r.flags&128)===0}function Wo(r){if(Xe){var i=Yt;if(i){var u=i;if(!Uf(r,i)){if($o(r))throw Error(n(418));i=er(u.nextSibling);var c=Wt;i&&Uf(r,i)?Bf(c,u):(r.flags=r.flags&-4097|2,Xe=!1,Wt=r)}}else{if($o(r))throw Error(n(418));r.flags=r.flags&-4097|2,Xe=!1,Wt=r}}}function Hf(r){for(r=r.return;r!==null&&r.tag!==5&&r.tag!==3&&r.tag!==13;)r=r.return;Wt=r}function Ba(r){if(r!==Wt)return!1;if(!Xe)return Hf(r),Xe=!0,!1;var i;if((i=r.tag!==3)&&!(i=r.tag!==5)&&(i=r.type,i=i!=="head"&&i!=="body"&&!Po(r.type,r.memoizedProps)),i&&(i=Yt)){if($o(r))throw jf(),Error(n(418));for(;i;)Bf(r,i),i=er(i.nextSibling)}if(Hf(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=er(r.nextSibling);break e}i--}else u!=="$"&&u!=="$!"&&u!=="$?"||i++}r=r.nextSibling}Yt=null}}else Yt=Wt?er(r.stateNode.nextSibling):null;return!0}function jf(){for(var r=Yt;r;)r=er(r.nextSibling)}function mi(){Yt=Wt=null,Xe=!1}function Yo(r){ln===null?ln=[r]:ln.push(r)}var eT=G.ReactCurrentBatchConfig;function cs(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,T=""+r;return i!==null&&i.ref!==null&&typeof i.ref=="function"&&i.ref._stringRef===T?i.ref:(i=function(k){var I=m.refs;k===null?delete I[T]:I[T]=k},i._stringRef=T,i)}if(typeof r!="string")throw Error(n(284));if(!u._owner)throw Error(n(290,r))}return r}function Ua(r,i){throw r=Object.prototype.toString.call(i),Error(n(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r))}function zf(r){var i=r._init;return i(r._payload)}function $f(r){function i(U,B){if(r){var j=U.deletions;j===null?(U.deletions=[B],U.flags|=16):j.push(B)}}function u(U,B){if(!r)return null;for(;B!==null;)i(U,B),B=B.sibling;return null}function c(U,B){for(U=new Map;B!==null;)B.key!==null?U.set(B.key,B):U.set(B.index,B),B=B.sibling;return U}function m(U,B){return U=dr(U,B),U.index=0,U.sibling=null,U}function T(U,B,j){return U.index=j,r?(j=U.alternate,j!==null?(j=j.index,j<B?(U.flags|=2,B):j):(U.flags|=2,B)):(U.flags|=1048576,B)}function k(U){return r&&U.alternate===null&&(U.flags|=2),U}function I(U,B,j,se){return B===null||B.tag!==6?(B=Ml(j,U.mode,se),B.return=U,B):(B=m(B,j),B.return=U,B)}function P(U,B,j,se){var Te=j.type;return Te===q?J(U,B,j.props.children,se,j.key):B!==null&&(B.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ve&&zf(Te)===B.type)?(se=m(B,j.props),se.ref=cs(U,B,j),se.return=U,se):(se=lu(j.type,j.key,j.props,null,U.mode,se),se.ref=cs(U,B,j),se.return=U,se)}function W(U,B,j,se){return B===null||B.tag!==4||B.stateNode.containerInfo!==j.containerInfo||B.stateNode.implementation!==j.implementation?(B=Fl(j,U.mode,se),B.return=U,B):(B=m(B,j.children||[]),B.return=U,B)}function J(U,B,j,se,Te){return B===null||B.tag!==7?(B=Pr(j,U.mode,se,Te),B.return=U,B):(B=m(B,j),B.return=U,B)}function ee(U,B,j){if(typeof B=="string"&&B!==""||typeof B=="number")return B=Ml(""+B,U.mode,j),B.return=U,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case ne:return j=lu(B.type,B.key,B.props,null,U.mode,j),j.ref=cs(U,null,B),j.return=U,j;case D:return B=Fl(B,U.mode,j),B.return=U,B;case ve:var se=B._init;return ee(U,se(B._payload),j)}if(Yn(B)||Ee(B))return B=Pr(B,U.mode,j,null),B.return=U,B;Ua(U,B)}return null}function K(U,B,j,se){var Te=B!==null?B.key:null;if(typeof j=="string"&&j!==""||typeof j=="number")return Te!==null?null:I(U,B,""+j,se);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case ne:return j.key===Te?P(U,B,j,se):null;case D:return j.key===Te?W(U,B,j,se):null;case ve:return Te=j._init,K(U,B,Te(j._payload),se)}if(Yn(j)||Ee(j))return Te!==null?null:J(U,B,j,se,null);Ua(U,j)}return null}function de(U,B,j,se,Te){if(typeof se=="string"&&se!==""||typeof se=="number")return U=U.get(j)||null,I(B,U,""+se,Te);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case ne:return U=U.get(se.key===null?j:se.key)||null,P(B,U,se,Te);case D:return U=U.get(se.key===null?j:se.key)||null,W(B,U,se,Te);case ve:var ke=se._init;return de(U,B,j,ke(se._payload),Te)}if(Yn(se)||Ee(se))return U=U.get(j)||null,J(B,U,se,Te,null);Ua(B,se)}return null}function me(U,B,j,se){for(var Te=null,ke=null,Se=B,Ae=B=0,pt=null;Se!==null&&Ae<j.length;Ae++){Se.index>Ae?(pt=Se,Se=null):pt=Se.sibling;var je=K(U,Se,j[Ae],se);if(je===null){Se===null&&(Se=pt);break}r&&Se&&je.alternate===null&&i(U,Se),B=T(je,B,Ae),ke===null?Te=je:ke.sibling=je,ke=je,Se=pt}if(Ae===j.length)return u(U,Se),Xe&&Ar(U,Ae),Te;if(Se===null){for(;Ae<j.length;Ae++)Se=ee(U,j[Ae],se),Se!==null&&(B=T(Se,B,Ae),ke===null?Te=Se:ke.sibling=Se,ke=Se);return Xe&&Ar(U,Ae),Te}for(Se=c(U,Se);Ae<j.length;Ae++)pt=de(Se,U,Ae,j[Ae],se),pt!==null&&(r&&pt.alternate!==null&&Se.delete(pt.key===null?Ae:pt.key),B=T(pt,B,Ae),ke===null?Te=pt:ke.sibling=pt,ke=pt);return r&&Se.forEach(function(fr){return i(U,fr)}),Xe&&Ar(U,Ae),Te}function ge(U,B,j,se){var Te=Ee(j);if(typeof Te!="function")throw Error(n(150));if(j=Te.call(j),j==null)throw Error(n(151));for(var ke=Te=null,Se=B,Ae=B=0,pt=null,je=j.next();Se!==null&&!je.done;Ae++,je=j.next()){Se.index>Ae?(pt=Se,Se=null):pt=Se.sibling;var fr=K(U,Se,je.value,se);if(fr===null){Se===null&&(Se=pt);break}r&&Se&&fr.alternate===null&&i(U,Se),B=T(fr,B,Ae),ke===null?Te=fr:ke.sibling=fr,ke=fr,Se=pt}if(je.done)return u(U,Se),Xe&&Ar(U,Ae),Te;if(Se===null){for(;!je.done;Ae++,je=j.next())je=ee(U,je.value,se),je!==null&&(B=T(je,B,Ae),ke===null?Te=je:ke.sibling=je,ke=je);return Xe&&Ar(U,Ae),Te}for(Se=c(U,Se);!je.done;Ae++,je=j.next())je=de(Se,U,Ae,je.value,se),je!==null&&(r&&je.alternate!==null&&Se.delete(je.key===null?Ae:je.key),B=T(je,B,Ae),ke===null?Te=je:ke.sibling=je,ke=je);return r&&Se.forEach(function(OT){return i(U,OT)}),Xe&&Ar(U,Ae),Te}function rt(U,B,j,se){if(typeof j=="object"&&j!==null&&j.type===q&&j.key===null&&(j=j.props.children),typeof j=="object"&&j!==null){switch(j.$$typeof){case ne:e:{for(var Te=j.key,ke=B;ke!==null;){if(ke.key===Te){if(Te=j.type,Te===q){if(ke.tag===7){u(U,ke.sibling),B=m(ke,j.props.children),B.return=U,U=B;break e}}else if(ke.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===ve&&zf(Te)===ke.type){u(U,ke.sibling),B=m(ke,j.props),B.ref=cs(U,ke,j),B.return=U,U=B;break e}u(U,ke);break}else i(U,ke);ke=ke.sibling}j.type===q?(B=Pr(j.props.children,U.mode,se,j.key),B.return=U,U=B):(se=lu(j.type,j.key,j.props,null,U.mode,se),se.ref=cs(U,B,j),se.return=U,U=se)}return k(U);case D:e:{for(ke=j.key;B!==null;){if(B.key===ke)if(B.tag===4&&B.stateNode.containerInfo===j.containerInfo&&B.stateNode.implementation===j.implementation){u(U,B.sibling),B=m(B,j.children||[]),B.return=U,U=B;break e}else{u(U,B);break}else i(U,B);B=B.sibling}B=Fl(j,U.mode,se),B.return=U,U=B}return k(U);case ve:return ke=j._init,rt(U,B,ke(j._payload),se)}if(Yn(j))return me(U,B,j,se);if(Ee(j))return ge(U,B,j,se);Ua(U,j)}return typeof j=="string"&&j!==""||typeof j=="number"?(j=""+j,B!==null&&B.tag===6?(u(U,B.sibling),B=m(B,j),B.return=U,U=B):(u(U,B),B=Ml(j,U.mode,se),B.return=U,U=B),k(U)):u(U,B)}return rt}var gi=$f(!0),Wf=$f(!1),Ha=tr(null),ja=null,Ei=null,Vo=null;function qo(){Vo=Ei=ja=null}function Qo(r){var i=Ha.current;Ge(Ha),r._currentValue=i}function Go(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 Ti(r,i){ja=r,Vo=Ei=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(Vo!==r)if(r={context:r,memoizedValue:i,next:null},Ei===null){if(ja===null)throw Error(n(308));Ei=r,ja.dependencies={lanes:0,firstContext:r}}else Ei=Ei.next=r;return i}var vr=null;function Ko(r){vr===null?vr=[r]:vr.push(r)}function Yf(r,i,u,c){var m=i.interleaved;return m===null?(u.next=u,Ko(i)):(u.next=m.next,m.next=u),i.interleaved=u,Bn(r,c)}function Bn(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 ir=!1;function Xo(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Vf(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 Un(r,i){return{eventTime:r,lane:i,tag:0,payload:null,callback:null,next:null}}function sr(r,i,u){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(He&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,Bn(r,u)}return m=c.interleaved,m===null?(i.next=i,Ko(c)):(i.next=m.next,m.next=i),c.interleaved=i,Bn(r,u)}function za(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,co(r,u)}}function qf(r,i){var u=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,u===c)){var m=null,T=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};T===null?m=T=k:T=T.next=k,u=u.next}while(u!==null);T===null?m=T=i:T=T.next=i}else m=T=i;u={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:T,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 $a(r,i,u,c){var m=r.updateQueue;ir=!1;var T=m.firstBaseUpdate,k=m.lastBaseUpdate,I=m.shared.pending;if(I!==null){m.shared.pending=null;var P=I,W=P.next;P.next=null,k===null?T=W:k.next=W,k=P;var J=r.alternate;J!==null&&(J=J.updateQueue,I=J.lastBaseUpdate,I!==k&&(I===null?J.firstBaseUpdate=W:I.next=W,J.lastBaseUpdate=P))}if(T!==null){var ee=m.baseState;k=0,J=W=P=null,I=T;do{var K=I.lane,de=I.eventTime;if((c&K)===K){J!==null&&(J=J.next={eventTime:de,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var me=r,ge=I;switch(K=i,de=u,ge.tag){case 1:if(me=ge.payload,typeof me=="function"){ee=me.call(de,ee,K);break e}ee=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ge.payload,K=typeof me=="function"?me.call(de,ee,K):me,K==null)break e;ee=S({},ee,K);break e;case 2:ir=!0}}I.callback!==null&&I.lane!==0&&(r.flags|=64,K=m.effects,K===null?m.effects=[I]:K.push(I))}else de={eventTime:de,lane:K,tag:I.tag,payload:I.payload,callback:I.callback,next:null},J===null?(W=J=de,P=ee):J=J.next=de,k|=K;if(I=I.next,I===null){if(I=m.shared.pending,I===null)break;K=I,I=K.next,K.next=null,m.lastBaseUpdate=K,m.shared.pending=null}}while(!0);if(J===null&&(P=ee),m.baseState=P,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 T===null&&(m.shared.lanes=0);Lr|=k,r.lanes=k,r.memoizedState=ee}}function Qf(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 ds={},_n=tr(ds),fs=tr(ds),hs=tr(ds);function wr(r){if(r===ds)throw Error(n(174));return r}function Jo(r,i){switch(qe(hs,i),qe(fs,r),qe(_n,ds),r=i.nodeType,r){case 9:case 11:i=(i=i.documentElement)?i.namespaceURI:ue(null,"");break;default:r=r===8?i.parentNode:i,i=r.namespaceURI||null,r=r.tagName,i=ue(i,r)}Ge(_n),qe(_n,i)}function yi(){Ge(_n),Ge(fs),Ge(hs)}function Gf(r){wr(hs.current);var i=wr(_n.current),u=ue(i,r.type);i!==u&&(qe(fs,r),qe(_n,u))}function Zo(r){fs.current===r&&(Ge(_n),Ge(fs))}var Ze=tr(0);function Wa(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 el=[];function tl(){for(var r=0;r<el.length;r++)el[r]._workInProgressVersionPrimary=null;el.length=0}var Ya=G.ReactCurrentDispatcher,nl=G.ReactCurrentBatchConfig,Ir=0,et=null,lt=null,ft=null,Va=!1,ps=!1,ms=0,tT=0;function St(){throw Error(n(321))}function rl(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 il(r,i,u,c,m,T){if(Ir=T,et=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,Ya.current=r===null||r.memoizedState===null?sT:aT,r=u(c,m),ps){T=0;do{if(ps=!1,ms=0,25<=T)throw Error(n(301));T+=1,ft=lt=null,i.updateQueue=null,Ya.current=uT,r=u(c,m)}while(ps)}if(Ya.current=Ga,i=lt!==null&&lt.next!==null,Ir=0,ft=lt=et=null,Va=!1,i)throw Error(n(300));return r}function sl(){var r=ms!==0;return ms=0,r}function Cn(){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 gs(r,i){return typeof i=="function"?i(r):i}function al(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=lt,m=c.baseQueue,T=u.pending;if(T!==null){if(m!==null){var k=m.next;m.next=T.next,T.next=k}c.baseQueue=m=T,u.pending=null}if(m!==null){T=m.next,c=c.baseState;var I=k=null,P=null,W=T;do{var J=W.lane;if((Ir&J)===J)P!==null&&(P=P.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 ee={lane:J,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};P===null?(I=P=ee,k=c):P=P.next=ee,et.lanes|=J,Lr|=J}W=W.next}while(W!==null&&W!==T);P===null?k=c:P.next=I,on(c,i.memoizedState)||(Pt=!0),i.memoizedState=c,i.baseState=k,i.baseQueue=P,u.lastRenderedState=c}if(r=u.interleaved,r!==null){m=r;do T=m.lane,et.lanes|=T,Lr|=T,m=m.next;while(m!==r)}else m===null&&(u.lanes=0);return[i.memoizedState,u.dispatch]}function ul(r){var i=en(),u=i.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=r;var c=u.dispatch,m=u.pending,T=i.memoizedState;if(m!==null){u.pending=null;var k=m=m.next;do T=r(T,k.action),k=k.next;while(k!==m);on(T,i.memoizedState)||(Pt=!0),i.memoizedState=T,i.baseQueue===null&&(i.baseState=T),u.lastRenderedState=T}return[T,c]}function Kf(){}function Xf(r,i){var u=et,c=en(),m=i(),T=!on(c.memoizedState,m);if(T&&(c.memoizedState=m,Pt=!0),c=c.queue,ol(eh.bind(null,u,c,r),[r]),c.getSnapshot!==i||T||ft!==null&&ft.memoizedState.tag&1){if(u.flags|=2048,Es(9,Zf.bind(null,u,c,m,i),void 0,null),ht===null)throw Error(n(349));(Ir&30)!==0||Jf(u,i,m)}return m}function Jf(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 Zf(r,i,u,c){i.value=u,i.getSnapshot=c,th(i)&&nh(r)}function eh(r,i,u){return u(function(){th(i)&&nh(r)})}function th(r){var i=r.getSnapshot;r=r.value;try{var u=i();return!on(r,u)}catch{return!0}}function nh(r){var i=Bn(r,1);i!==null&&hn(i,r,1,-1)}function rh(r){var i=Cn();return typeof r=="function"&&(r=r()),i.memoizedState=i.baseState=r,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:r},i.queue=r,r=r.dispatch=iT.bind(null,et,r),[i.memoizedState,r]}function Es(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 ih(){return en().memoizedState}function qa(r,i,u,c){var m=Cn();et.flags|=r,m.memoizedState=Es(1|i,u,void 0,c===void 0?null:c)}function Qa(r,i,u,c){var m=en();c=c===void 0?null:c;var T=void 0;if(lt!==null){var k=lt.memoizedState;if(T=k.destroy,c!==null&&rl(c,k.deps)){m.memoizedState=Es(i,u,T,c);return}}et.flags|=r,m.memoizedState=Es(1|i,u,T,c)}function sh(r,i){return qa(8390656,8,r,i)}function ol(r,i){return Qa(2048,8,r,i)}function ah(r,i){return Qa(4,2,r,i)}function uh(r,i){return Qa(4,4,r,i)}function oh(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 lh(r,i,u){return u=u!=null?u.concat([r]):null,Qa(4,4,oh.bind(null,i,r),u)}function ll(){}function ch(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&rl(i,c[1])?c[0]:(u.memoizedState=[r,i],r)}function dh(r,i){var u=en();i=i===void 0?null:i;var c=u.memoizedState;return c!==null&&i!==null&&rl(i,c[1])?c[0]:(r=r(),u.memoizedState=[r,i],r)}function fh(r,i,u){return(Ir&21)===0?(r.baseState&&(r.baseState=!1,Pt=!0),r.memoizedState=u):(on(u,i)||(u=jd(),et.lanes|=u,Lr|=u,r.baseState=!0),i)}function nT(r,i){var u=We;We=u!==0&&4>u?u:4,r(!0);var c=nl.transition;nl.transition={};try{r(!1),i()}finally{We=u,nl.transition=c}}function hh(){return en().memoizedState}function rT(r,i,u){var c=lr(r);if(u={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null},ph(r))mh(i,u);else if(u=Yf(r,i,u,c),u!==null){var m=Lt();hn(u,r,c,m),gh(u,i,c)}}function iT(r,i,u){var c=lr(r),m={lane:c,action:u,hasEagerState:!1,eagerState:null,next:null};if(ph(r))mh(i,m);else{var T=r.alternate;if(r.lanes===0&&(T===null||T.lanes===0)&&(T=i.lastRenderedReducer,T!==null))try{var k=i.lastRenderedState,I=T(k,u);if(m.hasEagerState=!0,m.eagerState=I,on(I,k)){var P=i.interleaved;P===null?(m.next=m,Ko(i)):(m.next=P.next,P.next=m),i.interleaved=m;return}}catch{}finally{}u=Yf(r,i,m,c),u!==null&&(m=Lt(),hn(u,r,c,m),gh(u,i,c))}}function ph(r){var i=r.alternate;return r===et||i!==null&&i===et}function mh(r,i){ps=Va=!0;var u=r.pending;u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i}function gh(r,i,u){if((u&4194240)!==0){var c=i.lanes;c&=r.pendingLanes,u|=c,i.lanes=u,co(r,u)}}var Ga={readContext:Zt,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useInsertionEffect:St,useLayoutEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useMutableSource:St,useSyncExternalStore:St,useId:St,unstable_isNewReconciler:!1},sT={readContext:Zt,useCallback:function(r,i){return Cn().memoizedState=[r,i===void 0?null:i],r},useContext:Zt,useEffect:sh,useImperativeHandle:function(r,i,u){return u=u!=null?u.concat([r]):null,qa(4194308,4,oh.bind(null,i,r),u)},useLayoutEffect:function(r,i){return qa(4194308,4,r,i)},useInsertionEffect:function(r,i){return qa(4,2,r,i)},useMemo:function(r,i){var u=Cn();return i=i===void 0?null:i,r=r(),u.memoizedState=[r,i],r},useReducer:function(r,i,u){var c=Cn();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=rT.bind(null,et,r),[c.memoizedState,r]},useRef:function(r){var i=Cn();return r={current:r},i.memoizedState=r},useState:rh,useDebugValue:ll,useDeferredValue:function(r){return Cn().memoizedState=r},useTransition:function(){var r=rh(!1),i=r[0];return r=nT.bind(null,r[1]),Cn().memoizedState=r,[i,r]},useMutableSource:function(){},useSyncExternalStore:function(r,i,u){var c=et,m=Cn();if(Xe){if(u===void 0)throw Error(n(407));u=u()}else{if(u=i(),ht===null)throw Error(n(349));(Ir&30)!==0||Jf(c,i,u)}m.memoizedState=u;var T={value:u,getSnapshot:i};return m.queue=T,sh(eh.bind(null,c,T,r),[r]),c.flags|=2048,Es(9,Zf.bind(null,c,T,u,i),void 0,null),u},useId:function(){var r=Cn(),i=ht.identifierPrefix;if(Xe){var u=Fn,c=Mn;u=(c&~(1<<32-un(c)-1)).toString(32)+u,i=":"+i+"R"+u,u=ms++,0<u&&(i+="H"+u.toString(32)),i+=":"}else u=tT++,i=":"+i+"r"+u.toString(32)+":";return r.memoizedState=i},unstable_isNewReconciler:!1},aT={readContext:Zt,useCallback:ch,useContext:Zt,useEffect:ol,useImperativeHandle:lh,useInsertionEffect:ah,useLayoutEffect:uh,useMemo:dh,useReducer:al,useRef:ih,useState:function(){return al(gs)},useDebugValue:ll,useDeferredValue:function(r){var i=en();return fh(i,lt.memoizedState,r)},useTransition:function(){var r=al(gs)[0],i=en().memoizedState;return[r,i]},useMutableSource:Kf,useSyncExternalStore:Xf,useId:hh,unstable_isNewReconciler:!1},uT={readContext:Zt,useCallback:ch,useContext:Zt,useEffect:ol,useImperativeHandle:lh,useInsertionEffect:ah,useLayoutEffect:uh,useMemo:dh,useReducer:ul,useRef:ih,useState:function(){return ul(gs)},useDebugValue:ll,useDeferredValue:function(r){var i=en();return lt===null?i.memoizedState=r:fh(i,lt.memoizedState,r)},useTransition:function(){var r=ul(gs)[0],i=en().memoizedState;return[r,i]},useMutableSource:Kf,useSyncExternalStore:Xf,useId:hh,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 cl(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 Ka={isMounted:function(r){return(r=r._reactInternals)?Sr(r)===r:!1},enqueueSetState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=lr(r),T=Un(c,m);T.payload=i,u!=null&&(T.callback=u),i=sr(r,T,m),i!==null&&(hn(i,r,m,c),za(i,r,m))},enqueueReplaceState:function(r,i,u){r=r._reactInternals;var c=Lt(),m=lr(r),T=Un(c,m);T.tag=1,T.payload=i,u!=null&&(T.callback=u),i=sr(r,T,m),i!==null&&(hn(i,r,m,c),za(i,r,m))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var u=Lt(),c=lr(r),m=Un(u,c);m.tag=2,i!=null&&(m.callback=i),i=sr(r,m,c),i!==null&&(hn(i,r,c,u),za(i,r,c))}};function Eh(r,i,u,c,m,T,k){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,T,k):i.prototype&&i.prototype.isPureReactComponent?!rs(u,c)||!rs(m,T):!0}function Th(r,i,u){var c=!1,m=nr,T=i.contextType;return typeof T=="object"&&T!==null?T=Zt(T):(m=Dt(i)?Cr:kt.current,c=i.contextTypes,T=(c=c!=null)?fi(r,m):nr),i=new i(u,T),r.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Ka,r.stateNode=i,i._reactInternals=r,c&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=m,r.__reactInternalMemoizedMaskedChildContext=T),i}function yh(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&&Ka.enqueueReplaceState(i,i.state,null)}function dl(r,i,u,c){var m=r.stateNode;m.props=u,m.state=r.memoizedState,m.refs={},Xo(r);var T=i.contextType;typeof T=="object"&&T!==null?m.context=Zt(T):(T=Dt(i)?Cr:kt.current,m.context=fi(r,T)),m.state=r.memoizedState,T=i.getDerivedStateFromProps,typeof T=="function"&&(cl(r,i,T,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&&Ka.enqueueReplaceState(m,m.state,null),$a(r,u,m,c),m.state=r.memoizedState),typeof m.componentDidMount=="function"&&(r.flags|=4194308)}function xi(r,i){try{var u="",c=i;do u+=_e(c),c=c.return;while(c);var m=u}catch(T){m=`
40
+ Error generating stack: `+T.message+`
41
+ `+T.stack}return{value:r,source:i,stack:m,digest:null}}function fl(r,i,u){return{value:r,source:null,stack:u??null,digest:i??null}}function hl(r,i){try{console.error(i.value)}catch(u){setTimeout(function(){throw u})}}var oT=typeof WeakMap=="function"?WeakMap:Map;function xh(r,i,u){u=Un(-1,u),u.tag=3,u.payload={element:null};var c=i.value;return u.callback=function(){ru||(ru=!0,vl=c),hl(r,i)},u}function bh(r,i,u){u=Un(-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(){hl(r,i)}}var T=r.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(u.callback=function(){hl(r,i),typeof c!="function"&&(ur===null?ur=new Set([this]):ur.add(this));var k=i.stack;this.componentDidCatch(i.value,{componentStack:k!==null?k:""})}),u}function kh(r,i,u){var c=r.pingCache;if(c===null){c=r.pingCache=new oT;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=kT.bind(null,r,i,u),i.then(r,r))}function Sh(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 _h(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=Un(-1,1),i.tag=2,sr(u,i,1))),u.lanes|=1),r):(r.flags|=65536,r.lanes=m,r)}var lT=G.ReactCurrentOwner,Pt=!1;function It(r,i,u,c){i.child=r===null?Wf(i,null,u,c):gi(i,r.child,u,c)}function Ch(r,i,u,c,m){u=u.render;var T=i.ref;return Ti(i,m),c=il(r,i,u,c,T,m),u=sl(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&u&&jo(i),i.flags|=1,It(r,i,c,m),i.child)}function Nh(r,i,u,c,m){if(r===null){var T=u.type;return typeof T=="function"&&!Pl(T)&&T.defaultProps===void 0&&u.compare===null&&u.defaultProps===void 0?(i.tag=15,i.type=T,Ah(r,i,T,c,m)):(r=lu(u.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(T=r.child,(r.lanes&m)===0){var k=T.memoizedProps;if(u=u.compare,u=u!==null?u:rs,u(k,c)&&r.ref===i.ref)return Hn(r,i,m)}return i.flags|=1,r=dr(T,c),r.ref=i.ref,r.return=i,i.child=r}function Ah(r,i,u,c,m){if(r!==null){var T=r.memoizedProps;if(rs(T,c)&&r.ref===i.ref)if(Pt=!1,i.pendingProps=c=T,(r.lanes&m)!==0)(r.flags&131072)!==0&&(Pt=!0);else return i.lanes=r.lanes,Hn(r,i,m)}return pl(r,i,u,c,m)}function vh(r,i,u){var c=i.pendingProps,m=c.children,T=r!==null?r.memoizedState:null;if(c.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},qe(ki,Vt),Vt|=u;else{if((u&1073741824)===0)return r=T!==null?T.baseLanes|u:u,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:r,cachePool:null,transitions:null},i.updateQueue=null,qe(ki,Vt),Vt|=r,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=T!==null?T.baseLanes:u,qe(ki,Vt),Vt|=c}else T!==null?(c=T.baseLanes|u,i.memoizedState=null):c=u,qe(ki,Vt),Vt|=c;return It(r,i,m,u),i.child}function wh(r,i){var u=i.ref;(r===null&&u!==null||r!==null&&r.ref!==u)&&(i.flags|=512,i.flags|=2097152)}function pl(r,i,u,c,m){var T=Dt(u)?Cr:kt.current;return T=fi(i,T),Ti(i,m),u=il(r,i,u,c,T,m),c=sl(),r!==null&&!Pt?(i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~m,Hn(r,i,m)):(Xe&&c&&jo(i),i.flags|=1,It(r,i,u,m),i.child)}function Ih(r,i,u,c,m){if(Dt(u)){var T=!0;Da(i)}else T=!1;if(Ti(i,m),i.stateNode===null)Ja(r,i),Th(i,u,c),dl(i,u,c,m),c=!0;else if(r===null){var k=i.stateNode,I=i.memoizedProps;k.props=I;var P=k.context,W=u.contextType;typeof W=="object"&&W!==null?W=Zt(W):(W=Dt(u)?Cr:kt.current,W=fi(i,W));var J=u.getDerivedStateFromProps,ee=typeof J=="function"||typeof k.getSnapshotBeforeUpdate=="function";ee||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==c||P!==W)&&yh(i,k,c,W),ir=!1;var K=i.memoizedState;k.state=K,$a(i,c,k,m),P=i.memoizedState,I!==c||K!==P||Ot.current||ir?(typeof J=="function"&&(cl(i,u,J,c),P=i.memoizedState),(I=ir||Eh(i,u,I,c,K,P,W))?(ee||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(i.flags|=4194308)):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=P),k.props=c,k.state=P,k.context=W,c=I):(typeof k.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{k=i.stateNode,Vf(r,i),I=i.memoizedProps,W=i.type===i.elementType?I:cn(i.type,I),k.props=W,ee=i.pendingProps,K=k.context,P=u.contextType,typeof P=="object"&&P!==null?P=Zt(P):(P=Dt(u)?Cr:kt.current,P=fi(i,P));var de=u.getDerivedStateFromProps;(J=typeof de=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(I!==ee||K!==P)&&yh(i,k,c,P),ir=!1,K=i.memoizedState,k.state=K,$a(i,c,k,m);var me=i.memoizedState;I!==ee||K!==me||Ot.current||ir?(typeof de=="function"&&(cl(i,u,de,c),me=i.memoizedState),(W=ir||Eh(i,u,W,c,K,me,P)||!1)?(J||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(c,me,P),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(c,me,P)),typeof k.componentDidUpdate=="function"&&(i.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&K===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&K===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=me),k.props=c,k.state=me,k.context=P,c=W):(typeof k.componentDidUpdate!="function"||I===r.memoizedProps&&K===r.memoizedState||(i.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&K===r.memoizedState||(i.flags|=1024),c=!1)}return ml(r,i,u,c,T,m)}function ml(r,i,u,c,m,T){wh(r,i);var k=(i.flags&128)!==0;if(!c&&!k)return m&&Pf(i,u,!1),Hn(r,i,T);c=i.stateNode,lT.current=i;var I=k&&typeof u.getDerivedStateFromError!="function"?null:c.render();return i.flags|=1,r!==null&&k?(i.child=gi(i,r.child,null,T),i.child=gi(i,null,I,T)):It(r,i,I,T),i.memoizedState=c.state,m&&Pf(i,u,!0),i.child}function Lh(r){var i=r.stateNode;i.pendingContext?Of(r,i.pendingContext,i.pendingContext!==i.context):i.context&&Of(r,i.context,!1),Jo(r,i.containerInfo)}function Rh(r,i,u,c,m){return mi(),Yo(m),i.flags|=256,It(r,i,u,c),i.child}var gl={dehydrated:null,treeContext:null,retryLane:0};function El(r){return{baseLanes:r,cachePool:null,transitions:null}}function Oh(r,i,u){var c=i.pendingProps,m=Ze.current,T=!1,k=(i.flags&128)!==0,I;if((I=k)||(I=r!==null&&r.memoizedState===null?!1:(m&2)!==0),I?(T=!0,i.flags&=-129):(r===null||r.memoizedState!==null)&&(m|=1),qe(Ze,m&1),r===null)return Wo(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,T?(c=i.mode,T=i.child,k={mode:"hidden",children:k},(c&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=k):T=cu(k,c,0,null),r=Pr(r,c,u,null),T.return=i,r.return=i,T.sibling=r,i.child=T,i.child.memoizedState=El(u),i.memoizedState=gl,r):Tl(i,k));if(m=r.memoizedState,m!==null&&(I=m.dehydrated,I!==null))return cT(r,i,k,c,I,m,u);if(T){T=c.fallback,k=i.mode,m=r.child,I=m.sibling;var P={mode:"hidden",children:c.children};return(k&1)===0&&i.child!==m?(c=i.child,c.childLanes=0,c.pendingProps=P,i.deletions=null):(c=dr(m,P),c.subtreeFlags=m.subtreeFlags&14680064),I!==null?T=dr(I,T):(T=Pr(T,k,u,null),T.flags|=2),T.return=i,c.return=i,c.sibling=T,i.child=c,c=T,T=i.child,k=r.child.memoizedState,k=k===null?El(u):{baseLanes:k.baseLanes|u,cachePool:null,transitions:k.transitions},T.memoizedState=k,T.childLanes=r.childLanes&~u,i.memoizedState=gl,c}return T=r.child,r=T.sibling,c=dr(T,{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 Tl(r,i){return i=cu({mode:"visible",children:i},r.mode,0,null),i.return=r,r.child=i}function Xa(r,i,u,c){return c!==null&&Yo(c),gi(i,r.child,null,u),r=Tl(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function cT(r,i,u,c,m,T,k){if(u)return i.flags&256?(i.flags&=-257,c=fl(Error(n(422))),Xa(r,i,k,c)):i.memoizedState!==null?(i.child=r.child,i.flags|=128,null):(T=c.fallback,m=i.mode,c=cu({mode:"visible",children:c.children},m,0,null),T=Pr(T,m,k,null),T.flags|=2,c.return=i,T.return=i,c.sibling=T,i.child=c,(i.mode&1)!==0&&gi(i,r.child,null,k),i.child.memoizedState=El(k),i.memoizedState=gl,T);if((i.mode&1)===0)return Xa(r,i,k,null);if(m.data==="$!"){if(c=m.nextSibling&&m.nextSibling.dataset,c)var I=c.dgst;return c=I,T=Error(n(419)),c=fl(T,c,void 0),Xa(r,i,k,c)}if(I=(k&r.childLanes)!==0,Pt||I){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!==T.retryLane&&(T.retryLane=m,Bn(r,m),hn(c,r,m,-1))}return Dl(),c=fl(Error(n(421))),Xa(r,i,k,c)}return m.data==="$?"?(i.flags|=128,i.child=r.child,i=ST.bind(null,r),m._reactRetry=i,null):(r=T.treeContext,Yt=er(m.nextSibling),Wt=i,Xe=!0,ln=null,r!==null&&(Xt[Jt++]=Mn,Xt[Jt++]=Fn,Xt[Jt++]=Nr,Mn=r.id,Fn=r.overflow,Nr=i),i=Tl(i,c.children),i.flags|=4096,i)}function Dh(r,i,u){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Go(r.return,i,u)}function yl(r,i,u,c,m){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:u,tailMode:m}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=c,T.tail=u,T.tailMode=m)}function Ph(r,i,u){var c=i.pendingProps,m=c.revealOrder,T=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&&Dh(r,u,i);else if(r.tag===19)Dh(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&&Wa(r)===null&&(m=u),u=u.sibling;u=m,u===null?(m=i.child,i.child=null):(m=u.sibling,u.sibling=null),yl(i,!1,m,u,T);break;case"backwards":for(u=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&Wa(r)===null){i.child=m;break}r=m.sibling,m.sibling=u,u=m,m=r}yl(i,!0,u,null,T);break;case"together":yl(i,!1,null,null,void 0);break;default:i.memoizedState=null}return i.child}function Ja(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),Lr|=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=dr(r,r.pendingProps),i.child=u,u.return=i;r.sibling!==null;)r=r.sibling,u=u.sibling=dr(r,r.pendingProps),u.return=i;u.sibling=null}return i.child}function dT(r,i,u){switch(i.tag){case 3:Lh(i),mi();break;case 5:Gf(i);break;case 1:Dt(i.type)&&Da(i);break;case 4:Jo(i,i.stateNode.containerInfo);break;case 10:var c=i.type._context,m=i.memoizedProps.value;qe(Ha,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?Oh(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 Ph(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,vh(r,i,u)}return Hn(r,i,u)}var Mh,xl,Fh,Bh;Mh=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}},xl=function(){},Fh=function(r,i,u,c){var m=r.memoizedProps;if(m!==c){r=i.stateNode,wr(_n.current);var T=null;switch(u){case"input":m=Bi(r,m),c=Bi(r,c),T=[];break;case"select":m=S({},m,{value:void 0}),c=S({},c,{value:void 0}),T=[];break;case"textarea":m=ji(r,m),c=ji(r,c),T=[];break;default:typeof m.onClick!="function"&&typeof c.onClick=="function"&&(r.onclick=La)}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 I=m[W];for(k in I)I.hasOwnProperty(k)&&(u||(u={}),u[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(a.hasOwnProperty(W)?T||(T=[]):(T=T||[]).push(W,null));for(W in c){var P=c[W];if(I=m!=null?m[W]:void 0,c.hasOwnProperty(W)&&P!==I&&(P!=null||I!=null))if(W==="style")if(I){for(k in I)!I.hasOwnProperty(k)||P&&P.hasOwnProperty(k)||(u||(u={}),u[k]="");for(k in P)P.hasOwnProperty(k)&&I[k]!==P[k]&&(u||(u={}),u[k]=P[k])}else u||(T||(T=[]),T.push(W,u)),u=P;else W==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,I=I?I.__html:void 0,P!=null&&I!==P&&(T=T||[]).push(W,P)):W==="children"?typeof P!="string"&&typeof P!="number"||(T=T||[]).push(W,""+P):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(a.hasOwnProperty(W)?(P!=null&&W==="onScroll"&&Qe("scroll",r),T||I===P||(T=[])):(T=T||[]).push(W,P))}u&&(T=T||[]).push("style",u);var W=T;(i.updateQueue=W)&&(i.flags|=4)}},Bh=function(r,i,u,c){u!==c&&(i.flags|=4)};function Ts(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 _t(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 fT(r,i,u){var c=i.pendingProps;switch(zo(i),i.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _t(i),null;case 1:return Dt(i.type)&&Oa(),_t(i),null;case 3:return c=i.stateNode,yi(),Ge(Ot),Ge(kt),tl(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(Ba(i)?i.flags|=4:r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,ln!==null&&(Ll(ln),ln=null))),xl(r,i),_t(i),null;case 5:Zo(i);var m=wr(hs.current);if(u=i.type,r!==null&&i.stateNode!=null)Fh(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 _t(i),null}if(r=wr(_n.current),Ba(i)){c=i.stateNode,u=i.type;var T=i.memoizedProps;switch(c[Sn]=i,c[os]=T,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<ss.length;m++)Qe(ss[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":Ui(c,T),Qe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!T.multiple},Qe("invalid",c);break;case"textarea":ua(c,T),Qe("invalid",c)}Tt(u,T),m=null;for(var k in T)if(T.hasOwnProperty(k)){var I=T[k];k==="children"?typeof I=="string"?c.textContent!==I&&(T.suppressHydrationWarning!==!0&&Ia(c.textContent,I,r),m=["children",I]):typeof I=="number"&&c.textContent!==""+I&&(T.suppressHydrationWarning!==!0&&Ia(c.textContent,I,r),m=["children",""+I]):a.hasOwnProperty(k)&&I!=null&&k==="onScroll"&&Qe("scroll",c)}switch(u){case"input":Rn(c),aa(c,T,!0);break;case"textarea":Rn(c),la(c);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(c.onclick=La)}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[Sn]=i,r[os]=c,Mh(r,i,!1,!1),i.stateNode=r;e:{switch(k=bn(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<ss.length;m++)Qe(ss[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":Ui(r,c),m=Bi(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":ua(r,c),m=ji(r,c),Qe("invalid",r);break;default:m=c}Tt(u,m),I=m;for(T in I)if(I.hasOwnProperty(T)){var P=I[T];T==="style"?qn(r,P):T==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&Oe(r,P)):T==="children"?typeof P=="string"?(u!=="textarea"||P!=="")&&Ue(r,P):typeof P=="number"&&Ue(r,""+P):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(a.hasOwnProperty(T)?P!=null&&T==="onScroll"&&Qe("scroll",r):P!=null&&z(r,T,P,k))}switch(u){case"input":Rn(r),aa(r,c,!1);break;case"textarea":Rn(r),la(r);break;case"option":c.value!=null&&r.setAttribute("value",""+Re(c.value));break;case"select":r.multiple=!!c.multiple,T=c.value,T!=null?Vn(r,!!c.multiple,T,!1):c.defaultValue!=null&&Vn(r,!!c.multiple,c.defaultValue,!0);break;default:typeof m.onClick=="function"&&(r.onclick=La)}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 _t(i),null;case 6:if(r&&i.stateNode!=null)Bh(r,i,r.memoizedProps,c);else{if(typeof c!="string"&&i.stateNode===null)throw Error(n(166));if(u=wr(hs.current),wr(_n.current),Ba(i)){if(c=i.stateNode,u=i.memoizedProps,c[Sn]=i,(T=c.nodeValue!==u)&&(r=Wt,r!==null))switch(r.tag){case 3:Ia(c.nodeValue,u,(r.mode&1)!==0);break;case 5:r.memoizedProps.suppressHydrationWarning!==!0&&Ia(c.nodeValue,u,(r.mode&1)!==0)}T&&(i.flags|=4)}else c=(u.nodeType===9?u:u.ownerDocument).createTextNode(c),c[Sn]=i,i.stateNode=c}return _t(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)jf(),mi(),i.flags|=98560,T=!1;else if(T=Ba(i),c!==null&&c.dehydrated!==null){if(r===null){if(!T)throw Error(n(318));if(T=i.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Sn]=i}else mi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;_t(i),T=!1}else ln!==null&&(Ll(ln),ln=null),T=!0;if(!T)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):Dl())),i.updateQueue!==null&&(i.flags|=4),_t(i),null);case 4:return yi(),xl(r,i),r===null&&as(i.stateNode.containerInfo),_t(i),null;case 10:return Qo(i.type._context),_t(i),null;case 17:return Dt(i.type)&&Oa(),_t(i),null;case 19:if(Ge(Ze),T=i.memoizedState,T===null)return _t(i),null;if(c=(i.flags&128)!==0,k=T.rendering,k===null)if(c)Ts(T,!1);else{if(ct!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(k=Wa(r),k!==null){for(i.flags|=128,Ts(T,!1),c=k.updateQueue,c!==null&&(i.updateQueue=c,i.flags|=4),i.subtreeFlags=0,c=u,u=i.child;u!==null;)T=u,r=c,T.flags&=14680066,k=T.alternate,k===null?(T.childLanes=0,T.lanes=r,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=k.childLanes,T.lanes=k.lanes,T.child=k.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=k.memoizedProps,T.memoizedState=k.memoizedState,T.updateQueue=k.updateQueue,T.type=k.type,r=k.dependencies,T.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}T.tail!==null&&nt()>Si&&(i.flags|=128,c=!0,Ts(T,!1),i.lanes=4194304)}else{if(!c)if(r=Wa(k),r!==null){if(i.flags|=128,c=!0,u=r.updateQueue,u!==null&&(i.updateQueue=u,i.flags|=4),Ts(T,!0),T.tail===null&&T.tailMode==="hidden"&&!k.alternate&&!Xe)return _t(i),null}else 2*nt()-T.renderingStartTime>Si&&u!==1073741824&&(i.flags|=128,c=!0,Ts(T,!1),i.lanes=4194304);T.isBackwards?(k.sibling=i.child,i.child=k):(u=T.last,u!==null?u.sibling=k:i.child=k,T.last=k)}return T.tail!==null?(i=T.tail,T.rendering=i,T.tail=i.sibling,T.renderingStartTime=nt(),i.sibling=null,u=Ze.current,qe(Ze,c?u&1|2:u&1),i):(_t(i),null);case 22:case 23:return Ol(),c=i.memoizedState!==null,r!==null&&r.memoizedState!==null!==c&&(i.flags|=8192),c&&(i.mode&1)!==0?(Vt&1073741824)!==0&&(_t(i),i.subtreeFlags&6&&(i.flags|=8192)):_t(i),null;case 24:return null;case 25:return null}throw Error(n(156,i.tag))}function hT(r,i){switch(zo(i),i.tag){case 1:return Dt(i.type)&&Oa(),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return yi(),Ge(Ot),Ge(kt),tl(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 5:return Zo(i),null;case 13:if(Ge(Ze),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(n(340));mi()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Ge(Ze),null;case 4:return yi(),null;case 10:return Qo(i.type._context),null;case 22:case 23:return Ol(),null;case 24:return null;default:return null}}var Za=!1,Ct=!1,pT=typeof WeakSet=="function"?WeakSet:Set,pe=null;function bi(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 bl(r,i,u){try{u()}catch(c){tt(r,i,c)}}var Uh=!1;function mT(r,i){if(Oo=ya,r=Ef(),Co(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,T=c.focusNode;c=c.focusOffset;try{u.nodeType,T.nodeType}catch{u=null;break e}var k=0,I=-1,P=-1,W=0,J=0,ee=r,K=null;t:for(;;){for(var de;ee!==u||m!==0&&ee.nodeType!==3||(I=k+m),ee!==T||c!==0&&ee.nodeType!==3||(P=k+c),ee.nodeType===3&&(k+=ee.nodeValue.length),(de=ee.firstChild)!==null;)K=ee,ee=de;for(;;){if(ee===r)break t;if(K===u&&++W===m&&(I=k),K===T&&++J===c&&(P=k),(de=ee.nextSibling)!==null)break;ee=K,K=ee.parentNode}ee=de}u=I===-1||P===-1?null:{start:I,end:P}}else u=null}u=u||{start:0,end:0}}else u=null;for(Do={focusedElem:r,selectionRange:u},ya=!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 me=i.alternate;if((i.flags&1024)!==0)switch(i.tag){case 0:case 11:case 15:break;case 1:if(me!==null){var ge=me.memoizedProps,rt=me.memoizedState,U=i.stateNode,B=U.getSnapshotBeforeUpdate(i.elementType===i.type?ge:cn(i.type,ge),rt);U.__reactInternalSnapshotBeforeUpdate=B}break;case 3:var j=i.stateNode.containerInfo;j.nodeType===1?j.textContent="":j.nodeType===9&&j.documentElement&&j.removeChild(j.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(se){tt(i,i.return,se)}if(r=i.sibling,r!==null){r.return=i.return,pe=r;break}pe=i.return}return me=Uh,Uh=!1,me}function ys(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 T=m.destroy;m.destroy=void 0,T!==void 0&&bl(i,u,T)}m=m.next}while(m!==c)}}function eu(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 kl(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 Hh(r){var i=r.alternate;i!==null&&(r.alternate=null,Hh(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&(delete i[Sn],delete i[os],delete i[Bo],delete i[XE],delete i[JE])),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 jh(r){return r.tag===5||r.tag===3||r.tag===4}function zh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||jh(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 Sl(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=La));else if(c!==4&&(r=r.child,r!==null))for(Sl(r,i,u),r=r.sibling;r!==null;)Sl(r,i,u),r=r.sibling}function _l(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(_l(r,i,u),r=r.sibling;r!==null;)_l(r,i,u),r=r.sibling}var yt=null,dn=!1;function ar(r,i,u){for(u=u.child;u!==null;)$h(r,i,u),u=u.sibling}function $h(r,i,u){if(kn&&typeof kn.onCommitFiberUnmount=="function")try{kn.onCommitFiberUnmount(ha,u)}catch{}switch(u.tag){case 5:Ct||bi(u,i);case 6:var c=yt,m=dn;yt=null,ar(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?Fo(r.parentNode,u):r.nodeType===1&&Fo(r,u),Xi(r)):Fo(yt,u.stateNode));break;case 4:c=yt,m=dn,yt=u.stateNode.containerInfo,dn=!0,ar(r,i,u),yt=c,dn=m;break;case 0:case 11:case 14:case 15:if(!Ct&&(c=u.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){m=c=c.next;do{var T=m,k=T.destroy;T=T.tag,k!==void 0&&((T&2)!==0||(T&4)!==0)&&bl(u,i,k),m=m.next}while(m!==c)}ar(r,i,u);break;case 1:if(!Ct&&(bi(u,i),c=u.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=u.memoizedProps,c.state=u.memoizedState,c.componentWillUnmount()}catch(I){tt(u,i,I)}ar(r,i,u);break;case 21:ar(r,i,u);break;case 22:u.mode&1?(Ct=(c=Ct)||u.memoizedState!==null,ar(r,i,u),Ct=c):ar(r,i,u);break;default:ar(r,i,u)}}function Wh(r){var i=r.updateQueue;if(i!==null){r.updateQueue=null;var u=r.stateNode;u===null&&(u=r.stateNode=new pT),i.forEach(function(c){var m=_T.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 T=r,k=i,I=k;e:for(;I!==null;){switch(I.tag){case 5:yt=I.stateNode,dn=!1;break e;case 3:yt=I.stateNode.containerInfo,dn=!0;break e;case 4:yt=I.stateNode.containerInfo,dn=!0;break e}I=I.return}if(yt===null)throw Error(n(160));$h(T,k,m),yt=null,dn=!1;var P=m.alternate;P!==null&&(P.return=null),m.return=null}catch(W){tt(m,i,W)}}if(i.subtreeFlags&12854)for(i=i.child;i!==null;)Yh(i,r),i=i.sibling}function Yh(r,i){var u=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:if(fn(i,r),Nn(r),c&4){try{ys(3,r,r.return),eu(3,r)}catch(ge){tt(r,r.return,ge)}try{ys(5,r,r.return)}catch(ge){tt(r,r.return,ge)}}break;case 1:fn(i,r),Nn(r),c&512&&u!==null&&bi(u,u.return);break;case 5:if(fn(i,r),Nn(r),c&512&&u!==null&&bi(u,u.return),r.flags&32){var m=r.stateNode;try{Ue(m,"")}catch(ge){tt(r,r.return,ge)}}if(c&4&&(m=r.stateNode,m!=null)){var T=r.memoizedProps,k=u!==null?u.memoizedProps:T,I=r.type,P=r.updateQueue;if(r.updateQueue=null,P!==null)try{I==="input"&&T.type==="radio"&&T.name!=null&&Hi(m,T),bn(I,k);var W=bn(I,T);for(k=0;k<P.length;k+=2){var J=P[k],ee=P[k+1];J==="style"?qn(m,ee):J==="dangerouslySetInnerHTML"?Oe(m,ee):J==="children"?Ue(m,ee):z(m,J,ee,W)}switch(I){case"input":Zr(m,T);break;case"textarea":oa(m,T);break;case"select":var K=m._wrapperState.wasMultiple;m._wrapperState.wasMultiple=!!T.multiple;var de=T.value;de!=null?Vn(m,!!T.multiple,de,!1):K!==!!T.multiple&&(T.defaultValue!=null?Vn(m,!!T.multiple,T.defaultValue,!0):Vn(m,!!T.multiple,T.multiple?[]:"",!1))}m[os]=T}catch(ge){tt(r,r.return,ge)}}break;case 6:if(fn(i,r),Nn(r),c&4){if(r.stateNode===null)throw Error(n(162));m=r.stateNode,T=r.memoizedProps;try{m.nodeValue=T}catch(ge){tt(r,r.return,ge)}}break;case 3:if(fn(i,r),Nn(r),c&4&&u!==null&&u.memoizedState.isDehydrated)try{Xi(i.containerInfo)}catch(ge){tt(r,r.return,ge)}break;case 4:fn(i,r),Nn(r);break;case 13:fn(i,r),Nn(r),m=r.child,m.flags&8192&&(T=m.memoizedState!==null,m.stateNode.isHidden=T,!T||m.alternate!==null&&m.alternate.memoizedState!==null||(Al=nt())),c&4&&Wh(r);break;case 22:if(J=u!==null&&u.memoizedState!==null,r.mode&1?(Ct=(W=Ct)||J,fn(i,r),Ct=W):fn(i,r),Nn(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(ee=pe=J;pe!==null;){switch(K=pe,de=K.child,K.tag){case 0:case 11:case 14:case 15:ys(4,K,K.return);break;case 1:bi(K,K.return);var me=K.stateNode;if(typeof me.componentWillUnmount=="function"){c=K,u=K.return;try{i=c,me.props=i.memoizedProps,me.state=i.memoizedState,me.componentWillUnmount()}catch(ge){tt(c,u,ge)}}break;case 5:bi(K,K.return);break;case 22:if(K.memoizedState!==null){Qh(ee);continue}}de!==null?(de.return=K,pe=de):Qh(ee)}J=J.sibling}e:for(J=null,ee=r;;){if(ee.tag===5){if(J===null){J=ee;try{m=ee.stateNode,W?(T=m.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(I=ee.stateNode,P=ee.memoizedProps.style,k=P!=null&&P.hasOwnProperty("display")?P.display:null,I.style.display=Kt("display",k))}catch(ge){tt(r,r.return,ge)}}}else if(ee.tag===6){if(J===null)try{ee.stateNode.nodeValue=W?"":ee.memoizedProps}catch(ge){tt(r,r.return,ge)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===r)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===r)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===r)break e;J===ee&&(J=null),ee=ee.return}J===ee&&(J=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:fn(i,r),Nn(r),c&4&&Wh(r);break;case 21:break;default:fn(i,r),Nn(r)}}function Nn(r){var i=r.flags;if(i&2){try{e:{for(var u=r.return;u!==null;){if(jh(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 T=zh(r);_l(r,T,m);break;case 3:case 4:var k=c.stateNode.containerInfo,I=zh(r);Sl(r,I,k);break;default:throw Error(n(161))}}catch(P){tt(r,r.return,P)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function gT(r,i,u){pe=r,Vh(r)}function Vh(r,i,u){for(var c=(r.mode&1)!==0;pe!==null;){var m=pe,T=m.child;if(m.tag===22&&c){var k=m.memoizedState!==null||Za;if(!k){var I=m.alternate,P=I!==null&&I.memoizedState!==null||Ct;I=Za;var W=Ct;if(Za=k,(Ct=P)&&!W)for(pe=m;pe!==null;)k=pe,P=k.child,k.tag===22&&k.memoizedState!==null?Gh(m):P!==null?(P.return=k,pe=P):Gh(m);for(;T!==null;)pe=T,Vh(T),T=T.sibling;pe=m,Za=I,Ct=W}qh(r)}else(m.subtreeFlags&8772)!==0&&T!==null?(T.return=m,pe=T):qh(r)}}function qh(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:Ct||eu(5,i);break;case 1:var c=i.stateNode;if(i.flags&4&&!Ct)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 T=i.updateQueue;T!==null&&Qf(i,T,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}Qf(i,k,u)}break;case 5:var I=i.stateNode;if(u===null&&i.flags&4){u=I;var P=i.memoizedProps;switch(i.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&u.focus();break;case"img":P.src&&(u.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(i.memoizedState===null){var W=i.alternate;if(W!==null){var J=W.memoizedState;if(J!==null){var ee=J.dehydrated;ee!==null&&Xi(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ct||i.flags&512&&kl(i)}catch(K){tt(i,i.return,K)}}if(i===r){pe=null;break}if(u=i.sibling,u!==null){u.return=i.return,pe=u;break}pe=i.return}}function Qh(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 Gh(r){for(;pe!==null;){var i=pe;try{switch(i.tag){case 0:case 11:case 15:var u=i.return;try{eu(4,i)}catch(P){tt(i,u,P)}break;case 1:var c=i.stateNode;if(typeof c.componentDidMount=="function"){var m=i.return;try{c.componentDidMount()}catch(P){tt(i,m,P)}}var T=i.return;try{kl(i)}catch(P){tt(i,T,P)}break;case 5:var k=i.return;try{kl(i)}catch(P){tt(i,k,P)}}}catch(P){tt(i,i.return,P)}if(i===r){pe=null;break}var I=i.sibling;if(I!==null){I.return=i.return,pe=I;break}pe=i.return}}var ET=Math.ceil,tu=G.ReactCurrentDispatcher,Cl=G.ReactCurrentOwner,tn=G.ReactCurrentBatchConfig,He=0,ht=null,ut=null,xt=0,Vt=0,ki=tr(0),ct=0,xs=null,Lr=0,nu=0,Nl=0,bs=null,Mt=null,Al=0,Si=1/0,jn=null,ru=!1,vl=null,ur=null,iu=!1,or=null,su=0,ks=0,wl=null,au=-1,uu=0;function Lt(){return(He&6)!==0?nt():au!==-1?au:au=nt()}function lr(r){return(r.mode&1)===0?1:(He&2)!==0&&xt!==0?xt&-xt:eT.transition!==null?(uu===0&&(uu=jd()),uu):(r=We,r!==0||(r=window.event,r=r===void 0?16:Kd(r.type)),r)}function hn(r,i,u,c){if(50<ks)throw ks=0,wl=null,Error(n(185));Vi(r,u,c),((He&2)===0||r!==ht)&&(r===ht&&((He&2)===0&&(nu|=u),ct===4&&cr(r,xt)),Ft(r,c),u===1&&He===0&&(i.mode&1)===0&&(Si=nt()+500,Pa&&rr()))}function Ft(r,i){var u=r.callbackNode;eE(r,i);var c=ga(r,r===ht?xt:0);if(c===0)u!==null&&Bd(u),r.callbackNode=null,r.callbackPriority=0;else if(i=c&-c,r.callbackPriority!==i){if(u!=null&&Bd(u),i===1)r.tag===0?ZE(Xh.bind(null,r)):Mf(Xh.bind(null,r)),GE(function(){(He&6)===0&&rr()}),u=null;else{switch(zd(c)){case 1:u=uo;break;case 4:u=Ud;break;case 16:u=fa;break;case 536870912:u=Hd;break;default:u=fa}u=sp(u,Kh.bind(null,r))}r.callbackPriority=i,r.callbackNode=u}}function Kh(r,i){if(au=-1,uu=0,(He&6)!==0)throw Error(n(327));var u=r.callbackNode;if(_i()&&r.callbackNode!==u)return null;var c=ga(r,r===ht?xt:0);if(c===0)return null;if((c&30)!==0||(c&r.expiredLanes)!==0||i)i=ou(r,c);else{i=c;var m=He;He|=2;var T=Zh();(ht!==r||xt!==i)&&(jn=null,Si=nt()+500,Or(r,i));do try{xT();break}catch(I){Jh(r,I)}while(!0);qo(),tu.current=T,He=m,ut!==null?i=0:(ht=null,xt=0,i=ct)}if(i!==0){if(i===2&&(m=oo(r),m!==0&&(c=m,i=Il(r,m))),i===1)throw u=xs,Or(r,0),cr(r,c),Ft(r,nt()),u;if(i===6)cr(r,c);else{if(m=r.current.alternate,(c&30)===0&&!TT(m)&&(i=ou(r,c),i===2&&(T=oo(r),T!==0&&(c=T,i=Il(r,T))),i===1))throw u=xs,Or(r,0),cr(r,c),Ft(r,nt()),u;switch(r.finishedWork=m,r.finishedLanes=c,i){case 0:case 1:throw Error(n(345));case 2:Dr(r,Mt,jn);break;case 3:if(cr(r,c),(c&130023424)===c&&(i=Al+500-nt(),10<i)){if(ga(r,0)!==0)break;if(m=r.suspendedLanes,(m&c)!==c){Lt(),r.pingedLanes|=r.suspendedLanes&m;break}r.timeoutHandle=Mo(Dr.bind(null,r,Mt,jn),i);break}Dr(r,Mt,jn);break;case 4:if(cr(r,c),(c&4194240)===c)break;for(i=r.eventTimes,m=-1;0<c;){var k=31-un(c);T=1<<k,k=i[k],k>m&&(m=k),c&=~T}if(c=m,c=nt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*ET(c/1960))-c,10<c){r.timeoutHandle=Mo(Dr.bind(null,r,Mt,jn),c);break}Dr(r,Mt,jn);break;case 5:Dr(r,Mt,jn);break;default:throw Error(n(329))}}}return Ft(r,nt()),r.callbackNode===u?Kh.bind(null,r):null}function Il(r,i){var u=bs;return r.current.memoizedState.isDehydrated&&(Or(r,i).flags|=256),r=ou(r,i),r!==2&&(i=Mt,Mt=u,i!==null&&Ll(i)),r}function Ll(r){Mt===null?Mt=r:Mt.push.apply(Mt,r)}function TT(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],T=m.getSnapshot;m=m.value;try{if(!on(T(),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 cr(r,i){for(i&=~Nl,i&=~nu,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 Xh(r){if((He&6)!==0)throw Error(n(327));_i();var i=ga(r,0);if((i&1)===0)return Ft(r,nt()),null;var u=ou(r,i);if(r.tag!==0&&u===2){var c=oo(r);c!==0&&(i=c,u=Il(r,c))}if(u===1)throw u=xs,Or(r,0),cr(r,i),Ft(r,nt()),u;if(u===6)throw Error(n(345));return r.finishedWork=r.current.alternate,r.finishedLanes=i,Dr(r,Mt,jn),Ft(r,nt()),null}function Rl(r,i){var u=He;He|=1;try{return r(i)}finally{He=u,He===0&&(Si=nt()+500,Pa&&rr())}}function Rr(r){or!==null&&or.tag===0&&(He&6)===0&&_i();var i=He;He|=1;var u=tn.transition,c=We;try{if(tn.transition=null,We=1,r)return r()}finally{We=c,tn.transition=u,He=i,(He&6)===0&&rr()}}function Ol(){Vt=ki.current,Ge(ki)}function Or(r,i){r.finishedWork=null,r.finishedLanes=0;var u=r.timeoutHandle;if(u!==-1&&(r.timeoutHandle=-1,QE(u)),ut!==null)for(u=ut.return;u!==null;){var c=u;switch(zo(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Oa();break;case 3:yi(),Ge(Ot),Ge(kt),tl();break;case 5:Zo(c);break;case 4:yi();break;case 13:Ge(Ze);break;case 19:Ge(Ze);break;case 10:Qo(c.type._context);break;case 22:case 23:Ol()}u=u.return}if(ht=r,ut=r=dr(r.current,null),xt=Vt=i,ct=0,xs=null,Nl=nu=Lr=0,Mt=bs=null,vr!==null){for(i=0;i<vr.length;i++)if(u=vr[i],c=u.interleaved,c!==null){u.interleaved=null;var m=c.next,T=u.pending;if(T!==null){var k=T.next;T.next=m,c.next=k}u.pending=c}vr=null}return r}function Jh(r,i){do{var u=ut;try{if(qo(),Ya.current=Ga,Va){for(var c=et.memoizedState;c!==null;){var m=c.queue;m!==null&&(m.pending=null),c=c.next}Va=!1}if(Ir=0,ft=lt=et=null,ps=!1,ms=0,Cl.current=null,u===null||u.return===null){ct=1,xs=i,ut=null;break}e:{var T=r,k=u.return,I=u,P=i;if(i=xt,I.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var W=P,J=I,ee=J.tag;if((J.mode&1)===0&&(ee===0||ee===11||ee===15)){var K=J.alternate;K?(J.updateQueue=K.updateQueue,J.memoizedState=K.memoizedState,J.lanes=K.lanes):(J.updateQueue=null,J.memoizedState=null)}var de=Sh(k);if(de!==null){de.flags&=-257,_h(de,k,I,T,i),de.mode&1&&kh(T,W,i),i=de,P=W;var me=i.updateQueue;if(me===null){var ge=new Set;ge.add(P),i.updateQueue=ge}else me.add(P);break e}else{if((i&1)===0){kh(T,W,i),Dl();break e}P=Error(n(426))}}else if(Xe&&I.mode&1){var rt=Sh(k);if(rt!==null){(rt.flags&65536)===0&&(rt.flags|=256),_h(rt,k,I,T,i),Yo(xi(P,I));break e}}T=P=xi(P,I),ct!==4&&(ct=2),bs===null?bs=[T]:bs.push(T),T=k;do{switch(T.tag){case 3:T.flags|=65536,i&=-i,T.lanes|=i;var U=xh(T,P,i);qf(T,U);break e;case 1:I=P;var B=T.type,j=T.stateNode;if((T.flags&128)===0&&(typeof B.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(ur===null||!ur.has(j)))){T.flags|=65536,i&=-i,T.lanes|=i;var se=bh(T,I,i);qf(T,se);break e}}T=T.return}while(T!==null)}tp(u)}catch(Te){i=Te,ut===u&&u!==null&&(ut=u=u.return);continue}break}while(!0)}function Zh(){var r=tu.current;return tu.current=Ga,r===null?Ga:r}function Dl(){(ct===0||ct===3||ct===2)&&(ct=4),ht===null||(Lr&268435455)===0&&(nu&268435455)===0||cr(ht,xt)}function ou(r,i){var u=He;He|=2;var c=Zh();(ht!==r||xt!==i)&&(jn=null,Or(r,i));do try{yT();break}catch(m){Jh(r,m)}while(!0);if(qo(),He=u,tu.current=c,ut!==null)throw Error(n(261));return ht=null,xt=0,ct}function yT(){for(;ut!==null;)ep(ut)}function xT(){for(;ut!==null&&!Yg();)ep(ut)}function ep(r){var i=ip(r.alternate,r,Vt);r.memoizedProps=r.pendingProps,i===null?tp(r):ut=i,Cl.current=null}function tp(r){var i=r;do{var u=i.alternate;if(r=i.return,(i.flags&32768)===0){if(u=fT(u,i,Vt),u!==null){ut=u;return}}else{if(u=hT(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 Dr(r,i,u){var c=We,m=tn.transition;try{tn.transition=null,We=1,bT(r,i,u,c)}finally{tn.transition=m,We=c}return null}function bT(r,i,u,c){do _i();while(or!==null);if((He&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 T=u.lanes|u.childLanes;if(tE(r,T),r===ht&&(ut=ht=null,xt=0),(u.subtreeFlags&2064)===0&&(u.flags&2064)===0||iu||(iu=!0,sp(fa,function(){return _i(),null})),T=(u.flags&15990)!==0,(u.subtreeFlags&15990)!==0||T){T=tn.transition,tn.transition=null;var k=We;We=1;var I=He;He|=4,Cl.current=null,mT(r,u),Yh(u,r),jE(Do),ya=!!Oo,Do=Oo=null,r.current=u,gT(u),Vg(),He=I,We=k,tn.transition=T}else r.current=u;if(iu&&(iu=!1,or=r,su=m),T=r.pendingLanes,T===0&&(ur=null),Gg(u.stateNode),Ft(r,nt()),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(ru)throw ru=!1,r=vl,vl=null,r;return(su&1)!==0&&r.tag!==0&&_i(),T=r.pendingLanes,(T&1)!==0?r===wl?ks++:(ks=0,wl=r):ks=0,rr(),null}function _i(){if(or!==null){var r=zd(su),i=tn.transition,u=We;try{if(tn.transition=null,We=16>r?16:r,or===null)var c=!1;else{if(r=or,or=null,su=0,(He&6)!==0)throw Error(n(331));var m=He;for(He|=4,pe=r.current;pe!==null;){var T=pe,k=T.child;if((pe.flags&16)!==0){var I=T.deletions;if(I!==null){for(var P=0;P<I.length;P++){var W=I[P];for(pe=W;pe!==null;){var J=pe;switch(J.tag){case 0:case 11:case 15:ys(8,J,T)}var ee=J.child;if(ee!==null)ee.return=J,pe=ee;else for(;pe!==null;){J=pe;var K=J.sibling,de=J.return;if(Hh(J),J===W){pe=null;break}if(K!==null){K.return=de,pe=K;break}pe=de}}}var me=T.alternate;if(me!==null){var ge=me.child;if(ge!==null){me.child=null;do{var rt=ge.sibling;ge.sibling=null,ge=rt}while(ge!==null)}}pe=T}}if((T.subtreeFlags&2064)!==0&&k!==null)k.return=T,pe=k;else e:for(;pe!==null;){if(T=pe,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:ys(9,T,T.return)}var U=T.sibling;if(U!==null){U.return=T.return,pe=U;break e}pe=T.return}}var B=r.current;for(pe=B;pe!==null;){k=pe;var j=k.child;if((k.subtreeFlags&2064)!==0&&j!==null)j.return=k,pe=j;else e:for(k=B;pe!==null;){if(I=pe,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:eu(9,I)}}catch(Te){tt(I,I.return,Te)}if(I===k){pe=null;break e}var se=I.sibling;if(se!==null){se.return=I.return,pe=se;break e}pe=I.return}}if(He=m,rr(),kn&&typeof kn.onPostCommitFiberRoot=="function")try{kn.onPostCommitFiberRoot(ha,r)}catch{}c=!0}return c}finally{We=u,tn.transition=i}}return!1}function np(r,i,u){i=xi(u,i),i=xh(r,i,1),r=sr(r,i,1),i=Lt(),r!==null&&(Vi(r,1,i),Ft(r,i))}function tt(r,i,u){if(r.tag===3)np(r,r,u);else for(;i!==null;){if(i.tag===3){np(i,r,u);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ur===null||!ur.has(c))){r=xi(u,r),r=bh(i,r,1),i=sr(i,r,1),r=Lt(),i!==null&&(Vi(i,1,r),Ft(i,r));break}}i=i.return}}function kT(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>nt()-Al?Or(r,0):Nl|=u),Ft(r,i)}function rp(r,i){i===0&&((r.mode&1)===0?i=1:(i=ma,ma<<=1,(ma&130023424)===0&&(ma=4194304)));var u=Lt();r=Bn(r,i),r!==null&&(Vi(r,i,u),Ft(r,u))}function ST(r){var i=r.memoizedState,u=0;i!==null&&(u=i.retryLane),rp(r,u)}function _T(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),rp(r,u)}var ip;ip=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,dT(r,i,u);Pt=(r.flags&131072)!==0}else Pt=!1,Xe&&(i.flags&1048576)!==0&&Ff(i,Fa,i.index);switch(i.lanes=0,i.tag){case 2:var c=i.type;Ja(r,i),r=i.pendingProps;var m=fi(i,kt.current);Ti(i,u),m=il(null,i,c,r,m,u);var T=sl();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)?(T=!0,Da(i)):T=!1,i.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,Xo(i),m.updater=Ka,i.stateNode=m,m._reactInternals=i,dl(i,c,r,u),i=ml(null,i,c,!0,T,u)):(i.tag=0,Xe&&T&&jo(i),It(null,i,m,u),i=i.child),i;case 16:c=i.elementType;e:{switch(Ja(r,i),r=i.pendingProps,m=c._init,c=m(c._payload),i.type=c,m=i.tag=NT(c),r=cn(c,r),m){case 0:i=pl(null,i,c,r,u);break e;case 1:i=Ih(null,i,c,r,u);break e;case 11:i=Ch(null,i,c,r,u);break e;case 14:i=Nh(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),pl(r,i,c,m,u);case 1:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),Ih(r,i,c,m,u);case 3:e:{if(Lh(i),r===null)throw Error(n(387));c=i.pendingProps,T=i.memoizedState,m=T.element,Vf(r,i),$a(i,c,null,u);var k=i.memoizedState;if(c=k.element,T.isDehydrated)if(T={element:c,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},i.updateQueue.baseState=T,i.memoizedState=T,i.flags&256){m=xi(Error(n(423)),i),i=Rh(r,i,c,u,m);break e}else if(c!==m){m=xi(Error(n(424)),i),i=Rh(r,i,c,u,m);break e}else for(Yt=er(i.stateNode.containerInfo.firstChild),Wt=i,Xe=!0,ln=null,u=Wf(i,null,c,u),i.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(mi(),c===m){i=Hn(r,i,u);break e}It(r,i,c,u)}i=i.child}return i;case 5:return Gf(i),r===null&&Wo(i),c=i.type,m=i.pendingProps,T=r!==null?r.memoizedProps:null,k=m.children,Po(c,m)?k=null:T!==null&&Po(c,T)&&(i.flags|=32),wh(r,i),It(r,i,k,u),i.child;case 6:return r===null&&Wo(i),null;case 13:return Oh(r,i,u);case 4:return Jo(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=gi(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),Ch(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,T=i.memoizedProps,k=m.value,qe(Ha,c._currentValue),c._currentValue=k,T!==null)if(on(T.value,k)){if(T.children===m.children&&!Ot.current){i=Hn(r,i,u);break e}}else for(T=i.child,T!==null&&(T.return=i);T!==null;){var I=T.dependencies;if(I!==null){k=T.child;for(var P=I.firstContext;P!==null;){if(P.context===c){if(T.tag===1){P=Un(-1,u&-u),P.tag=2;var W=T.updateQueue;if(W!==null){W=W.shared;var J=W.pending;J===null?P.next=P:(P.next=J.next,J.next=P),W.pending=P}}T.lanes|=u,P=T.alternate,P!==null&&(P.lanes|=u),Go(T.return,u,i),I.lanes|=u;break}P=P.next}}else if(T.tag===10)k=T.type===i.type?null:T.child;else if(T.tag===18){if(k=T.return,k===null)throw Error(n(341));k.lanes|=u,I=k.alternate,I!==null&&(I.lanes|=u),Go(k,u,i),k=T.sibling}else k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===i){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}It(r,i,m.children,u),i=i.child}return i;case 9:return m=i.type,c=i.pendingProps.children,Ti(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),Nh(r,i,c,m,u);case 15:return Ah(r,i,i.type,i.pendingProps,u);case 17:return c=i.type,m=i.pendingProps,m=i.elementType===c?m:cn(c,m),Ja(r,i),i.tag=1,Dt(c)?(r=!0,Da(i)):r=!1,Ti(i,u),Th(i,c,m),dl(i,c,m,u),ml(null,i,c,!0,r,u);case 19:return Ph(r,i,u);case 22:return vh(r,i,u)}throw Error(n(156,i.tag))};function sp(r,i){return Fd(r,i)}function CT(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 CT(r,i,u,c)}function Pl(r){return r=r.prototype,!(!r||!r.isReactComponent)}function NT(r){if(typeof r=="function")return Pl(r)?1:0;if(r!=null){if(r=r.$$typeof,r===ce)return 11;if(r===re)return 14}return 2}function dr(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 lu(r,i,u,c,m,T){var k=2;if(c=r,typeof r=="function")Pl(r)&&(k=1);else if(typeof r=="string")k=5;else e:switch(r){case q:return Pr(u.children,m,T,i);case Z:k=8,m|=8;break;case oe:return r=nn(12,u,i,m|2),r.elementType=oe,r.lanes=T,r;case Ce:return r=nn(13,u,i,m),r.elementType=Ce,r.lanes=T,r;case fe:return r=nn(19,u,i,m),r.elementType=fe,r.lanes=T,r;case Ie:return cu(u,m,T,i);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case $:k=10;break e;case le:k=9;break e;case ce:k=11;break e;case re:k=14;break e;case ve: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=T,i}function Pr(r,i,u,c){return r=nn(7,r,c,i),r.lanes=u,r}function cu(r,i,u,c){return r=nn(22,r,c,i),r.elementType=Ie,r.lanes=u,r.stateNode={isHidden:!1},r}function Ml(r,i,u){return r=nn(6,r,null,i),r.lanes=u,r}function Fl(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 AT(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=lo(0),this.expirationTimes=lo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lo(0),this.identifierPrefix=c,this.onRecoverableError=m,this.mutableSourceEagerHydrationData=null}function Bl(r,i,u,c,m,T,k,I,P){return r=new AT(r,i,u,I,P),i===1?(i=1,T===!0&&(i|=8)):i=0,T=nn(3,null,null,i),r.current=T,T.stateNode=r,T.memoizedState={element:c,isDehydrated:u,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xo(T),r}function vT(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 ap(r){if(!r)return nr;r=r._reactInternals;e:{if(Sr(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 Df(r,u,i)}return i}function up(r,i,u,c,m,T,k,I,P){return r=Bl(u,c,!0,r,m,T,k,I,P),r.context=ap(null),u=r.current,c=Lt(),m=lr(u),T=Un(c,m),T.callback=i??null,sr(u,T,m),r.current.lanes=m,Vi(r,m,c),Ft(r,c),r}function du(r,i,u,c){var m=i.current,T=Lt(),k=lr(m);return u=ap(u),i.context===null?i.context=u:i.pendingContext=u,i=Un(T,k),i.payload={element:r},c=c===void 0?null:c,c!==null&&(i.callback=c),r=sr(m,i,k),r!==null&&(hn(r,m,k,T),za(r,m,k)),k}function fu(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 op(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<i?u:i}}function Ul(r,i){op(r,i),(r=r.alternate)&&op(r,i)}function wT(){return null}var lp=typeof reportError=="function"?reportError:function(r){console.error(r)};function Hl(r){this._internalRoot=r}hu.prototype.render=Hl.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(n(409));du(r,i,null,null)},hu.prototype.unmount=Hl.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Rr(function(){du(null,r,null,null)}),i[Dn]=null}};function hu(r){this._internalRoot=r}hu.prototype.unstable_scheduleHydration=function(r){if(r){var i=Yd();r={blockedOn:null,target:r,priority:i};for(var u=0;u<Xn.length&&i!==0&&i<Xn[u].priority;u++);Xn.splice(u,0,r),u===0&&Qd(r)}};function jl(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function pu(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11&&(r.nodeType!==8||r.nodeValue!==" react-mount-point-unstable "))}function cp(){}function IT(r,i,u,c,m){if(m){if(typeof c=="function"){var T=c;c=function(){var W=fu(k);T.call(W)}}var k=up(i,c,r,0,null,!1,!1,"",cp);return r._reactRootContainer=k,r[Dn]=k.current,as(r.nodeType===8?r.parentNode:r),Rr(),k}for(;m=r.lastChild;)r.removeChild(m);if(typeof c=="function"){var I=c;c=function(){var W=fu(P);I.call(W)}}var P=Bl(r,0,!1,null,null,!1,!1,"",cp);return r._reactRootContainer=P,r[Dn]=P.current,as(r.nodeType===8?r.parentNode:r),Rr(function(){du(i,P,u,c)}),P}function mu(r,i,u,c,m){var T=u._reactRootContainer;if(T){var k=T;if(typeof m=="function"){var I=m;m=function(){var P=fu(k);I.call(P)}}du(i,k,r,m)}else k=IT(u,i,r,m,c);return fu(k)}$d=function(r){switch(r.tag){case 3:var i=r.stateNode;if(i.current.memoizedState.isDehydrated){var u=Yi(i.pendingLanes);u!==0&&(co(i,u|1),Ft(i,nt()),(He&6)===0&&(Si=nt()+500,rr()))}break;case 13:Rr(function(){var c=Bn(r,1);if(c!==null){var m=Lt();hn(c,r,1,m)}}),Ul(r,1)}},fo=function(r){if(r.tag===13){var i=Bn(r,134217728);if(i!==null){var u=Lt();hn(i,r,134217728,u)}Ul(r,134217728)}},Wd=function(r){if(r.tag===13){var i=lr(r),u=Bn(r,i);if(u!==null){var c=Lt();hn(u,r,i,c)}Ul(r,i)}},Yd=function(){return We},Vd=function(r,i){var u=We;try{return We=r,i()}finally{We=u}},ro=function(r,i,u){switch(i){case"input":if(Zr(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=Ra(c);if(!m)throw Error(n(90));sa(c),Zr(c,m)}}}break;case"textarea":oa(r,u);break;case"select":i=u.value,i!=null&&Vn(r,!!u.multiple,i,!1)}},Id=Rl,Ld=Rr;var LT={usingClientEntryPoint:!1,Events:[ls,ci,Ra,vd,wd,Rl]},Ss={findFiberByHostInstance:_r,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},RT={bundleType:Ss.bundleType,version:Ss.version,rendererPackageName:Ss.rendererPackageName,rendererConfig:Ss.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:G.ReactCurrentDispatcher,findHostInstanceByFiber:function(r){return r=Pd(r),r===null?null:r.stateNode},findFiberByHostInstance:Ss.findFiberByHostInstance||wT,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 gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!gu.isDisabled&&gu.supportsFiber)try{ha=gu.inject(RT),kn=gu}catch{}}return Bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=LT,Bt.createPortal=function(r,i){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!jl(i))throw Error(n(200));return vT(r,i,null,u)},Bt.createRoot=function(r,i){if(!jl(r))throw Error(n(299));var u=!1,c="",m=lp;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onRecoverableError!==void 0&&(m=i.onRecoverableError)),i=Bl(r,1,!1,null,null,u,!1,c,m),r[Dn]=i.current,as(r.nodeType===8?r.parentNode:r),new Hl(i)},Bt.findDOMNode=function(r){if(r==null)return null;if(r.nodeType===1)return r;var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(n(188)):(r=Object.keys(r).join(","),Error(n(268,r)));return r=Pd(i),r=r===null?null:r.stateNode,r},Bt.flushSync=function(r){return Rr(r)},Bt.hydrate=function(r,i,u){if(!pu(i))throw Error(n(200));return mu(null,r,i,!0,u)},Bt.hydrateRoot=function(r,i,u){if(!jl(r))throw Error(n(405));var c=u!=null&&u.hydratedSources||null,m=!1,T="",k=lp;if(u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(T=u.identifierPrefix),u.onRecoverableError!==void 0&&(k=u.onRecoverableError)),i=up(i,null,r,1,u??null,m,!1,T,k),r[Dn]=i.current,as(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 hu(i)},Bt.render=function(r,i,u){if(!pu(i))throw Error(n(200));return mu(null,r,i,!1,u)},Bt.unmountComponentAtNode=function(r){if(!pu(r))throw Error(n(40));return r._reactRootContainer?(Rr(function(){mu(null,null,r,!1,function(){r._reactRootContainer=null,r[Dn]=null})}),!0):!1},Bt.unstable_batchedUpdates=Rl,Bt.unstable_renderSubtreeIntoContainer=function(r,i,u,c){if(!pu(u))throw Error(n(200));if(r==null||r._reactInternals===void 0)throw Error(n(38));return mu(r,i,u,!1,c)},Bt.version="18.3.1-next-f1338f8080-20240426",Bt}var Tp;function u0(){if(Tp)return Wl.exports;Tp=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(),Wl.exports=jT(),Wl.exports}var yp;function zT(){if(yp)return Eu;yp=1;var e=u0();return Eu.createRoot=e.createRoot,Eu.hydrateRoot=e.hydrateRoot,Eu}var $T=zT();/**
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 Yc=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,o0=/^[\\/]{2}/;function WT(e,t){return t+e.replace(/\\/g,"/")}var xp="popstate";function bp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function YT(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 bc("",{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:$s(a)}return qT(t,n,null,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Tn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function VT(){return Math.random().toString(36).substring(2,10)}function kp(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 bc(e,t,n=null,s,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Li(t):t,state:n,key:t&&t.key||s||VT(),mask:a}}function $s({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 Li(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 qT(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(),A=O==null?null:O-h;h=O,f&&f({action:d,location:w.location,delta:A})}function x(O,A){d="PUSH";let F=bp(O)?O:bc(w.location,O,A);h=E()+1;let z=kp(F,h),G=w.createHref(F.mask||F);try{l.pushState(z,"",G)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;a.location.assign(G)}o&&f&&f({action:d,location:w.location,delta:1})}function b(O,A){d="REPLACE";let F=bp(O)?O:bc(w.location,O,A);h=E();let z=kp(F,h),G=w.createHref(F.mask||F);l.replaceState(z,"",G),o&&f&&f({action:d,location:w.location,delta:0})}function N(O){return QT(a,O)}let w={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(xp,g),f=O,()=>{a.removeEventListener(xp,g),f=null}},createHref(O){return t(a,O)},createURL:N,encodeLocation(O){let A=N(O);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:x,replace:b,go(O){return l.go(O)}};return w}function QT(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:$s(t);return a=a.replace(/ $/,"%20"),!n&&o0.test(a)&&(a=s+a),new URL(a,s)}function l0(e,t,n="/"){return GT(e,t,n,!1)}function GT(e,t,n,s,a){let o=typeof t=="string"?Li(t):t,l=$n(o.pathname||"/",n);if(l==null)return null;let d=KT(e),f=null,h=p0(l);for(let E=0;f==null&&E<d.length;++E)f=ay(d[E],h,s);return f}function KT(e){let t=c0(e);return XT(t),t}function c0(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=mn([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}".`),c0(l.children,t,x,g,f)),!(l.path==null&&!l.index)&&t.push({path:g,score:iy(g,l.index),routesMeta:x.map((b,N)=>{let[w,O]=h0(b.relativePath,b.caseSensitive,N===x.length-1);return{...b,matcher:w,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 d0(l.path))o(l,d,!0,h)}),t}function d0(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=d0(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 XT(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:sy(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}var JT=/^:[\w-]+$/,ZT=3,ey=2,ty=1,ny=10,ry=-2,Sp=e=>e==="*";function iy(e,t){let n=e.split("/"),s=n.length;return n.some(Sp)&&(s+=ry),t&&(s+=ey),n.filter(a=>!Sp(a)).reduce((a,o)=>a+(JT.test(o)?ZT:o===""?ty:ny),s)}function sy(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 ay(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?f0(g,E,f.matcher,f.compiledParams):Ws(g,E),b=f.route;if(!x&&h&&n&&!s[s.length-1].route.index&&(x=Ws({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},E)),!x)return null;Object.assign(a,x.params),l.push({params:a,pathname:mn([o,x.pathname]),pathnameBase:ly(mn([o,x.pathnameBase])),route:b}),x.pathnameBase!=="/"&&(o=mn([o,x.pathnameBase]))}return l}function Ws(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=h0(e.path,e.caseSensitive,e.end);return f0(e,t,n,s)}function f0(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 h0(e,t=!1,n=!0){Tn(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 p0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Tn(!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 $n(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 uy(e,t="/"){let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Li(e):e,o;return n?(n=m0(n),n.startsWith("/")?o=_p(n.substring(1),"/"):o=_p(n,t)):o=t,{pathname:o,search:cy(s),hash:dy(a)}}function _p(e,t){let n=Iu(t).split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function ql(e,t,n,s){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(s)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function oy(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vc(e){let t=oy(e);return t.map((n,s)=>s===t.length-1?n.pathname:n.pathnameBase)}function Uu(e,t,n,s=!1){let a;typeof e=="string"?a=Li(e):(a={...e},Ke(!a.pathname||!a.pathname.includes("?"),ql("?","pathname","search",a)),Ke(!a.pathname||!a.pathname.includes("#"),ql("#","pathname","hash",a)),Ke(!a.search||!a.search.includes("#"),ql("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,d;if(l==null)d=n;else{let g=t.length-1;if(!s&&l.startsWith("..")){let x=l.split("/");for(;x[0]==="..";)x.shift(),g-=1;a.pathname=x.join("/")}d=g>=0?t[g]:"/"}let f=uy(a,d),h=l&&l!=="/"&&l.endsWith("/"),E=(o||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||E)&&(f.pathname+="/"),f}var m0=e=>e.replace(/[\\/]{2,}/g,"/"),mn=e=>m0(e.join("/")),Iu=e=>e.replace(/\/+$/,""),ly=e=>Iu(e).replace(/^\/*/,"/"),cy=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dy=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,fy=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 hy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function py(e){let t=e.map(n=>n.route.path).filter(Boolean);return mn(t)||"/"}var g0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function E0(e,t){let n=e;if(typeof n!="string"||!Yc.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let s=n,a=!1;if(g0)try{let o=new URL(window.location.href),l=o0.test(n)?new URL(WT(n,o.protocol)):new URL(n),d=$n(l.pathname,t);l.origin===o.origin&&d!=null?n=d+l.search+l.hash:a=!0}catch{Tn(!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 T0=["POST","PUT","PATCH","DELETE"];new Set(T0);var my=["GET",...T0];new Set(my);var gy=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ey(e){try{return gy.includes(new URL(e).protocol)}catch{return!1}}var Ri=L.createContext(null);Ri.displayName="DataRouter";var Hu=L.createContext(null);Hu.displayName="DataRouterState";var y0=L.createContext(!1);function Ty(){return L.useContext(y0)}var x0=L.createContext({isTransitioning:!1});x0.displayName="ViewTransition";var yy=L.createContext(new Map);yy.displayName="Fetchers";var xy=L.createContext(null);xy.displayName="Await";var Gt=L.createContext(null);Gt.displayName="Navigation";var Ks=L.createContext(null);Ks.displayName="Location";var wn=L.createContext({outlet:null,matches:[],isDataRoute:!1});wn.displayName="Route";var qc=L.createContext(null);qc.displayName="RouteError";var b0="REACT_ROUTER_ERROR",by="REDIRECT",ky="ROUTE_ERROR_RESPONSE";function Sy(e){if(e.startsWith(`${b0}:${by}:{`))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 _y(e){if(e.startsWith(`${b0}:${ky}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new fy(t.status,t.statusText,t.data)}catch{}}function Cy(e,{relative:t}={}){Ke(qr(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:s}=L.useContext(Gt),{hash:a,pathname:o,search:l}=Xs(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:mn([n,o])),s.createHref({pathname:d,search:l,hash:a})}function qr(){return L.useContext(Ks)!=null}function yn(){return Ke(qr(),"useLocation() may be used only in the context of a <Router> component."),L.useContext(Ks).location}function Ny(e){Ke(qr(),"useMatch() may be used only in the context of a <Router> component.");let{pathname:t}=yn();return L.useMemo(()=>Ws(e,p0(t)),[t,e])}var k0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function S0(e){L.useContext(Gt).static||L.useLayoutEffect(e)}function Qc(){let{isDataRoute:e}=L.useContext(wn);return e?Uy():Ay()}function Ay(){Ke(qr(),"useNavigate() may be used only in the context of a <Router> component.");let e=L.useContext(Ri),{basename:t,navigator:n}=L.useContext(Gt),{matches:s}=L.useContext(wn),{pathname:a}=yn(),o=JSON.stringify(Vc(s)),l=L.useRef(!1);return S0(()=>{l.current=!0}),L.useCallback((f,h={})=>{if(Tn(l.current,k0),!l.current)return;if(typeof f=="number"){n.go(f);return}let E=Uu(f,JSON.parse(o),a,h.relative==="path");e==null&&t!=="/"&&(E.pathname=E.pathname==="/"?t:mn([t,E.pathname])),(h.replace?n.replace:n.push)(E,h.state,h)},[t,n,o,a,e])}L.createContext(null);function Xs(e,{relative:t}={}){let{matches:n}=L.useContext(wn),{pathname:s}=yn(),a=JSON.stringify(Vc(n));return L.useMemo(()=>Uu(e,JSON.parse(a),s,t==="path"),[e,a,s,t])}function vy(e,t){return _0(e,t)}function _0(e,t,n){var O;Ke(qr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=L.useContext(Gt),{matches:a}=L.useContext(wn),o=a[a.length-1],l=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let A=h&&h.path||"";N0(d,!h||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${A}">) 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="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let E=yn(),g;if(t){let A=typeof t=="string"?Li(t):t;Ke(f==="/"||((O=A.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 "${A.pathname}" was given in the \`location\` prop.`),g=A}else g=E;let x=g.pathname||"/",b=x;if(f!=="/"){let A=f.replace(/^\//,"").split("/");b="/"+x.replace(/^\//,"").split("/").slice(A.length).join("/")}let N=n&&n.state.matches.length?n.state.matches.map(A=>Object.assign(A,{route:n.manifest[A.route.id]||A.route})):l0(e,{pathname:b});Tn(h||N!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Tn(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 w=Oy(N&&N.map(A=>Object.assign({},A,{params:Object.assign({},l,A.params),pathname:mn([f,s.encodeLocation?s.encodeLocation(A.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?f:mn([f,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),a,n);return t&&w?L.createElement(Ks.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...g},navigationType:"POP"}},w):w}function wy(){let e=By(),t=hy(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=L.createElement(L.Fragment,null,L.createElement("p",null,"💿 Hey developer 👋"),L.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",L.createElement("code",{style:o},"ErrorBoundary")," or"," ",L.createElement("code",{style:o},"errorElement")," prop on your route.")),L.createElement(L.Fragment,null,L.createElement("h2",null,"Unexpected Application Error!"),L.createElement("h3",{style:{fontStyle:"italic"}},t),n?L.createElement("pre",{style:a},n):null,l)}var Iy=L.createElement(wy,null),C0=class extends L.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=_y(e.digest);n&&(e=n)}let t=e!==void 0?L.createElement(wn.Provider,{value:this.props.routeContext},L.createElement(qc.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?L.createElement(Ly,{error:e},t):t}};C0.contextType=y0;var Ql=new WeakMap;function Ly({children:e,error:t}){let{basename:n}=L.useContext(Gt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let s=Sy(t.digest);if(s){let a=Ql.get(t);if(a)throw a;let o=E0(s.location,n),l=o.absoluteURL||o.to;if(Ey(l))throw new Error("Invalid redirect location");if(g0&&!Ql.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 Ql.set(t,d),d}return L.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function Ry({routeContext:e,match:t,children:n}){let s=L.useContext(Ri);return s&&s.static&&s.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=t.route.id),L.createElement(wn.Provider,{value:e},n)}function Oy(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:py(s.matches),errorInfo:g})}:void 0;return a.reduceRight((E,g,x)=>{let b,N=!1,w=null,O=null;s&&(b=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||Iy,l&&(d<0&&x===0?(N0("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 A=t.concat(a.slice(0,x+1)),F=()=>{let z;return b?z=w:N?z=O:g.route.Component?z=L.createElement(g.route.Component,null):g.route.element?z=g.route.element:z=E,L.createElement(Ry,{match:g,routeContext:{outlet:E,matches:A,isDataRoute:s!=null},children:z})};return s&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?L.createElement(C0,{location:s.location,revalidation:s.revalidation,component:w,error:b,children:F(),routeContext:{outlet:null,matches:A,isDataRoute:!0},onError:h}):F()},null)}function Gc(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Dy(e){let t=L.useContext(Ri);return Ke(t,Gc(e)),t}function Py(e){let t=L.useContext(Hu);return Ke(t,Gc(e)),t}function My(e){let t=L.useContext(wn);return Ke(t,Gc(e)),t}function Kc(e){let t=My(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 Fy(){return Kc("useRouteId")}function By(){var s;let e=L.useContext(qc),t=Py("useRouteError"),n=Kc("useRouteError");return e!==void 0?e:(s=t.errors)==null?void 0:s[n]}function Uy(){let{router:e}=Dy("useNavigate"),t=Kc("useNavigate"),n=L.useRef(!1);return S0(()=>{n.current=!0}),L.useCallback(async(a,o={})=>{Tn(n.current,k0),n.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Cp={};function N0(e,t,n){!t&&!Cp[e]&&(Cp[e]=!0,Tn(!1,n))}L.memo(Hy);function Hy({routes:e,manifest:t,future:n,state:s,isStatic:a,onError:o}){return _0(e,void 0,{manifest:t,state:s,isStatic:a,onError:o})}function jy({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}=L.useContext(Gt);Tn(!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}=L.useContext(wn),{pathname:l}=yn(),d=Qc(),f=Uu(e,Vc(o),l,s==="path"),h=JSON.stringify(f);return L.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:s})},[d,h,s,t,n]),null}function Os(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 zy({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=L.useMemo(()=>({basename:d,navigator:a,static:o,useTransitions:l,future:{}}),[d,a,o,l]);typeof n=="string"&&(n=Li(n));let{pathname:h="/",search:E="",hash:g="",state:x=null,key:b="default",mask:N}=n,w=L.useMemo(()=>{let O=$n(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 Tn(w!=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.`),w==null?null:L.createElement(Gt.Provider,{value:f},L.createElement(Ks.Provider,{children:t,value:w}))}function $y({children:e,location:t}){return vy(kc(e),t)}function kc(e,t=[]){let n=[];return L.Children.forEach(e,(s,a)=>{if(!L.isValidElement(s))return;let o=[...t,a];if(s.type===L.Fragment){n.push.apply(n,kc(s.props.children,o));return}Ke(s.type===Os,`[${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=kc(s.props.children,o)),n.push(l)}),n}var _u="get",Cu="application/x-www-form-urlencoded";function ju(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Wy(e){return ju(e)&&e.tagName.toLowerCase()==="button"}function Yy(e){return ju(e)&&e.tagName.toLowerCase()==="form"}function Vy(e){return ju(e)&&e.tagName.toLowerCase()==="input"}function qy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qy(e,t){return e.button===0&&(!t||t==="_self")&&!qy(e)}var Tu=null;function Gy(){if(Tu===null)try{new FormData(document.createElement("form"),0),Tu=!1}catch{Tu=!0}return Tu}var Ky=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Gl(e){return e!=null&&!Ky.has(e)?(Tn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Cu}"`),null):e}function Xy(e,t){let n,s,a,o,l;if(Yy(e)){let d=e.getAttribute("action");s=d?$n(d,t):null,n=e.getAttribute("method")||_u,a=Gl(e.getAttribute("enctype"))||Cu,o=new FormData(e)}else if(Wy(e)||Vy(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?$n(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||_u,a=Gl(e.getAttribute("formenctype"))||Gl(d.getAttribute("enctype"))||Cu,o=new FormData(d,e),!Gy()){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(ju(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=_u,s=null,a=Cu,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 Xc(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function A0(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&&$n(a.pathname,t)==="/"?a.pathname=`${Iu(t)}/_root.${s}`:a.pathname=`${Iu(a.pathname)}.${s}`,a}async function Jy(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 Zy(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 e2(e,t,n){let s=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await Jy(o,n);return l.links?l.links():[]}return[]}));return i2(s.flat(1).filter(Zy).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Np(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 t2(e,t,{includeHydrateFallback:n}={}){return n2(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 n2(e){return[...new Set(e)]}function r2(e){let t={},n=Object.keys(e).sort();for(let s of n)t[s]=e[s];return t}function i2(e,t){let n=new Set;return new Set(t),e.reduce((s,a)=>{let o=JSON.stringify(r2(a));return n.has(o)||(n.add(o),s.push({key:o,link:a})),s},[])}function Jc(){let e=L.useContext(Ri);return Xc(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function s2(){let e=L.useContext(Hu);return Xc(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Zc=L.createContext(void 0);Zc.displayName="FrameworkContext";function zu(){let e=L.useContext(Zc);return Xc(e,"You must render this element inside a <HydratedRouter> element"),e}function a2(e,t){let n=L.useContext(Zc),[s,a]=L.useState(!1),[o,l]=L.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:h,onMouseLeave:E,onTouchStart:g}=t,x=L.useRef(null);L.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let w=A=>{A.forEach(F=>{l(F.isIntersecting)})},O=new IntersectionObserver(w,{threshold:.5});return x.current&&O.observe(x.current),()=>{O.disconnect()}}},[e]),L.useEffect(()=>{if(s){let w=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(w)}}},[s]);let b=()=>{a(!0)},N=()=>{a(!1),l(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:Cs(d,b),onBlur:Cs(f,N),onMouseEnter:Cs(h,b),onMouseLeave:Cs(E,N),onTouchStart:Cs(g,b)}]:[!1,x,{}]}function Cs(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function u2({page:e,...t}){let n=Ty(),{nonce:s}=zu(),{router:a}=Jc(),o=L.useMemo(()=>l0(a.routes,e,a.basename),[a.routes,e,a.basename]);return o?(t.nonce==null&&s&&(t={...t,nonce:s}),n?L.createElement(l2,{page:e,matches:o,...t}):L.createElement(c2,{page:e,matches:o,...t})):null}function o2(e){let{manifest:t,routeModules:n}=zu(),[s,a]=L.useState([]);return L.useEffect(()=>{let o=!1;return e2(e,t,n).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,n]),s}function l2({page:e,matches:t,...n}){let s=yn(),{future:a}=zu(),{basename:o}=Jc(),l=L.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let d=A0(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 L.createElement(L.Fragment,null,l.map(d=>L.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function c2({page:e,matches:t,...n}){let s=yn(),{future:a,manifest:o,routeModules:l}=zu(),{basename:d}=Jc(),{loaderData:f,matches:h}=s2(),E=L.useMemo(()=>Np(e,t,h,o,s,"data"),[e,t,h,o,s]),g=L.useMemo(()=>Np(e,t,h,o,s,"assets"),[e,t,h,o,s]),x=L.useMemo(()=>{if(e===s.pathname+s.search+s.hash)return[];let w=new Set,O=!1;if(t.forEach(F=>{var G;let z=o.routes[F.route.id];!z||!z.hasLoader||(!E.some(ne=>ne.route.id===F.route.id)&&F.route.id in f&&((G=l[F.route.id])!=null&&G.shouldRevalidate)||z.hasClientLoader?O=!0:w.add(F.route.id))}),w.size===0)return[];let A=A0(e,d,a.v8_trailingSlashAwareDataRequests,"data");return O&&w.size>0&&A.searchParams.set("_routes",t.filter(F=>w.has(F.route.id)).map(F=>F.route.id).join(",")),[A.pathname+A.search]},[d,a.v8_trailingSlashAwareDataRequests,f,s,o,E,t,e,l]),b=L.useMemo(()=>t2(g,o),[g,o]),N=o2(g);return L.createElement(L.Fragment,null,x.map(w=>L.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),b.map(w=>L.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),N.map(({key:w,link:O})=>L.createElement("link",{key:w,nonce:n.nonce,...O,crossOrigin:O.crossOrigin??n.crossOrigin})))}function d2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var f2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{f2&&(window.__reactRouterVersion="7.18.2")}catch{}function h2({basename:e,children:t,useTransitions:n,window:s}){let a=L.useRef();a.current==null&&(a.current=YT({window:s,v5Compat:!0}));let o=a.current,[l,d]=L.useState({action:o.action,location:o.location}),f=L.useCallback(h=>{n===!1?d(h):L.startTransition(()=>d(h))},[n]);return L.useLayoutEffect(()=>o.listen(f),[o,f]),L.createElement(zy,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:o,useTransitions:n})}var ed=L.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},w){let{basename:O,navigator:A,useTransitions:F}=L.useContext(Gt),z=typeof E=="string"&&Yc.test(E),G=E0(E,O);E=G.to;let ne=Cy(E,{relative:a}),D=yn(),q=null;if(d){let re=Uu(d,[],D.mask?D.mask.pathname:"/",!0);O!=="/"&&(re.pathname=re.pathname==="/"?O:mn([O,re.pathname])),q=A.createHref(re)}let[Z,oe,$]=a2(s,N),le=E2(E,{replace:l,mask:d,state:f,target:h,preventScrollReset:g,relative:a,viewTransition:x,defaultShouldRevalidate:b,useTransitions:F});function ce(re){t&&t(re),re.defaultPrevented||le(re)}let Ce=!(G.isExternal||o),fe=L.createElement("a",{...N,...$,href:(Ce?q:void 0)||G.absoluteURL||ne,onClick:Ce?ce:t,ref:d2(w,oe),target:h,"data-discover":!z&&n==="render"?"true":void 0});return Z&&!z?L.createElement(L.Fragment,null,fe,L.createElement(u2,{page:ne})):fe});ed.displayName="Link";var p2=L.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=Xs(l,{relative:h.relative}),x=yn(),b=L.useContext(Hu),{navigator:N,basename:w}=L.useContext(Gt),O=b!=null&&k2(g)&&d===!0,A=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,A=A.toLowerCase()),z&&w&&(z=$n(z,w)||z);const G=A!=="/"&&A.endsWith("/")?A.length-1:A.length;let ne=F===A||!a&&F.startsWith(A)&&F.charAt(G)==="/",D=z!=null&&(z===A||!a&&z.startsWith(A)&&z.charAt(A.length)==="/"),q={isActive:ne,isPending:D,isTransitioning:O},Z=ne?t:void 0,oe;typeof s=="function"?oe=s(q):oe=[s,ne?"active":null,D?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(q):o;return L.createElement(ed,{...h,"aria-current":Z,className:oe,ref:E,style:$,to:l,viewTransition:d},typeof f=="function"?f(q):f)});p2.displayName="NavLink";var m2=L.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:s,replace:a,state:o,method:l=_u,action:d,onSubmit:f,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x,...b},N)=>{let{useTransitions:w}=L.useContext(Gt),O=x2(),A=b2(d,{relative:h}),F=l.toLowerCase()==="get"?"get":"post",z=typeof d=="string"&&Yc.test(d),G=ne=>{if(f&&f(ne),ne.defaultPrevented)return;ne.preventDefault();let D=ne.nativeEvent.submitter,q=(D==null?void 0:D.getAttribute("formmethod"))||l,Z=()=>O(D||ne.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:a,state:o,relative:h,preventScrollReset:E,viewTransition:g,defaultShouldRevalidate:x});w&&n!==!1?L.startTransition(()=>Z()):Z()};return L.createElement("form",{ref:N,method:F,action:A,onSubmit:s?f:G,...b,"data-discover":!z&&e==="render"?"true":void 0})});m2.displayName="Form";function g2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function v0(e){let t=L.useContext(Ri);return Ke(t,g2(e)),t}function E2(e,{target:t,replace:n,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f,useTransitions:h}={}){let E=Qc(),g=yn(),x=Xs(e,{relative:l});return L.useCallback(b=>{if(Qy(b,t)){b.preventDefault();let N=n!==void 0?n:$s(g)===$s(x),w=()=>E(e,{replace:N,mask:s,state:a,preventScrollReset:o,relative:l,viewTransition:d,defaultShouldRevalidate:f});h?L.startTransition(()=>w()):w()}},[g,E,x,n,s,a,t,e,o,l,d,f,h])}var T2=0,y2=()=>`__${String(++T2)}__`;function x2(){let{router:e}=v0("useSubmit"),{basename:t}=L.useContext(Gt),n=Fy(),s=e.fetch,a=e.navigate;return L.useCallback(async(o,l={})=>{let{action:d,method:f,encType:h,formData:E,body:g}=Xy(o,t);if(l.navigate===!1){let x=l.fetcherKey||y2();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 b2(e,{relative:t}={}){let{basename:n}=L.useContext(Gt),s=L.useContext(wn);Ke(s,"useFormAction must be used inside a RouteContext");let[a]=s.matches.slice(-1),o={...Xs(e||".",{relative:t})},l=yn();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:mn([n,o.pathname])),$s(o)}function k2(e,{relative:t}={}){let n=L.useContext(x0);Ke(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:s}=v0("useViewTransitionState"),a=Xs(e,{relative:t});if(!n.isTransitioning)return!1;let o=$n(n.currentLocation.pathname,s)||n.currentLocation.pathname,l=$n(n.nextLocation.pathname,s)||n.nextLocation.pathname;return Ws(a.pathname,l)!=null||Ws(a.pathname,o)!=null}const Ap=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},S2=(e=>e?Ap(e):Ap),_2=e=>e;function C2(e,t=_2){const n=Rs.useSyncExternalStore(e.subscribe,Rs.useCallback(()=>t(e.getState()),[e,t]),Rs.useCallback(()=>t(e.getInitialState()),[e,t]));return Rs.useDebugValue(n),n}const vp=e=>{const t=S2(e),n=s=>C2(t,s);return Object.assign(n,t),n},N2=(e=>e?vp(e):vp),Lu="Attached files: ",A2=[".png",".jpg",".jpeg",".gif",".webp",".svg",".bmp",".ico",".avif"];function v2(e){const t=e.split(`
53
+ `).find(n=>n.startsWith(Lu));return t?t.slice(Lu.length).split(", ").map(n=>n.trim()).filter(Boolean):[]}function w2(e){return v2(e).filter(t=>{const n=t.toLowerCase();return A2.some(s=>n.endsWith(s))})}function td(e){return e.split(`
54
+ `).filter(t=>!t.startsWith(Lu)).join(`
55
+ `).trim()}function wp(){return{turnStatus:"idle",creditsSpent:0,lastTurnCredits:0,contextUsagePercentage:0,lastTurnDurationMs:0,subagents:[],pendingStages:[],mcpServers:[],availableCommands:[],oauthPrompts:[],compacting:!1}}const Kl=60;function I2(e){const t=e.filter(o=>o.type==="text").map(o=>o.text).join(`
56
+ `),n=td(t).replace(/```[\s\S]*?```/g," ").replace(/\s+/g," ").trim();if(!n)return"";if(n.length<=Kl)return n.replace(/[.,;:!?]+$/,"");const s=n.slice(0,Kl),a=s.lastIndexOf(" ");return`${(a>Kl/2?s.slice(0,a):s).replace(/[.,;:!?]+$/,"")}…`}const L2=(e,t)=>t.updatedAt.localeCompare(e.updatedAt);function w0(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(L2)}function R2(e,t,n){const s=e.find(a=>a.sessionId===t);return s?w0(e,{...s,updatedAt:n}):e}function I0(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 be=N2((e,t)=>({sessions:[],models:[],agents:[],defaultAgentId:"kiro_default",activeId:null,loadingSessionId:null,modes:[],items:[],appliedSeq:0,remainingOlder:0,observability:wp(),fsVersion:{},watchedPaths:[],streamingText:"",streamingThought:"",pending:[],sessionNotice:null,connStatus:"closed",createError:null,previewPath:null,setConnStatus:n=>e({connStatus:n}),setCreateError:n=>e({createError: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:w0(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:wp(),streamingText:"",streamingThought:"",pending:[],sessionNotice:null,currentModeId:void 0,currentModelId:void 0,previewPath:null}),dismissSessionNotice:()=>e({sessionNotice:null}),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(w=>w.type==="text").map(w=>w.text).join(""),E=td(h),g=w2(h),x=s.pending.findIndex(w=>w.status==="sending"),b=new Date(n.ts).toISOString(),N=R2(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((w,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:[...Xl(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:Xl(s,`s-${n.seq}`,n.ts),sessionNotice:null,streamingText:"",streamingThought:"",observability:{...s.observability,turnStatus:"idle"}});break}case"turn_error":{const h=I0(a.message);e({items:[...Xl(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 Xl(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 Nt(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();throw new Error(`${e} ${t} failed (${a.status}): ${l}`)}const o=await a.text();return o?JSON.parse(o):{}}function O2(e){return Nt("POST","/api/login",{token:e})}function D2(){return Nt("POST","/api/logout")}const dt={devices:()=>Nt("GET","/api/devices"),revokeDevice:e=>Nt("DELETE",`/api/devices/${e}`),logoutAll:()=>Nt("POST","/api/logout-all"),models:()=>Nt("GET","/api/models"),agents:()=>Nt("GET","/api/agents"),listDirs:e=>Nt("GET",`/api/fs/dirs?path=${encodeURIComponent(e)}`),listSessions:()=>Nt("GET","/api/sessions"),createSession:e=>Nt("POST","/api/sessions",e),getSession:e=>Nt("GET",`/api/sessions/${e}`),transcriptPage:(e,t,n)=>Nt("GET",`/api/sessions/${e}/transcript?offset=${t}&limit=${n}`),deleteSession:e=>Nt("DELETE",`/api/sessions/${e}`),renameSession:(e,t)=>Nt("POST",`/api/sessions/${e}/rename`,{title:t}),setSessionCwd:(e,t)=>Nt("POST",`/api/sessions/${e}/cwd`,{cwd:t}),tree:(e,t="")=>Nt("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()}},Nu={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},P2=8e3,L0=25e3,M2=1e4;function Ip(e){return e.state===void 0||e.state===Nu.CLOSED||e.state===Nu.CLOSING?!0:e.state===Nu.CONNECTING?e.now-e.connectingSince>P2:e.now-e.lastMessageAt>L0+M2}function F2(e){return e.state===Nu.OPEN&&e.now-e.lastMessageAt>L0}const B2=1008;class U2{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||Ip(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();Ip(t)?this.connect():F2(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===B2){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 nd="/sessions",H2=`${nd}/:sessionId`;function R0(e){return`${nd}/${encodeURIComponent(e)}`}const j2=`${nd}/new`,z2={prompt:"Message",cancel:"Stop",set_mode:"Agent change",set_model:"Model change",exec_command:"Command"};class $2{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 U2(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 be.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(`${z2[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(R0(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(j2)}send(t){const n=`pending-${this.msgSeq++}`,s=td(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:I2(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)}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||be.getState().activeId!==null}}const it=new $2;function O0(e){const t=e.trim().slice(0,4e3);return!t||!it.canSend?!1:(it.send([{type:"text",text:t}]),!0)}function D0({size:e=14,className:t}){return y.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:y.jsx("polyline",{points:"6 9 12 15 18 9"})})}function P0({size:e=16,className:t}){return y.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:[y.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),y.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function W2({size:e=16,className:t}){return y.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:y.jsx("polyline",{points:"20 6 9 17 4 12"})})}function Y2({size:e=18,className:t}){return y.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:[y.jsx("rect",{x:"4",y:"11",width:"16",height:"10",rx:"2"}),y.jsx("path",{d:"M8 11V7a4 4 0 0 1 8 0v4"})]})}function Wr({size:e=28,className:t}){return y.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:y.jsx("path",{d:"M12 3a9 9 0 1 0 9 9"})})}function V2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M12 19V5"}),y.jsx("path",{d:"m5 12 7-7 7 7"})]})}function Lp({size:e=16,className:t}){return y.jsx("svg",{className:t,width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none","aria-hidden":!0,children:y.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function M0({size:e=20,className:t}){return y.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:[y.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),y.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function F0({size:e=20,className:t}){return y.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:[y.jsx("circle",{cx:"11",cy:"11",r:"7"}),y.jsx("line",{x1:"21",y1:"21",x2:"16.5",y2:"16.5"})]})}function B0({size:e=16,className:t}){return y.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:y.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 q2({size:e=16,className:t}){return y.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:[y.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"}),y.jsx("path",{d:"M2 10l2.5 9h15l2.5-9H7.5"})]})}function Q2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"})]})}function Rp({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("polyline",{points:"9 15 7 13 9 11"}),y.jsx("polyline",{points:"15 11 17 13 15 15"})]})}function G2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("circle",{cx:"12",cy:"15",r:"2"}),y.jsx("path",{d:"M12 11v2"}),y.jsx("path",{d:"M12 17v1"})]})}function K2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("line",{x1:"8",y1:"13",x2:"16",y2:"13"}),y.jsx("line",{x1:"8",y1:"17",x2:"14",y2:"17"})]})}function X2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("circle",{cx:"10",cy:"14",r:"2"}),y.jsx("path",{d:"M20 17l-3-3-5 5"})]})}function J2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("path",{d:"M8 13h3v3H8z"}),y.jsx("line",{x1:"14",y1:"13",x2:"16",y2:"13"}),y.jsx("line",{x1:"14",y1:"16",x2:"16",y2:"16"})]})}function Z2({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),y.jsx("polyline",{points:"14 2 14 8 20 8"}),y.jsx("polyline",{points:"8 15 10 13 8 11"}),y.jsx("line",{x1:"12",y1:"16",x2:"16",y2:"16"})]})}function ex({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),y.jsx("polyline",{points:"7 10 12 15 17 10"}),y.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}function Jl({size:e=20,className:t}){return y.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:y.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})})}function tx({size:e=16,className:t}){return y.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:[y.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"}),y.jsx("line",{x1:"9",y1:"14",x2:"15",y2:"14"}),y.jsx("line",{x1:"9",y1:"18",x2:"13",y2:"18"})]})}function nx({size:e=18,className:t}){return y.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:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function rx({size:e=16,className:t}){return y.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:[y.jsx("path",{d:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z"}),y.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function ix({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"16 18 22 12 16 6"}),y.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function sx({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"15 3 21 3 21 9"}),y.jsx("polyline",{points:"9 21 3 21 3 15"}),y.jsx("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}function ax({size:e=16,className:t}){return y.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:[y.jsx("polyline",{points:"4 14 10 14 10 20"}),y.jsx("polyline",{points:"20 10 14 10 14 4"}),y.jsx("line",{x1:"14",y1:"10",x2:"21",y2:"3"}),y.jsx("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]})}var $u=u0();function ux(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 ox({sessions:e,onOpen:t,onClose:n}){const[s,a]=L.useState(""),[o,l]=L.useState(0),d=L.useRef(null);L.useEffect(()=>{var g;(g=d.current)==null||g.focus()},[]);const f=L.useMemo(()=>s.trim()?e.map(g=>({s:g,score:ux(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]);L.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 $u.createPortal(y.jsx("div",{className:"search-backdrop",onClick:n,children:y.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Search sessions",onClick:g=>g.stopPropagation(),children:[y.jsxs("div",{className:"search-field",children:[y.jsx(F0,{size:20,className:"search-field-icon"}),y.jsx("input",{ref:d,className:"search-modal-input",value:s,placeholder:"Search sessions…",onChange:g=>a(g.target.value),onKeyDown:E}),y.jsx("kbd",{className:"search-esc",children:"esc"})]}),y.jsx("div",{className:"search-results",children:f.length===0?y.jsx("p",{className:"search-empty",children:s.trim()?`No sessions match "${s}".`:"No sessions yet."}):f.map((g,x)=>y.jsxs("button",{className:`search-result ${x===o?"is-active":""}`,onMouseEnter:()=>l(x),onClick:()=>h(g.sessionId),children:[y.jsx("span",{className:"search-result-title",children:g.title}),y.jsx("span",{className:"search-result-agent",children:g.agentId??"kiro_default"})]},g.sessionId))})]})}),document.body)}function lx(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 cx(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 dx({onClose:e,onSelfRevoked:t}){const[n,s]=L.useState(null),[a,o]=L.useState(!1),l=()=>dt.devices().then(h=>s(h.devices)).catch(()=>s([]));L.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 $u.createPortal(y.jsx("div",{className:"search-backdrop",onClick:e,children:y.jsxs("div",{className:"search-modal",role:"dialog","aria-label":"Logged-in devices",onClick:h=>h.stopPropagation(),children:[y.jsxs("div",{className:"devices-head",children:[y.jsx("span",{className:"devices-title",children:"Logged-in devices"}),y.jsx("button",{className:"btn-ghost",onClick:e,children:"Close"})]}),y.jsx("div",{className:"devices-list",children:n===null?y.jsx("p",{className:"search-empty",children:"Loading…"}):n.length===0?y.jsx("p",{className:"search-empty",children:"No active devices."}):n.map(h=>y.jsxs("div",{className:"device-row",children:[y.jsxs("span",{className:"device-main",children:[y.jsxs("span",{className:"device-name",children:[cx(h.userAgent),h.current&&y.jsx("span",{className:"device-badge",children:"This device"})]}),y.jsxs("span",{className:"device-sub",children:["Active ",lx(h.lastSeenAt)]})]}),y.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:()=>d(h),children:h.current?"Log out":"Revoke"})]},h.id))}),n&&n.length>1&&y.jsx("div",{className:"devices-foot",children:y.jsx("button",{className:"btn-ghost device-revoke",disabled:a,onClick:f,children:"Log out all devices"})})]})}),document.body)}function fx({title:e,message:t,confirmLabel:n="Confirm",cancelLabel:s="Cancel",danger:a=!1,onConfirm:o,onCancel:l}){return L.useEffect(()=>{const d=f=>{f.key==="Escape"&&l()};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[l]),$u.createPortal(y.jsx("div",{className:"confirm-backdrop",onClick:d=>{d.target===d.currentTarget&&l()},children:y.jsxs("div",{className:"confirm-modal",role:"dialog","aria-modal":"true","aria-label":e,children:[y.jsx("h3",{className:"confirm-title",children:e}),t&&y.jsx("p",{className:"confirm-message",children:t}),y.jsxs("div",{className:"confirm-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:l,children:s}),y.jsx("button",{className:a?"btn-danger":"btn-primary",onClick:o,autoFocus:!0,children:n})]})]})}),document.body)}function hx(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 px({sessions:e,activeId:t,loadingId:n,onOpen:s,onNew:a,onDelete:o,onRename:l,onLock:d}){const[f,h]=L.useState(!1),[E,g]=L.useState(!1),[x,b]=L.useState(!1),[N,w]=L.useState(null),[O,A]=L.useState(null),[F,z]=L.useState(null),[G,ne]=L.useState("");L.useEffect(()=>{if(!N)return;const q=()=>w(null);return document.addEventListener("click",q),()=>document.removeEventListener("click",q)},[N]),L.useEffect(()=>{if(!x)return;const q=()=>b(!1);return document.addEventListener("click",q),()=>document.removeEventListener("click",q)},[x]);const D=q=>{const Z=G.trim();Z&&l(q,Z),z(null)};return y.jsxs("aside",{className:"sidebar",children:[y.jsxs("header",{className:"sidebar-head",children:[y.jsxs("span",{className:"brand",children:[y.jsx("img",{className:"brand-logo",src:"/logo.svg",alt:""}),y.jsx("span",{className:"wordmark",children:"Casper"})]}),y.jsxs("div",{className:"sidebar-actions",children:[y.jsxs("div",{className:"account-menu",children:[y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Account",title:"Account",onClick:q=>{q.stopPropagation(),b(Z=>!Z)},children:y.jsx(Y2,{size:18})}),x&&y.jsxs("div",{className:"menu-list",onClick:q=>q.stopPropagation(),children:[y.jsx("button",{className:"menu-item",onClick:()=>{b(!1),g(!0)},children:"Devices"}),y.jsx("button",{className:"menu-item",onClick:()=>{b(!1),d()},children:"Lock app"})]})]}),y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"Search sessions",onClick:()=>h(!0),children:y.jsx(F0,{size:20})}),y.jsx("button",{className:"iconbtn iconbtn-lg","aria-label":"New session",title:"New session",onClick:a,children:y.jsx(M0,{size:20})})]})]}),y.jsx("div",{className:"sidebar-list",children:e.length===0?y.jsx("p",{className:"sidebar-empty",children:"No sessions yet. Start one and it keeps running while you're away."}):e.map(q=>y.jsxs("div",{className:`srow ${q.sessionId===t?"is-active":""}`,children:[F===q.sessionId?y.jsx("input",{className:"srow-rename",autoFocus:!0,onFocus:Z=>Z.currentTarget.select(),value:G,onChange:Z=>ne(Z.target.value),onBlur:()=>D(q.sessionId),onKeyDown:Z=>{Z.key==="Enter"&&D(q.sessionId),Z.key==="Escape"&&z(null)},onClick:Z=>Z.stopPropagation()}):y.jsx(ed,{className:"srow-open",to:R0(q.sessionId),onClick:Z=>{Z.metaKey||Z.ctrlKey||Z.shiftKey||Z.altKey||s(q.sessionId)},children:y.jsxs("span",{className:"srow-main",children:[y.jsx("span",{className:"srow-title",title:q.title,children:q.title}),y.jsxs("span",{className:"srow-sub",children:[y.jsx("span",{className:"srow-agent",children:q.agentId??"kiro_default"}),y.jsx("span",{className:"srow-dot",children:"·"}),n===q.sessionId&&y.jsx(Wr,{size:11,className:"srow-spinner"}),y.jsx("span",{className:"srow-when",children:hx(q.updatedAt)})]})]})}),y.jsxs("div",{className:"srow-menu",children:[y.jsx("button",{className:"iconbtn srow-menu-btn","aria-label":"Session actions",onClick:Z=>{Z.stopPropagation(),w(N===q.sessionId?null:q.sessionId)},children:"⋮"}),N===q.sessionId&&y.jsxs("div",{className:"menu-list",onClick:Z=>Z.stopPropagation(),children:[y.jsx("button",{className:"menu-item",onClick:()=>{ne(q.title),z(q.sessionId),w(null)},children:"Rename"}),y.jsx("button",{className:"menu-item menu-item-danger",onClick:()=>{w(null),A(q.sessionId)},children:"Delete"})]})]})]},q.sessionId))}),f&&y.jsx(ox,{sessions:e,onOpen:s,onClose:()=>h(!1)}),E&&y.jsx(dx,{onClose:()=>g(!1),onSelfRevoked:()=>{g(!1),d()}}),O&&y.jsx(fx,{title:"Delete session?",message:"This session and its history will be permanently deleted. This can't be undone.",confirmLabel:"Delete",danger:!0,onConfirm:()=>{const q=O;A(null),o(q)},onCancel:()=>A(null)})]})}const mx="modulepreload",gx=function(e){return"/"+e},Op={},Sc=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=gx(h),h in Op)return;Op[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":mx,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 Dp(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 U0(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ex=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tx=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yx={};function Pp(e,t){return(yx.jsx?Tx:Ex).test(e)}const xx=/[ \t\n\f\r]/g;function bx(e){return typeof e=="object"?e.type==="text"?Mp(e.value):!1:Mp(e)}function Mp(e){return e.replace(xx,"")===""}class Js{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Js.prototype.normal={};Js.prototype.property={};Js.prototype.space=void 0;function H0(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Js(n,s,t)}function Ys(e){return e.toLowerCase()}class jt{constructor(t,n){this.attribute=n,this.property=t}}jt.prototype.attribute="";jt.prototype.booleanish=!1;jt.prototype.boolean=!1;jt.prototype.commaOrSpaceSeparated=!1;jt.prototype.commaSeparated=!1;jt.prototype.defined=!1;jt.prototype.mustUseProperty=!1;jt.prototype.number=!1;jt.prototype.overloadedBoolean=!1;jt.prototype.property="";jt.prototype.spaceSeparated=!1;jt.prototype.space=void 0;let kx=0;const we=Qr(),ot=Qr(),_c=Qr(),ie=Qr(),Ye=Qr(),zr=Qr(),qt=Qr();function Qr(){return 2**++kx}const Cc=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:ot,commaOrSpaceSeparated:qt,commaSeparated:zr,number:ie,overloadedBoolean:_c,spaceSeparated:Ye},Symbol.toStringTag,{value:"Module"})),Zl=Object.keys(Cc);class rd extends jt{constructor(t,n,s,a){let o=-1;if(super(t,n),Fp(this,"space",a),typeof s=="number")for(;++o<Zl.length;){const l=Zl[o];Fp(this,Zl[o],(s&Cc[l])===Cc[l])}}}rd.prototype.defined=!0;function Fp(e,t,n){n&&(e[t]=n)}function Oi(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new rd(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Ys(s)]=s,n[Ys(o.attribute)]=s}return new Js(t,n,e.space)}const j0=Oi({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Ye,ariaCurrent:null,ariaDescribedBy:Ye,ariaDetails:null,ariaDisabled:ot,ariaDropEffect:Ye,ariaErrorMessage:null,ariaExpanded:ot,ariaFlowTo:Ye,ariaGrabbed:ot,ariaHasPopup:null,ariaHidden:ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ye,ariaLevel:ie,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Ye,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Ye,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ot,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function z0(e,t){return t in e?e[t]:t}function $0(e,t){return z0(e,t.toLowerCase())}const Sx=Oi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zr,acceptCharset:Ye,accessKey:Ye,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:Ye,autoFocus:we,autoPlay:we,blocking:Ye,capture:null,charSet:null,checked:we,cite:null,className:Ye,closedBy:null,colorSpace:null,cols:ie,colSpan:ie,command:null,commandFor:null,content:null,contentEditable:ot,controls:we,controlsList:Ye,coords:ie|zr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:_c,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:Ye,height:ie,hidden:_c,high:ie,href:null,hrefLang:null,htmlFor:Ye,httpEquiv:Ye,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:Ye,itemRef:Ye,itemScope:we,itemType:Ye,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:we,optimum:ie,pattern:null,ping:Ye,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:Ye,required:we,reversed:we,rows:ie,rowSpan:ie,sandbox:Ye,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:ot,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ye,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:zr,part:Ye,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:$0}),_x=Oi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:qt,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:Ye,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:zr,g2:zr,glyphName:zr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:qt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ye,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:qt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:qt,rev:qt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:qt,requiredFeatures:qt,requiredFonts:qt,requiredFormats:qt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:qt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:qt,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:qt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:z0}),W0=Oi({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()}}),Y0=Oi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:$0}),V0=Oi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Cx={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"},Nx=/[A-Z]/g,Bp=/-[a-z]/g,Ax=/^data[-\w.:]+$/i;function Wu(e,t){const n=Ys(t);let s=t,a=jt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Ax.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Bp,wx);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Bp.test(o)){let l=o.replace(Nx,vx);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=rd}return new a(s,t)}function vx(e){return"-"+e.toLowerCase()}function wx(e){return e.charAt(1).toUpperCase()}const Zs=H0([j0,Sx,W0,Y0,V0],"html"),Tr=H0([j0,_x,W0,Y0,V0],"svg");function Up(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function q0(e){return e.join(" ").trim()}var Ci={},ec,Hp;function Ix(){if(Hp)return ec;Hp=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,A){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];A=A||{};var F=1,z=1;function G(fe){var re=fe.match(t);re&&(F+=re.length);var ve=fe.lastIndexOf(f);z=~ve?fe.length-ve:z+fe.length}function ne(){var fe={line:F,column:z};return function(re){return re.position=new D(fe),oe(),re}}function D(fe){this.start=fe,this.end={line:F,column:z},this.source=A.source}D.prototype.content=O;function q(fe){var re=new Error(A.source+":"+F+":"+z+": "+fe);if(re.reason=fe,re.filename=A.source,re.line=F,re.column=z,re.source=O,!A.silent)throw re}function Z(fe){var re=fe.exec(O);if(re){var ve=re[0];return G(ve),O=O.slice(ve.length),re}}function oe(){Z(n)}function $(fe){var re;for(fe=fe||[];re=le();)re!==!1&&fe.push(re);return fe}function le(){var fe=ne();if(!(h!=O.charAt(0)||E!=O.charAt(1))){for(var re=2;g!=O.charAt(re)&&(E!=O.charAt(re)||h!=O.charAt(re+1));)++re;if(re+=2,g===O.charAt(re-1))return q("End of comment missing");var ve=O.slice(2,re-2);return z+=2,G(ve),O=O.slice(re),z+=2,fe({type:x,comment:ve})}}function ce(){var fe=ne(),re=Z(s);if(re){if(le(),!Z(a))return q("property missing ':'");var ve=Z(o),Ie=fe({type:b,property:w(re[0].replace(e,g)),value:ve?w(ve[0].replace(e,g)):g});return Z(l),Ie}}function Ce(){var fe=[];$(fe);for(var re;re=ce();)re!==!1&&(fe.push(re),$(fe));return fe}return oe(),Ce()}function w(O){return O?O.replace(d,g):g}return ec=N,ec}var jp;function Lx(){if(jp)return Ci;jp=1;var e=Ci&&Ci.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.default=n;const t=e(Ix());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 Ci}var Ns={},zp;function Rx(){if(zp)return Ns;zp=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.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 Ns.camelCase=f,Ns}var As,$p;function Ox(){if($p)return As;$p=1;var e=As&&As.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(Lx()),n=Rx();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,As=s,As}var Dx=Ox();const Px=$c(Dx),Yu=Q0("end"),In=Q0("start");function Q0(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 G0(e){const t=In(e),n=Yu(e);if(t&&n)return{start:t,end:n}}function Ps(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Wp(e.position):"start"in e||"end"in e?Wp(e):"line"in e||"column"in e?Nc(e):""}function Nc(e){return Yp(e&&e.line)+":"+Yp(e&&e.column)}function Wp(e){return Nc(e&&e.start)+"-"+Nc(e&&e.end)}function Yp(e){return e&&typeof e=="number"?e:1}class vt extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(l=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const f=s.indexOf(":");f===-1?o.ruleId=s:(o.source=s.slice(0,f),o.ruleId=s.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=d?d.line:void 0,this.name=Ps(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vt.prototype.file="";vt.prototype.name="";vt.prototype.reason="";vt.prototype.message="";vt.prototype.stack="";vt.prototype.column=void 0;vt.prototype.line=void 0;vt.prototype.ancestors=void 0;vt.prototype.cause=void 0;vt.prototype.fatal=void 0;vt.prototype.place=void 0;vt.prototype.ruleId=void 0;vt.prototype.source=void 0;const id={}.hasOwnProperty,Mx=new Map,Fx=/[A-Z]/g,Bx=new Set(["table","tbody","thead","tfoot","tr"]),Ux=new Set(["td","th"]),K0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Hx(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=Qx(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=qx(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"?Tr:Zs,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=X0(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function X0(e,t,n){if(t.type==="element")return jx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return zx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Wx(e,t,n);if(t.type==="mdxjsEsm")return $x(e,t);if(t.type==="root")return Yx(e,t,n);if(t.type==="text")return Vx(e,t)}function jx(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=Tr,e.schema=a),e.ancestors.push(t);const o=Z0(e,t.tagName,!1),l=Gx(e,t);let d=ad(e,t);return Bx.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!bx(f):!0})),J0(e,l,o,t),sd(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function zx(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)}Vs(e,t.position)}function $x(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Vs(e,t.position)}function Wx(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=Tr,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:Z0(e,t.name,!0),l=Kx(e,t),d=ad(e,t);return J0(e,l,o,t),sd(l,d),e.ancestors.pop(),e.schema=s,e.create(t,o,l,n)}function Yx(e,t,n){const s={};return sd(s,ad(e,t)),e.create(t,e.Fragment,s,n)}function Vx(e,t){return t.value}function J0(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function sd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qx(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 Qx(e,t){return n;function n(s,a,o,l){const d=Array.isArray(o.children),f=In(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 Gx(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&id.call(t.properties,a)){const o=Xx(e,a,t.properties[a]);if(o){const[l,d]=o;e.tableCellAlignToStyle&&l==="align"&&typeof d=="string"&&Ux.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 Kx(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 Vs(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 Vs(e,t.position);else o=s.value===null?!0:s.value;n[a]=o}return n}function ad(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:Mx;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=X0(e,o,l);d!==void 0&&n.push(d)}return n}function Xx(e,t,n){const s=Wu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?U0(n):q0(n)),s.property==="style"){let a=typeof n=="object"?n:Jx(e,String(n));return e.stylePropertyNameCase==="css"&&(a=Zx(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?Cx[s.property]||s.property:s.attribute,n]}}function Jx(e,t){try{return Px(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new vt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=K0+"#cannot-parse-style-attribute",a}}function Z0(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=Pp(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=Pp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return id.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);Vs(e)}function Vs(e,t){const n=new vt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=K0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Zx(e){const t={};let n;for(n in e)id.call(e,n)&&(t[eb(n)]=e[n]);return t}function eb(e){let t=e.replace(Fx,tb);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tb(e){return"-"+e.toLowerCase()}const tc={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"]},nb={};function ud(e,t){const n=nb,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return e1(e,s,a)}function e1(e,t,n){if(rb(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 Vp(e.children,t,n)}return Array.isArray(e)?Vp(e,t,n):""}function Vp(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=e1(e[a],t,n);return s.join("")}function rb(e){return!!(e&&typeof e=="object")}const qp=document.createElement("i");function od(e){const t="&"+e+";";qp.innerHTML=t;const n=qp.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 Qp={}.hasOwnProperty;function t1(e){const t={};let n=-1;for(;++n<e.length;)ib(t,e[n]);return t}function ib(e,t){let n;for(n in t){const a=(Qp.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){Qp.call(a,l)||(a[l]=[]);const d=o[l];sb(a[l],Array.isArray(d)?d:d?[d]:[])}}}function sb(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 n1(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 gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Rt=yr(/[A-Za-z]/),At=yr(/[\dA-Za-z]/),ab=yr(/[#-'*+\--9=?A-Z^-~]/);function Ru(e){return e!==null&&(e<32||e===127)}const Ac=yr(/\d/),ub=yr(/[\dA-Fa-f]/),ob=yr(/[!-/:-@[-`{-~]/);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 Vu=yr(new RegExp("\\p{P}|\\p{S}","u")),Yr=yr(/\s/);function yr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Di(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&At(e.charCodeAt(n+1))&&At(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(l=String.fromCharCode(o,d),a=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(s,n),encodeURIComponent(l)),s=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function Me(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return Fe(f)?(e.enter(n),d(f)):t(f)}function d(f){return Fe(f)&&o++<a?(e.consume(f),d):(e.exit(n),t(f))}}const lb={tokenize:cb};function cb(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 db={tokenize:fb},Gp={tokenize:hb};function fb(e){const t=this,n=[];let s=0,a,o,l;return d;function d(z){if(s<n.length){const G=n[s];return t.containerState=G[1],e.attempt(G[0].continuation,f,h)(z)}return h(z)}function f(z){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&F();const G=t.events.length;let ne=G,D;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){D=t.events[ne][1].end;break}A(s);let q=G;for(;q<t.events.length;)t.events[q][1].end={...D},q++;return Qt(t.events,ne+1,0,t.events.slice(G)),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(Gp,E,g)(z)}function E(z){return a&&F(),A(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(Gp,b,N)(z)}function b(z){return s++,n.push([t.currentConstruct,t.containerState]),x(z)}function N(z){if(z===null){a&&F(),A(0),e.consume(z);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),w(z)}function w(z){if(z===null){O(e.exit("chunkFlow"),!0),A(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),w)}function O(z,G){const ne=t.sliceStream(z);if(G&&ne.push(null),z.previous=o,o&&(o.next=z),o=z,a.defineSkip(z.start),a.write(ne),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 Z=q,oe,$;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(oe){$=t.events[Z][1].end;break}oe=!0}for(A(s),D=q;D<t.events.length;)t.events[D][1].end={...$},D++;Qt(t.events,Z+1,0,t.events.slice(q)),t.events.length=D}}function A(z){let G=n.length;for(;G-- >z;){const ne=n[G];t.containerState=ne[1],ne[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 hb(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 wi(e){if(e===null||Ve(e)||Yr(e))return 1;if(Vu(e))return 2}function qu(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const vc={name:"attention",resolveAll:pb,tokenize:mb};function pb(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};Kp(g,-f),Kp(x,f),l={type:f>1?"strongSequence":"emphasisSequence",start:g,end:{...e[s][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:f>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:f>1?"strong":"emphasis",start:{...l.start},end:{...d.end}},e[s][1].end={...l.start},e[n][1].start={...d.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=rn(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=rn(h,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rn(h,qu(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=rn(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(E=2,h=rn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):E=0,Qt(e,s-1,n-s+3,h),n=s+h.length-E-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function mb(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=wi(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=wi(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 Kp(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gb={name:"autolink",tokenize:Eb};function Eb(e,t,n){let s=0;return a;function a(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(b){return Rt(b)?(e.consume(b),l):b===64?n(b):h(b)}function l(b){return b===43||b===45||b===46||At(b)?(s=1,d(b)):h(b)}function d(b){return b===58?(e.consume(b),s=0,f):(b===43||b===45||b===46||At(b))&&s++<32?(e.consume(b),d):(s=0,h(b))}function f(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||Ru(b)?n(b):(e.consume(b),f)}function h(b){return b===64?(e.consume(b),E):ab(b)?(e.consume(b),h):n(b)}function E(b){return At(b)?g(b):n(b)}function g(b){return b===46?(e.consume(b),s=0,E):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):x(b)}function x(b){if((b===45||At(b))&&s++<63){const N=b===45?x:g;return e.consume(b),N}return n(b)}}const ea={partial:!0,tokenize:Tb};function Tb(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 r1={continuation:{tokenize:xb},exit:bb,name:"blockQuote",tokenize:yb};function yb(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 xb(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(r1,t,n)(l)}}function bb(e){e.exit("blockQuote")}const i1={name:"characterEscape",tokenize:kb};function kb(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 ob(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const s1={name:"characterReference",tokenize:Sb};function Sb(e,t,n){const s=this;let a=0,o,l;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),f}function f(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=At,E(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=ub,E):(e.enter("characterReferenceValue"),o=7,l=Ac,E(g))}function E(g){if(g===59&&a){const x=e.exit("characterReferenceValue");return l===At&&!od(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 Xp={partial:!0,tokenize:Cb},Jp={concrete:!0,name:"codeFenced",tokenize:_b};function _b(e,t,n){const s=this,a={partial:!0,tokenize:ne};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(Xp,w,G)(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 w(D){return e.attempt(a,G,O)(D)}function O(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),A}function A(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(Xp,w,G)(D):(e.enter("codeFlowValue"),z(D))}function z(D){return D===null||ye(D)?(e.exit("codeFlowValue"),F(D)):(e.consume(D),z)}function G(D){return e.exit("codeFenced"),t(D)}function ne(D,q,Z){let oe=0;return $;function $(re){return D.enter("lineEnding"),D.consume(re),D.exit("lineEnding"),le}function le(re){return D.enter("codeFencedFence"),Fe(re)?Me(D,ce,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):ce(re)}function ce(re){return re===d?(D.enter("codeFencedFenceSequence"),Ce(re)):Z(re)}function Ce(re){return re===d?(oe++,D.consume(re),Ce):oe>=l?(D.exit("codeFencedFenceSequence"),Fe(re)?Me(D,fe,"whitespace")(re):fe(re)):Z(re)}function fe(re){return re===null||ye(re)?(D.exit("codeFencedFence"),q(re)):Z(re)}}}function Cb(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 nc={name:"codeIndented",tokenize:Ab},Nb={partial:!0,tokenize:vb};function Ab(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(Nb,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 vb(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 wb={name:"codeText",previous:Lb,resolve:Ib,tokenize:Rb};function Ib(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 Lb(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Rb(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 Ob{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&&vs(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),vs(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vs(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);vs(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vs(this.left,n.reverse())}}}function vs(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function a1(e){const t={};let n=-1,s,a,o,l,d,f,h;const E=new Ob(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,Db(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 Db(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,w=0;const O=[w];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&&(w=x+1,O.push(w),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 A=d.slice(O[x],O[x+1]),F=o.pop();f.push([F,F+A.length-1]),e.splice(F,2,A)}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 Pb={resolve:Fb,tokenize:Bb},Mb={partial:!0,tokenize:Ub};function Fb(e){return a1(e),e}function Bb(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(Mb,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 Ub(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 u1(e,t,n,s,a,o,l,d,f){const h=f||Number.POSITIVE_INFINITY;let E=0;return g;function g(A){return A===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(A),e.exit(o),x):A===null||A===32||A===41||Ru(A)?n(A):(e.enter(s),e.enter(l),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(A))}function x(A){return A===62?(e.enter(o),e.consume(A),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===62?(e.exit("chunkString"),e.exit(d),x(A)):A===null||A===60||ye(A)?n(A):(e.consume(A),A===92?N:b)}function N(A){return A===60||A===62||A===92?(e.consume(A),b):b(A)}function w(A){return!E&&(A===null||A===41||Ve(A))?(e.exit("chunkString"),e.exit(d),e.exit(l),e.exit(s),t(A)):E<h&&A===40?(e.consume(A),E++,w):A===41?(e.consume(A),E--,w):A===null||A===32||A===40||Ru(A)?n(A):(e.consume(A),A===92?O:w)}function O(A){return A===40||A===41||A===92?(e.consume(A),w):w(A)}}function o1(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 l1(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 Ms(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 Hb={name:"definition",tokenize:zb},jb={partial:!0,tokenize:$b};function zb(e,t,n){const s=this;let a;return o;function o(b){return e.enter("definition"),l(b)}function l(b){return o1.call(s,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return a=gn(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)?Ms(e,h)(b):h(b)}function h(b){return u1(e,E,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function E(b){return e.attempt(jb,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 $b(e,t,n){return s;function s(d){return Ve(d)?Ms(e,a)(d):n(d)}function a(d){return l1(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 Wb={name:"hardBreakEscape",tokenize:Yb};function Yb(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 Vb={name:"headingAtx",resolve:qb,tokenize:Qb};function qb(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 Qb(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 Gb=["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"],Zp=["pre","script","style","textarea"],Kb={concrete:!0,name:"htmlFlow",resolveTo:Zb,tokenize:ek},Xb={partial:!0,tokenize:nk},Jb={partial:!0,tokenize:tk};function Zb(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 ek(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,w):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:ce:N):n(v)}function w(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,_e=l.toLowerCase();return!he&&!o&&Zp.includes(_e)?(a=1,s.interrupt?t(v):ce(v)):Gb.includes(l.toLowerCase())?(a=6,he?(e.consume(v),A):s.interrupt?t(v):ce(v)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(v):o?F(v):z(v))}return v===45||At(v)?(e.consume(v),l+=String.fromCharCode(v),O):n(v)}function A(v){return v===62?(e.consume(v),s.interrupt?t:ce):n(v)}function F(v){return Fe(v)?(e.consume(v),F):$(v)}function z(v){return v===47?(e.consume(v),$):v===58||v===95||Rt(v)?(e.consume(v),G):Fe(v)?(e.consume(v),z):$(v)}function G(v){return v===45||v===46||v===58||v===95||At(v)?(e.consume(v),G):ne(v)}function ne(v){return v===61?(e.consume(v),D):Fe(v)?(e.consume(v),ne):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):Z(v)}function q(v){return v===f?(e.consume(v),f=null,oe):v===null||ye(v)?n(v):(e.consume(v),q)}function Z(v){return v===null||v===34||v===39||v===47||v===60||v===61||v===62||v===96||Ve(v)?ne(v):(e.consume(v),Z)}function oe(v){return v===47||v===62||Fe(v)?z(v):n(v)}function $(v){return v===62?(e.consume(v),le):n(v)}function le(v){return v===null||ye(v)?ce(v):Fe(v)?(e.consume(v),le):n(v)}function ce(v){return v===45&&a===2?(e.consume(v),ve):v===60&&a===1?(e.consume(v),Ie):v===62&&a===4?(e.consume(v),M):v===63&&a===3?(e.consume(v),S):v===93&&a===5?(e.consume(v),Ee):ye(v)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Xb,Y,Ce)(v)):v===null||ye(v)?(e.exit("htmlFlowData"),Ce(v)):(e.consume(v),ce)}function Ce(v){return e.check(Jb,fe,Y)(v)}function fe(v){return e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),re}function re(v){return v===null||ye(v)?Ce(v):(e.enter("htmlFlowData"),ce(v))}function ve(v){return v===45?(e.consume(v),S):ce(v)}function Ie(v){return v===47?(e.consume(v),l="",ae):ce(v)}function ae(v){if(v===62){const he=l.toLowerCase();return Zp.includes(he)?(e.consume(v),M):ce(v)}return Rt(v)&&l.length<8?(e.consume(v),l+=String.fromCharCode(v),ae):ce(v)}function Ee(v){return v===93?(e.consume(v),S):ce(v)}function S(v){return v===62?(e.consume(v),M):v===45&&a===2?(e.consume(v),S):ce(v)}function M(v){return v===null||ye(v)?(e.exit("htmlFlowData"),Y(v)):(e.consume(v),M)}function Y(v){return e.exit("htmlFlow"),t(v)}}function tk(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 nk(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(ea,t,n)}}const rk={name:"htmlText",tokenize:ik};function ik(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),ne):S===63?(e.consume(S),z):Rt(S)?(e.consume(S),Z):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,Ie(S)):(e.consume(S),g)}function x(S){return S===45?(e.consume(S),b):g(S)}function b(S){return S===62?ve(S):S===45?x(S):g(S)}function N(S){const M="CDATA[";return S===M.charCodeAt(o++)?(e.consume(S),o===M.length?w:N):n(S)}function w(S){return S===null?n(S):S===93?(e.consume(S),O):ye(S)?(l=w,Ie(S)):(e.consume(S),w)}function O(S){return S===93?(e.consume(S),A):w(S)}function A(S){return S===62?ve(S):S===93?(e.consume(S),A):w(S)}function F(S){return S===null||S===62?ve(S):ye(S)?(l=F,Ie(S)):(e.consume(S),F)}function z(S){return S===null?n(S):S===63?(e.consume(S),G):ye(S)?(l=z,Ie(S)):(e.consume(S),z)}function G(S){return S===62?ve(S):z(S)}function ne(S){return Rt(S)?(e.consume(S),D):n(S)}function D(S){return S===45||At(S)?(e.consume(S),D):q(S)}function q(S){return ye(S)?(l=q,Ie(S)):Fe(S)?(e.consume(S),q):ve(S)}function Z(S){return S===45||At(S)?(e.consume(S),Z):S===47||S===62||Ve(S)?oe(S):n(S)}function oe(S){return S===47?(e.consume(S),ve):S===58||S===95||Rt(S)?(e.consume(S),$):ye(S)?(l=oe,Ie(S)):Fe(S)?(e.consume(S),oe):ve(S)}function $(S){return S===45||S===46||S===58||S===95||At(S)?(e.consume(S),$):le(S)}function le(S){return S===61?(e.consume(S),ce):ye(S)?(l=le,Ie(S)):Fe(S)?(e.consume(S),le):oe(S)}function ce(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),a=S,Ce):ye(S)?(l=ce,Ie(S)):Fe(S)?(e.consume(S),ce):(e.consume(S),fe)}function Ce(S){return S===a?(e.consume(S),a=void 0,re):S===null?n(S):ye(S)?(l=Ce,Ie(S)):(e.consume(S),Ce)}function fe(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Ve(S)?oe(S):(e.consume(S),fe)}function re(S){return S===47||S===62||Ve(S)?oe(S):n(S)}function ve(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function Ie(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),ae}function ae(S){return Fe(S)?Me(e,Ee,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):Ee(S)}function Ee(S){return e.enter("htmlTextData"),l(S)}}const ld={name:"labelEnd",resolveAll:ok,resolveTo:lk,tokenize:ck},sk={tokenize:dk},ak={tokenize:fk},uk={tokenize:hk};function ok(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 lk(e,t){let n=e.length,s=0,a,o,l,d;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},E={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[l-2][1].start}};return d=[["enter",f,t],["enter",h,t]],d=rn(d,e.slice(o+1,o+s+3)),d=rn(d,[["enter",E,t]]),d=rn(d,qu(t.parser.constructs.insideSpan.null,e.slice(o+s+4,l-3),t)),d=rn(d,[["exit",E,t],e[l-2],e[l-1],["exit",h,t]]),d=rn(d,e.slice(l+1)),d=rn(d,[["exit",f,t]]),Qt(e,o,e.length,d),e}function ck(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(gn(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(sk,E,l?E:g)(x):x===91?e.attempt(ak,E,l?h:g)(x):l?E(x):g(x)}function h(x){return e.attempt(uk,E,g)(x)}function E(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function dk(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)?Ms(e,o)(g):o(g)}function o(g){return g===41?E(g):u1(e,l,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function l(g){return Ve(g)?Ms(e,f)(g):E(g)}function d(g){return n(g)}function f(g){return g===34||g===39||g===40?l1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):E(g)}function h(g){return Ve(g)?Ms(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 fk(e,t,n){const s=this;return a;function a(d){return o1.call(s,e,o,l,"reference","referenceMarker","referenceString")(d)}function o(d){return s.parser.defined.includes(gn(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function l(d){return n(d)}}function hk(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 pk={name:"labelStartImage",resolveAll:ld.resolveAll,tokenize:mk};function mk(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 gk={name:"labelStartLink",resolveAll:ld.resolveAll,tokenize:Ek};function Ek(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 rc={name:"lineEnding",tokenize:Tk};function Tk(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Me(e,t,"linePrefix")}}const Au={name:"thematicBreak",tokenize:yk};function yk(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 Ht={continuation:{tokenize:Sk},exit:Ck,name:"list",tokenize:kk},xk={partial:!0,tokenize:Nk},bk={partial:!0,tokenize:_k};function kk(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:Ac(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(Au,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 Ac(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(ea,s.interrupt?n:E,e.attempt(xk,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 Sk(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(ea,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(bk,t,l)(d))}function l(d){return s.containerState._closeFlow=!0,s.interrupt=void 0,Me(e,e.attempt(Ht,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function _k(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 Ck(e){e.exit(this.containerState.type)}function Nk(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 em={name:"setextUnderline",resolveTo:Ak,tokenize:vk};function Ak(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 vk(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 wk={tokenize:Ik};function Ik(e){const t=this,n=e.attempt(ea,s,e.attempt(this.parser.constructs.flowInitial,a,Me(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Pb,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 Lk={resolveAll:d1()},Rk=c1("string"),Ok=c1("text");function c1(e){return{resolveAll:d1(e==="text"?Dk: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 d1(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 Dk(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 Pk={42:Ht,43:Ht,45:Ht,48:Ht,49:Ht,50:Ht,51:Ht,52:Ht,53:Ht,54:Ht,55:Ht,56:Ht,57:Ht,62:r1},Mk={91:Hb},Fk={[-2]:nc,[-1]:nc,32:nc},Bk={35:Vb,42:Au,45:[em,Au],60:Kb,61:em,95:Au,96:Jp,126:Jp},Uk={38:s1,92:i1},Hk={[-5]:rc,[-4]:rc,[-3]:rc,33:pk,38:s1,42:vc,60:[gb,rk],91:gk,92:[Wb,i1],93:ld,95:vc,96:wb},jk={null:[vc,Lk]},zk={null:[42,95]},$k={null:[]},Wk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:zk,contentInitial:Mk,disable:$k,document:Pk,flow:Bk,flowInitial:Fk,insideSpan:jk,string:Uk,text:Hk},Symbol.toStringTag,{value:"Module"}));function Yk(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(ne),check:q(D),consume:F,enter:z,exit:G,interrupt:q(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,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(le){return l=rn(l,le),O(),l[l.length-1]!==null?[]:(Z(t,0),h.events=qu(o,h.events,h),h.events)}function x(le,ce){return qk(b(le),ce)}function b(le){return Vk(l,le)}function N(){const{_bufferIndex:le,_index:ce,line:Ce,column:fe,offset:re}=s;return{_bufferIndex:le,_index:ce,line:Ce,column:fe,offset:re}}function w(le){a[le.line]=le.column,$()}function O(){let le;for(;s._index<l.length;){const ce=l[s._index];if(typeof ce=="string")for(le=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===le&&s._bufferIndex<ce.length;)A(ce.charCodeAt(s._bufferIndex));else A(ce)}}function A(le){E=E(le)}function F(le){ye(le)?(s.line++,s.column=1,s.offset+=le===-3?2:1,$()):le!==-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=le}function z(le,ce){const Ce=ce||{};return Ce.type=le,Ce.start=N(),h.events.push(["enter",Ce,h]),d.push(Ce),Ce}function G(le){const ce=d.pop();return ce.end=N(),h.events.push(["exit",ce,h]),ce}function ne(le,ce){Z(le,ce.from)}function D(le,ce){ce.restore()}function q(le,ce){return Ce;function Ce(fe,re,ve){let Ie,ae,Ee,S;return Array.isArray(fe)?Y(fe):"tokenize"in fe?Y([fe]):M(fe);function M(xe){return Be;function Be(Re){const ze=Re!==null&&xe[Re],at=Re!==null&&xe.null,Rn=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(at)?at:at?[at]:[]];return Y(Rn)(Re)}}function Y(xe){return Ie=xe,ae=0,xe.length===0?ve:v(xe[ae])}function v(xe){return Be;function Be(Re){return S=oe(),Ee=xe,xe.partial||(h.currentConstruct=xe),xe.name&&h.parser.constructs.disable.null.includes(xe.name)?_e():xe.tokenize.call(ce?Object.assign(Object.create(h),ce):h,f,he,_e)(Re)}}function he(xe){return le(Ee,S),re}function _e(xe){return S.restore(),++ae<Ie.length?v(Ie[ae]):ve}}}function Z(le,ce){le.resolveAll&&!o.includes(le)&&o.push(le),le.resolve&&Qt(h.events,ce,h.events.length-ce,le.resolve(h.events.slice(ce),h)),le.resolveTo&&(h.events=le.resolveTo(h.events,h))}function oe(){const le=N(),ce=h.previous,Ce=h.currentConstruct,fe=h.events.length,re=Array.from(d);return{from:fe,restore:ve};function ve(){s=le,h.previous=ce,h.currentConstruct=Ce,h.events.length=fe,d=re,$()}}function $(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function Vk(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 qk(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 Qk(e){const s={constructs:t1([Wk,...(e||{}).extensions||[]]),content:a(lb),defined:[],document:a(db),flow:a(wk),lazy:{},string:a(Rk),text:a(Ok)};return s;function a(o){return l;function l(d){return Yk(s,o,d)}}}function Gk(e){for(;!a1(e););return e}const tm=/[\0\t\n\r]/g;function Kk(){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(tm.lastIndex=g,h=tm.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 Xk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Jk(e){return e.replace(Xk,Zk)}function Zk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return n1(n.slice(o?2:1),o?16:10)}return od(n)||e}const f1={}.hasOwnProperty;function eS(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),tS(n)(Gk(Qk(n).document().write(Kk()(e,t,!0))))}function tS(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ei),autolinkProtocol:oe,autolinkEmail:oe,atxHeading:o(Ui),blockQuote:o(at),characterEscape:oe,characterReference:oe,codeFenced:o(Rn),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(Rn,l),codeText:o(sa,l),codeTextData:oe,data:oe,codeFlowValue:oe,definition:o(Jr),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(Bi),hardBreakEscape:o(Hi),hardBreakTrailing:o(Hi),htmlFlow:o(Zr,l),htmlFlowData:oe,htmlText:o(Zr,l),htmlTextData:oe,image:o(aa),label:l,link:o(ei),listItem:o(Vn),listItemValue:x,listOrdered:o(Yn,g),listUnordered:o(Yn),paragraph:o(ji),reference:v,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(Ui),strong:o(ua),thematicBreak:o(la)},exit:{atxHeading:f(),atxHeadingSequence:ne,autolink:f(),autolinkEmail:ze,autolinkProtocol:Re,blockQuote:f(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:xe,characterReference:Be,codeFenced:f(O),codeFencedFence:w,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:$,codeIndented:f(A),codeText:f(re),codeTextData:$,data:$,definition:f(),definitionDestinationString:G,definitionLabelString:F,definitionTitleString:z,emphasis:f(),hardBreakEscape:f(ce),hardBreakTrailing:f(ce),htmlFlow:f(Ce),htmlFlowData:$,htmlText:f(fe),htmlTextData:$,image:f(Ie),label:Ee,labelText:ae,lineEnding:le,link:f(ve),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:he,resourceDestinationString:S,resourceTitleString:M,resource:Y,setextHeading:f(Z),setextHeadingLineSequence:q,setextHeadingText:D,strong:f(),thematicBreak:f()}};h1(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(Q){let ue={type:"root",children:[]};const Ne={stack:[ue],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]];f1.call(Et,Q[Ue][1].type)&&Et[Q[Ue][1].type].call(Object.assign({sliceSerialize:Q[Ue][2].sliceSerialize},Ne),Q[Ue][1])}if(Ne.tokenStack.length>0){const Et=Ne.tokenStack[Ne.tokenStack.length-1];(Et[1]||nm).call(Ne,void 0,Et[0])}for(ue.position={start:hr(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:hr(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ue=-1;++Ue<t.transforms.length;)ue=t.transforms[Ue](ue)||ue;return ue}function a(Q,ue,Ne){let Oe=ue-1,Ue=-1,Et=!1,On,Kt,qn,kr;for(;++Oe<=Ne;){const Tt=Q[Oe];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?Ue++:Ue--,kr=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(On&&!kr&&!Ue&&!qn&&(qn=Oe),kr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kr=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(On){let bn=Oe;for(Kt=void 0;bn--;){const zt=Q[bn];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=bn}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)&&(On._spread=!0),On.end=Object.assign({},Kt?Q[Kt][1].start:Tt[1].end),Q.splice(Kt||Oe,0,["exit",On,Tt[2]]),Oe++,Ne++}if(Tt[1].type==="listItemPrefix"){const bn={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};On=bn,Q.splice(Oe,0,["enter",bn,Tt[2]]),Oe++,Ne++,qn=void 0,kr=!0}}}return Q[ue][1]._spread=Et,Ne}function o(Q,ue){return Ne;function Ne(Oe){d.call(this,Q(Oe),Oe),ue&&ue.call(this,Oe)}}function l(){this.stack.push({type:"fragment",children:[]})}function d(Q,ue,Ne){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ue,Ne||void 0]),Q.position={start:hr(ue.start),end:void 0}}function f(Q){return ue;function ue(Ne){Q&&Q.call(this,Ne),h.call(this,Ne)}}function h(Q,ue){const Ne=this.stack.pop(),Oe=this.tokenStack.pop();if(Oe)Oe[0].type!==Q.type&&(ue?ue.call(this,Q,Oe[0]):(Oe[1]||nm).call(this,Q,Oe[0]));else throw new Error("Cannot close `"+Q.type+"` ("+Ps({start:Q.start,end:Q.end})+"): it’s not open");Ne.position.end=hr(Q.end)}function E(){return ud(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(Q){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=Q}function N(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=Q}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function A(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q.replace(/(\r?\n|\r)$/g,"")}function F(Q){const ue=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ue,Ne.identifier=gn(this.sliceSerialize(Q)).toLowerCase()}function z(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function G(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function ne(Q){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Ne=this.sliceSerialize(Q).length;ue.depth=Ne}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function q(Q){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function oe(Q){const Ne=this.stack[this.stack.length-1].children;let Oe=Ne[Ne.length-1];(!Oe||Oe.type!=="text")&&(Oe=oa(),Oe.position={start:hr(Q.start),end:void 0},Ne.push(Oe)),this.stack.push(Oe)}function $(Q){const ue=this.stack.pop();ue.value+=this.sliceSerialize(Q),ue.position.end=hr(Q.end)}function le(Q){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=ue.children[ue.children.length-1];Ne.position.end=hr(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ue.type)&&(oe.call(this,Q),$.call(this,Q))}function ce(){this.data.atHardBreak=!0}function Ce(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function fe(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function re(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.value=Q}function ve(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function Ie(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ue,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ae(Q){const ue=this.sliceSerialize(Q),Ne=this.stack[this.stack.length-2];Ne.label=Jk(ue),Ne.identifier=gn(ue).toLowerCase()}function Ee(){const Q=this.stack[this.stack.length-1],ue=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const Oe=Q.children;Ne.children=Oe}else Ne.alt=ue}function S(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.url=Q}function M(){const Q=this.resume(),ue=this.stack[this.stack.length-1];ue.title=Q}function Y(){this.data.inReference=void 0}function v(){this.data.referenceType="collapsed"}function he(Q){const ue=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ue,Ne.identifier=gn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function _e(Q){this.data.characterReferenceType=Q.type}function xe(Q){const ue=this.sliceSerialize(Q),Ne=this.data.characterReferenceType;let Oe;Ne?(Oe=n1(ue,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Oe=od(ue);const Ue=this.stack[this.stack.length-1];Ue.value+=Oe}function Be(Q){const ue=this.stack.pop();ue.position.end=hr(Q.end)}function Re(Q){$.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(Q)}function ze(Q){$.call(this,Q);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(Q)}function at(){return{type:"blockquote",children:[]}}function Rn(){return{type:"code",lang:null,meta:null,value:""}}function sa(){return{type:"inlineCode",value:""}}function Jr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Bi(){return{type:"emphasis",children:[]}}function Ui(){return{type:"heading",depth:0,children:[]}}function Hi(){return{type:"break"}}function Zr(){return{type:"html",value:""}}function aa(){return{type:"image",title:null,url:"",alt:null}}function ei(){return{type:"link",title:null,url:"",children:[]}}function Yn(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Vn(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function ji(){return{type:"paragraph",children:[]}}function ua(){return{type:"strong",children:[]}}function oa(){return{type:"text",value:""}}function la(){return{type:"thematicBreak"}}}function hr(e){return{line:e.line,column:e.column,offset:e.offset}}function h1(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?h1(e,s):nS(e,s)}}function nS(e,t){let n;for(n in t)if(f1.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 nm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ps({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ps({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ps({start:t.start,end:t.end})+") is still open")}function rS(e){const t=this;t.parser=n;function n(s){return eS(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function iS(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 sS(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
61
+ `}]}function aS(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 uS(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oS(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lS(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",s=String(t.identifier).toUpperCase(),a=Di(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 cS(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 dS(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function p1(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 fS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return p1(e,t);const a={src:Di(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 hS(e,t){const n={src:Di(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 pS(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 mS(e,t){const n=String(t.identifier).toUpperCase(),s=e.definitionById.get(n);if(!s)return p1(e,t);const a={href:Di(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 gS(e,t){const n={href:Di(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 ES(e,t,n){const s=e.all(t),a=n?TS(n):m1(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 TS(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=m1(n[s])}return t}function m1(e){const t=e.spread;return t??e.children.length>1}function yS(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 xS(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bS(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function kS(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function SS(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=In(t.children[1]),f=Yu(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 _S(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 CS(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const rm=9,im=32;function NS(e){const t=String(e),n=/\r?\n|\r/g;let s=n.exec(t),a=0;const o=[];for(;s;)o.push(sm(t.slice(a,s.index),a>0,!0),s[0]),a=s.index+s[0].length,s=n.exec(t);return o.push(sm(t.slice(a),a>0,!1)),o.join("")}function sm(e,t,n){let s=0,a=e.length;if(t){let o=e.codePointAt(s);for(;o===rm||o===im;)s++,o=e.codePointAt(s)}if(n){let o=e.codePointAt(a-1);for(;o===rm||o===im;)a--,o=e.codePointAt(a-1)}return a>s?e.slice(s,a):""}function AS(e,t){const n={type:"text",value:NS(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function vS(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wS={blockquote:iS,break:sS,code:aS,delete:uS,emphasis:oS,footnoteReference:lS,heading:cS,html:dS,imageReference:fS,image:hS,inlineCode:pS,linkReference:mS,link:gS,listItem:ES,list:yS,paragraph:xS,root:bS,strong:kS,table:SS,tableCell:CS,tableRow:_S,text:AS,thematicBreak:vS,toml:yu,yaml:yu,definition:yu,footnoteDefinition:yu};function yu(){}const g1=-1,Qu=0,Fs=1,Ou=2,cd=3,dd=4,fd=5,hd=6,E1=7,T1=8,IS=typeof self=="object"?self:globalThis,am=(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 IS[e](t)},LS=(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 Qu:case g1:return n(l,a);case Fs:{const d=n([],a);for(const f of l)d.push(s(f));return d}case Ou:{const d=n({},a);for(const[f,h]of l)d[s(f)]=s(h);return d}case cd:return n(new Date(l),a);case dd:{const{source:d,flags:f}=l;return n(new RegExp(d,f),a)}case fd:{const d=n(new Map,a);for(const[f,h]of l)d.set(s(f),s(h));return d}case hd:{const d=n(new Set,a);for(const f of l)d.add(s(f));return d}case E1:{const{name:d,message:f}=l;return n(am(d,f),a)}case T1: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(am(o,l),a)};return s},um=e=>LS(new Map,e)(0),Hr="",{toString:RS}={},{keys:OS}=Object,ws=e=>{const t=typeof e;if(t!=="object"||!e)return[Qu,t];const n=RS.call(e).slice(8,-1);switch(n){case"Array":return[Fs,Hr];case"Object":return[Ou,Hr];case"Date":return[cd,Hr];case"RegExp":return[dd,Hr];case"Map":return[fd,Hr];case"Set":return[hd,Hr];case"DataView":return[Fs,n]}return n.includes("Array")?[Fs,n]:n.includes("Error")?[E1,n]:[Ou,n]},xu=([e,t])=>e===Qu&&(t==="function"||t==="symbol"),DS=(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]=ws(l);switch(d){case Qu:{let E=l;switch(f){case"bigint":d=T1,E=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);E=null;break;case"undefined":return a([g1],l)}return a([d,E],l)}case Fs:{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 Ou:{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 OS(l))(e||!xu(ws(l[x])))&&E.push([o(x),o(l[x])]);return g}case cd:return a([d,isNaN(l.getTime())?Hr:l.toISOString()],l);case dd:{const{source:E,flags:g}=l;return a([d,{source:E,flags:g}],l)}case fd:{const E=[],g=a([d,E],l);for(const[x,b]of l)(e||!(xu(ws(x))||xu(ws(b))))&&E.push([o(x),o(b)]);return g}case hd:{const E=[],g=a([d,E],l);for(const x of l)(e||!xu(ws(x)))&&E.push(o(x));return g}}const{message:h}=l;return a([d,{name:f,message:h}],l)};return o},om=(e,{json:t,lossy:n}={})=>{const s=[];return DS(!(t||n),!!t,new Map,s)(e),s},Vr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?um(om(e,t)):structuredClone(e):(e,t)=>um(om(e,t));function PS(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 MS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function FS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||PS,s=e.options.footnoteBackLabel||MS,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=Di(g.toLowerCase());let b=0;const N=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++b<=w;){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 A={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(E,!0)};e.patch(h,A),d.push(A)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Vr(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 Gu=(function(e){if(e==null)return jS;if(typeof e=="function")return Ku(e);if(typeof e=="object")return Array.isArray(e)?BS(e):US(e);if(typeof e=="string")return HS(e);throw new Error("Expected function, string, or object as test")});function BS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Gu(e[n]);return Ku(s);function s(...a){let o=-1;for(;++o<t.length;)if(t[o].apply(this,a))return!0;return!1}}function US(e){const t=e;return Ku(n);function n(s){const a=s;let o;for(o in e)if(a[o]!==t[o])return!1;return!0}}function HS(e){return Ku(t);function t(n){return n&&n.type===e}}function Ku(e){return t;function t(n,s,a){return!!(zS(n)&&e.call(this,n,typeof s=="number"?s:void 0,a||void 0))}}function jS(){return!0}function zS(e){return e!==null&&typeof e=="object"&&"type"in e}const y1=[],$S=!0,wc=!1,WS="skip";function x1(e,t,n,s){let a;typeof t=="function"&&typeof n!="function"?(s=n,n=t):a=t;const o=Gu(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=y1,N,w,O;if((!t||o(f,h,E[E.length-1]||void 0))&&(b=YS(n(f,E)),b[0]===wc))return b;if("children"in f&&f.children){const A=f;if(A.children&&b[0]!==WS)for(w=(s?A.children.length:-1)+l,O=E.concat(A);w>-1&&w<A.children.length;){const F=A.children[w];if(N=d(F,w,O)(),N[0]===wc)return N;w=typeof N[1]=="number"?N[1]:w+l}}return b}}}function YS(e){return Array.isArray(e)?e:typeof e=="number"?[$S,e]:e==null?y1:[e]}function Xu(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),x1(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 Ic={}.hasOwnProperty,VS={};function qS(e,t){const n=t||VS,s=new Map,a=new Map,o=new Map,l={...wS,...n.handlers},d={all:h,applyData:GS,definitionById:s,footnoteById:a,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:QS,wrap:XS};return Xu(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(Ic.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:w,...O}=E,A=Vr(O);return A.children=d.all(E),A}return Vr(E)}return(d.options.unknownHandler||KS)(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=lm(N.value)),!Array.isArray(N)&&N.type==="element")){const w=N.children[0];w&&w.type==="text"&&(w.value=lm(w.value))}Array.isArray(N)?g.push(...N):g.push(N)}}}return g}}function QS(e,t){e.position&&(t.position=G0(e))}function GS(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,Vr(o)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function KS(e,t){const n=t.data||{},s="value"in t&&!(Ic.call(n,"hProperties")||Ic.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 XS(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 lm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function cm(e,t){const n=qS(e,t),s=n.one(e,void 0),a=FS(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 JS(e,t){return e&&"run"in e?async function(n,s){const a=cm(n,{file:s,...t});await e.run(a,s)}:function(n,s){return cm(n,{file:s,...e||t})}}function dm(e){if(e)throw e}var ic,fm;function ZS(){if(fm)return ic;fm=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 ic=function f(){var h,E,g,x,b,N,w=arguments[0],O=1,A=arguments.length,F=!1;for(typeof w=="boolean"&&(F=w,w=arguments[1]||{},O=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});O<A;++O)if(h=arguments[O],h!=null)for(E in h)g=d(w,E),x=d(h,E),w!==x&&(F&&x&&(o(x)||(b=a(x)))?(b?(b=!1,N=g&&a(g)?g:[]):N=g&&o(g)?g:{},l(w,{name:E,newValue:f(F,N,x)})):typeof x<"u"&&l(w,{name:E,newValue:x}));return w},ic}var e_=ZS();const sc=$c(e_);function Lc(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 t_(){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?n_(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 n_(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:r_,dirname:i_,extname:s_,join:a_,sep:"/"};function r_(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ta(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 i_(e){if(ta(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 s_(e){ta(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 a_(...e){let t=-1,n;for(;++t<e.length;)ta(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":u_(n)}function u_(e){ta(e);const t=e.codePointAt(0)===47;let n=o_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function o_(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 ta(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const l_={cwd:c_};function c_(){return"/"}function Rc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d_(e){if(typeof e=="string")e=new URL(e);else if(!Rc(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 f_(e)}function f_(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 ac=["history","path","basename","stem","extname","dirname"];class b1{constructor(t){let n;t?Rc(t)?n={path:t}:typeof t=="string"||h_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":l_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<ac.length;){const o=ac[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)ac.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?An.basename(this.path):void 0}set basename(t){oc(t,"basename"),uc(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){hm(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(uc(t,"extname"),hm(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){Rc(t)&&(t=d_(t)),oc(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){oc(t,"stem"),uc(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 vt(t,n,s);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function uc(e,t){if(e&&e.includes(An.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+An.sep+"`")}function oc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function h_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p_=(function(e){const s=this.constructor.prototype,a=s[e],o=function(){return a.apply(o,arguments)};return Object.setPrototypeOf(o,s),o}),m_={}.hasOwnProperty;class pd extends p_{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=t_()}copy(){const t=new pd;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];t.use(...s)}return t.data(sc(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(dc("data",this.frozen),this.namespace[t]=n,this):m_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(dc("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=bu(t),s=this.parser||this.Parser;return lc("parse",s),s(String(n),n)}process(t,n){const s=this;return this.freeze(),lc("process",this.parser||this.Parser),cc("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(o,l){const d=bu(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);T_(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(),lc("processSync",this.parser||this.Parser),cc("processSync",this.compiler||this.Compiler),this.process(t,a),mm("processSync","process",n),s;function a(o,l){n=!0,dm(o),s=l}}run(t,n,s){pm(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=bu(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),mm("runSync","run",s),a;function o(l,d){dm(l),a=d,s=!0}}stringify(t,n){this.freeze();const s=bu(n),a=this.compiler||this.Compiler;return cc("stringify",a),pm(t),a(t,s)}use(t,...n){const s=this.attachers,a=this.namespace;if(dc("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=sc(!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 w=s[x][1];Lc(w)&&Lc(b)&&(b=sc(!0,w,b)),s[x]=[h,b,...N]}}}}const g_=new pd().freeze();function lc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function cc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function dc(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 pm(e){if(!Lc(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mm(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function bu(e){return E_(e)?e:new b1(e)}function E_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function T_(e){return typeof e=="string"||y_(e)}function y_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const x_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gm=[],Em={allowDangerousHtml:!0},b_=/^(https?|ircs?|mailto|xmpp)$/i,k_=[{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 S_(e){const t=__(e),n=C_(e);return N_(t.runSync(t.parse(n),n),e)}function __(e){const t=e.rehypePlugins||gm,n=e.remarkPlugins||gm,s=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Em}:Em;return g_().use(rS).use(n).use(JS,s).use(t)}function C_(e){const t=e.children||"",n=new b1;return typeof t=="string"&&(n.value=t),n}function N_(e,t){const n=t.allowedElements,s=t.allowElement,a=t.components,o=t.disallowedElements,l=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||A_;for(const E of k_)Object.hasOwn(t,E.from)&&(""+E.from+(E.to?"use `"+E.to+"` instead":"remove it")+x_+E.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Xu(e,h),Hx(e,{Fragment:y.Fragment,components:a,ignoreInvalidStyle:!0,jsx:y.jsx,jsxs:y.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 tc)if(Object.hasOwn(tc,b)&&Object.hasOwn(E.properties,b)){const N=E.properties[b],w=tc[b];(w===null||w.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 A_(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||b_.test(e.slice(0,t))?e:""}function Tm(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 v_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function w_(e,t,n){const a=Gu((n||{}).ignore||[]),o=I_(t);let l=-1;for(;++l<o.length;)x1(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 A=!1,F=[];x.lastIndex=0;let z=x.exec(h.value);for(;z;){const G=z.index,ne={index:z.index,input:z.input,stack:[...E,h]};let D=b(...z,ne);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?x.lastIndex=G+1:(N!==G&&F.push({type:"text",value:h.value.slice(N,G)}),Array.isArray(D)?F.push(...D):D&&F.push(D),N=G+z[0].length,A=!0),!x.global)break;z=x.exec(h.value)}return A?(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 I_(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([L_(a[0]),R_(a[1])])}return t}function L_(e){return typeof e=="string"?new RegExp(v_(e),"g"):e}function R_(e){return typeof e=="function"?e:function(){return e}}const fc="phrasing",hc=["autolink","link","image","label"];function O_(){return{transforms:[H_],enter:{literalAutolink:P_,literalAutolinkEmail:pc,literalAutolinkHttp:pc,literalAutolinkWww:pc},exit:{literalAutolink:U_,literalAutolinkEmail:B_,literalAutolinkHttp:M_,literalAutolinkWww:F_}}}function D_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:fc,notInConstruct:hc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:fc,notInConstruct:hc},{character:":",before:"[ps]",after:"\\/",inConstruct:fc,notInConstruct:hc}]}}function P_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function pc(e){this.config.enter.autolinkProtocol.call(this,e)}function M_(e){this.config.exit.autolinkProtocol.call(this,e)}function F_(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 B_(e){this.config.exit.autolinkEmail.call(this,e)}function U_(e){this.exit(e)}function H_(e){w_(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,j_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),z_]],{ignore:["link","linkReference"]})}function j_(e,t,n,s,a){let o="";if(!k1(a)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!$_(n)))return!1;const l=W_(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 z_(e,t,n,s){return!k1(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function $_(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 W_(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=Tm(e,"(");let o=Tm(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 k1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Yr(n)||Vu(n))&&(!t||n!==47)}S1.peek=Z_;function Y_(){this.buffer()}function V_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function q_(){this.buffer()}function Q_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function G_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K_(e){this.exit(e)}function X_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=gn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function J_(e){this.exit(e)}function Z_(){return"["}function S1(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 eC(){return{enter:{gfmFootnoteCallString:Y_,gfmFootnoteCall:V_,gfmFootnoteDefinitionLabelString:q_,gfmFootnoteDefinition:Q_},exit:{gfmFootnoteCallString:G_,gfmFootnoteCall:K_,gfmFootnoteDefinitionLabelString:X_,gfmFootnoteDefinition:J_}}}function tC(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:S1},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?_1:nC))),h(),f}}function nC(e,t,n){return t===0?e:_1(e,t,n)}function _1(e,t,n){return(n?"":" ")+e}const rC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];C1.peek=oC;function iC(){return{canContainEols:["delete"],enter:{strikethrough:aC},exit:{strikethrough:uC}}}function sC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:rC}],handlers:{delete:C1}}}function aC(e){this.enter({type:"delete",children:[]},e)}function uC(e){this.exit(e)}function C1(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 oC(){return"~"}function lC(e){return e.length}function cC(e,t){const n=t||{},s=(n.align||[]).concat(),a=n.stringLength||lC,o=[],l=[],d=[],f=[];let h=0,E=-1;for(;++E<e.length;){const w=[],O=[];let A=-1;for(e[E].length>h&&(h=e[E].length);++A<e[E].length;){const F=dC(e[E][A]);if(n.alignDelimiters!==!1){const z=a(F);O[A]=z,(f[A]===void 0||z>f[A])&&(f[A]=z)}w.push(F)}l[E]=w,d[E]=O}let g=-1;if(typeof s=="object"&&"length"in s)for(;++g<h;)o[g]=ym(s[g]);else{const w=ym(s);for(;++g<h;)o[g]=w}g=-1;const x=[],b=[];for(;++g<h;){const w=o[g];let O="",A="";w===99?(O=":",A=":"):w===108?O=":":w===114&&(A=":");let F=n.alignDelimiters===!1?1:Math.max(1,f[g]-O.length-A.length);const z=O+"-".repeat(F)+A;n.alignDelimiters!==!1&&(F=O.length+F+A.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 w=l[E],O=d[E];g=-1;const A=[];for(;++g<h;){const F=w[g]||"";let z="",G="";if(n.alignDelimiters!==!1){const ne=f[g]-(O[g]||0),D=o[g];D===114?z=" ".repeat(ne):D===99?ne%2?(z=" ".repeat(ne/2+.5),G=" ".repeat(ne/2-.5)):(z=" ".repeat(ne/2),G=z):G=" ".repeat(ne)}n.delimiterStart!==!1&&!g&&A.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&F==="")&&(n.delimiterStart!==!1||g)&&A.push(" "),n.alignDelimiters!==!1&&A.push(z),A.push(F),n.alignDelimiters!==!1&&A.push(G),n.padding!==!1&&A.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&A.push("|")}N.push(n.delimiterEnd===!1?A.join("").replace(/ +$/,""):A.join(""))}return N.join(`
72
+ `)}function dC(e){return e==null?"":String(e)}function ym(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 xm={}.hasOwnProperty;function N1(e,t){const n=t||{};function s(a,...o){let l=s.invalid;const d=s.handlers;if(a&&xm.call(a,e)){const f=String(a[e]);l=xm.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 fC(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()),hC);return a(),l}function hC(e,t,n){return">"+(n?"":" ")+e}function pC(e,t){return bm(e,t.inConstruct,!0)&&!bm(e,t.notInConstruct,!1)}function bm(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 km(e,t,n,s){let a=-1;for(;++a<n.unsafe.length;)if(n.unsafe[a].character===`
73
+ `&&pC(n.stack,n.unsafe[a]))return/[ \t]/.test(s.before)?"":" ";return`\\
74
+ `}function A1(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 mC(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 gC(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 EC(e,t,n,s){const a=gC(n),o=e.value||"",l=a==="`"?"GraveAccent":"Tilde";if(mC(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,TC);return g(),x}const d=n.createTracker(s),f=a.repeat(Math.max(A1(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 TC(e,t,n){return(n?"":" ")+e}function md(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 yC(e,t,n,s){const a=md(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 xC(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 qs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Du(e,t,n){const s=wi(e),a=wi(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}}v1.peek=bC;function v1(e,t,n,s){const a=xC(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=Du(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=qs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Du(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+qs(g));const b=l.move(a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function bC(e,t,n){return n.options.emphasis||"*"}function kC(e,t){let n=!1;return Xu(e,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,wc}),!!((!e.depth||e.depth<3)&&ud(e)&&(t.options.setext||n))}function SC(e,t,n,s){const a=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(s);if(kC(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=qs(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),d(),h}w1.peek=_C;function w1(e){return e.value||""}function _C(){return"<"}I1.peek=CC;function I1(e,t,n,s){const a=md(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 CC(){return"!"}L1.peek=NC;function L1(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 NC(){return"!"}R1.peek=AC;function R1(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 AC(){return"`"}function O1(e,t){const n=ud(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))}D1.peek=vC;function D1(e,t,n,s){const a=md(n),o=a==='"'?"Quote":"Apostrophe",l=n.createTracker(s);let d,f;if(O1(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 vC(e,t,n){return O1(e,n)?"<":"["}P1.peek=wC;function P1(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 wC(){return"["}function gd(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 IC(e){const t=gd(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 LC(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 M1(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 RC(e,t,n,s){const a=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?LC(n):gd(n);const d=e.ordered?l==="."?")":".":IC(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),M1(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 OC(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 DC(e,t,n,s){const a=OC(n);let o=n.bulletCurrent||gd(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 PC(e,t,n,s){const a=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,s);return o(),a(),l}const MC=Gu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function FC(e,t,n,s){return(e.children.some(function(l){return MC(l)})?n.containerPhrasing:n.containerFlow).call(n,e,s)}function BC(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}F1.peek=UC;function F1(e,t,n,s){const a=BC(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=Du(s.before.charCodeAt(s.before.length-1),h,a);E.inside&&(f=qs(h)+f.slice(1));const g=f.charCodeAt(f.length-1),x=Du(s.after.charCodeAt(0),g,a);x.inside&&(f=f.slice(0,-1)+qs(g));const b=l.move(a+a);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:E.outside},d+f+b}function UC(e,t,n){return n.options.strong||"*"}function HC(e,t,n,s){return n.safe(e.value,s)}function jC(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 zC(e,t,n){const s=(M1(n)+(n.options.ruleSpaces?" ":"")).repeat(jC(n));return n.options.ruleSpaces?s.slice(0,-1):s}const B1={blockquote:fC,break:km,code:EC,definition:yC,emphasis:v1,hardBreak:km,heading:SC,html:w1,image:I1,imageReference:L1,inlineCode:R1,link:D1,linkReference:P1,list:RC,listItem:DC,paragraph:PC,root:FC,strong:F1,text:HC,thematicBreak:zC};function $C(){return{enter:{table:WC,tableData:Sm,tableHeader:Sm,tableRow:VC},exit:{codeText:qC,table:YC,tableData:mc,tableHeader:mc,tableRow:mc}}}function WC(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 YC(e){this.exit(e),this.data.inTable=void 0}function VC(e){this.enter({type:"tableRow",children:[]},e)}function mc(e){this.exit(e)}function Sm(e){this.enter({type:"tableCell",children:[]},e)}function qC(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,QC));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function QC(e,t){return t==="|"?t:e}function GC(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,w,O){return h(E(b,w,O),b.align)}function d(b,N,w,O){const A=g(b,w,O),F=h([A]);return F.slice(0,F.indexOf(`
85
+ `))}function f(b,N,w,O){const A=w.enter("tableCell"),F=w.enter("phrasing"),z=w.containerPhrasing(b,{...O,before:o,after:o});return F(),A(),z}function h(b,N){return cC(b,{align:N,alignDelimiters:s,padding:n,stringLength:a})}function E(b,N,w){const O=b.children;let A=-1;const F=[],z=N.enter("table");for(;++A<O.length;)F[A]=g(O[A],N,w);return z(),F}function g(b,N,w){const O=b.children;let A=-1;const F=[],z=N.enter("tableRow");for(;++A<O.length;)F[A]=f(O[A],b,N,w);return z(),F}function x(b,N,w){let O=B1.inlineCode(b,N,w);return w.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function KC(){return{exit:{taskListCheckValueChecked:_m,taskListCheckValueUnchecked:_m,paragraph:JC}}}function XC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ZC}}}function _m(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function JC(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 ZC(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=B1.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 e3(){return[O_(),eC(),iC(),$C(),KC()]}function t3(e){return{extensions:[D_(),tC(e),sC(),GC(e),XC()]}}const n3={tokenize:o3,partial:!0},U1={tokenize:l3,partial:!0},H1={tokenize:c3,partial:!0},j1={tokenize:d3,partial:!0},r3={tokenize:f3,partial:!0},z1={name:"wwwAutolink",tokenize:a3,previous:W1},$1={name:"protocolAutolink",tokenize:u3,previous:Y1},Wn={name:"emailAutolink",tokenize:s3,previous:V1},Ln={};function i3(){return{text:Ln}}let Mr=48;for(;Mr<123;)Ln[Mr]=Wn,Mr++,Mr===58?Mr=65:Mr===91&&(Mr=97);Ln[43]=Wn;Ln[45]=Wn;Ln[46]=Wn;Ln[95]=Wn;Ln[72]=[Wn,$1];Ln[104]=[Wn,$1];Ln[87]=[Wn,z1];Ln[119]=[Wn,z1];function s3(e,t,n){const s=this;let a,o;return l;function l(g){return!Oc(g)||!V1.call(s,s.previous)||Ed(s.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return Oc(g)?(e.consume(g),d):g===64?(e.consume(g),f):n(g)}function f(g){return g===46?e.check(r3,E,h)(g):g===45||g===95||At(g)?(o=!0,e.consume(g),f):E(g)}function h(g){return e.consume(g),a=!0,f}function E(g){return o&&a&&Rt(s.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function a3(e,t,n){const s=this;return a;function a(l){return l!==87&&l!==119||!W1.call(s,s.previous)||Ed(s.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(n3,e.attempt(U1,e.attempt(H1,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function u3(e,t,n){const s=this;let a="",o=!1;return l;function l(g){return(g===72||g===104)&&Y1.call(s,s.previous)&&!Ed(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||Ru(g)||Ve(g)||Yr(g)||Vu(g)?n(g):e.attempt(U1,e.attempt(H1,E),n)(g)}function E(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function o3(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 l3(e,t,n){let s,a,o;return l;function l(h){return h===46||h===95?e.check(j1,f,d)(h):h===null||Ve(h)||Yr(h)||h!==45&&Vu(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 c3(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(j1,t,o)(l):l===null||Ve(l)||Yr(l)?t(l):(e.consume(l),a)}function o(l){return l===41&&s++,e.consume(l),a}}function d3(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)||Yr(d)?t(d):n(d)}function a(d){return d===null||d===40||d===91||Ve(d)||Yr(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 f3(e,t,n){return s;function s(o){return e.consume(o),a}function a(o){return At(o)?n(o):t(o)}}function W1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ve(e)}function Y1(e){return!Rt(e)}function V1(e){return!(e===47||Oc(e))}function Oc(e){return e===43||e===45||e===46||e===95||At(e)}function Ed(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 h3={tokenize:b3,partial:!0};function p3(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:T3,continuation:{tokenize:y3},exit:x3}},text:{91:{name:"gfmFootnoteCall",tokenize:E3},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:m3,resolveTo:g3}}}}function m3(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=gn(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 g3(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 E3(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(gn(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 T3(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 w=e.exit("gfmFootnoteDefinitionLabelString");return o=gn(s.sliceSerialize(w)),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 y3(e,t,n){return e.check(ea,t,e.attempt(h3,t,n))}function x3(e){e.exit("gfmFootnoteDefinition")}function b3(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 k3(e){let n=(e||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:a};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function a(l,d){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const E={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},g={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},x=[["enter",E,d],["enter",l[h][1],d],["exit",l[h][1],d],["enter",g,d]],b=d.parser.constructs.insideSpan.null;b&&Qt(x,x.length,0,qu(b,l.slice(h+1,f),d)),Qt(x,x.length,0,[["exit",g,d],["enter",l[f][1],d],["exit",l[f][1],d],["exit",E,d]]),Qt(l,h-1,f-h+3,x),f=h+x.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,d,f){const h=this.previous,E=this.events;let g=0;return x;function x(N){return h===126&&E[E.length-1][1].type!=="characterEscape"?f(N):(l.enter("strikethroughSequenceTemporary"),b(N))}function b(N){const w=wi(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"),A=wi(N);return O._open=!A||A===2&&!!w,O._close=!w||w===2&&!!A,d(N)}}}class S3{constructor(){this.map=[]}add(t,n,s){_3(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 _3(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 C3(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 N3(){return{flow:{null:{name:"table",tokenize:A3,resolveAll:v3}}}}function A3(e,t,n){const s=this;let a=0,o=0,l;return d;function d($){let le=s.events.length-1;for(;le>-1;){const fe=s.events[le][1].type;if(fe==="lineEnding"||fe==="linePrefix")le--;else break}const ce=le>-1?s.events[le][1].type:null,Ce=ce==="tableHead"||ce==="tableRow"?D:f;return Ce===D&&s.parser.lazy[s.now().line]?n($):Ce($)}function f($){return e.enter("tableHead"),e.enter("tableRow"),h($)}function h($){return $===124||(l=!0,o+=1),E($)}function E($){return $===null?n($):ye($)?o>1?(o=0,s.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),b):n($):Fe($)?Me(e,E,"whitespace")($):(o+=1,l&&(l=!1,a+=1),$===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),l=!0,E):(e.enter("data"),g($)))}function g($){return $===null||$===124||Ve($)?(e.exit("data"),E($)):(e.consume($),$===92?x:g)}function x($){return $===92||$===124?(e.consume($),g):g($)}function b($){return s.interrupt=!1,s.parser.lazy[s.now().line]?n($):(e.enter("tableDelimiterRow"),l=!1,Fe($)?Me(e,N,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):N($))}function N($){return $===45||$===58?O($):$===124?(l=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),w):ne($)}function w($){return Fe($)?Me(e,O,"whitespace")($):O($)}function O($){return $===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),A):$===45?(o+=1,A($)):$===null||ye($)?G($):ne($)}function A($){return $===45?(e.enter("tableDelimiterFiller"),F($)):ne($)}function F($){return $===45?(e.consume($),F):$===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),z):(e.exit("tableDelimiterFiller"),z($))}function z($){return Fe($)?Me(e,G,"whitespace")($):G($)}function G($){return $===124?N($):$===null||ye($)?!l||a!==o?ne($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):ne($)}function ne($){return n($)}function D($){return e.enter("tableRow"),q($)}function q($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),q):$===null||ye($)?(e.exit("tableRow"),t($)):Fe($)?Me(e,q,"whitespace")($):(e.enter("data"),Z($))}function Z($){return $===null||$===124||Ve($)?(e.exit("data"),q($)):(e.consume($),$===92?oe:Z)}function oe($){return $===92||$===124?(e.consume($),Z):Z($)}}function v3(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 S3;for(;++n<e.length;){const b=e[n],N=b[1];b[0]==="enter"?N.type==="tableHead"?(d=!1,f!==0&&(Cm(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=ku(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=ku(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=ku(x,t,o,a,n,g)):l[1]!==0&&(g=ku(x,t,l,a,n,g)),a=0):a&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&Cm(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=C3(t.events,n))}return e}function ku(e,t,n,s,a,o){const l=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},Ni(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=Ni(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=Ni(t.events,n[2]),E=Ni(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,w=n[3]-n[2]-1;e.add(N,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return a!==void 0&&(o.end=Object.assign({},Ni(t.events,a)),e.add(a,0,[["exit",o,t]]),o=void 0),o}function Cm(e,t,n,s,a){const o=[],l=Ni(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 Ni(e,t){const n=e[t],s=n[0]==="enter"?"start":"end";return n[1][s]}const w3={name:"tasklistCheck",tokenize:L3};function I3(){return{text:{91:w3}}}function L3(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:R3},t,n)(f):n(f)}}function R3(e,t,n){return Me(e,s,"whitespace");function s(a){return a===null?n(a):t(a)}}function O3(e){return t1([i3(),p3(),k3(e),N3(),I3()])}const D3={};function P3(e){const t=this,n=e||D3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(O3(n)),o.push(e3()),l.push(t3(n))}function M3(){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 F3(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(A1(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 w=N.index;f.codePointAt(w)===10&&f.codePointAt(w-1)===13&&w--,f=f.slice(0,w)+" "+f.slice(N.index+1)}}return E+f+E}function a(){return"$"}}const B3={tokenize:U3,concrete:!0,name:"mathFlow"},Nm={tokenize:H3,partial:!0};function U3(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(Nm,x,O)(F)}function x(F){return e.attempt({tokenize:A,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(Nm,x,O)(F):(e.enter("mathFlowValue"),w(F))}function w(F){return F===null||ye(F)?(e.exit("mathFlowValue"),N(F)):(e.consume(F),w)}function O(F){return e.exit("mathFlow"),t(F)}function A(F,z,G){let ne=0;return Me(F,D,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function D(oe){return F.enter("mathFlowFence"),F.enter("mathFlowFenceSequence"),q(oe)}function q(oe){return oe===36?(ne++,F.consume(oe),q):ne<l?G(oe):(F.exit("mathFlowFenceSequence"),Me(F,Z,"whitespace")(oe))}function Z(oe){return oe===null||ye(oe)?(F.exit("mathFlowFence"),z(oe)):G(oe)}}}function H3(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 j3(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),{tokenize:s,resolve:z3,previous:$3,name:"mathText"};function s(a,o,l){let d=0,f,h;return E;function E(w){return a.enter("mathText"),a.enter("mathTextSequence"),g(w)}function g(w){return w===36?(a.consume(w),d++,g):d<2&&!n?l(w):(a.exit("mathTextSequence"),x(w))}function x(w){return w===null?l(w):w===36?(h=a.enter("mathTextSequence"),f=0,N(w)):w===32?(a.enter("space"),a.consume(w),a.exit("space"),x):ye(w)?(a.enter("lineEnding"),a.consume(w),a.exit("lineEnding"),x):(a.enter("mathTextData"),b(w))}function b(w){return w===null||w===32||w===36||ye(w)?(a.exit("mathTextData"),x(w)):(a.consume(w),b)}function N(w){return w===36?(a.consume(w),f++,N):f===d?(a.exit("mathTextSequence"),a.exit("mathText"),o(w)):(h.type="mathTextData",b(w))}}}function z3(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 $3(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function W3(e){return{flow:{36:B3},text:{36:j3(e)}}}const Y3={};function V3(e){const t=this,n=e||Y3,s=t.data(),a=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),l=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);a.push(W3(n)),o.push(M3()),l.push(F3(n))}const q3=[P3,V3],Q3=/\\[a-zA-Z]+|[\^_]/,G3=/^\d[\d,.]*\s*(?:[kKmMbB]|bn|billion|million|thousand)?$/,K3=/^[a-zA-Z]{3,}$/,Am=/[=+\-*/<>≤≥±×÷]/,X3=/[.,;:!?]$/,J3=/\n/,Z3=/\s+/,eN=/\d,\d{3}\b/;function tN(e){const t=e.trim();if(!t||J3.test(e))return!1;if(Q3.test(t))return!0;if(G3.test(t))return!1;const n=t.split(Z3),s=n.filter(o=>K3.test(o.replace(X3,"")));return s.length>=2||eN.test(t)?!1:!!(n.every(o=>o.length<=4)&&(n.length===1||Am.test(t))||Am.test(t)&&s.length===0)}function nN(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 rN(e){let t="",n=0;for(;n<e.length;){const s=nN(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(!tN(o)){t+=`\\$${o}`,n=a;continue}t+=e.slice(n,a+1),n=a+1;continue}}t+=e[n],n++}return t}const vm=/[#.]/g;function iN(e,t){const n=e||"",s={};let a=0,o,l;for(;a<n.length;){vm.lastIndex=a;const d=vm.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 q1(e,t,n){const s=n?oN(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=iN(o,t);const h=f.tagName.toLowerCase(),E=s?s.get(h):void 0;if(f.tagName=E||h,sN(l))d.unshift(l);else for(const[g,x]of Object.entries(l))aN(e,f.properties,g,x)}for(const h of d)Dc(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return a}function sN(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 aN(e,t,n,s){const a=Wu(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=Up(s):a.commaSeparated?o=Dp(s):a.commaOrSpaceSeparated?o=Up(Dp(s).join(" ")):o=wm(a,a.property,s):Array.isArray(s)?o=[...s]:o=a.property==="style"?uN(s):String(s);if(Array.isArray(o)){const l=[];for(const d of o)l.push(wm(a,a.property,d));o=l}a.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[a.property]=o}}function Dc(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)Dc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Dc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function wm(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ys(n)===Ys(t)))return!0}return n}function uN(e){const t=[];for(const[n,s]of Object.entries(e))t.push([n,s].join(": "));return t.join("; ")}function oN(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const lN=["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"],cN=q1(Zs,"div"),dN=q1(Tr,"g",lN);function fN(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=Im(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=Im(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 Im(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 jr={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/"},Q1={}.hasOwnProperty,hN=Object.prototype;function pN(e,t){const n=t||{};return Td({file:n.file||void 0,location:!1,schema:n.space==="svg"?Tr:Zs,verbose:n.verbose||!1},e)}function Td(e,t){let n;switch(t.nodeName){case"#comment":{const s=t;return n={type:"comment",value:s.data},vu(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:G1(e,t.childNodes),data:{quirksMode:a}},e.file&&e.location){const o=String(e.file),l=fN(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"},vu(e,s,n),n}case"#text":{const s=t;return n={type:"text",value:s.value},vu(e,s,n),n}default:return n=mN(e,t),n}}function G1(e,t){let n=-1;const s=[];for(;++n<t.length;){const a=Td(e,t[n]);s.push(a)}return s}function mN(e,t){const n=e.schema;e.schema=t.namespaceURI===jr.svg?Tr:Zs;let s=-1;const a={};for(;++s<t.attrs.length;){const d=t.attrs[s],f=(d.prefix?d.prefix+":":"")+d.name;Q1.call(hN,f)||(a[f]=d.value)}const l=(e.schema.space==="svg"?dN:cN)(t.tagName,a,G1(e,t.childNodes));if(vu(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=Td(e,d.content);h&&E&&e.file&&(g.position={start:h.end,end:E.start}),l.content=g}return e.schema=n,l}function vu(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const s=gN(e,n,t.sourceCodeLocation);s&&(e.location=!0,n.position=s)}}function gN(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)Q1.call(n.attrs,l)&&(o[Wu(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=Lm({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Lm({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Lm(e){return e.line&&e.column?e:void 0}const EN={},TN={}.hasOwnProperty,K1=N1("type",{handlers:{root:xN,element:CN,text:SN,comment:_N,doctype:kN}});function yN(e,t){const s=(t||EN).space;return K1(e,s==="svg"?Tr:Zs)}function xN(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function bN(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=yd(e.children,n,t),Pi(e,n),n}function kN(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Pi(e,t),t}function SN(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Pi(e,t),t}function _N(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Pi(e,t),t}function CN(e,t){const n=t;let s=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(s=Tr);const a=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&TN.call(e.properties,o)){const f=NN(s,o,e.properties[o]);f&&a.push(f)}}const l=s.space,d={nodeName:e.tagName,tagName:e.tagName,attrs:a,namespaceURI:jr[l],childNodes:[],parentNode:null};return d.childNodes=yd(e.children,d,s),Pi(e,d),e.tagName==="template"&&e.content&&(d.content=bN(e.content,s)),d}function NN(e,t,n){const s=Wu(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?U0(n):q0(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=jr[s.space]}return a}function yd(e,t,n){let s=-1;const a=[];if(e)for(;++s<e.length;){const o=K1(e[s],n);o.parentNode=t,a.push(o)}return a}function Pi(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 AN=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],vN=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 X1(e){return e>=55296&&e<=57343}function wN(e){return e>=56320&&e<=57343}function IN(e,t){return(e-55296)*1024+9216+t}function J1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Z1(e){return e>=64976&&e<=65007||vN.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 LN=65536;class RN{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=LN,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(wN(n))return this.pos++,this._addGap(),IN(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,X1(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){J1(t)?this._err(V.controlCharacterInInputStream):Z1(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 eg(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 ON=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))),DN=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 PN(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=DN.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 MN=32;var Er;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Er||(Er={}));function Pc(e){return e>=gt.ZERO&&e<=gt.NINE}function FN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_F||e>=gt.LOWER_A&&e<=gt.LOWER_F}function BN(e){return e>=gt.UPPER_A&&e<=gt.UPPER_Z||e>=gt.LOWER_A&&e<=gt.LOWER_Z||Pc(e)}function UN(e){return e===gt.EQUALS||BN(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 zn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(zn||(zn={}));class HN{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=zn.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)|MN)===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(Pc(a)||FN(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(Pc(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===zn.Strict)return 0;return this.emitCodePoint(PN(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&Er.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=jN(s,a,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===zn.Attribute&&(o===0||UN(l))?0:this.emitNotTerminatedNamedEntity();if(a=s[this.treeIndex],o=(a&Er.VALUE_LENGTH)>>14,o!==0){if(l===gt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==zn.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]&Er.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]&~Er.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!==zn.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 jN(e,t,n,s){const a=(t&Er.BRANCH_LENGTH)>>7,o=t&Er.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 $r;(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"})($r||($r={}));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 zN=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 Mi(e){var t;return(t=zN.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const te=p,$N={[X.HTML]:new Set([te.ADDRESS,te.APPLET,te.AREA,te.ARTICLE,te.ASIDE,te.BASE,te.BASEFONT,te.BGSOUND,te.BLOCKQUOTE,te.BODY,te.BR,te.BUTTON,te.CAPTION,te.CENTER,te.COL,te.COLGROUP,te.DD,te.DETAILS,te.DIR,te.DIV,te.DL,te.DT,te.EMBED,te.FIELDSET,te.FIGCAPTION,te.FIGURE,te.FOOTER,te.FORM,te.FRAME,te.FRAMESET,te.H1,te.H2,te.H3,te.H4,te.H5,te.H6,te.HEAD,te.HEADER,te.HGROUP,te.HR,te.HTML,te.IFRAME,te.IMG,te.INPUT,te.LI,te.LINK,te.LISTING,te.MAIN,te.MARQUEE,te.MENU,te.META,te.NAV,te.NOEMBED,te.NOFRAMES,te.NOSCRIPT,te.OBJECT,te.OL,te.P,te.PARAM,te.PLAINTEXT,te.PRE,te.SCRIPT,te.SECTION,te.SELECT,te.SOURCE,te.STYLE,te.SUMMARY,te.TABLE,te.TBODY,te.TD,te.TEMPLATE,te.TEXTAREA,te.TFOOT,te.TH,te.THEAD,te.TITLE,te.TR,te.TRACK,te.UL,te.WBR,te.XMP]),[X.MATHML]:new Set([te.MI,te.MO,te.MN,te.MS,te.MTEXT,te.ANNOTATION_XML]),[X.SVG]:new Set([te.TITLE,te.FOREIGN_OBJECT,te.DESC]),[X.XLINK]:new Set,[X.XML]:new Set,[X.XMLNS]:new Set},Mc=new Set([te.H1,te.H2,te.H3,te.H4,te.H5,te.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 WN(e){return e>=_.DIGIT_0&&e<=_.DIGIT_9}function Ds(e){return e>=_.LATIN_CAPITAL_A&&e<=_.LATIN_CAPITAL_Z}function YN(e){return e>=_.LATIN_SMALL_A&&e<=_.LATIN_SMALL_Z}function pr(e){return YN(e)||Ds(e)}function Rm(e){return pr(e)||WN(e)}function Su(e){return e+32}function tg(e){return e===_.SPACE||e===_.LINE_FEED||e===_.TABULATION||e===_.FORM_FEED}function Om(e){return tg(e)||e===_.SOLIDUS||e===_.GREATER_THAN_SIGN}function VN(e){return e===_.NULL?V.nullCharacterReference:e>1114111?V.characterReferenceOutsideUnicodeRange:X1(e)?V.surrogateCharacterReference:Z1(e)?V.noncharacterCharacterReference:J1(e)||e===_.CARRIAGE_RETURN?V.controlCharacterReference:null}class qN{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 RN(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new HN(ON,(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=VN(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(eg(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=Mi(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=tg(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()?zn.Attribute:zn.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(pr(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(pr(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(Ds(t)?Su(t):t)}}_stateRcdataLessThanSign(t){t===_.SOLIDUS?this.state=C.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=C.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){pr(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){pr(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){pr(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:pr(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){pr(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)&&Om(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)&&Om(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(Ds(t)?Su(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(Ds(t))this._createDoctypeToken(String.fromCharCode(Su(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(Ds(t)?Su(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()&&Rm(this.preprocessor.peek(1))?C.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Rm(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===_.SEMICOLON&&this._err(V.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ng=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),Dm=new Set([...ng,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),Pu=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),QN=new Set([...Pu,p.OL,p.UL]),GN=new Set([...Pu,p.BUTTON]),Pm=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),Mm=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),KN=new Set([p.TR,p.TEMPLATE,p.HTML]),XN=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),JN=new Set([p.TABLE,p.TEMPLATE,p.HTML]),ZN=new Set([p.TD,p.TH]);class eA{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(Mc,X.HTML)}popUntilTableCellPopped(){this.popUntilPopped(ZN,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(JN,X.HTML)}clearBackToTableBodyContext(){this.clearBackTo(XN,X.HTML)}clearBackToTableRowContext(){this.clearBackTo(KN,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(Mm.has(a))return!1;break}case X.MATHML:{if(Pm.has(a))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Pu)}hasInListItemScope(t){return this.hasInDynamicScope(t,QN)}hasInButtonScope(t){return this.hasInDynamicScope(t,GN)}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(Mc.has(n))return!0;if(Pu.has(n))return!1;break}case X.SVG:{if(Mm.has(n))return!1;break}case X.MATHML:{if(Pm.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&&ng.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Dm.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Dm.has(this.currentTagId);)this.pop()}}const gc=3;var vn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(vn||(vn={}));const Fm={type:vn.Marker};class tA{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===vn.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<gc)return;const n=this.treeAdapter.getAttrList(t),s=this._getNoahArkConditionCandidates(t,n);if(s.length<gc)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>=gc&&this.entries.splice(d.idx,1))}}insertMarker(){this.entries.unshift(Fm)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:vn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const s=this.entries.indexOf(this.bookmark);this.entries.splice(s,0,{type:vn.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(Fm);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(s=>s.type===vn.Marker||this.treeAdapter.getTagName(s.element)===t);return n&&n.type===vn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===vn.Element&&n.element===t)}}const mr={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};mr.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(mr.isTextNode(n)){n.value+=t;return}}mr.appendChild(e,mr.createTextNode(t))},insertTextBefore(e,t,n){const s=e.childNodes[e.childNodes.indexOf(n)-1];s&&mr.isTextNode(s)?s.value+=t:mr.insertBefore(e,mr.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}}},rg="html",nA="about:legacy-compat",rA="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",ig=["+//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//"],iA=[...ig,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],sA=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),sg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aA=[...sg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Bm(e,t){return t.some(n=>e.startsWith(n))}function uA(e){return e.name===rg&&e.publicId===null&&(e.systemId===null||e.systemId===nA)}function oA(e){if(e.name!==rg)return sn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===rA)return sn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),sA.has(n))return sn.QUIRKS;let s=t===null?iA:ig;if(Bm(n,s))return sn.QUIRKS;if(s=t===null?sg:aA,Bm(n,s))return sn.LIMITED_QUIRKS}return sn.NO_QUIRKS}const Um={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},lA="definitionurl",cA="definitionURL",dA=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])),fA=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}]]),hA=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])),pA=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 mA(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:s})=>s===$r.COLOR||s===$r.SIZE||s===$r.FACE)||pA.has(t)}function ag(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===lA){e.attrs[t].name=cA;break}}function ug(e){for(let t=0;t<e.attrs.length;t++){const n=dA.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xd(e){for(let t=0;t<e.attrs.length;t++){const n=fA.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 gA(e){const t=hA.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Mi(e.tagName))}function EA(e,t){return t===X.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function TA(e,t,n){if(t===X.MATHML&&e===p.ANNOTATION_XML){for(let s=0;s<n.length;s++)if(n[s].name===$r.ENCODING){const a=n[s].value.toLowerCase();return a===Um.TEXT_HTML||a===Um.APPLICATION_XML}}return t===X.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function yA(e,t,n,s){return(!s||s===X.HTML)&&TA(e,t,n)||(!s||s===X.MATHML)&&EA(e,t)}const xA="hidden",bA=8,kA=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 SA={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},og=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),Hm={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:mr,onParseError:null};class jm{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={...Hm,...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 qN(this.options,this),this.activeFormattingElements=new tA(this.treeAdapter),this.fragmentContextID=s?Mi(this.treeAdapter.getTagName(s)):p.UNKNOWN,this._setContextModes(s??this.document,this.fragmentContextID),this.openElements=new eA(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={...Hm,...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:SA,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 yA(t,a,o,s)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(a=>a.type===vn.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 og.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 $N[s].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Zv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.IN_BODY:case R.IN_CAPTION:case R.IN_CELL:case R.IN_TEMPLATE:{cg(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:{Ec(this,t);break}case R.IN_TABLE_TEXT:{gg(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Jv(this,t);return}switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(this,t);break}case R.TEXT:{this._insertCharacters(t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_COLUMN_GROUP:{Mu(this,t);break}case R.AFTER_BODY:{Fu(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Fc(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:{Fc(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.AFTER_BODY:{IA(this,t);break}case R.AFTER_AFTER_BODY:case R.AFTER_AFTER_FRAMESET:{LA(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case R.INITIAL:{RA(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:{Ls(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)?ew(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{OA(this,t);break}case R.BEFORE_HEAD:{PA(this,t);break}case R.IN_HEAD:{xn(this,t);break}case R.IN_HEAD_NO_SCRIPT:{BA(this,t);break}case R.AFTER_HEAD:{HA(this,t);break}case R.IN_BODY:{wt(this,t);break}case R.IN_TABLE:{Ii(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Mv(this,t);break}case R.IN_COLUMN_GROUP:{Sd(this,t);break}case R.IN_TABLE_BODY:{eo(this,t);break}case R.IN_ROW:{to(this,t);break}case R.IN_CELL:{Uv(this,t);break}case R.IN_SELECT:{yg(this,t);break}case R.IN_SELECT_IN_TABLE:{jv(this,t);break}case R.IN_TEMPLATE:{$v(this,t);break}case R.AFTER_BODY:{Yv(this,t);break}case R.IN_FRAMESET:{Vv(this,t);break}case R.AFTER_FRAMESET:{Qv(this,t);break}case R.AFTER_AFTER_BODY:{Kv(this,t);break}case R.AFTER_AFTER_FRAMESET:{Xv(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?tw(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{DA(this,t);break}case R.BEFORE_HEAD:{MA(this,t);break}case R.IN_HEAD:{FA(this,t);break}case R.IN_HEAD_NO_SCRIPT:{UA(this,t);break}case R.AFTER_HEAD:{jA(this,t);break}case R.IN_BODY:{Zu(this,t);break}case R.TEXT:{Nv(this,t);break}case R.IN_TABLE:{Qs(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_CAPTION:{Fv(this,t);break}case R.IN_COLUMN_GROUP:{Bv(this,t);break}case R.IN_TABLE_BODY:{Bc(this,t);break}case R.IN_ROW:{Tg(this,t);break}case R.IN_CELL:{Hv(this,t);break}case R.IN_SELECT:{xg(this,t);break}case R.IN_SELECT_IN_TABLE:{zv(this,t);break}case R.IN_TEMPLATE:{Wv(this,t);break}case R.AFTER_BODY:{kg(this,t);break}case R.IN_FRAMESET:{qv(this,t);break}case R.AFTER_FRAMESET:{Gv(this,t);break}case R.AFTER_AFTER_BODY:{wu(this,t);break}}}onEof(t){switch(this.insertionMode){case R.INITIAL:{Is(this,t);break}case R.BEFORE_HTML:{Bs(this,t);break}case R.BEFORE_HEAD:{Us(this,t);break}case R.IN_HEAD:{Hs(this,t);break}case R.IN_HEAD_NO_SCRIPT:{js(this,t);break}case R.AFTER_HEAD:{zs(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:{pg(this,t);break}case R.TEXT:{Av(this,t);break}case R.IN_TABLE_TEXT:{Ls(this,t);break}case R.IN_TEMPLATE:{bg(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:{kd(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:{lg(this,t);break}case R.IN_TABLE:case R.IN_TABLE_BODY:case R.IN_ROW:{Ec(this,t);break}case R.IN_TABLE_TEXT:{mg(this,t);break}}}}function _A(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):hg(e,t),n}function CA(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 NA(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>=kA;!d||f?(f&&e.activeFormattingElements.removeEntry(d),e.openElements.remove(l)):(l=AA(e,d),s===t&&(e.activeFormattingElements.bookmark=d),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(l,s),s=l)}return s}function AA(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 vA(e,t,n){const s=e.treeAdapter.getTagName(t),a=Mi(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 wA(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 bd(e,t){for(let n=0;n<bA;n++){const s=_A(e,t);if(!s)break;const a=CA(e,s);if(!a)break;e.activeFormattingElements.bookmark=s;const o=NA(e,a,s.element),l=e.openElements.getCommonAncestor(s.element);e.treeAdapter.detachNode(o),l&&vA(e,l,o),wA(e,a,s)}}function Fc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function IA(e,t){e._appendCommentNode(t,e.openElements.items[0])}function LA(e,t){e._appendCommentNode(t,e.document)}function kd(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 RA(e,t){e._setDocumentType(t);const n=t.forceQuirks?sn.QUIRKS:oA(t);uA(t)||e._err(t,V.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=R.BEFORE_HTML}function Is(e,t){e._err(t,V.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,sn.QUIRKS),e.insertionMode=R.BEFORE_HTML,e._processToken(t)}function OA(e,t){t.tagID===p.HTML?(e._insertElement(t,X.HTML),e.insertionMode=R.BEFORE_HEAD):Bs(e,t)}function DA(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&Bs(e,t)}function Bs(e,t){e._insertFakeRootElement(),e.insertionMode=R.BEFORE_HEAD,e._processToken(t)}function PA(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:Us(e,t)}}function MA(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?Us(e,t):e._err(t,V.endTagWithoutMatchingOpenElement)}function Us(e,t){e._insertFakeElement(H.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=R.IN_HEAD,e._processToken(t)}function xn(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:Hs(e,t)}}function FA(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:{Hs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function Gr(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 Hs(e,t){e.openElements.pop(),e.insertionMode=R.AFTER_HEAD,e._processToken(t)}function BA(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:{xn(e,t);break}case p.NOSCRIPT:{e._err(t,V.nestedNoscriptInHead);break}default:js(e,t)}}function UA(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=R.IN_HEAD;break}case p.BR:{js(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function js(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 HA(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),xn(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,V.misplacedStartTagForHeadElement);break}default:zs(e,t)}}function jA(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{zs(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:e._err(t,V.endTagWithoutMatchingOpenElement)}}function zs(e,t){e._insertFakeElement(H.BODY,p.BODY),e.insertionMode=R.IN_BODY,Ju(e,t)}function Ju(e,t){switch(t.type){case Pe.CHARACTER:{cg(e,t);break}case Pe.WHITESPACE_CHARACTER:{lg(e,t);break}case Pe.COMMENT:{Fc(e,t);break}case Pe.START_TAG:{wt(e,t);break}case Pe.END_TAG:{Zu(e,t);break}case Pe.EOF:{pg(e,t);break}}}function lg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function cg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function zA(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function $A(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function WA(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 YA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML)}function VA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Mc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,X.HTML)}function qA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function QA(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 GA(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 KA(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,X.HTML),e.tokenizer.state=st.PLAINTEXT}function XA(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 JA(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(H.A);n&&(bd(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 ZA(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ev(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(bd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,X.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tv(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function nv(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 dg(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fg(e){const t=eg(e,$r.TYPE);return t!=null&&t.toLowerCase()===xA}function rv(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,X.HTML),fg(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function iv(e,t){e._appendElement(t,X.HTML),t.ackSelfClosing=!0}function sv(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,X.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function av(e,t){t.tagName=H.IMG,t.tagID=p.IMG,dg(e,t)}function uv(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 ov(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function lv(e,t){e.framesetOk=!1,e._switchToTextParsing(t,st.RAWTEXT)}function zm(e,t){e._switchToTextParsing(t,st.RAWTEXT)}function cv(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 dv(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,X.HTML)}function fv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,X.HTML)}function hv(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,X.HTML)}function pv(e,t){e._reconstructActiveFormattingElements(),ag(t),xd(t),t.selfClosing?e._appendElement(t,X.MATHML):e._insertElement(t,X.MATHML),t.ackSelfClosing=!0}function mv(e,t){e._reconstructActiveFormattingElements(),ug(t),xd(t),t.selfClosing?e._appendElement(t,X.SVG):e._insertElement(t,X.SVG),t.ackSelfClosing=!0}function $m(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:{ZA(e,t);break}case p.A:{JA(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{VA(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:{YA(e,t);break}case p.LI:case p.DD:case p.DT:{GA(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{dg(e,t);break}case p.HR:{sv(e,t);break}case p.RB:case p.RTC:{fv(e,t);break}case p.RT:case p.RP:{hv(e,t);break}case p.PRE:case p.LISTING:{qA(e,t);break}case p.XMP:{ov(e,t);break}case p.SVG:{mv(e,t);break}case p.HTML:{zA(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:{xn(e,t);break}case p.BODY:{$A(e,t);break}case p.FORM:{QA(e,t);break}case p.NOBR:{ev(e,t);break}case p.MATH:{pv(e,t);break}case p.TABLE:{nv(e,t);break}case p.INPUT:{rv(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{iv(e,t);break}case p.IMAGE:{av(e,t);break}case p.BUTTON:{XA(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{tv(e,t);break}case p.IFRAME:{lv(e,t);break}case p.SELECT:{cv(e,t);break}case p.OPTION:case p.OPTGROUP:{dv(e,t);break}case p.NOEMBED:case p.NOFRAMES:{zm(e,t);break}case p.FRAMESET:{WA(e,t);break}case p.TEXTAREA:{uv(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?zm(e,t):$m(e,t);break}case p.PLAINTEXT:{KA(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:$m(e,t)}}function gv(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 Ev(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=R.AFTER_BODY,kg(e,t))}function Tv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function yv(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 xv(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(H.P,p.P),e._closePElement()}function bv(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function kv(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function Sv(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function _v(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function Cv(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(H.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function hg(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 Zu(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:{bd(e,t);break}case p.P:{xv(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:{Tv(e,t);break}case p.LI:{bv(e);break}case p.DD:case p.DT:{kv(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{Sv(e);break}case p.BR:{Cv(e);break}case p.BODY:{gv(e,t);break}case p.HTML:{Ev(e,t);break}case p.FORM:{yv(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{_v(e,t);break}case p.TEMPLATE:{Gr(e,t);break}default:hg(e,t)}}function pg(e,t){e.tmplInsertionModeStack.length>0?bg(e,t):kd(e,t)}function Nv(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 Av(e,t){e._err(t,V.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Ec(e,t){if(e.openElements.currentTagId!==void 0&&og.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:{gg(e,t);break}case Pe.WHITESPACE_CHARACTER:{mg(e,t);break}}else na(e,t)}function vv(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_CAPTION}function wv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_COLUMN_GROUP}function Iv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.COLGROUP,p.COLGROUP),e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t)}function Lv(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,X.HTML),e.insertionMode=R.IN_TABLE_BODY}function Rv(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(H.TBODY,p.TBODY),e.insertionMode=R.IN_TABLE_BODY,eo(e,t)}function Ov(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Dv(e,t){fg(t)?e._appendElement(t,X.HTML):na(e,t),t.ackSelfClosing=!0}function Pv(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,X.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ii(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{Rv(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{xn(e,t);break}case p.COL:{Iv(e,t);break}case p.FORM:{Pv(e,t);break}case p.TABLE:{Ov(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{Lv(e,t);break}case p.INPUT:{Dv(e,t);break}case p.CAPTION:{vv(e,t);break}case p.COLGROUP:{wv(e,t);break}default:na(e,t)}}function Qs(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{Gr(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:na(e,t)}}function na(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ju(e,t),e.fosterParentingEnabled=n}function mg(e,t){e.pendingCharacterTokens.push(t)}function gg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ls(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)na(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Eg=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function Mv(e,t){const n=t.tagID;Eg.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=R.IN_TABLE,Ii(e,t)):wt(e,t)}function Fv(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&&Qs(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:Zu(e,t)}}function Sd(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:{xn(e,t);break}default:Mu(e,t)}}function Bv(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:{Gr(e,t);break}case p.COL:break;default:Mu(e,t)}}function Mu(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=R.IN_TABLE,e._processToken(t))}function eo(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,to(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,Ii(e,t));break}default:Ii(e,t)}}function Bc(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,Qs(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:Qs(e,t)}}function to(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,eo(e,t));break}default:Ii(e,t)}}function Tg(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,Bc(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,Bc(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:Qs(e,t)}}function Uv(e,t){const n=t.tagID;Eg.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),to(e,t)):wt(e,t)}function Hv(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(),Tg(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:Zu(e,t)}}function yg(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:{xn(e,t);break}}}function xg(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:{Gr(e,t);break}}}function jv(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)):yg(e,t)}function zv(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)):xg(e,t)}function $v(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:{xn(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,Ii(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=R.IN_COLUMN_GROUP,e.insertionMode=R.IN_COLUMN_GROUP,Sd(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=R.IN_TABLE_BODY,e.insertionMode=R.IN_TABLE_BODY,eo(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=R.IN_ROW,e.insertionMode=R.IN_ROW,to(e,t);break}default:e.tmplInsertionModeStack[0]=R.IN_BODY,e.insertionMode=R.IN_BODY,wt(e,t)}}function Wv(e,t){t.tagID===p.TEMPLATE&&Gr(e,t)}function bg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kd(e,t)}function Yv(e,t){t.tagID===p.HTML?wt(e,t):Fu(e,t)}function kg(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 Fu(e,t)}function Fu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Vv(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:{xn(e,t);break}}}function qv(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 Qv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Gv(e,t){t.tagID===p.HTML&&(e.insertionMode=R.AFTER_AFTER_FRAMESET)}function Kv(e,t){t.tagID===p.HTML?wt(e,t):wu(e,t)}function wu(e,t){e.insertionMode=R.IN_BODY,Ju(e,t)}function Xv(e,t){switch(t.tagID){case p.HTML:{wt(e,t);break}case p.NOFRAMES:{xn(e,t);break}}}function Jv(e,t){t.chars=Je,e._insertCharacters(t)}function Zv(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sg(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 ew(e,t){if(mA(t))Sg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===X.MATHML?ag(t):s===X.SVG&&(gA(t),ug(t)),xd(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0}}function tw(e,t){if(t.tagID===p.P||t.tagID===p.BR){Sg(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 nw=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,rw=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wm={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _g(e,t){const n=hw(e),s=N1("type",{handlers:{root:iw,element:sw,text:aw,comment:Ng,doctype:uw,raw:lw},unknown:cw}),a={parser:n?new jm(Wm):jm.getFragmentParser(void 0,Wm),handle(d){s(d,a)},stitches:!1,options:t||{}};s(e,a),Fi(a,In());const o=n?a.parser.document:a.parser.getFragment(),l=pN(o,{file:a.options.file});return a.stitches&&Xu(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 Cg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function iw(e,t){Cg(e.children,t)}function sw(e,t){dw(e,t),Cg(e.children,t),fw(e,t)}function aw(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Pe.CHARACTER,chars:e.value,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uw(e,t){const n={type:Pe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ra(e)};Fi(t,In(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ow(e,t){t.stitches=!0;const n=pw(e);if("children"in e&&"children"in n){const s=_g({type:"root",children:e.children},t.options);n.children=s.children}Ng({type:"comment",value:{stitch:n}},t)}function Ng(e,t){const n=e.value,s={type:Pe.COMMENT,data:n,location:ra(e)};Fi(t,In(e)),t.parser.currentToken=s,t.parser._processToken(t.parser.currentToken)}function lw(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,Ag(t,In(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(nw,"&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 cw(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ow(n,t);else{let s="";throw rw.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 Fi(e,t){Ag(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 Ag(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 dw(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,In(e));const s=t.parser.openElements.current;let a="namespaceURI"in s?s.namespaceURI:jr.html;a===jr.html&&n==="svg"&&(a=jr.svg);const o=yN({...e,children:[]},{space:a===jr.svg?"svg":"html"}),l={type:Pe.START_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:ra(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function fw(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&AN.includes(n)||t.parser.tokenizer.state===st.PLAINTEXT)return;Fi(t,Yu(e));const s={type:Pe.END_TAG,tagName:n,tagID:Mi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ra(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 hw(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ra(e){const t=In(e)||{line:void 0,column:void 0,offset:void 0},n=Yu(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 pw(e){return"children"in e?Vr({...e,children:[]}):Vr(e)}function mw(e){return function(t,n){return _g(t,{...e,file:n})}}const Fr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Uc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Fr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Fr],h2:[["className","sr-only"]],img:[...Fr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Fr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Fr],table:[...Fr],ul:[...Fr,["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"]},gr={}.hasOwnProperty;function gw(e,t){let n={type:"root",children:[]};const s={schema:t?{...Uc,...t}:Uc,stack:[]},a=vg(s,e);return a&&(Array.isArray(a)?a.length===1?n=a[0]:n.children=a:n=a),n}function vg(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return Ew(e,n);case"doctype":return Tw(e,n);case"element":return yw(e,n);case"root":return xw(e,n);case"text":return bw(e,n)}}}function Ew(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 ia(o,t),o}}function Tw(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return ia(n,t),n}}function yw(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const s=wg(e,t.children),a=kw(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&&gr.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 ia(l,t),l}function xw(e,t){const s={type:"root",children:wg(e,t.children)};return ia(s,t),s}function bw(e,t){const s={type:"text",value:typeof t.value=="string"?t.value:""};return ia(s,t),s}function wg(e,t){const n=[];if(Array.isArray(t)){const s=t;let a=-1;for(;++a<s.length;){const o=vg(e,s[a]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function kw(e,t){const n=e.stack[e.stack.length-1],s=e.schema.attributes,a=e.schema.required,o=s&&gr.call(s,n)?s[n]:void 0,l=s&&gr.call(s,"*")?s["*"]:void 0,d=t&&typeof t=="object"?t:{},f={};let h;for(h in d)if(gr.call(d,h)){const E=d[h];let g=Ym(e,Vm(o,h),h,E);g==null&&(g=Ym(e,Vm(l,h),h,E)),g!=null&&(f[h]=g)}if(a&&gr.call(a,n)){const E=a[n];for(h in E)gr.call(E,h)&&!gr.call(f,h)&&(f[h]=E[h])}return f}function Ym(e,t,n,s){return t?Array.isArray(s)?Sw(e,t,n,s):Ig(e,t,n,s):void 0}function Sw(e,t,n,s){let a=-1;const o=[];for(;++a<s.length;){const l=Ig(e,t,n,s[a]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function Ig(e,t,n,s){if(!(typeof s!="boolean"&&typeof s!="number"&&typeof s!="string")&&_w(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 _w(e,t,n){const s=e.schema.protocols&&gr.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 ia(e,t){const n=G0(t);t.data&&(e.data=Vr(t.data)),n&&(e.position=n)}function Vm(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 Cw(e){return function(t){return gw(t,e)}}const Hc=Uc,Br=(e,...t)=>{var n;return[...((n=Hc.attributes)==null?void 0:n[e])??[],...t]},Nw={...Hc,attributes:{...Hc.attributes,p:Br("p","align"),div:Br("div","align"),h1:Br("h1","align"),h2:Br("h2","align"),h3:Br("h3","align"),img:Br("img","width","height","align"),a:Br("a","align")}},Aw=new Set(["code","pre","svg","math","style","script","textarea"]),vw="fade-word";function ww(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:[vw]},children:[{type:"text",value:n}]})}return t}function Lg(e){const t=e.children;if(!t)return;const n=[];for(const s of t){if(s.type==="text"){n.push(...ww(s.value??""));continue}if(s.type==="element"&&Aw.has(s.tagName??"")){n.push(s);continue}Lg(s),n.push(s)}e.children=n}function Iw(){return e=>Lg(e)}const Lw=256*1024;let Ur=null,Rw=0;const Bu=new Map;function qm(e,t){var n;(n=Bu.get(e))==null||n(t),Bu.delete(e)}function Ow(){if(Ur)return Ur;try{Ur=new Worker(new URL("/assets/highlightWorker-DJp1Ce5p.js",import.meta.url),{type:"module"}),Ur.addEventListener("message",e=>qm(e.data.id,e.data.html)),Ur.addEventListener("error",()=>{for(const e of[...Bu.keys()])qm(e,null);Ur=null})}catch{return null}return Ur}async function _d(e,t){if(e.length>Lw)return null;const n=Ow();if(!n)return null;const s=++Rw;return new Promise(a=>{Bu.set(s,a),n.postMessage({id:s,code:e,lang:t})})}function Dw({code:e,lang:t}){const[n,s]=L.useState(null);L.useEffect(()=>{let o=!1;return _d(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 y.jsxs("div",{className:"codeblock",children:[y.jsxs("div",{className:"codeblock-bar",children:[y.jsx("span",{className:"codeblock-lang",children:t||"text"}),y.jsx("button",{className:"codeblock-copy",onClick:a,"aria-label":"Copy code",children:"copy"})]}),n?y.jsx("div",{className:"codeblock-body",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})}let Tc=null;function Pw(){return Tc||(Tc=Sc(()=>import("./mermaid.core-DsId9yj5.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))),Tc}let Mw=0;function Fw({code:e}){const t=L.useRef(null),[n,s]=L.useState(!1);return L.useEffect(()=>{let a=!1;s(!1);const o=e.trim();if(o)return Pw().then(async l=>{const d=await l.parse(o,{suppressErrors:!0});if(a||!d)return;const{svg:f}=await l.render(`mermaid-${Mw++}`,o);a||!t.current||(t.current.innerHTML=f,s(!0))}).catch(()=>{}),()=>{a=!0}},[e]),y.jsxs("div",{className:"mermaid-wrap",children:[y.jsx("div",{className:`mermaid-block ${n?"":"is-hidden"}`,ref:t}),!n&&y.jsxs("div",{className:"codeblock",children:[y.jsx("div",{className:"codeblock-bar",children:y.jsx("span",{className:"codeblock-lang",children:"mermaid"})}),y.jsx("pre",{className:"codeblock-body codeblock-plain",children:y.jsx("code",{children:e})})]})]})}const Bw=/language-(\w+)/,Uw=/\n$/,Hw={code(e){const{className:t,children:n}=e,s=Bw.exec(t??""),a=String(n).replace(Uw,"");if(!t&&!a.includes(`
92
+ `))return y.jsx("code",{className:"md-inline-code",children:a});const l=(s==null?void 0:s[1])??"";return l==="mermaid"?y.jsx(Fw,{code:a}):y.jsx(Dw,{code:a,lang:l})},a(e){return y.jsx("a",{...e,target:"_blank",rel:"noreferrer noopener"})}};let vi=null,Qm=null;function Rg(){return Qm??(Qm=Promise.all([Sc(()=>import("./index-Dewf4nkF.js"),__vite__mapDeps([0,1])),Sc(()=>Promise.resolve({}),__vite__mapDeps([2]))]).then(([e])=>{vi=e.default})),Qm}let Gm=!1;function jw(){if(Gm||vi)return;Gm=!0;const e=()=>void Rg(),t=globalThis.requestIdleCallback;t?t(e):setTimeout(e,2e3)}const zw=/(^|[^\\])\$/,Gs=L.memo(function({text:t,html:n=!1,streaming:s=!1}){const a=L.useMemo(()=>rN(t),[t]),o=zw.test(a),[l,d]=L.useState(()=>vi!==null);L.useEffect(()=>{if(vi)return;if(!o){jw();return}let h=!0;return Rg().then(()=>{h&&d(!0)}),()=>{h=!1}},[o]);const f=L.useMemo(()=>{const h=o&&vi?[vi]:[];return n?[mw,[Cw,Nw],...h]:s?[...h,Iw]:h},[n,s,o,l]);return y.jsx("div",{className:"md",children:y.jsx(S_,{remarkPlugins:q3,rehypePlugins:f,components:Hw,children:a})})});function $w(e,t){if(!e||!t)return null;if(!t.startsWith("/"))return Xm(t.replace(/^\.\//,""));const n=Km(e),s=Xm(Km(t));return s===null||s===n?null:s.startsWith(`${n}/`)?s.slice(n.length+1):null}const Km=e=>e.replace(/\/+$/,"");function Xm(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 Ww=4e5;function Jm(e,t){const n=e.split(`
93
+ `),s=t.split(`
94
+ `),a=n.length,o=s.length;if(a*o>Ww)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 Og={loading:"lazy",decoding:"async",ref:e=>{e!=null&&e.complete&&(e.dataset.loaded="")},onLoad:e=>{e.currentTarget.dataset.loaded=""}},En=e=>!!e&&typeof e=="object";function Cd(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=En(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 Yw={shell:"shell",write:"write",read:"read",grep:"grep",todo:"todo_list",webfetch:"web_fetch",websearch:"web_search",introspect:"introspect",generic:void 0},Vw=/^@?([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)$/,qw=/@([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)/;function Qw(e){const t=Vw.exec(e.name??"");if(t)return`@${t[1]}/${t[2]}`;const n=qw.exec(e.title??"");return!n||e.name&&e.name!==n[2]?null:`@${n[1]}/${n[2]}`}function Gw(e){const t=Qw(e);if(t)return t;if(e.name)return e.name;const n=Yw[Cd(e)];if(n)return n;const s=e.title??"";return s&&!/\s/.test(s)?s:"tool"}function Dg(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 Kr(e){const t=[];for(const n of e)En(n)&&(n.type==="content"&&En(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 Xr(e){for(const t of e)if(En(t)&&t.kind==="json"&&En(t.data))return t.data;return null}function Nd(e){const t=Object.keys(e);return t.length===1&&typeof e[t[0]]=="string"?e[t[0]]:null}function Kw(e){if(e==null)return[];if(typeof e=="string")return e?[{kind:"text",data:e}]:[];if(En(e)&&Array.isArray(e.items)){const t=[];for(const n of e.items)En(n)&&(typeof n.Text=="string"?t.push({kind:"text",data:n.Text}):En(n.Json)&&t.push({kind:"json",data:n.Json}));return t}return[]}function xr(e){return[...Array.isArray(e.content)?e.content:[],...Kw(e.output)]}function Xw(e){for(const t of e)if(En(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 Jw(e){let t=Xr(e);if(!t||!Array.isArray(t.tasks)){const n=Kr(e).trim();if(n.startsWith("{"))try{const s=JSON.parse(n);t=En(s)?s:null}catch{t=null}}return t&&Array.isArray(t.tasks)?t.tasks.map(n=>{const s=En(n)?n:{};return{desc:typeof s.task_description=="string"?s.task_description:"",done:s.completed===!0}}):null}const Zw=["https://cdnjs.cloudflare.com","https://cdn.jsdelivr.net","https://unpkg.com","https://esm.sh"];function eI(){const e=Zw.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 tI=`
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
+ `,nI=`
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 rI(){return`<!doctype html>
236
+ <html>
237
+ <head>
238
+ <meta charset="utf-8">
239
+ <meta http-equiv="Content-Security-Policy" content="${eI()}">
240
+ <meta name="color-scheme" content="dark">
241
+ <style>${nI}</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>${tI}<\/script>
247
+ </body>
248
+ </html>`}const iI=rI(),sI=256*1024;function aI(){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 uI({code:e}){const t=L.useRef(null),[n,s]=L.useState(!1),[a,o]=L.useState(120),l=e.length>sI;L.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"&&O0(g.text)};return window.addEventListener("message",h),()=>window.removeEventListener("message",h)},[]),L.useEffect(()=>{var f,h;n&&((h=(f=t.current)==null?void 0:f.contentWindow)==null||h.postMessage({type:"casper:theme",css:aI()},"*"))},[n]),L.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?y.jsxs("div",{className:"widget-error",children:["Widget is ",Math.round(e.length/1024)," KB, too large to render."]}):y.jsx("div",{className:"widget-wrap",style:{height:a},children:y.jsx("iframe",{ref:t,className:"widget-frame",title:"Widget",sandbox:"allow-scripts",srcDoc:iI,onLoad:d})})}const oI="show_widget";function Pg(e){var a;if(!((a=e.name)!=null&&a.endsWith(oI)))return null;const t=e.input??{},n=typeof t.widget_code=="string"?t.widget_code:"";return{title:typeof t.title=="string"?t.title:"",code:n}}function lI(e){return e.replace(/_/g," ").trim()}function cI({tool:e}){const t=Pg(e);return t?e.status==="failed"?y.jsxs("div",{className:"widget-error",children:["Widget ",lI(t.title)||"call"," failed."]}):t.code?y.jsx(uI,{code:t.code}):null:null}function dI(e){var o;if(!((o=e.name)!=null&&o.endsWith("show_choice")))return null;const t=e.input??{},n=typeof t.question=="string"?t.question.trim():"",s=Array.isArray(t.options)?t.options:[],a=[];for(const l of s){const d=l??{},f=typeof d.label=="string"&&d.label.trim()?d.label:"";if(!f)continue;const h=typeof d.detail=="string"&&d.detail.trim()?d.detail:void 0,E=typeof d.prompt=="string"&&d.prompt.trim()?d.prompt:f;a.push({label:f,detail:h,prompt:E})}return!n||a.length<2?null:{question:n,options:a}}function fI(e,t){if(t===null)return{picked:null,superseded:!1};const n=e.find(s=>s.prompt.trim()===t.trim());return n?{picked:n.label,superseded:!1}:{picked:null,superseded:!0}}function hI(e){var a;const{items:t,pending:n}=be.getState(),s=t.findIndex(o=>o.type==="tool_call"&&o.tool.id===e);if(s===-1)return null;for(const o of t.slice(s+1))if(o.type==="message"&&o.message.role==="user")return o.message.text;return((a=n[0])==null?void 0:a.text)??null}function pI({data:e,toolId:t}){const n=be(E=>E.items),s=be(E=>E.pending),[a,o]=L.useState(null),l=fI(e.options,n.length||s.length?hI(t):null),d=a??l.picked,f=d!==null||l.superseded,h=E=>{f||O0(E.prompt)&&o(E.label)};return y.jsxs("div",{className:"tpl-choice",children:[y.jsx("p",{className:"tpl-choice-q",children:e.question}),y.jsx("div",{className:"tpl-choice-opts",children:e.options.map(E=>{const g=d===E.label;return y.jsxs("button",{className:`tpl-choice-opt${g?" is-picked":""}`,onClick:()=>h(E),disabled:f,"aria-pressed":g,children:[y.jsx("span",{className:"tpl-choice-label",children:E.label}),E.detail&&y.jsx("span",{className:"tpl-choice-detail",children:E.detail})]},E.label)})})]})}const mI={pending:"queued",in_progress:"running",completed:"done",failed:"failed"},bt=e=>e&&typeof e=="object"?e:null,$e=e=>typeof e=="string"?e:void 0,Zm=e=>e.split("/").pop()||e;function gI(e){const t=Array.isArray(e.operations)?e.operations:[];for(const n of t){const s=bt(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 EI(e){const t=bt(e.input);if(!t)return null;const n=$e(t.__tool_use_purpose);if(n)return{text:n};switch(Cd(e)){case"write":{const s=$e(t.path);return s?{text:Zm(s),title:s}:null}case"read":{const s=gI(t);return s?{text:Zm(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 Mg(e){const t=bt(e);if(!t||!Array.isArray(t.operations))return[];const n=[];for(const s of t.operations){const a=bt(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 e0=e=>`/api/fs/image?path=${encodeURIComponent(e)}`;function TI({tool:e,arriving:t=!1}){if(Pg(e))return y.jsx(cI,{tool:e});const n=dI(e);if(n)return y.jsx(pI,{data:n,toolId:e.id});const s=e.status,[a,o]=L.useState(s==="failed"),l=EI(e),d=Mg(e.input);return y.jsxs("div",{className:`toolcall toolcall-${s} ${t?"is-arriving":""}`,children:[y.jsxs("button",{className:"toolcall-head",onClick:()=>o(f=>!f),children:[y.jsx("span",{className:`toolcall-dot dot-${s}`}),y.jsx("span",{className:"toolcall-title",children:Gw(e)}),l&&y.jsx("span",{className:"toolcall-summary",title:l.title??l.text,children:l.text}),y.jsx("span",{className:"toolcall-status",children:mI[s]??s}),y.jsx("span",{className:`toolcall-chevron ${a?"is-open":""}`,children:"▸"})]}),d.length>0&&y.jsx("div",{className:"toolcall-images",children:d.map(f=>y.jsx("a",{href:e0(f),target:"_blank",rel:"noopener noreferrer",className:"toolcall-image-link",children:y.jsx("img",{src:e0(f),alt:f.split("/").pop()??"image",className:"toolcall-image",...Og})},f))}),y.jsx(yI,{open:a,children:y.jsx("div",{className:"toolcall-body",children:xI(e)})})]})}function yI({open:e,children:t}){const[n,s]=L.useState(e);L.useEffect(()=>{e&&s(!0)},[e]);const a=o=>{o.propertyName==="grid-template-rows"&&!e&&s(!1)};return y.jsx("div",{className:`collapse ${e?"is-open":""}`,onTransitionEnd:a,children:y.jsx("div",{className:"collapse-inner",children:n?t:null})})}function xI(e){switch(Cd(e)){case"shell":return bI(e);case"write":return kI(e);case"read":return SI(e);case"grep":return _I(e);case"todo":return CI(e);case"webfetch":return AI(e);case"websearch":return wI(e);case"introspect":return NI(e);default:return br(e)}}function bI(e){const t=bt(e.input),n=$e(t==null?void 0:t.command)??"",s=xr(e),a=Xr(s),o=a?$e(a.stdout)??"":Kr(s),l=a?$e(a.stderr)??"":"",d=a?String(a.exit_status??""):"",f=d!==""&&!/\b0$/.test(d);return y.jsxs(y.Fragment,{children:[n&&y.jsx(an,{code:n,lang:"bash"}),o.trim()&&y.jsx(an,{code:o,lang:"text"}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"stderr"}),y.jsx(an,{code:l,lang:"text"})]}),f&&y.jsx("div",{className:"toolcall-exit",children:d})]})}function Fg({path:e}){const t=be(l=>l.activeId),n=be(l=>{var d;return((d=l.sessions.find(f=>f.sessionId===l.activeId))==null?void 0:d.cwd)??""}),s=be(l=>l.openFilePreview),a=t?$w(n,e):null,o=a??e;return a?y.jsx("div",{className:"toolcall-file",children:y.jsx("button",{className:"toolcall-file-name",onClick:()=>s(a),title:`Preview ${e}`,children:o})}):y.jsx("div",{className:"toolcall-file",title:e,children:y.jsx("span",{className:"toolcall-file-name is-plain",children:o})})}function kI(e){const t=bt(e.input),n=$e(t==null?void 0:t.path)??"",s=f=>n?y.jsxs(y.Fragment,{children:[y.jsx(Fg,{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(y.jsx(an,{code:f,lang:Dg(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(y.jsx(t0,{diff:Jm(o,l)}));const d=Xw(e.content);return s(d?y.jsx(t0,{diff:Jm(d.oldText,d.newText)}):br(e))}function SI(e){const t=bt(e.input),n=t&&Array.isArray(t.operations)?t.operations:[],s=Kr(xr(e));if(!s.trim())return Mg(e.input).length>0?null:br(e);const a=n.map(bt).find(d=>d&&d.mode!=="Image"),o=a&&typeof a.path=="string"?a.path:"",l=(a==null?void 0:a.mode)==="Line"?Dg(o):"text";return y.jsxs(y.Fragment,{children:[o&&y.jsx(Fg,{path:o}),y.jsx(an,{code:s,lang:l})]})}function _I(e){const t=xr(e),n=Xr(t),s=n&&Array.isArray(n.results)?n.results.filter(o=>{const l=bt(o);return!!l&&(Array.isArray(l.matches)||typeof l.file=="string")}):null;if(s&&s.length>0)return y.jsx("div",{className:"grep",children:s.map((o,l)=>{const d=bt(o),f=d&&typeof d.file=="string"?d.file:"",h=d&&Array.isArray(d.matches)?d.matches.map(String):[];return y.jsxs("div",{className:"grep-file",children:[y.jsx("div",{className:"grep-fname",children:f}),y.jsx("pre",{className:"grep-matches",children:h.join(`
249
+ `)})]},l)})});const a=Kr(t);return a.trim()?y.jsx(an,{code:a,lang:"text"}):br(e)}function CI(e){const t=Jw(xr(e));return!t||t.length===0?br(e):y.jsx("div",{className:"todo",children:t.map((n,s)=>y.jsxs("div",{className:`todo-item ${n.done?"is-done":""}`,children:[y.jsx("span",{className:"todo-check","aria-hidden":!0,children:n.done?"☑":"☐"}),y.jsx("span",{className:"todo-text",children:n.desc})]},s))})}function NI(e){const t=bt(e.input),n=$e(t==null?void 0:t.query)??$e(t==null?void 0:t.doc_path),s=xr(e),a=Xr(s),o=(a?$e(a.documentation)??Nd(a):null)??Kr(s);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:n,lang:"text"})]}),o.trim()?y.jsx("div",{className:"toolcall-doc",children:y.jsx(Gs,{text:o})}):br(e)]})}function AI(e){const t=bt(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=xr(e),l=Xr(o),d=l?Nd(l)??$e(l.content)??JSON.stringify(l,null,2):Kr(o);return y.jsxs(y.Fragment,{children:[n&&y.jsxs("div",{className:"toolcall-meta",children:[y.jsx("a",{className:"toolcall-link",href:n,target:"_blank",rel:"noopener noreferrer",children:n}),s&&y.jsx("span",{className:"toolcall-tag",children:s})]}),a&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"search terms"}),y.jsx(an,{code:a,lang:"text"})]}),d.trim()?y.jsx(an,{code:d,lang:"markdown"}):br(e)]})}function vI(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=bt(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 wI(e){var a;const t=xr(e),n=vI(Xr(t));if(!n)return br(e);const s=$e((a=bt(e.input))==null?void 0:a.query);return y.jsxs(y.Fragment,{children:[s&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"query"}),y.jsx(an,{code:s,lang:"text"})]}),y.jsx("ol",{className:"websearch",children:n.map((o,l)=>y.jsxs("li",{className:"websearch-item",children:[o.url?y.jsx("a",{className:"websearch-title",href:o.url,target:"_blank",rel:"noopener noreferrer",children:o.title??o.url}):y.jsx("span",{className:"websearch-title",children:o.title??"(untitled)"}),o.url&&y.jsx("div",{className:"websearch-url",children:o.url}),o.snippet&&y.jsx("p",{className:"websearch-snippet",children:o.snippet})]},l))})]})}function br(e){const t=e.input;let n="";if(typeof t=="string")n=t;else if(bt(t)){const{__tool_use_purpose:f,...h}=bt(t);n=JSON.stringify(h,null,2)}const s=xr(e),a=Xr(s),o=a?Nd(a):null,l=o??(a?JSON.stringify(a,null,2):Kr(s)),d=o?"text":/^\s*[[{]/.test(l)?"json":"text";return y.jsxs(y.Fragment,{children:[n&&n!=="{}"&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"input"}),y.jsx(an,{code:n,lang:bt(t)?"json":"text"})]}),l.trim()&&y.jsxs("div",{className:"toolcall-section",children:[y.jsx("div",{className:"toolcall-label",children:"output"}),y.jsx(an,{code:l,lang:d})]})]})}function an({code:e,lang:t}){const[n,s]=L.useState(null);return L.useEffect(()=>{let a=!1;return _d(e,t).then(o=>!a&&s(o)).catch(()=>!a&&s(null)),()=>{a=!0}},[e,t]),n?y.jsx("div",{className:"toolcode",dangerouslySetInnerHTML:{__html:n}}):y.jsx("pre",{className:"toolcode toolcode-plain",children:e})}function t0({diff:e}){return y.jsx("div",{className:"diff-body",children:e.map((t,n)=>y.jsxs("div",{className:`diff-line diff-${t.type}`,children:[y.jsx("span",{className:"diff-sign","aria-hidden":!0,children:t.type==="add"?"+":t.type==="del"?"-":" "}),y.jsx("span",{className:"diff-code",children:t.text||" "})]},n))})}const II=L.memo(TI),LI=4,RI=300,OI=240,DI=80;function PI(e,t){if(e<=0)return{offset:0,limit:0};const n=Math.max(0,e-t);return{offset:n,limit:e-n}}function MI(e,t,n,s){const a=t-e,o=Math.max(0,s-n);return a>o+LI}class FI{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);MI(t.scrollTop,this.lastScrollTop,n,this.lastMaxTop)&&(this.follow=!1),this.lastScrollTop=t.scrollTop,this.lastMaxTop=n,this.updateButton(t),t.scrollTop<RI&&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}=PI(this.content.remainingOlder,DI);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>OI})}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 BI=700,yc=typeof window<"u"?window.matchMedia("(prefers-reduced-motion: reduce)"):null,UI=L.memo(function({onRetry:t,onRetryTurn:n}){const s=be(D=>D.items),a=be(D=>D.streamingText),o=be(D=>D.streamingThought),l=be(D=>D.pending),d=l.some(D=>D.status==="sending"),f=be(D=>D.observability.turnStatus),h=be(D=>D.observability.compacting),E=be(D=>D.activeId),g=be(D=>D.remainingOlder),x=L.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,w]=L.useState(!1);L.useEffect(()=>{if(w(!1),f!=="running")return;const D=setTimeout(()=>w(!0),BI);return()=>clearTimeout(D)},[f,a,o,s.length]);const O=L.useRef(null),[A,F]=L.useState({loadingOlder:!1,showScrollButton:!1}),z=L.useRef(null);z.current||(z.current=new FI({element:()=>O.current,fetchPage:(D,q,Z)=>dt.transcriptPage(D,q,Z).then(oe=>oe.items),prepend:D=>be.getState().prependItems(D),onFlags:F,reducedMotion:()=>(yc==null?void 0:yc.matches)??!1}));const G=z.current;L.useEffect(()=>(G.reset(),()=>G.dispose()),[E,G]),L.useEffect(()=>{G.onContent({sessionId:E,itemCount:s.length,pendingCount:l.length,remainingOlder:g})},[s,a,o,l,E,h,g,G]),L.useLayoutEffect(()=>{G.restoreAnchor()},[s,G]);const ne=s.length===0&&!a&&!o&&l.length===0;return y.jsxs("div",{className:"transcript-wrap",children:[A.loadingOlder&&y.jsxs("div",{className:"loading-older",role:"status",children:[y.jsx(Wr,{size:14}),y.jsx("span",{children:"Loading earlier messages…"})]}),y.jsxs("div",{className:"transcript",ref:O,onScroll:()=>G.onScroll(),children:[ne&&y.jsxs("div",{className:"transcript-empty",children:[y.jsx("p",{className:"empty-title",children:"Casper is here."}),y.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"?y.jsx(n0,{text:D.message.text},D.message.id):y.jsx("div",{className:`msg msg-${D.message.role}`,children:D.message.role==="assistant"?y.jsx(Gs,{text:D.message.text}):y.jsxs(y.Fragment,{children:[E&&D.message.imagePaths&&D.message.imagePaths.length>0&&y.jsx("div",{className:"msg-images",children:D.message.imagePaths.map(q=>y.jsx("a",{href:dt.attachmentUrl(E,q),target:"_blank",rel:"noopener noreferrer",className:"msg-image-link",children:y.jsx("img",{src:dt.attachmentUrl(E,q),alt:q.split("/").pop()??"image",className:"msg-image",...Og})},q))}),D.message.text&&y.jsx("div",{className:"msg-user-text",children:D.message.text})]})},D.message.id):D.type==="tool_call"?y.jsx(II,{tool:D.tool,arriving:b(D.tool.id)},D.tool.id):D.type==="turn_error"?y.jsx(HI,{message:D.message,onRetry:n},D.id):y.jsx(jI,{summary:D.summary},D.id)),l.map(D=>y.jsxs("div",{className:`msg msg-user msg-pending ${D.status==="failed"?"is-failed":""}`,children:[y.jsx("div",{className:"msg-user-text",children:D.text}),D.status==="failed"&&y.jsxs("div",{className:"msg-failed",children:[y.jsx("span",{className:"msg-failed-why",children:D.error??"Failed to send."}),y.jsx("button",{className:"msg-retry",onClick:()=>t(D.id,D.text),children:"Retry"})]})]},D.id)),o&&y.jsx(n0,{text:o,live:!0}),a&&y.jsx("div",{className:"msg msg-assistant",children:y.jsx(Gs,{text:a,streaming:!0})}),(f==="running"||d)&&(N||!a&&!o)&&y.jsxs("div",{className:"thinking",children:[y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"}),y.jsx("span",{className:"thinking-dot"})]}),h&&y.jsx("div",{className:"compaction compaction-live",children:y.jsx("div",{className:"compaction-rule",children:y.jsxs("span",{className:"compaction-head",children:[y.jsx(Wr,{size:13,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Compacting conversation…"})]})})})]}),A.showScrollButton&&y.jsx("button",{className:"scroll-to-bottom",onClick:()=>G.jumpToLatest(),"aria-label":"Scroll to latest",title:"Scroll to latest",children:y.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:y.jsx("polyline",{points:"6 9 12 15 18 9"})})})]})});function n0({text:e,live:t=!1}){const[n,s]=L.useState(!1);return y.jsxs("div",{className:`thought ${t?"is-live":""}`,children:[y.jsxs("button",{className:"thought-head",onClick:()=>s(a=>!a),children:[y.jsx("span",{className:"thought-chevron",children:n?"▾":"▸"}),y.jsx("span",{className:`thought-label ${t?"is-live":""}`,children:"Thinking"})]}),n&&y.jsx("div",{className:"thought-body",children:y.jsx("div",{className:"thought-text",children:e})})]})}function HI({message:e,onRetry:t}){const[n,s]=L.useState(!1),[a,o]=L.useState(!1),l=I0(e),d=be(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 y.jsxs("div",{className:"sysnote",children:[y.jsx("div",{className:"sysnote-rule",children:y.jsxs("button",{className:"sysnote-head",onClick:()=>s(h=>!h),"aria-expanded":n,children:[y.jsx("span",{"aria-hidden":!0,children:"⚠"}),y.jsx("span",{className:"sysnote-label",children:l.title}),y.jsx("span",{className:"sysnote-toggle",children:n?"Hide details":"Show details"})]})}),n&&y.jsxs("div",{className:"sysnote-body",children:[l.fix&&y.jsx("p",{className:"sysnote-fix",children:l.fix}),y.jsx("pre",{className:"sysnote-raw",children:e}),y.jsxs("div",{className:"sysnote-actions",children:[t&&d&&y.jsx("button",{className:"btn-sm is-danger",onClick:()=>t(d),children:"Retry turn"}),y.jsx("button",{className:"btn-sm",onClick:f,children:a?"Copied":"Copy details"})]})]})]})}function jI({summary:e}){const[t,n]=L.useState(!1);return y.jsxs("div",{className:"compaction",children:[y.jsx("div",{className:"compaction-rule",children:y.jsxs("button",{className:"compaction-head",onClick:()=>n(s=>!s),"aria-expanded":t,children:[y.jsx(nx,{size:14,className:"compaction-icon"}),y.jsx("span",{className:"compaction-label",children:"Conversation compacted"}),y.jsx("span",{className:"compaction-toggle",children:t?"Hide summary":"Show summary"})]})}),t&&y.jsx("div",{className:"compaction-body",children:y.jsx(Gs,{text:e})})]})}function zI({value:e,onChange:t,label:n="Working directory",placeholder:s="leave blank for server default",hint:a="A folder that doesn't exist yet will be created.",autoFocus:o=!1}){const[l,d]=L.useState([]),[f,h]=L.useState(!1),[E,g]=L.useState(null),x=L.useRef("");L.useEffect(()=>{const O=e;x.current=O;const A=setTimeout(()=>{dt.listDirs(O).then(F=>{x.current===O&&(d(F.entries),g({path:F.target,kind:F.targetKind}))}).catch(()=>{x.current===O&&(d([]),g(null))})},150);return()=>clearTimeout(A)},[e]);const b=e.trim()!=="",N=b&&(E==null?void 0:E.kind)==="missing",w=b&&(E==null?void 0:E.kind)==="file";return y.jsxs("label",{className:"picker cwd-field",children:[y.jsx("span",{className:"picker-label",children:n}),y.jsx("input",{className:"picker-input",value:e,placeholder:s,autoComplete:"off",spellCheck:!1,autoFocus:o,onFocus:()=>h(!0),onChange:O=>{t(O.target.value),h(!0)},onBlur:()=>setTimeout(()=>h(!1),120)}),f&&l.length>0&&y.jsx("div",{className:"cwd-suggestions",children:l.map(O=>y.jsx("button",{type:"button",className:"cwd-suggestion",onMouseDown:A=>A.preventDefault(),onClick:()=>{t(O),d([])},children:O},O))}),N&&y.jsxs("span",{className:"picker-hint cwd-will-create",children:["Doesn't exist yet - this folder will be created: ",y.jsx("code",{children:E.path})]}),w&&y.jsxs("span",{className:"picker-hint cwd-is-file",children:["That path is a file, not a folder: ",y.jsx("code",{children:E.path})]}),!N&&!w&&y.jsx("span",{className:"picker-hint",children:a})]})}function $I({sessionId:e,currentCwd:t,onChanged:n,onClose:s}){const[a,o]=L.useState(t??""),[l,d]=L.useState(!1),[f,h]=L.useState(null),E=async()=>{const g=a.trim();if(!(!g||l)){d(!0),h(null);try{const x=await dt.setSessionCwd(e,g);n(x.cwd),s()}catch(x){h(x.message)}finally{d(!1)}}};return y.jsx("div",{className:"sheet-backdrop",onClick:s,children:y.jsxs("div",{className:"sheet",onClick:g=>g.stopPropagation(),children:[y.jsx("div",{className:"sheet-handle"}),y.jsx("h2",{className:"sheet-title",children:"Change working directory"}),y.jsx(zI,{value:a,onChange:o,placeholder:"/path/to/folder",hint:"The session keeps its transcript. A folder that doesn't exist yet will be created.",autoFocus:!0}),f&&y.jsx("div",{className:"sheet-error",children:f}),y.jsxs("div",{className:"sheet-actions",children:[y.jsx("button",{className:"btn-ghost",onClick:s,disabled:l,children:"Cancel"}),y.jsx("button",{className:"btn-primary",onClick:E,disabled:l||!a.trim(),children:l?"Saving…":"Change folder"})]})]})})}function WI(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function YI({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 y.jsx(Rp,{size:15,className:"ftree-icon-svg ftree-icon-code"});case"json":case"yaml":case"yml":case"toml":case"ini":case"env":case"lock":return y.jsx(G2,{size:15,className:"ftree-icon-svg ftree-icon-config"});case"md":case"txt":case"rst":case"log":case"csv":return y.jsx(K2,{size:15,className:"ftree-icon-svg ftree-icon-text"});case"css":case"scss":case"less":case"sass":return y.jsx(J2,{size:15,className:"ftree-icon-svg ftree-icon-style"});case"html":case"svg":case"xml":return y.jsx(Rp,{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 y.jsx(X2,{size:15,className:"ftree-icon-svg ftree-icon-image"});case"sh":case"bash":case"zsh":case"fish":case"bat":case"ps1":return y.jsx(Z2,{size:15,className:"ftree-icon-svg ftree-icon-terminal"});default:return y.jsx(Q2,{size:15,className:"ftree-icon-svg"})}}function Bg({entry:e,sessionId:t,depth:n,onPreview:s,onExpanded:a}){const o=be(g=>g.fsVersion[e.path]??0),[l,d]=L.useState({expanded:!1,children:null,loading:!1});L.useEffect(()=>{if(e.type==="directory")return a(e.path,l.expanded),()=>a(e.path,!1)},[e.path,e.type,l.expanded,a]),L.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=L.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=L.useCallback(()=>{e.type==="file"&&s(e)},[e,s]),E=n*16;return e.type==="directory"?y.jsxs(y.Fragment,{children:[y.jsxs("button",{className:"ftree-row ftree-dir",onClick:f,style:{paddingLeft:`${E+8}px`},children:[y.jsx("span",{className:`ftree-chevron ${l.expanded?"is-open":""}`,children:l.loading?y.jsx(Wr,{size:12}):y.jsx(D0,{size:12,className:"ftree-chevron-icon"})}),y.jsx("span",{className:"ftree-icon",children:l.expanded?y.jsx(q2,{size:15,className:"ftree-icon-svg ftree-icon-folder"}):y.jsx(B0,{size:15,className:"ftree-icon-svg ftree-icon-folder"})}),y.jsx("span",{className:"ftree-name",children:e.name})]}),l.expanded&&l.children&&y.jsxs("div",{className:"ftree-children",children:[l.children.map(g=>y.jsx(Bg,{entry:g,sessionId:t,depth:n+1,onPreview:s,onExpanded:a},g.path)),l.children.length===0&&y.jsx("div",{className:"ftree-empty",style:{paddingLeft:`${E+24}px`},children:"Empty"})]})]}):y.jsxs("div",{className:"ftree-row ftree-file",style:{paddingLeft:`${E+8}px`},onClick:h,children:[y.jsx("span",{className:"ftree-chevron ftree-chevron-spacer","aria-hidden":"true"}),y.jsx("span",{className:"ftree-icon",children:y.jsx(YI,{name:e.name})}),y.jsx("span",{className:"ftree-name",children:e.name}),e.size!=null&&y.jsx("span",{className:"ftree-size",children:WI(e.size)})]})}function VI({sessionId:e,onClose:t}){var D;const[n,s]=L.useState([]),[a,o]=L.useState(""),[l,d]=L.useState(!0),[f,h]=L.useState(null),[E,g]=L.useState(!1),x=be(q=>q.sessions),b=be(q=>q.setWatchedPaths),N=be(q=>q.fsVersion[""]??0),w=L.useRef(new Set),O=be(q=>q.setSessions),A=be(q=>q.openFilePreview),F=(D=x.find(q=>q.sessionId===e))==null?void 0:D.cwd,z=L.useCallback(()=>{b(["",...w.current])},[b]),G=L.useCallback((q,Z)=>{const oe=w.current;Z!==oe.has(q)&&(Z?oe.add(q):oe.delete(q),z())},[z]);L.useEffect(()=>(z(),()=>b([])),[z,b]);const ne=L.useCallback(async(q=!1)=>{q||d(!0),h(null);try{const Z=await dt.tree(e);s(Z.entries),o(Z.cwd)}catch(Z){h(Z.message)}finally{q||d(!1)}},[e]);return L.useEffect(()=>{ne()},[ne]),L.useEffect(()=>{N&&ne(!0)},[N]),y.jsxs("div",{className:"ftree-panel",children:[y.jsxs("div",{className:"ftree-header",children:[y.jsx("span",{className:"ftree-title",title:a,children:"Files"}),y.jsx("button",{className:"ftree-refresh",onClick:()=>g(!0),title:"Change working directory","aria-label":"Change working directory",children:y.jsx(B0,{size:14})}),t&&y.jsx("button",{className:"ftree-close",onClick:t,title:"Close file tree","aria-label":"Close file tree",children:y.jsx(P0,{size:15})})]}),a&&y.jsx("div",{className:"ftree-cwd",title:a,children:a}),y.jsxs("div",{className:"ftree-list",children:[l&&n.length===0&&y.jsx("div",{className:"ftree-loading",children:"Loading…"}),f&&y.jsxs("div",{className:"ftree-error",children:[f,y.jsx("button",{className:"ftree-repoint",onClick:()=>g(!0),children:"Change folder…"})]}),!l&&!f&&n.length===0&&y.jsx("div",{className:"ftree-empty",children:"No files"}),!f&&n.map(q=>y.jsx(Bg,{entry:q,sessionId:e,depth:0,onPreview:Z=>A(Z.path),onExpanded:G},q.path))]}),E&&y.jsx($I,{sessionId:e,currentCwd:a||F,onChanged:q=>{O(x.map(Z=>Z.sessionId===e?{...Z,cwd:q}:Z)),ne()},onClose:()=>g(!1)})]})}const qI=new Set(["png","jpg","jpeg","gif","webp","svg","bmp","ico","avif"]);function QI(e){const t=e.toLowerCase(),n=t.lastIndexOf("."),s=n>0?t.slice(n+1):"";return qI.has(s)?"image":s==="pdf"?"pdf":s==="html"||s==="htm"?"html":s==="md"||s==="markdown"?"markdown":"text"}const GI={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 KI(e){const t=e.toLowerCase();if(t==="dockerfile")return"dockerfile";if(t==="makefile")return"make";const n=t.split(".").pop()??"";return GI[n]??""}const xc=e=>e.split("/").pop()||e;function XI({preview:e,sessionId:t,onClose:n}){const[s,a]=L.useState(!1),[o,l]=L.useState({}),d=()=>{window.open(dt.downloadUrl(t,e.path),"_blank")},f=b=>{b.target===b.currentTarget&&n()};L.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 y.jsx("div",{className:"fpreview-backdrop",onClick:f,children:y.jsxs("div",{className:`fpreview-modal${s?" fpreview-full":""}`,children:[y.jsxs("div",{className:"fpreview-header",children:[E&&!e.error&&y.jsxs("div",{className:"fpreview-seg",role:"group","aria-label":"Preview mode",children:[y.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:y.jsx(rx,{size:17})}),y.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:y.jsx(ix,{size:17})})]}),y.jsx("span",{className:"fpreview-name",title:e.path,children:e.name}),y.jsx("button",{className:"fpreview-dl",onClick:d,title:"Download file","aria-label":"Download file",children:y.jsx(ex,{size:18})}),y.jsx("button",{className:"fpreview-full-btn",onClick:()=>a(b=>!b),title:s?"Exit fullscreen":"Fullscreen","aria-label":s?"Exit fullscreen":"Fullscreen",children:s?y.jsx(ax,{size:18}):y.jsx(sx,{size:18})}),y.jsx("button",{className:"fpreview-close",onClick:n,"aria-label":"Close preview",children:y.jsx(P0,{size:18})})]}),y.jsxs("div",{className:"fpreview-body",children:[e.loading&&y.jsx("div",{className:"fpreview-loading",children:y.jsx(Wr,{size:48})}),e.error&&y.jsx("div",{className:"ftree-error",children:e.error}),!e.loading&&!e.error&&e.kind==="image"&&y.jsx("img",{src:dt.previewUrl(t,e.path),alt:e.name,className:"fpreview-image"}),!e.error&&e.kind==="pdf"&&y.jsx("iframe",{src:dt.previewUrl(t,e.path),title:e.name,className:"fpreview-pdf"}),!e.error&&e.kind==="html"&&g&&y.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&&y.jsx("div",{className:"fpreview-md",children:y.jsx(Gs,{text:e.content,html:!0})}),!e.loading&&!e.error&&x&&e.highlightedHtml&&y.jsx("div",{className:"fpreview-highlighted",dangerouslySetInnerHTML:{__html:e.highlightedHtml}}),!e.loading&&!e.error&&x&&!e.highlightedHtml&&e.content!==null&&y.jsx("pre",{className:"fpreview-code",children:e.content})]})]})})}function JI(){const e=be(l=>l.previewPath),t=be(l=>l.activeId),n=be(l=>l.closeFilePreview),[s,a]=L.useState(null),o=L.useCallback(()=>n(),[n]);return L.useEffect(()=>{if(!e||!t){a(null);return}let l=!1;const d=QI(xc(e)),f=d!=="image"&&d!=="pdf";if(a({path:e,name:xc(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=KI(xc(e));if(!g)return;const x=await _d(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:$u.createPortal(y.jsx(XI,{preview:s,sessionId:t,onClose:o}),document.body)}function Ug({ariaLabel:e,value:t,options:n,onChange:s}){const[a,o]=L.useState(!1),[l,d]=L.useState(0),f=L.useRef(null),h=n.find(x=>x.value===t);L.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]),L.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 y.jsxs("div",{className:"dd",ref:f,children:[y.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:[y.jsx("span",{className:"dd-value",children:(h==null?void 0:h.label)??t??"Select…"}),y.jsx(D0,{size:13,className:"dd-chevron"})]}),a&&y.jsx("div",{className:"dd-panel",role:"listbox",children:n.map((x,b)=>y.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:[y.jsx("span",{className:"dd-check",children:x.value===t&&y.jsx(W2,{size:15})}),y.jsx("span",{className:"dd-option-label",children:x.label}),x.hint&&y.jsx("span",{className:"dd-option-hint",children:x.hint})]},x.value))})]})}function ZI({value:e,onChange:t}){var a;const n=be(o=>o.models),s=e??((a=n.find(o=>o.isDefault))==null?void 0:a.modelId);return y.jsx(Ug,{ariaLabel:"Model",value:s,onChange:t,options:n.map(o=>({value:o.modelId,label:o.modelName,hint:`${o.rateMultiplier}x`}))})}function e6({value:e,onChange:t}){const n=be(d=>d.modes),s=be(d=>d.agents),a=be(d=>d.defaultAgentId),o=n.length>0?n:s,l=e??a;return y.jsx(Ug,{ariaLabel:"Agent",value:l,onChange:t,options:o.map(d=>({value:d.id,label:d.name}))})}const pn=18,jc=2.5,zc=(pn-jc)/2,r0=2*Math.PI*zc;function t6(e){return e>85?"var(--aurora-red)":e>60?"var(--aurora-orange)":"var(--frost)"}const i0=new Intl.NumberFormat;function n6({onCompact:e}){var w;const t=be(O=>O.observability.contextUsagePercentage),n=be(O=>O.observability.compacting),s=be(O=>O.observability.turnStatus),a=be(O=>O.activeId),o=be(O=>O.currentModelId),l=be(O=>O.models),[d,f]=L.useState(!1),h=L.useRef(null);L.useEffect(()=>{if(!d)return;const O=F=>{h.current&&!h.current.contains(F.target)&&f(!1)},A=F=>{F.key==="Escape"&&f(!1)};return document.addEventListener("mousedown",O),document.addEventListener("keydown",A),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",A)}},[d]);const E=Math.max(0,Math.min(100,t)),g=t6(E),x=E/100*r0,b=(w=l.find(O=>O.modelId===o))==null?void 0:w.contextWindowTokens,N=b?Math.round(E/100*b):void 0;return a?y.jsxs("div",{className:"ctx",ref:h,children:[y.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:y.jsx("svg",{width:pn,height:pn,viewBox:`0 0 ${pn} ${pn}`,"aria-hidden":!0,children:y.jsxs("g",{transform:`rotate(-90 ${pn/2} ${pn/2})`,children:[y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:"var(--n2)",strokeWidth:jc}),y.jsx("circle",{cx:pn/2,cy:pn/2,r:zc,fill:"none",stroke:g,strokeWidth:jc,strokeLinecap:"round",strokeDasharray:`${x} ${r0-x}`})]})})}),d&&y.jsxs("div",{className:"ctx-pop",role:"dialog","aria-label":"Context usage",children:[y.jsxs("div",{className:"ctx-pop-head",children:[y.jsx("span",{className:"ctx-pop-title",children:"Context used"}),y.jsxs("span",{className:"ctx-pop-pct",style:{color:g},children:[E.toFixed(1),"%"]})]}),y.jsx("div",{className:"ctx-pop-bar",children:y.jsx("span",{className:"ctx-pop-bar-fill",style:{width:`${E}%`,background:g}})}),b?y.jsxs("dl",{className:"ctx-pop-rows",children:[y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Used"}),y.jsxs("dd",{children:[i0.format(N??0)," tokens"]})]}),y.jsxs("div",{className:"ctx-pop-row",children:[y.jsx("dt",{children:"Window"}),y.jsxs("dd",{children:[i0.format(b)," tokens"]})]})]}):y.jsx("p",{className:"ctx-pop-note",children:"Token counts need a selected model’s window size."}),y.jsx("button",{type:"button",className:"ctx-pop-compact",disabled:!a||n||s!=="idle",onClick:()=>{f(!1),e()},children:n?"Compacting…":"Compact conversation"})]})]}):null}const r6={closed:"Offline - reconnecting when possible",reconnecting:"Reconnecting…",resyncing:"Resyncing…"};function i6(e){return e.live?e.uploading?"Uploading…":e.cancelling?"Stopping…":e.compacting?"Compacting conversation…":e.running?"Casper is working…":"Ask Casper to build something…":r6[e.connStatus]??"Connecting…"}const s0=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml"]);function s6({sessionId:e,onSend:t,onCancel:n,onCompact:s,onChangeModel:a,onChangeAgent:o,connStatus:l,draft:d}){const[f,h]=L.useState(""),[E,g]=L.useState([]),[x,b]=L.useState(!1),[N,w]=L.useState(null),O=be(S=>S.observability.turnStatus),A=be(S=>S.observability.compacting),F=be(S=>S.currentModeId),z=be(S=>S.currentModelId),G=O==="running",ne=O==="cancelling",D=d||l==="connected",q=L.useRef(null),Z=L.useRef(null),oe=S=>new Promise((M,Y)=>{const v=new FileReader;v.onload=()=>M(v.result.split(",")[1]??""),v.onerror=()=>Y(new Error("Failed to read file")),v.readAsDataURL(S)}),$=L.useCallback(()=>{const S=Z.current;S&&(S.style.height="auto",S.style.height=`${Math.min(S.scrollHeight,200)}px`)},[]);L.useEffect(()=>{$()},[f,$]);const le=L.useCallback(S=>{const M=S.map(Y=>{const v=s0.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,...M])},[]),ce=async(S,M,Y)=>{const v=[];S.length>0&&v.push({type:"text",text:Lu+S.map(he=>he.path).join(", ")+`
250
+ `});for(let he=0;he<S.length;he++){const _e=S[he],xe=M[he];if(_e){if(_e.kind==="image"&&xe)try{const Be=await oe(xe.file);v.push({type:"image",data:Be,mimeType:xe.file.type})}catch{}else if(_e.kind==="text"&&xe)try{const Be=await xe.file.text();v.push({type:"text",text:`[File: ${_e.path}]
251
+ \`\`\`
252
+ ${Be}
253
+ \`\`\``})}catch{}}}return Y&&v.push({type:"text",text:Y}),v},Ce=async()=>{const S=f.trim();if(!S&&E.length===0||G||ne||A||!D||x)return;let M=[];const Y=E;if(Y.length>0){if(!e){w("No active session to upload to.");return}b(!0),w(null);try{M=(await dt.uploadFiles(e,Y.map(_e=>_e.file))).files}catch(he){w(he.message),b(!1);return}b(!1)}const v=await ce(M,Y,S);v.length!==0&&(t(v),h(""),Y.forEach(he=>he.previewUrl&&URL.revokeObjectURL(he.previewUrl)),g([]),requestAnimationFrame(()=>{Z.current&&(Z.current.style.height="auto")}))},fe=S=>{S.key==="Enter"&&!S.shiftKey&&(S.preventDefault(),Ce())},re=L.useCallback(S=>{var v;const M=(v=S.clipboardData)==null?void 0:v.items;if(!M)return;const Y=[];for(const he of Array.from(M))if(he.kind==="file"&&s0.has(he.type)){const _e=he.getAsFile();_e&&Y.push(_e)}Y.length>0&&(S.preventDefault(),le(Y))},[le]),ve=S=>{S.target.files&&le(Array.from(S.target.files)),S.target.value=""},Ie=S=>{g(M=>{const Y=M.find(v=>v.id===S);return Y!=null&&Y.previewUrl&&URL.revokeObjectURL(Y.previewUrl),M.filter(v=>v.id!==S)})};L.useEffect(()=>()=>{g(S=>(S.forEach(M=>M.previewUrl&&URL.revokeObjectURL(M.previewUrl)),S))},[]);const ae=i6({live:D,connStatus:l,uploading:x,cancelling:ne,compacting:A,running:G}),Ee=(f.trim()||E.length>0)&&!G&&!ne&&!A&&!x&&D;return y.jsxs("div",{className:"composer",children:[N&&y.jsx("div",{className:"composer-error",children:N}),E.length>0&&y.jsx("div",{className:"composer-attachments",children:E.map(S=>y.jsxs("div",{className:"composer-att",children:[S.isImage&&S.previewUrl?y.jsx("img",{src:S.previewUrl,alt:S.file.name,className:"composer-att-img"}):y.jsxs("div",{className:"composer-att-file",title:S.file.name,children:[y.jsx("span",{className:"composer-att-file-icon",children:"📄"}),y.jsx("span",{className:"composer-att-file-name",children:S.file.name})]}),y.jsx("button",{className:"composer-att-remove",onClick:()=>Ie(S.id),"aria-label":`Remove ${S.file.name}`,children:"×"})]},S.id))}),y.jsxs("div",{className:"composer-box",children:[y.jsx("textarea",{ref:Z,className:"composer-input",value:f,onChange:S=>h(S.target.value),onKeyDown:fe,onPaste:re,placeholder:ae,rows:1}),y.jsxs("div",{className:"composer-actions",children:[y.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:y.jsx(M0,{size:18})}),y.jsxs("div",{className:"composer-actions-right",children:[y.jsx(n6,{onCompact:s}),y.jsx(e6,{value:F,onChange:o}),y.jsx(ZI,{value:z,onChange:a}),G?y.jsx("button",{className:"composer-btn composer-stop",onClick:n,title:"Stop","aria-label":"Stop",children:y.jsx(Lp,{size:15})}):ne?y.jsx("button",{className:"composer-btn composer-stop",disabled:!0,title:"Stopping…","aria-label":"Stopping",children:y.jsx(Lp,{size:15})}):y.jsx("button",{className:"composer-btn composer-send",onClick:Ce,disabled:!Ee,title:x?"Uploading…":"Send","aria-label":x?"Uploading":"Send",children:x?y.jsx(Wr,{size:15}):y.jsx(V2,{size:17})})]})]})]}),y.jsx("input",{ref:q,type:"file",multiple:!0,onChange:ve,className:"composer-file-input"})]})}const a6={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 u6({status:e}){const{cls:t,label:n}=a6[e];return y.jsxs("span",{className:`conndot conndot-${t}`,children:[y.jsx("span",{className:"conndot-blip"}),y.jsx("span",{className:"conndot-label",children:n})]})}function o6({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}){const w=be(oe=>{var $;return($=oe.sessions.find(le=>le.sessionId===oe.activeId))==null?void 0:$.title}),O=be(oe=>e&&oe.pending.length===0&&oe.items.length===0),A=be(oe=>oe.activeId),F=be(oe=>oe.sessionNotice),z=be(oe=>oe.dismissSessionNotice),[G,ne]=L.useState(!1);if(L.useEffect(()=>{ne(!1)},[A]),t)return y.jsxs("main",{className:"chatpane",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Jl,{size:20})}),y.jsx("span",{className:"chat-title",children:"Opening session…"})]}),y.jsx("div",{className:"chat-blank",children:y.jsx(Wr,{size:48,className:"chat-spinner"})})]});if(s)return y.jsxs("main",{className:"chatpane",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Jl,{size:20})}),y.jsx("span",{className:"chat-title",children:"New session"})]}),y.jsxs("div",{className:"chat-blank",children:[y.jsx("p",{className:"chat-blank-title",children:"Couldn't start the session"}),y.jsx("p",{className:"chat-blank-sub",children:s}),y.jsxs("div",{className:"chat-error-actions",children:[y.jsx("button",{className:"btn-primary",onClick:a,children:"Try again"}),y.jsx("button",{className:"btn-ghost",onClick:o,children:"Back to sessions"})]})]})]});const D=y.jsxs("div",{className:"composer-wrap",children:[F&&y.jsxs("div",{className:"notice-banner",role:"alert",children:[y.jsx("span",{className:"notice-icon","aria-hidden":!0,children:"⚠"}),y.jsxs("div",{className:"notice-text",children:[y.jsx("p",{className:"notice-title",children:F.title}),F.fix&&y.jsx("p",{className:"notice-sub",children:F.fix})]}),y.jsx("button",{className:"notice-x",onClick:z,"aria-label":"Dismiss",children:"×"})]}),y.jsx(s6,{sessionId:A,onSend:f,onCancel:g,onCompact:N,onChangeModel:x,onChangeAgent:b,connStatus:n,draft:e})]}),q=y.jsxs("div",{className:"chat-draft",children:[y.jsxs("div",{className:"draft-hero",children:[y.jsx("img",{className:"draft-logo",src:"/logo.svg",alt:""}),y.jsx("h1",{className:"draft-title",children:"Casper"})]}),D]}),Z=y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"chat-body",children:y.jsx(UI,{onRetry:h,onRetryTurn:E})}),D]});return y.jsxs("main",{className:`chatpane chatpane-split ${G?"has-tree":""}`,children:[y.jsxs("div",{className:"chat-col",children:[y.jsxs("header",{className:"chat-head",children:[y.jsx("button",{className:"navbtn",onClick:d,"aria-label":l?"Hide sessions":"Show sessions","aria-expanded":l,children:y.jsx(Jl,{size:20})}),!e&&y.jsx("span",{className:"chat-title",title:w,children:w??"Session"}),!e&&y.jsx(u6,{status:n}),!e&&y.jsx("button",{className:`ftree-toggle ${G?"is-active":""}`,onClick:()=>ne(oe=>!oe),title:"Toggle file tree","aria-label":"Toggle file tree","aria-pressed":G,children:y.jsx(tx,{size:18})})]}),O?q:Z]}),A&&y.jsxs("aside",{className:`ftree-aside ${G?"is-open":""}`,children:[G&&y.jsx(VI,{sessionId:A,onClose:()=>ne(!1)}),y.jsx(JI,{})]}),A&&G&&y.jsx("div",{className:"ftree-backdrop",onClick:()=>ne(!1),"aria-hidden":!0})]})}function l6({onReady:e}){const[t,n]=L.useState(""),[s,a]=L.useState(null),[o,l]=L.useState(!1),d=async()=>{l(!0),a(null);try{await O2(t.trim()),e()}catch(f){a(f.message)}finally{l(!1)}};return y.jsxs("div",{className:"gate",children:[y.jsx("img",{className:"gate-logo",src:"/logo.svg",alt:""}),y.jsx("h1",{className:"gate-title",children:"Casper"}),y.jsx("p",{className:"gate-sub",children:"Enter your access token to continue."}),y.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&&y.jsx("p",{className:"gate-error",children:s}),y.jsx("button",{className:"btn-primary gate-btn",onClick:d,disabled:o,children:o?"Checking…":"Continue"}),y.jsxs("p",{className:"gate-hint",children:["Don't have it? On the machine running Casper, run ",y.jsx("code",{children:"casper token"}),"."]})]})}const a0=768;function c6(){const[e,t]=L.useState("checking");return L.useEffect(()=>{e==="checking"&&dt.listSessions().then(n=>{be.getState().setSessions(n.sessions),t("ready")}).catch(()=>t("gate"))},[e]),e==="checking"?y.jsx("div",{className:"app-splash"}):e==="gate"?y.jsx(l6,{onReady:()=>t("ready")}):y.jsx(h2,{children:y.jsxs($y,{children:[y.jsxs(Os,{element:y.jsx(d6,{onLock:()=>t("gate")}),children:[y.jsx(Os,{index:!0,element:null}),y.jsx(Os,{path:"sessions/:sessionId",element:null})]}),y.jsx(Os,{path:"*",element:y.jsx(jy,{to:"/",replace:!0})})]})})}function d6({onLock:e}){var O;const t=be(A=>A.sessions),n=be(A=>A.activeId),s=be(A=>A.loadingSessionId),a=be(A=>A.connStatus),o=be(A=>A.createError),l=be(A=>A.watchedPaths),d=Qc(),f=((O=Ny(H2))==null?void 0:O.params.sessionId)??null,E=f==="new"||!f&&n===null,g=E?null:f;L.useEffect(()=>{it.attach({navigate:d,onLock:e})},[d,e]),L.useEffect(()=>{it.loadPickers(),be.getState().sessions.length===0&&it.refreshSessions()},[]),L.useEffect(()=>{it.syncRoute(g,E)},[g,E]),L.useEffect(()=>{a==="connected"&&it.watchPaths(l)},[l,a]);const x=L.useCallback(()=>{D2(),it.lock()},[]),[b,N]=L.useState(()=>window.innerWidth>a0),w=L.useCallback(()=>{window.innerWidth<=a0&&N(!1)},[]);return y.jsxs("div",{className:`layout ${b?"nav-open":""}`,children:[y.jsx(px,{sessions:t,activeId:n,loadingId:s,onOpen:A=>{it.markLoading(A),w()},onNew:()=>{it.startDraft(),w()},onDelete:A=>void it.deleteSession(A),onRename:(A,F)=>void it.renameSession(A,F),onLock:x}),b&&y.jsx("button",{className:"nav-scrim","aria-label":"Close session panel",onClick:()=>N(!1)}),y.jsx(o6,{navOpen:b,onToggleNav:()=>N(A=>!A),isDraft:E,loadingSessionId:s,connStatus:a,createError:o,onRetryCreate:()=>it.retryCreate(),onDismissError:()=>it.dismissCreateError(),onSend:A=>it.send(A),onRetry:(A,F)=>it.retrySend(A,F),onRetryTurn:A=>it.retryTurn(A),onCancel:()=>it.cancel(),onChangeModel:A=>it.changeModel(A),onChangeAgent:A=>it.changeAgent(A),onCompact:()=>it.compact()})]})}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(()=>{})}$T.createRoot(document.getElementById("root")).render(y.jsx(Rs.StrictMode,{children:y.jsx(c6,{})}));export{WS as S,Sc as _,Gu as c,$c as g,cN as h,dN as s,x1 as v,jr as w};